'everything' fix bug
authorHannes Janetzek <hannes.janetzek@gmail.com>
Sun, 18 Apr 2010 06:26:50 +0000 (06:26 +0000)
committerHannes Janetzek <hannes.janetzek@gmail.com>
Sun, 18 Apr 2010 06:26:50 +0000 (06:26 +0000)
SVN revision: 48097

src/modules/everything/e_mod_main.c
src/modules/everything/evry_view_plugin_tabs.c

index 15d56fc..13678f3 100644 (file)
@@ -368,6 +368,9 @@ _evry_cb_plugin_sort(const void *data1, const void *data2)
 {
    const Evry_Plugin *p1 = data1;
    const Evry_Plugin *p2 = data2;
+   if (!p1->config) return -1;
+   if (!p2->config) return 1;
+   
    return p1->config->priority - p2->config->priority;
 }
 
index 2a0ded8..f07579c 100644 (file)
@@ -84,10 +84,6 @@ _tab_scroll_to(Tab_View *v, Evry_Plugin *p, int animate)
      e_box_align_set(v->o_tabs, 0.0, 0.5);
 }
 
-static Ecore_Timer *timer = NULL;
-
-
-
 static int
 _timer_cb(void *data)
 {
@@ -114,9 +110,13 @@ _tabs_update(Tab_View *v)
    edje_object_calc_force(v->o_tabs); 
    evas_object_geometry_get(v->o_tabs, &x, NULL, &w, NULL);
 
-   if (!w && !timer)
-     timer = ecore_timer_add(0.1, _timer_cb, v); 
-
+   if (!w && !v->timer)
+     {
+       v->timer = ecore_timer_add(0.1, _timer_cb, v); 
+       return;
+     }
+   printf("width %d\n", w);
+   
    /* remove tabs for not active plugins */
    e_box_freeze(v->o_tabs);
 
@@ -169,12 +169,13 @@ _tabs_update(Tab_View *v)
          edje_object_signal_emit(o, "e,state,unselected", "e");
      }
 
-   if (eina_list_count(s->cur_plugins) == 2)
-     {
-       v->align = 0;
-       e_box_align_set(v->o_tabs, 0.0, 0.5);       
-     }
-   else if (s->plugin)
+   /* if (eina_list_count(s->cur_plugins) == 2)
+    *   {
+    *  v->align = 0;
+    *  e_box_align_set(v->o_tabs, 0.0, 0.5);       
+    *   } */
+   /* else */
+   if (s->plugin)
      _tab_scroll_to(v, s->plugin, 0);
 
    e_box_thaw(v->o_tabs);