changeset 12348:4f7797a3024b

[gaim-migrate @ 14652] 00:53:29 <Bleeter> oh yeah, we've lost the accellerator on the 'add/edit' menu item anyway 00:53:42 <deryni> We can get that back. And now we have. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Mon, 05 Dec 2005 06:07:14 +0000
parents 8337e1286313
children 2a1961c1a345
files src/gtkblist.c
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Mon Dec 05 05:47:08 2005 +0000
+++ b/src/gtkblist.c	Mon Dec 05 06:07:14 2005 +0000
@@ -2470,6 +2470,7 @@
 
 	/* Accounts menu */
 	{ N_("/_Accounts"), NULL, NULL, 0, "<Branch>" },
+	{ N_("/Accounts/Add\\/Edit"), "<CTL>A", gaim_gtk_accounts_window_show, 0, "<StockItem>", GAIM_STOCK_ACCOUNTS },
 
 	/* Tools */
 	{ N_("/_Tools"), NULL, NULL, 0, "<Branch>" },
@@ -5376,16 +5377,13 @@
 
 	/* Clear the old Accounts menu */
 	for (l = gtk_container_get_children(GTK_CONTAINER(accountmenu)); l; l = l->next) {
-		gtk_container_remove(GTK_CONTAINER(accountmenu),
-		                     GTK_WIDGET(l->data));
+		menuitem = l->data;
+
+		if (menuitem != gtk_item_factory_get_widget(gtkblist->ift, N_("/Accounts/Add\\/Edit")))
+			gtk_container_remove(GTK_CONTAINER(accountmenu),
+			                     GTK_WIDGET(l->data));
 	}
 
-	menuitem = gtk_menu_item_new_with_label(_("Add/Edit"));
-	g_signal_connect(G_OBJECT(menuitem), "activate",
-	                 G_CALLBACK(gaim_gtk_accounts_window_show), NULL);
-	gtk_menu_shell_append(GTK_MENU_SHELL(accountmenu), menuitem);
-	gtk_widget_show(menuitem);
-
 	for (accounts = gaim_accounts_get_all(); accounts; accounts = accounts->next) {
 		char *buf = NULL;
 		GtkWidget *image = NULL;