[maemo-commits] [maemo-commits] r13851 - in projects/haf/trunk/hildon-desktop: . policies
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Sep 17 16:23:00 EEST 2007
- Previous message: [maemo-commits] r13850 - in projects/haf/trunk/hildon-desktop: . libhildondesktop
- Next message: [maemo-commits] r13852 - projects/haf/hafbuildbot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart Date: 2007-09-17 16:22:57 +0300 (Mon, 17 Sep 2007) New Revision: 13851 Modified: projects/haf/trunk/hildon-desktop/ChangeLog projects/haf/trunk/hildon-desktop/policies/tasknavigator-policy.c Log: 2007-09-17 Moises Martinez <moises.martinez at nokia.com> * policies/tasknavigator-policy.c: (hd_ui_policy_module_filter_plugin_list): - Filter any previous position of the switcher plugins. Fixes: NB#69004 * ChangeLog updated. Modified: projects/haf/trunk/hildon-desktop/ChangeLog =================================================================== --- projects/haf/trunk/hildon-desktop/ChangeLog 2007-09-17 13:14:39 UTC (rev 13850) +++ projects/haf/trunk/hildon-desktop/ChangeLog 2007-09-17 13:22:57 UTC (rev 13851) @@ -1,3 +1,10 @@ +2007-09-17 Moises Martinez <moises.martinez at nokia.com> + + * policies/tasknavigator-policy.c: + (hd_ui_policy_module_filter_plugin_list): + - Filter any previous position of the switcher plugins. + Fixes: NB#69004 + 2007-09-17 Johan Bilien <johan.bilien at nokia.com> * libhildondesktop/libhildonmenu.[ch]: added support for Modified: projects/haf/trunk/hildon-desktop/policies/tasknavigator-policy.c =================================================================== --- projects/haf/trunk/hildon-desktop/policies/tasknavigator-policy.c 2007-09-17 13:14:39 UTC (rev 13850) +++ projects/haf/trunk/hildon-desktop/policies/tasknavigator-policy.c 2007-09-17 13:22:57 UTC (rev 13851) @@ -58,14 +58,29 @@ GList * hd_ui_policy_module_filter_plugin_list (GList *plugin_list) { - GList *i, *f_plugin_list = NULL; + GList *i, *f_plugin_list = NULL, *pre_plugin_list = NULL; gboolean used_browser_plugin = FALSE; gboolean used_contact_plugin = FALSE; gboolean used_appsmenu_plugin = FALSE; gint position = 0; gint n_items; - for (i = plugin_list; i && position < 3; i = i->next) + /* This pre-filtering is for avoiding the problem when + * dragging in a TreeModelFilter as invisible items can + * be at the middle and not at the end as actually expected + */ + + for (position = 0, i = plugin_list; i && position < 3; i = i->next) + { + if (!g_str_equal (i->data, HD_TN_ENTRY_PATH "/" HD_TN_SWITCHER_MENU_PLUGIN) && + !g_str_equal (i->data, HD_TN_ENTRY_PATH "/" HD_TN_APP_SWITCHER_PLUGIN)) + { + pre_plugin_list = g_list_append (pre_plugin_list, i->data); + position++; + } + } + + for (position = 0, i = pre_plugin_list; i && position < 3; i = i->next, position++) { const gchar *plugin_id = (const gchar *) i->data; @@ -93,10 +108,10 @@ if (g_str_equal (plugin_id, HD_TN_ENTRY_PATH "/" HD_TN_APPS_MENU_PLUGIN)) used_appsmenu_plugin = TRUE; - - position++; } + g_list_free (pre_plugin_list); + n_items = g_list_length (f_plugin_list); if (n_items < 3 && !used_browser_plugin)
- Previous message: [maemo-commits] r13850 - in projects/haf/trunk/hildon-desktop: . libhildondesktop
- Next message: [maemo-commits] r13852 - projects/haf/hafbuildbot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]