[glibmm] Gio::SimpleAction: Make set_state() public
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::SimpleAction: Make set_state() public
- Date: Thu, 2 Feb 2017 08:57:17 +0000 (UTC)
commit c5bed834d97fecc59c431fd87a2081a64007afee
Author: Daniel Boles <dboles src gnome org>
Date: Mon Jan 30 20:58:03 2017 +0000
Gio::SimpleAction: Make set_state() public
This is needed to apply the requested state in a custom handler for
signal_change_state(). It was protected on an assumption that when the C
doc for g_simple_action_set_state() said “This should only be called by
the implementor of the action”, it meant the implementor of a subclass.
But the C docs for signal change-state are clear that it means the
implementor of the signal handler. Without such a user being able to
call set_state(), they can’t apply the new state, unless they subclass
SimpleAction, which is a lot to require for such a simple case as this.
https://bugzilla.gnome.org/show_bug.cgi?id=777953
gio/src/simpleaction.hg | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gio/src/simpleaction.hg b/gio/src/simpleaction.hg
index d1e6f23..9f0c67a 100644
--- a/gio/src/simpleaction.hg
+++ b/gio/src/simpleaction.hg
@@ -159,11 +159,7 @@ public:
_WRAP_SIGNAL(void activate(const Glib::VariantBase& parameter), "activate", no_default_handler)
_WRAP_SIGNAL(void change_state(const Glib::VariantBase& value), "change-state", no_default_handler)
-protected:
-
//TODO: Add templated version of this, renaming this to set_state_variant(), like Action::change_state()?
- //This is protected because the C docs say "This should only be called by the implementor of the action."
- // though that is not entirely clear. We can make this public if somebody needs it.
_WRAP_METHOD(void set_state(const Glib::VariantBase& value), g_simple_action_set_state)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]