diff options
author | Christopher James Lahey <clahey@ximian.com> | 2002-04-18 05:57:08 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2002-04-18 05:57:08 +0800 |
commit | 11112bffd14460420d12bcb29b81ec91b04e4da0 (patch) | |
tree | ae7e247f7b03e2f00bf588cf4bd0e397945d15cb /widgets/misc/e-popup-menu.h | |
parent | 240b0dfa2253676ef779109b75a5cf3557b7f002 (diff) | |
download | gsoc2013-evolution-11112bffd14460420d12bcb29b81ec91b04e4da0.tar.gz gsoc2013-evolution-11112bffd14460420d12bcb29b81ec91b04e4da0.tar.zst gsoc2013-evolution-11112bffd14460420d12bcb29b81ec91b04e4da0.zip |
Bumped version number to 0.19.99.11.
2002-04-17 Christopher James Lahey <clahey@ximian.com>
* configure.in: Bumped version number to 0.19.99.11.
* gal/widgets/e-popup-menu.c, gal/widgets/e-popup-menu.h: Changed
this to be API compatible with gal 0.19. Added a bunch of pound
defines and added API for toggle and radio menu items.
* gal/widgets/e-categories.c: Updated this to match the new
EPopupMenu.
From gal/e-table/ChangeLog:
2002-04-17 Christopher James Lahey <clahey@ximian.com>
* e-table-header-item.c: Updated this to match the new EPopupMenu.
svn path=/trunk/; revision=16496
Diffstat (limited to 'widgets/misc/e-popup-menu.h')
-rw-r--r-- | widgets/misc/e-popup-menu.h | 53 |
1 files changed, 49 insertions, 4 deletions
diff --git a/widgets/misc/e-popup-menu.h b/widgets/misc/e-popup-menu.h index 66435b9ecf..095c1a42d7 100644 --- a/widgets/misc/e-popup-menu.h +++ b/widgets/misc/e-popup-menu.h @@ -32,20 +32,65 @@ BEGIN_GNOME_DECLS -#define E_POPUP_SEPARATOR { "", NULL, (NULL), NULL, NULL, 0 } -#define E_POPUP_TERMINATOR { NULL, NULL, (NULL), NULL, NULL, 0 } +#define E_POPUP_SEPARATOR { "", NULL, (NULL), NULL, 0 } +#define E_POPUP_TERMINATOR { NULL, NULL, (NULL), NULL, 0 } + + +/* In the following, CC = custom closure */ + +#define E_POPUP_ITEM(name,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 0, 0, 0, 0 } +#define E_POPUP_ITEM_CC(name,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 0, 0, 0, 1 } +#define E_POPUP_SUBMENU(name,submenu,disable_mask) { (name), NULL, NULL, (submenu), (disable_mask), NULL, NULL, 0, 0, 0, 0 } + +#define E_POPUP_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 0, 0, 0, 0 } +#define E_POPUP_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 0, 0, 0, 1 } +#define E_POPUP_PIXMAP_SUBMENU(name,pixmap,submenu,disable_mask) { (name), (pixmap), NULL, (submenu), (disable_mask), NULL, NULL, 0, 0, 0, 0 } + +#define E_POPUP_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 0, 0, 0, 0 } +#define E_POPUP_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 0, 0, 0, 1 } +#define E_POPUP_PIXMAP_WIDGET_SUBMENU(name,pixmap_widget,submenu,disable_mask) { (name), NULL, NULL, (submenu), (disable_mask), (pixmap_widget), NULL, 0, 0, 0, 0 } + + +#define E_POPUP_TOGGLE_ITEM(name,fn,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 1, 0, value, 0 } +#define E_POPUP_TOGGLE_ITEM_CC(name,fn,closure,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 1, 0, value, 1 } + +#define E_POPUP_TOGGLE_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 1, 0, value, 0 } +#define E_POPUP_TOGGLE_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 1, 0, value, 1 } + +#define E_POPUP_TOGGLE_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 1, 0, value, 0 } +#define E_POPUP_TOGGLE_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 1, 0, value, 1 } + + +#define E_POPUP_RADIO_ITEM(name,fn,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, NULL, 0, 1, value, 0 } +#define E_POPUP_RADIO_ITEM_CC(name,fn,closure,disable_mask,value) { (name), NULL, (fn), NULL, (disable_mask), NULL, (closure), 0, 1, value, 1 } + +#define E_POPUP_RADIO_PIXMAP_ITEM(name,pixmap,fn,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, NULL, 0, 1, value, 0 } +#define E_POPUP_RADIO_PIXMAP_ITEM_CC(name,pixmap,fn,closure,disable_mask) { (name), (pixmap), (fn), NULL, (disable_mask), NULL, (closure), 0, 1, value, 1 } + +#define E_POPUP_RADIO_PIXMAP_WIDGET_ITEM(name,pixmap_widget,fn,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), NULL, 0, 1, value, 0 } +#define E_POPUP_RADIO_PIXMAP_WIDGET_ITEM_CC(name,pixmap_widget,fn,closure,disable_mask) { (name), NULL, (fn), NULL, (disable_mask), (pixmap_widget), (closure), 0, 1, value, 1 } typedef struct _EPopupMenu EPopupMenu; struct _EPopupMenu { char *name; - GtkWidget *pixmap; + const gchar *pixmap; void (*fn) (GtkWidget *widget, void *closure); - void *closure; EPopupMenu *submenu; guint32 disable_mask; + + /* Added post 0.19 */ + GtkWidget *pixmap_widget; + void *closure; + + guint is_toggle : 1; + guint is_radio : 1; + guint is_active : 1; + + guint use_custom_closure : 1; }; + GtkMenu *e_popup_menu_create (EPopupMenu *menu_list, guint32 disable_mask, guint32 hide_mask, |