aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-01-05 15:49:44 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-01-05 15:49:44 +0800
commit2e323c2f2c622682831644fdecff3f7fe68736c2 (patch)
treecbfbb75e200731b2e9c33af5402f2435a998982c /mail
parent19e2fea988754f3f4f43667e30463bd7fd4e18cc (diff)
downloadgsoc2013-evolution-2e323c2f2c622682831644fdecff3f7fe68736c2.tar.gz
gsoc2013-evolution-2e323c2f2c622682831644fdecff3f7fe68736c2.tar.zst
gsoc2013-evolution-2e323c2f2c622682831644fdecff3f7fe68736c2.zip
add a semi-dummy target for widget target.
2005-01-05 Not Zed <NotZed@Ximian.com> * em-menu.c (em_menu_target_new_widget): add a semi-dummy target for widget target. svn path=/trunk/; revision=28242
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/em-menu.c21
-rw-r--r--mail/em-menu.h10
3 files changed, 34 insertions, 0 deletions
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 <NotZed@Ximian.com>
+ * 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);
/* ********************************************************************** */