[glibmm] Gio: MenuItem: set_action_and_target(): Add one without the cariant.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio: MenuItem: set_action_and_target(): Add one without the cariant.
- Date: Thu, 22 Mar 2012 20:24:45 +0000 (UTC)
commit 00383dc4a514731a905e44a8826d833899a798a5
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Mar 22 21:24:39 2012 +0100
Gio: MenuItem: set_action_and_target(): Add one without the cariant.
* gio/src/menuitem.[hg|ccg]: set_action_and_target(): Rename to
set_action() and add a set_action() with just the action name,
because the GVariant* is optional.
ChangeLog | 8 ++++++++
gio/src/menuitem.ccg | 5 +++++
gio/src/menuitem.hg | 6 +++++-
3 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 83e56fd..0883bd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-03-22 Murray Cumming <murrayc murrayc com>
+ Gio: MenuItem: set_action_and_target(): Add one without the cariant.
+
+ * gio/src/menuitem.[hg|ccg]: set_action_and_target(): Rename to
+ set_action() and add a set_action() with just the action name,
+ because the GVariant* is optional.
+
+2012-03-22 Murray Cumming <murrayc murrayc com>
+
Gio: SimpleAction: Add a parameter that takes no VariantType.
* gio/src/simpleaction.[hg|ccg]: The GVariantType* is optional.
diff --git a/gio/src/menuitem.ccg b/gio/src/menuitem.ccg
index 969d51e..bf8e897 100644
--- a/gio/src/menuitem.ccg
+++ b/gio/src/menuitem.ccg
@@ -20,4 +20,9 @@
namespace Gio
{
+void MenuItem::set_action_and_target(const Glib::ustring& action)
+{
+ g_menu_item_set_action_and_target_value(gobj(), action.c_str(), 0);
+}
+
} // namespace Gio
diff --git a/gio/src/menuitem.hg b/gio/src/menuitem.hg
index 381b381..742ce0d 100644
--- a/gio/src/menuitem.hg
+++ b/gio/src/menuitem.hg
@@ -55,7 +55,11 @@ public:
_WRAP_METHOD(void set_label(const Glib::ustring& label), g_menu_item_set_label)
_WRAP_METHOD(void set_submenu(const Glib::RefPtr<MenuModel>& submenu), g_menu_item_set_submenu)
_WRAP_METHOD(void set_section(const Glib::RefPtr<MenuModel>& section), g_menu_item_set_section)
- _WRAP_METHOD(void set_action_and_target_value(const Glib::ustring& action, const Glib::VariantBase& target_value), g_menu_item_set_action_and_target_value)
+
+ //TODO: Documentation:
+ void set_action_and_target(const Glib::ustring& action);
+
+ _WRAP_METHOD(void set_action_and_target(const Glib::ustring& action, const Glib::VariantBase& target_value), g_menu_item_set_action_and_target_value)
_IGNORE(g_menu_item_set_action_and_target)
_WRAP_METHOD(void set_detailed_action(const Glib::ustring& detailed_action), g_menu_item_set_detailed_action)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]