changeset 21486:c8cdf0bcc8e3

merge of '45b552be25717e53a4c0e84b9d0242ded9c05628' and '534c96a5976cb55b46a727cf2bee87140137b1e9'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 14 Nov 2007 00:23:21 +0000
parents b95a421c9980 (current diff) a4860971f861 (diff)
children f2e42e09e635 277873603719
files
diffstat 4 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Tue Nov 13 23:26:12 2007 +0000
+++ b/ChangeLog.API	Wed Nov 14 00:23:21 2007 +0000
@@ -146,11 +146,13 @@
 		  string id of a menuitem respectively.
 		* Added gnt_window_get_accel_item, which returns a the id of a menuitem
 		  bound to a keystroke.
-		* Added gnt_menu_get_item to activate and return a menuitem of the
-		  given id from a menu.
+		* Added gnt_menu_get_item to get a menuitem of the given id from a
+		  menu.
 		* Added gnt_menuitem_activate, which triggers the 'activate' signal on
 		  the menuitem and calls the callback function, if available.
 		* Added GntEntryKillRing in GntEntry.
+		* Added gnt_window_set_maximize and gnt_window_get_maximize, and
+		  GntWindowFlags enum.
 
 version 2.2.2 (??/??/????):
 	libpurple:
--- a/finch/libgnt/gntmenu.c	Tue Nov 13 23:26:12 2007 +0000
+++ b/finch/libgnt/gntmenu.c	Wed Nov 14 00:23:21 2007 +0000
@@ -490,9 +490,6 @@
 		item = NULL;
 	}
 
-	if (item)
-		menuitem_activate(menu, item);
-
 	return item;
 }
 
--- a/finch/libgnt/gntmenu.h	Tue Nov 13 23:26:12 2007 +0000
+++ b/finch/libgnt/gntmenu.h	Wed Nov 14 00:23:21 2007 +0000
@@ -108,7 +108,7 @@
 void gnt_menu_add_item(GntMenu *menu, GntMenuItem *item);
 
 /**
- * Activate and return the GntMenuItem with the given ID.
+ * Return the GntMenuItem with the given ID.
  *
  * @param menu   The menu.
  * @param id     The ID for an item.
--- a/finch/libgnt/gntwm.c	Tue Nov 13 23:26:12 2007 +0000
+++ b/finch/libgnt/gntwm.c	Wed Nov 14 00:23:21 2007 +0000
@@ -1876,8 +1876,11 @@
 			GntMenu *menu = GNT_WINDOW(win)->menu;
 			if (menu) {
 				const char *id = gnt_window_get_accel_item(GNT_WINDOW(win), keys);
-				if (id)
-					ret = (gnt_menu_get_item(menu, id) != NULL);
+				if (id) {
+					GntMenuItem *item = gnt_menu_get_item(menu, id);
+					if (item)
+						ret = gnt_menuitem_activate(item);
+				}
 			}
 		}
 		if (!ret)