okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=5d94c9529ad0717bcab72f24a995290f6579586a

commit 5d94c9529ad0717bcab72f24a995290f6579586a
Author: Stephen okra Houston <[email protected]>
Date:   Mon Aug 29 11:11:50 2016 -0500

    Ephoto: Update label for config directory setting. Fix crash while changing 
directories in single view.
    
    Fixes https://phab.enlightenment.org/T4440
    Maniphest Tasks: https://phab.enlightenment.org/T4440
---
 src/bin/ephoto_config.c         |  2 +-
 src/bin/ephoto_single_browser.c | 18 ++++--------------
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index d568ce6..8d8c795 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -127,7 +127,7 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
    ephoto->config->smooth_scale = check;
 
    label = elm_label_add(table);
-   elm_object_text_set(label, _("Directory To Open Ephoto In:"));
+   elm_object_text_set(label, _("Top Level Directory"));
    evas_object_size_hint_align_set(label, 0.5, 0.5);
    elm_table_pack(table, label, 0, 5, 1, 1);
    evas_object_show(label); 
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index df0eb23..525bfcb 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -2108,21 +2108,11 @@ ephoto_single_browser_entry_set(Evas_Object *obj, 
Ephoto_Entry *entry)
    Ephoto_Viewer *v;
    Ephoto_History *eh;
    Evas_Coord w, h;
-   char *dir;
 
-   if (sb->entry && !entry)
-     {
-        dir = ecore_file_dir_get(sb->entry->path);
-        if (!eina_streq(sb->ephoto->config->directory, dir))
-          {
-             sb->entry = entry;
-          }
-        free(dir);
-     }
-   if (entry)
-     {
-        sb->entry = entry;
-     }
+   if (!entry)
+     sb->entry = NULL;
+   else if (entry)
+     sb->entry = entry;
    _ephoto_single_browser_recalc(sb);
    if (sb->edited_image_data)
      {

-- 


Reply via email to