diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-02-13 14:18:56 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-02-13 14:18:56 -0600 |
commit | 0c1e774b428c6ccb76e6ad9e0de9e809b56790fa (patch) | |
tree | b006365d9aea686bb25fc3d10408fbccc36fb44f | |
parent | cb4bd9d9338e07504365491c1b45bf7918fdc8bc (diff) | |
download | ayatana-indicator-power-0c1e774b428c6ccb76e6ad9e0de9e809b56790fa.tar.gz ayatana-indicator-power-0c1e774b428c6ccb76e6ad9e0de9e809b56790fa.tar.bz2 ayatana-indicator-power-0c1e774b428c6ccb76e6ad9e0de9e809b56790fa.zip |
remove unncessary private field 'visible'
-rw-r--r-- | src/indicator-power.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/indicator-power.c b/src/indicator-power.c index 90db2f9..bbd00d8 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -78,8 +78,6 @@ typedef struct { GVariant *device; GSettings *settings; - - gboolean visible; } IndicatorPower; @@ -123,8 +121,6 @@ indicator_power_init (IndicatorPower *self) self->accessible_desc = NULL; - self->visible = FALSE; - self->watcher_id = g_bus_watch_name (G_BUS_TYPE_SESSION, DBUS_SERVICE, G_BUS_NAME_WATCHER_FLAGS_NONE, @@ -137,7 +133,7 @@ indicator_power_init (IndicatorPower *self) g_signal_connect_swapped (self->settings, "changed::" ICON_POLICY_KEY, G_CALLBACK(update_visibility), self); g_object_set (G_OBJECT(self), - INDICATOR_OBJECT_DEFAULT_VISIBILITY, self->visible, + INDICATOR_OBJECT_DEFAULT_VISIBILITY, FALSE, NULL); } @@ -827,13 +823,8 @@ get_devices_cb (GObject *source_object, static void update_visibility (IndicatorPower * self) { - const gboolean visible = should_be_visible (self); - - if (self->visible != visible) - { - self->visible = visible; - indicator_object_set_visible (INDICATOR_OBJECT (self), visible); - } + indicator_object_set_visible (INDICATOR_OBJECT (self), + should_be_visible (self)); } static void |