aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-popup.c')
-rw-r--r--e-util/e-popup.c19
1 files changed, 19 insertions, 0 deletions
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.