[glibmm] Gio: SimpleAction: Add a parameter that takes no VariantType.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio: SimpleAction: Add a parameter that takes no VariantType.
- Date: Thu, 22 Mar 2012 20:11:43 +0000 (UTC)
commit 1ec938d5540be91138a841af0e532689923523b1
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Mar 22 21:07:40 2012 +0100
Gio: SimpleAction: Add a parameter that takes no VariantType.
* gio/src/simpleaction.[hg|ccg]: The GVariantType* is optional.
ChangeLog | 6 ++++++
gio/src/simpleaction.ccg | 7 ++++++-
gio/src/simpleaction.hg | 7 ++++++-
3 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c6afe7c..83e56fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2012-03-22 Murray Cumming <murrayc murrayc com>
+
Gio: Menu, MenuItem: Add default parameter values.
* gio/src/menu.hg:
diff --git a/gio/src/simpleaction.ccg b/gio/src/simpleaction.ccg
index f1623f6..286c964 100644
--- a/gio/src/simpleaction.ccg
+++ b/gio/src/simpleaction.ccg
@@ -22,4 +22,9 @@
namespace Gio
{
-}// namespace Gio
+SimpleAction::SimpleAction(const Glib::ustring& name)
+:
+ _CONSTRUCT("name", name.c_str())
+{}
+
+} // namespace Gio
diff --git a/gio/src/simpleaction.hg b/gio/src/simpleaction.hg
index dfc668f..6432b39 100644
--- a/gio/src/simpleaction.hg
+++ b/gio/src/simpleaction.hg
@@ -45,12 +45,17 @@ class SimpleAction : public Glib::Object, public Action
_STRUCT_NOT_HIDDEN
protected:
-#m4 _CONVERSION(`const Glib::VariantType&',`const GVariantType*',`$3.gobj()')
+ explicit SimpleAction(const Glib::ustring& name);
+#m4 _CONVERSION(`const Glib::VariantType&',`const GVariantType*',`$3.gobj()')
_WRAP_CTOR(SimpleAction(const Glib::ustring& name, const Glib::VariantType& parameter_type), g_simple_action_new)
+
_WRAP_CTOR(SimpleAction(const Glib::ustring& name, const Glib::VariantType& parameter_type, const Glib::VariantBase& sate), g_simple_action_new_stateful)
public:
+
+ _WRAP_CREATE(const Glib::ustring& name)
+
_WRAP_METHOD_DOCS_ONLY(g_simple_action_new)
_WRAP_CREATE(const Glib::ustring& name, const Glib::VariantType& parameter_type)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]