From 6a3586deb6849f3cd2cc0517b737c98279862211 Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Sun, 18 Apr 2010 06:26:50 +0000 Subject: [PATCH] 'everything' fix bug SVN revision: 48097 --- src/modules/everything/e_mod_main.c | 3 +++ src/modules/everything/evry_view_plugin_tabs.c | 27 +++++++++++++------------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/modules/everything/e_mod_main.c b/src/modules/everything/e_mod_main.c index 15d56fc..13678f3 100644 --- a/src/modules/everything/e_mod_main.c +++ b/src/modules/everything/e_mod_main.c @@ -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; } diff --git a/src/modules/everything/evry_view_plugin_tabs.c b/src/modules/everything/evry_view_plugin_tabs.c index 2a0ded8..f07579c 100644 --- a/src/modules/everything/evry_view_plugin_tabs.c +++ b/src/modules/everything/evry_view_plugin_tabs.c @@ -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); -- 2.7.4