From 17e030e2022b2343c795b7fd524ba9451ca71e9f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 27 Oct 2008 22:47:50 +0000 Subject: Fix a couple minor UI bugs. Populate the calendar's filter combo. svn path=/branches/kill-bonobo/; revision=36691 --- shell/e-shell-window-actions.c | 6 +++++- shell/e-shell-window.c | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c index 2dcdd4c4d4..348daae89e 100644 --- a/shell/e-shell-window-actions.c +++ b/shell/e-shell-window-actions.c @@ -1781,6 +1781,7 @@ shell_window_extract_actions (EShellWindow *shell_window, { const gchar *current_view; GList *match_list = NULL; + GList *primary = NULL; GList *iter; /* Pick out the actions from the source list that are tagged @@ -1809,7 +1810,10 @@ shell_window_extract_actions (EShellWindow *shell_window, if (strcmp (module_name, current_view) != 0) continue; - match_list = g_list_append (match_list, iter); + if (g_object_get_data (G_OBJECT (action), "primary")) + match_list = g_list_prepend (match_list, iter); + else + match_list = g_list_append (match_list, iter); } /* source_list = [B] match_list = [A] -> [C] */ diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index f278af0bf8..467e59d6cd 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -742,6 +742,16 @@ e_shell_window_register_new_item_actions (EShellWindow *shell_window, g_object_set_data ( G_OBJECT (action), "module-name", (gpointer) module_name); + + /* The first action becomes the first item in the "New" + * menu, and consequently its icon is shown in the "New" + * button when the shell module's view is active. This + * is all sorted out in shell_window_extract_actions(). + * Note, the data value just needs to be non-zero. */ + if (ii == 0) + g_object_set_data ( + G_OBJECT (action), + "primary", GINT_TO_POINTER (TRUE)); } e_shell_window_update_new_menu (shell_window); -- cgit v1.2.3