[glibmm] Action/ActionGroup: Make some parameter parameters optional.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Action/ActionGroup: Make some parameter parameters optional.
- Date: Tue, 8 Oct 2013 07:52:24 +0000 (UTC)
commit 842f841182e51a66bd1ffc9a158a80b52438f71f
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Oct 8 09:51:03 2013 +0200
Action/ActionGroup: Make some parameter parameters optional.
* gio/src/action.[hg|ccg]: Add an activate() method that takes no
parameter.
* gio/src/actiongroup.hg: activate_action(): Add a method overload
that takes no parameter parameter.
gio/src/action.ccg | 5 +++++
gio/src/action.hg | 4 ++++
gio/src/actiongroup.hg | 2 +-
3 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gio/src/action.ccg b/gio/src/action.ccg
index d3dd74a..cc9a5f4 100644
--- a/gio/src/action.ccg
+++ b/gio/src/action.ccg
@@ -24,4 +24,9 @@
namespace Gio
{
+void Action::activate()
+{
+ g_action_activate(gobj(), 0);
+}
+
} // namespace Gio
diff --git a/gio/src/action.hg b/gio/src/action.hg
index ecd8c70..b981e25 100644
--- a/gio/src/action.hg
+++ b/gio/src/action.hg
@@ -149,6 +149,10 @@ public:
_WRAP_METHOD(Glib::VariantBase get_state_variant() const, g_action_get_state)
/** Activates the action.
+ */
+ void activate();
+
+ /** Activates the action.
*
* The @a parameter must be the correct type of parameter for the action (ie:
* the parameter type given at construction time), if any.
diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg
index 2edafaa..4d706d7 100644
--- a/gio/src/actiongroup.hg
+++ b/gio/src/actiongroup.hg
@@ -126,7 +126,7 @@ public:
_WRAP_METHOD(void change_action_state(const Glib::ustring& action_name, const Glib::VariantBase& value),
g_action_group_change_action_state)
//TODO: Add templated method, renaming this to activate_action_variant().
- _WRAP_METHOD(void activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter),
g_action_group_activate_action)
+ _WRAP_METHOD(void activate_action(const Glib::ustring& action_name, const Glib::VariantBase&
parameter{?}), g_action_group_activate_action)
_WRAP_METHOD(void action_added(const Glib::ustring& action_name), g_action_group_action_added)
_WRAP_METHOD(void action_removed(const Glib::ustring& action_name), g_action_group_action_removed)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]