[glibmm] Gio: Menu, MenuItem: Add default parameter values.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio: Menu, MenuItem: Add default parameter values.
- Date: Thu, 22 Mar 2012 19:55:43 +0000 (UTC)
commit 4d1c786d9b6508294ac6d4b41aa937ca64d5115f
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Mar 22 20:55:38 2012 +0100
Gio: Menu, MenuItem: Add default parameter values.
* gio/src/menu.hg:
* gio/src/menuitem.hg: Let the detailed_description parameters be
empty.
ChangeLog | 8 ++++++++
gio/src/menu.hg | 6 +++---
gio/src/menuitem.hg | 3 ++-
3 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c853bb0..c6afe7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-03-22 Murray Cumming <murrayc murrayc com>
+ Gio: Menu, MenuItem: Add default parameter values.
+
+ * gio/src/menu.hg:
+ * gio/src/menuitem.hg: Let the detailed_description parameters be
+ empty.
+
+2012-03-22 Murray Cumming <murrayc murrayc com>
+
Gio: Add Menu and MenuItem.
* tools/extra_defs_gen/generate_defs_gio.cc: Mention the new GTypes here,
diff --git a/gio/src/menu.hg b/gio/src/menu.hg
index c3ebb12..1b28578 100644
--- a/gio/src/menu.hg
+++ b/gio/src/menu.hg
@@ -46,9 +46,9 @@ public:
_WRAP_METHOD(void append_item(const Glib::RefPtr<MenuItem>& item), g_menu_append_item)
_WRAP_METHOD(void remove(int position), g_menu_remove)
- _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(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_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)
diff --git a/gio/src/menuitem.hg b/gio/src/menuitem.hg
index f8b240c..381b381 100644
--- a/gio/src/menuitem.hg
+++ b/gio/src/menuitem.hg
@@ -33,8 +33,9 @@ class MenuItem : public Glib::Object
_CLASS_GOBJECT(MenuItem, GMenuItem, G_MENU_ITEM, Glib::Object, GObject)
protected:
- _WRAP_CTOR(MenuItem(const Glib::ustring& label, const Glib::ustring& detailed_action), g_menu_item_new)
+ _WRAP_CTOR(MenuItem(const Glib::ustring& label = Glib::ustring(), const Glib::ustring& detailed_action = Glib::ustring()), g_menu_item_new)
+ //TODO: label can be empty, so reorder these parameters?
_WRAP_CTOR(MenuItem(const Glib::ustring& label, const Glib::RefPtr<MenuModel>& submenu), g_menu_item_new_submenu)
public:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]