commit 2a084d80af07803ee8f0949d6e5452c418b517a0
parent f14232d5975e53a3ee2366091e60499d39283b18
Author: Colin Leroy <colin@colino.net>
Date: Fri, 25 Jul 2008 06:19:29 +0000
2008-07-25 [colin] 3.5.0cvs33
* src/gtk/menu.h
Add a macro to remove menu items
Make the gui_manager variable useless
Diffstat:
4 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-25 [colin] 3.5.0cvs33
+
+ * src/gtk/menu.h
+ Add a macro to remove menu items
+ Make the gui_manager variable useless
+
2008-07-24 [colin] 3.5.0cvs32
* src/mimeview.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3444,3 +3444,4 @@
( cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/plugins/trayicon/libeggtrayicon/eggtrayicon.c; ) > 3.5.0cvs30.patchset
( cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/plugins/pgpcore/pgp_viewer.c; cvs diff -u -r 1.1.2.51 -r 1.1.2.52 src/plugins/pgpcore/sgpgme.c; ) > 3.5.0cvs31.patchset
( cvs diff -u -r 1.274.2.255 -r 1.274.2.256 src/mainwindow.c; cvs diff -u -r 1.83.2.135 -r 1.83.2.136 src/mimeview.c; cvs diff -u -r 1.395.2.374 -r 1.395.2.375 src/summaryview.c; cvs diff -u -r 1.68.2.47 -r 1.68.2.48 src/summaryview.h; ) > 3.5.0cvs32.patchset
+( cvs diff -u -r 1.4.2.13 -r 1.4.2.14 src/gtk/menu.h; ) > 3.5.0cvs33.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=5
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=32
+EXTRA_VERSION=33
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/gtk/menu.h b/src/gtk/menu.h
@@ -46,11 +46,23 @@
GINT_TO_POINTER(data)); \
}
-#define MENUITEM_ADDUI(path, name, action, type) \
- gtk_ui_manager_add_ui(gui_manager, \
- gtk_ui_manager_new_merge_id(gui_manager), \
+#define MENUITEM_ADDUI(path, name, action, type) \
+ gtk_ui_manager_add_ui(gtkut_ui_manager(), \
+ gtk_ui_manager_new_merge_id(gui_manager),\
path, name, action, type, FALSE);
+#define MENUITEM_ADDUI_ID(path, name, action, type,id) \
+ id = gtk_ui_manager_new_merge_id(gtkut_ui_manager()); \
+ gtk_ui_manager_add_ui(gtkut_ui_manager(), \
+ id, \
+ path, name, action, type, FALSE);
+
+#define MENUITEM_REMUI(action_group,name,id) { \
+ GtkAction *action = gtk_action_group_get_action(action_group, name); \
+ if (action) gtk_action_group_remove_action(action_group, action); \
+ if (id) gtk_ui_manager_remove_ui(gtkut_ui_manager(), id); \
+}
+
#define menu_set_insensitive_all(menu_shell) \
menu_set_sensitive_all(menu_shell, FALSE);