From 2e323c2f2c622682831644fdecff3f7fe68736c2 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 5 Jan 2005 07:49:44 +0000 Subject: add a semi-dummy target for widget target. 2005-01-05 Not Zed * em-menu.c (em_menu_target_new_widget): add a semi-dummy target for widget target. svn path=/trunk/; revision=28242 --- mail/ChangeLog | 3 +++ mail/em-menu.c | 21 +++++++++++++++++++++ mail/em-menu.h | 10 ++++++++++ 3 files changed, 34 insertions(+) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 7db637dfd2..8048971e13 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,8 @@ 2005-01-05 Not Zed + * em-menu.c (em_menu_target_new_widget): add a semi-dummy target + for widget target. + * mail-component.c (handleuri_got_folder): handle the "reply" parameter, if set. diff --git a/mail/em-menu.c b/mail/em-menu.c index c7e70b272f..a80e4fb153 100644 --- a/mail/em-menu.c +++ b/mail/em-menu.c @@ -236,6 +236,27 @@ em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char * return t; } +/** + * em_menu_target_new_window: + * @emp: + * @window: + * + * create a dummy target which references some sort of widget. + * + * Return value: + **/ +EMMenuTargetWidget * +em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w) +{ + EMMenuTargetWidget *t = e_menu_target_new(&emp->popup, EM_MENU_TARGET_WIDGET, sizeof(*t)); + guint32 mask = ~0; + + t->target.mask = mask; + t->target.widget = w; + + return t; +} + static void emp_standard_menu_factory(EMenu *emp, void *data) { diff --git a/mail/em-menu.h b/mail/em-menu.h index 5f9183b860..043689520c 100644 --- a/mail/em-menu.h +++ b/mail/em-menu.h @@ -39,6 +39,7 @@ typedef struct _EMMenuClass EMMenuClass; /* Types of popup tagets */ enum _em_menu_target_t { EM_MENU_TARGET_SELECT, + EM_MENU_TARGET_WIDGET, }; /* Flags that describe a TARGET_SELECT */ @@ -63,6 +64,8 @@ enum { EM_MENU_SELECT_LAST = 1<<18 /* reserve 2 slots */ }; +/* Flags that describe a TARGET_WIDGET (none) */ + typedef struct _EMMenuTargetSelect EMMenuTargetSelect; struct _EMMenuTargetSelect { @@ -72,6 +75,12 @@ struct _EMMenuTargetSelect { GPtrArray *uids; }; +typedef struct _EMMenuTargetWidget EMMenuTargetWidget; + +struct _EMMenuTargetWidget { + EMenuTarget target; +}; + typedef struct _EMenuItem EMMenuItem; /* The object */ @@ -90,6 +99,7 @@ GType em_menu_get_type(void); EMMenu *em_menu_new(const char *menuid); EMMenuTargetSelect *em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids); +EMMenuTargetWidget *em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w); /* ********************************************************************** */ -- cgit v1.2.3