diff options
author | Not Zed <NotZed@Ximian.com> | 2004-10-12 11:10:54 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-10-12 11:10:54 +0800 |
commit | 31fed55c8038eaf27ed4f51b33500e6f243c8d59 (patch) | |
tree | ec91f88ffcb83b8d6c0efe3a56fb8c1309bfd6d1 /e-util | |
parent | 2d89e54a1d42b95417f0ecf3631b272c35f9b231 (diff) | |
download | gsoc2013-evolution-31fed55c8038eaf27ed4f51b33500e6f243c8d59.tar.gz gsoc2013-evolution-31fed55c8038eaf27ed4f51b33500e6f243c8d59.tar.zst gsoc2013-evolution-31fed55c8038eaf27ed4f51b33500e6f243c8d59.zip |
new method to create a targetless popup menu.
2004-10-12 Not Zed <NotZed@Ximian.com>
* e-popup.c (e_popup_new): new method to create a targetless popup
menu.
svn path=/trunk/; revision=27545
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-popup.c | 19 | ||||
-rw-r--r-- | e-util/e-popup.h | 2 |
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); |