okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=74523396f4383d12fb435a3f5c503e15f5a07201

commit 74523396f4383d12fb435a3f5c503e15f5a07201
Author: Stephen Houston <smhousto...@gmail.com>
Date:   Wed Oct 11 09:30:37 2017 -0500

    Ephoto: Don't pack the directory browser twice.
---
 src/bin/ephoto_main.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 268e0c9..1c0a787 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -272,8 +272,11 @@ _folder_icon_clicked(void *data, Evas_Object *obj,
 
    if (!ephoto->folders_toggle)
      {
-        evas_object_show(ephoto->dir_browser);
-        elm_box_pack_start(ephoto->layout, ephoto->dir_browser);
+        if (!evas_object_visible_get(ephoto->dir_browser))
+          {
+             evas_object_show(ephoto->dir_browser);
+             elm_box_pack_start(ephoto->layout, ephoto->dir_browser);
+          }
         ephoto->folders_toggle = EINA_TRUE;
         ret = elm_icon_standard_set(ephoto->folders_icon, "folder-open");
         if (!ret)
@@ -331,8 +334,11 @@ ephoto_show_folders(Ephoto *ephoto, Eina_Bool toggle)
 
    if (!ephoto->folders_toggle || !toggle)
      {
-        evas_object_show(ephoto->dir_browser);
-        elm_box_pack_start(ephoto->layout, ephoto->dir_browser);
+        if (!evas_object_visible_get(ephoto->dir_browser))
+          {
+             evas_object_show(ephoto->dir_browser);
+             elm_box_pack_start(ephoto->layout, ephoto->dir_browser);
+          }
         ephoto->folders_toggle = EINA_TRUE;
         ret = elm_icon_standard_set(ephoto->folders_icon, "folder-open");
         if (!ret)

-- 


Reply via email to