changeset 21483:a4860971f861

Update the ChangeLog.API and change how gnt_menu_get_item works. On a different note, 'IM experience' is such a dirty phrase. PUKE!
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 14 Nov 2007 00:09:06 +0000
parents 84489b5529a7
children c8cdf0bcc8e3
files ChangeLog.API finch/libgnt/gntmenu.c finch/libgnt/gntmenu.h finch/libgnt/gntwm.c
diffstat 4 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Tue Nov 13 22:45:51 2007 +0000
+++ b/ChangeLog.API	Wed Nov 14 00:09:06 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 22:45:51 2007 +0000
+++ b/finch/libgnt/gntmenu.c	Wed Nov 14 00:09:06 2007 +0000
@@ -490,9 +490,6 @@
 		item = NULL;
 	}
 
-	if (item)
-		menuitem_activate(menu, item);
-
 	return item;
 }
 
--- a/finch/libgnt/gntmenu.h	Tue Nov 13 22:45:51 2007 +0000
+++ b/finch/libgnt/gntmenu.h	Wed Nov 14 00:09:06 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 22:45:51 2007 +0000
+++ b/finch/libgnt/gntwm.c	Wed Nov 14 00:09:06 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)