From 3749314afd84bd2093a96b429daf3dc117ce5ca9 Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Fri, 25 Jul 2014 12:45:32 +0200 Subject: 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. --- gio/src/menu.hg | 10 ++++++---- 1 file 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& section), g_menu_insert_section) _WRAP_METHOD(void prepend_section(const Glib::ustring& label{?}, const Glib::RefPtr& section), g_menu_prepend_section) -- cgit v1.2.1