[network-manager-applet/th/validation-error-bgo754832: 2/13] c-e: don't pass actionable argument to CEPolkitButton:update_button()



commit 8a77b227ad7cde7d9eed622a83e0d560b38ed19b
Author: Thomas Haller <thaller redhat com>
Date:   Thu Sep 10 17:42:50 2015 +0200

    c-e: don't pass actionable argument to CEPolkitButton:update_button()

 src/connection-editor/ce-polkit-button.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/connection-editor/ce-polkit-button.c b/src/connection-editor/ce-polkit-button.c
index c72177f..690ed92 100644
--- a/src/connection-editor/ce-polkit-button.c
+++ b/src/connection-editor/ce-polkit-button.c
@@ -59,9 +59,12 @@ enum {
 static guint signals[LAST_SIGNAL] = { 0 };
 
 static void
-update_button (CEPolkitButton *self, gboolean actionable)
+update_button (CEPolkitButton *self)
 {
        CEPolkitButtonPrivate *priv = CE_POLKIT_BUTTON_GET_PRIVATE (self);
+       gboolean actionable;
+
+       actionable = ce_polkit_button_get_actionable (self);
 
        gtk_widget_set_sensitive (GTK_WIDGET (self), actionable);
 
@@ -80,7 +83,7 @@ update_and_emit (CEPolkitButton *self, gboolean old_actionable)
        gboolean new_actionable;
 
        new_actionable = ce_polkit_button_get_actionable (self);
-       update_button (self, new_actionable);
+       update_button (self);
        if (new_actionable != old_actionable)
                g_signal_emit (self, signals[ACTIONABLE], 0, new_actionable);
 }
@@ -172,8 +175,7 @@ ce_polkit_button_new (const char *label,
        g_object_ref_sink (priv->auth);
 
        gtk_button_set_label (GTK_BUTTON (object), label);
-       update_button (CE_POLKIT_BUTTON (object),
-                      ce_polkit_button_get_actionable (CE_POLKIT_BUTTON (object)));
+       update_button (CE_POLKIT_BUTTON (object));
 
        permission_changed_cb (client,
                               permission,


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