Hello,
attached patch corrects behaviour of the efm_nav history
and buttons' state.
Index: src/e_mod_main.c
===================================================================
--- src/e_mod_main.c    (revision 35796)
+++ src/e_mod_main.c    (working copy)
@@ -328,6 +328,8 @@
    if ((!inst) || (!inst->tbar)) return;
    o_fm = e_toolbar_fm2_get(inst->tbar);
    if (!o_fm) return;
+   // Don't destroy forward history when refreshing
+   inst->ignore_dir = 1;
    e_fm2_path_set(o_fm, NULL, e_fm2_real_path_get(o_fm));
 }
 
@@ -350,7 +352,7 @@
         p = t;
         if (p[0] == 0) p = "/";
         e_fm2_path_set(o_fm, NULL, p);
-        edje_object_signal_emit(inst->o_up, "e,state,enabled", "e");
+        //edje_object_signal_emit(inst->o_up, "e,state,enabled", "e");
      }
    else 
      edje_object_signal_emit(inst->o_up, "e,state,disabled", "e");
@@ -398,15 +400,29 @@
    if (!inst->ignore_dir) 
      {
         const char *t;
-        t = ecore_list_first(inst->history);
+        t = ecore_list_current(inst->history);
         if(!t || strcmp(t, path))
           {
+            if (t)
+              {
+                 int i, current;
+                 current = ecore_list_index(inst->history);
+                 ecore_list_first_goto(inst->history);
+                 for(i = 0; i < current; i++)
+                         ecore_list_remove_destroy(inst->history);
+              }
              ecore_list_prepend(inst->history, strdup(path));
              ecore_list_first_goto(inst->history);
           }
      }
    inst->ignore_dir = 0;
 
+   if (!strcmp(path, "/"))
+        edje_object_signal_emit(inst->o_up, "e,state,disabled", "e");
+   else
+        edje_object_signal_emit(inst->o_up, "e,state,enabled", "e");
+   edje_object_message_signal_process(inst->o_up);
+
    count = ecore_list_count(inst->history);
    i = ecore_list_index(inst->history);
 
@@ -420,7 +436,10 @@
      }
    else 
      {
-       edje_object_signal_emit(inst->o_back, "e,state,enabled", "e");
+       if (i == (count - 1))
+         edje_object_signal_emit(inst->o_back, "e,state,disabled", "e");
+       else
+         edje_object_signal_emit(inst->o_back, "e,state,enabled", "e");
        edje_object_message_signal_process(inst->o_back);
        if (i == 0) 
          edje_object_signal_emit(inst->o_forward, "e,state,disabled", "e");
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to