aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-08-31 20:29:42 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-31 20:29:42 +0800
commit8bbf952350c37970e8947b807513e58e91435998 (patch)
tree7cac55cfc3250341ac352fecb7f491bbd1ead20b
parent8bf77996e08c94eb3bd885b2b69b74206868d622 (diff)
downloadgsoc2013-evolution-8bbf952350c37970e8947b807513e58e91435998.tar
gsoc2013-evolution-8bbf952350c37970e8947b807513e58e91435998.tar.gz
gsoc2013-evolution-8bbf952350c37970e8947b807513e58e91435998.tar.bz2
gsoc2013-evolution-8bbf952350c37970e8947b807513e58e91435998.tar.lz
gsoc2013-evolution-8bbf952350c37970e8947b807513e58e91435998.tar.xz
gsoc2013-evolution-8bbf952350c37970e8947b807513e58e91435998.tar.zst
gsoc2013-evolution-8bbf952350c37970e8947b807513e58e91435998.zip
Fix some bugs related to the New menu and toolbar button.
svn path=/branches/kill-bonobo/; revision=36232
-rw-r--r--shell/e-shell-window-actions.c10
-rw-r--r--widgets/misc/e-menu-tool-button.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index a43333c5b1..13fe3c7d12 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -1256,12 +1256,12 @@ shell_window_extract_actions (EShellWindow *shell_window,
*/
for (iter = *source_list; iter != NULL; iter = iter->next) {
GtkAction *action = iter->data;
- const gchar *view_name;
+ const gchar *module_name;
- view_name = g_object_get_data (
- G_OBJECT (action), "view-name");
+ module_name = g_object_get_data (
+ G_OBJECT (action), "module-name");
- if (view_name != current_view)
+ if (strcmp (module_name, current_view) != 0)
continue;
match_list = g_list_append (match_list, iter);
@@ -1372,9 +1372,11 @@ e_shell_window_create_new_menu (EShellWindow *shell_window)
separator = gtk_separator_menu_item_new ();
new_item_actions = g_list_prepend (new_item_actions, separator);
+ gtk_widget_show (GTK_WIDGET (separator));
separator = gtk_separator_menu_item_new ();
new_source_actions = g_list_prepend (new_source_actions, separator);
+ gtk_widget_show (GTK_WIDGET (separator));
/* Merge everything into one list, reflecting the menu layout. */
diff --git a/widgets/misc/e-menu-tool-button.c b/widgets/misc/e-menu-tool-button.c
index be77895fbe..f2ff6ded44 100644
--- a/widgets/misc/e-menu-tool-button.c
+++ b/widgets/misc/e-menu-tool-button.c
@@ -51,12 +51,10 @@ menu_tool_button_get_first_menu_item (GtkMenuToolButton *menu_tool_button)
/* XXX GTK+ 2.12 provides no accessor function. */
children = GTK_MENU_SHELL (menu)->children;
- if (children == NULL || children->next == NULL)
+ if (children == NULL)
return NULL;
- /* Return the /second/ menu item, which turns out to be the first
- * visible item. The first menu item is some kind of placeholder? */
- return GTK_MENU_ITEM (children->next->data);
+ return GTK_MENU_ITEM (children->data);
}
static void