[balsa/gtk3] Actually change the state of a boolean action



commit bac5090d9d6fb10c2b8d5b6744d040b024240f49
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sat Aug 10 08:45:34 2013 -0400

    Actually change the state of a boolean action
    
        * src/main-window.c (bw_action_set_boolean): use
        g_action_change_state instead of g_simple_action_set_state, so
        that the state is actually changed (Carlos Franke).

 ChangeLog         |    6 ++++++
 src/main-window.c |    3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 284e6d1..41ab16f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-10  Peter Bloomfield
+
+       * src/main-window.c (bw_action_set_boolean): use
+       g_action_change_state instead of g_simple_action_set_state, so
+       that the state is actually changed (Carlos Franke).
+
 2013-08-04  Pawel Salek
 
        * src/sendmsg-window.c: compile with GtkSourceview
diff --git a/src/main-window.c b/src/main-window.c
index 2ca27cb..324e1f0 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -748,8 +748,7 @@ bw_action_set_boolean(BalsaWindow * window,
 
     action = g_action_map_lookup_action(G_ACTION_MAP(window), action_name);
     if (action)
-        g_simple_action_set_state(G_SIMPLE_ACTION(action),
-                                  g_variant_new_boolean(state));
+        g_action_change_state(action, g_variant_new_boolean(state));
     else
         g_print("%s action \"%s\" not found\n", __func__, action_name);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]