changeset 5089:29b80bc21ba7

[gaim-migrate @ 5451] Joe Clarke (jmarcus) writes: "The accelerator keys (e.g. ctl+q, ctl+i, etc.) do not work in GAIM 0.60. I think that's because there is no accelerator group attached to the main GAIM window. The attached patch corrects the problem." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 09 Apr 2003 23:28:47 +0000
parents 73e3f3c78d12
children 4596276f5b12
files ChangeLog src/buddy.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Apr 09 05:59:13 2003 +0000
+++ b/ChangeLog	Wed Apr 09 23:28:47 2003 +0000
@@ -1,5 +1,9 @@
 Gaim: The Pimpin' Penguin IM Clone that's good for the soul!
 
+version 0.62
+	* Keyboard shortcuts in the buddy list work again (Thanks Joe 
+	 Clarke).
+
 version 0.61 (04/07/2003):
 	* Split the buddy pounce core and UI, and rewrote the UI for it.
 	* Removed folder icons and excess space from the buddy list (Thanks
--- a/src/buddy.c	Wed Apr 09 05:59:13 2003 +0000
+++ b/src/buddy.c	Wed Apr 09 23:28:47 2003 +0000
@@ -1112,6 +1112,7 @@
 	GtkWidget *sw;
 	GtkWidget *button;
 	GtkSizeGroup *sg;
+	GtkAccelGroup *accel_group;
 	GtkTreeSelection *selection;
 	GtkTargetEntry gte[] = {{"GAIM_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
 				{"application/x-im-contact", 0, DRAG_BUDDY}};
@@ -1136,7 +1137,10 @@
 	gtk_widget_add_events(gtkblist->window, GDK_VISIBILITY_NOTIFY_MASK);
 
 	/******************************* Menu bar *************************************/
-	ift = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<GaimMain>", NULL);
+	accel_group = gtk_accel_group_new();
+	gtk_window_add_accel_group(GTK_WINDOW (gtkblist->window), accel_group);
+	g_object_unref(accel_group);
+	ift = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<GaimMain>", accel_group);
 	gtk_item_factory_set_translate_func (ift,
 					     item_factory_translate_func,
 					     NULL, NULL);