summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2014-07-25 12:45:32 +0200
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2014-07-25 12:45:32 +0200
commit3749314afd84bd2093a96b429daf3dc117ce5ca9 (patch)
tree642730a4385fa1980c5c4513b74df15ba51c0a6e
parent08da2fbbb763b81fd6f1e3074aaaf83694c012ed (diff)
downloadglibmm-3749314afd84bd2093a96b429daf3dc117ce5ca9.tar.gz
Gio::Menu: Allow detailed_action == null
* gio/src/menu.hg: insert/prepend/append(): Make it possible to pass detailed_action == 0 to the glib/gio functions. Bug #733203.
-rw-r--r--gio/src/menu.hg10
1 files changed, 6 insertions, 4 deletions
diff --git a/gio/src/menu.hg b/gio/src/menu.hg
index 69ae591e..ad129a9d 100644
--- a/gio/src/menu.hg
+++ b/gio/src/menu.hg
@@ -55,11 +55,13 @@ public:
_WRAP_METHOD(void remove(int position), g_menu_remove)
_WRAP_METHOD(void remove_all(), g_menu_remove_all)
-//TODO: Allow label to be null. But when would that be useful?
+// The glib docs says that label can be null in all insert/prepend/append functions.
+// But except in the xxx_section() functions, a null label results in a critical message,
+// and does not seem useful. See https://bugzilla.gnome.org/show_bug.cgi?id=733203
//We don't return the MenuItem* because the C API can't give us something modifiable: See https://bugzilla.gnome.org/show_bug.cgi?id=708906
- _WRAP_METHOD(void insert(int position, const Glib::ustring& label, const Glib::ustring& detailed_action = Glib::ustring()), g_menu_insert)
- _WRAP_METHOD(void prepend(const Glib::ustring& label, const Glib::ustring& detailed_action = Glib::ustring()), g_menu_prepend)
- _WRAP_METHOD(void append(const Glib::ustring& label, const Glib::ustring& detailed_action = Glib::ustring()), g_menu_append)
+ _WRAP_METHOD(void insert(int position, const Glib::ustring& label, const Glib::ustring& detailed_action{?}), g_menu_insert)
+ _WRAP_METHOD(void prepend(const Glib::ustring& label, const Glib::ustring& detailed_action{?}), g_menu_prepend)
+ _WRAP_METHOD(void append(const Glib::ustring& label, const Glib::ustring& detailed_action{?}), g_menu_append)
_WRAP_METHOD(void insert_section(int position, const Glib::ustring& label{?}, const Glib::RefPtr<MenuModel>& section), g_menu_insert_section)
_WRAP_METHOD(void prepend_section(const Glib::ustring& label{?}, const Glib::RefPtr<MenuModel>& section), g_menu_prepend_section)