aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-popup.c19
-rw-r--r--e-util/e-popup.h2
3 files changed, 26 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 6fe94df6ce..c2b0fd4a99 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-12 Not Zed <NotZed@Ximian.com>
+
+ * e-popup.c (e_popup_new): new method to create a targetless popup
+ menu.
+
2004-10-08 JP Rosevear <jpr@novell.com>
* e-plugin.c (ep_load): fix typo
diff --git a/e-util/e-popup.c b/e-util/e-popup.c
index 25a3a0bdc8..31c3bd0866 100644
--- a/e-util/e-popup.c
+++ b/e-util/e-popup.c
@@ -179,6 +179,25 @@ e_popup_get_type(void)
}
/**
+ * e_popup_new - Create an targetless popup menu manager.
+ * @menuid: Unique ID for this menu.
+ *
+ * Create a targetless popup menu object. This can be used as a
+ * helper for creating popup menu's with no target. Such popup menu's
+ * wont be very pluggable.
+ *
+ * Return value: A new EPopup.
+ **/
+EPopup *e_popup_new(const char *menuid)
+{
+ EPopup *ep = g_object_new(e_popup_get_type(), NULL);
+
+ e_popup_construct(ep, menuid);
+
+ return ep;
+}
+
+/**
* e_popup_construct:
* @ep: An instantiated but uninitialised EPopup.
* @menuid: The menu identifier.
diff --git a/e-util/e-popup.h b/e-util/e-popup.h
index dca73d79b7..f4556f453e 100644
--- a/e-util/e-popup.h
+++ b/e-util/e-popup.h
@@ -192,6 +192,8 @@ struct _EPopupClass {
GType e_popup_get_type(void);
+EPopup *e_popup_new(const char *menuid);
+
/* Static class methods */
EPopupFactory *e_popup_class_add_factory(EPopupClass *klass, const char *menuid, EPopupFactoryFunc func, void *data);
void e_popup_class_remove_factory(EPopupClass *klass, EPopupFactory *f);