aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-05-20 14:18:08 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-05-20 14:18:08 -0500
commit3c2d328731ce6e776192af28e1e17fcef6dda29c (patch)
tree8853d0fa0d06297a6a27de667cb7b697af600ef6 /src
parent5288b423da2c18e91c10be9aab71ba26da314540 (diff)
parent65f56468d1c02a02ea51a3ac336dc3ffe60db524 (diff)
downloadayatana-indicator-power-3c2d328731ce6e776192af28e1e17fcef6dda29c.tar.gz
ayatana-indicator-power-3c2d328731ce6e776192af28e1e17fcef6dda29c.tar.bz2
ayatana-indicator-power-3c2d328731ce6e776192af28e1e17fcef6dda29c.zip
sync with indicator-power/15.04
Diffstat (limited to 'src')
-rw-r--r--src/service.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index dad6dc8..f0b3ef9 100644
--- a/src/service.c
+++ b/src/service.c
@@ -110,6 +110,7 @@ struct _IndicatorPowerServicePrivate
guint actions_export_id;
GDBusConnection * conn;
+ gboolean menus_built;
struct ProfileMenuInfo menus[N_PROFILES];
GSimpleActionGroup * actions;
@@ -674,7 +675,7 @@ rebuild_now (IndicatorPowerService * self, guint sections)
g_simple_action_set_state (p->header_action, create_header_state (self));
}
- if (p->conn == NULL) /* we haven't built the menus yet */
+ if (!p->menus_built)
return;
if (sections & SECTION_DEVICES)
@@ -1184,6 +1185,7 @@ indicator_power_service_init (IndicatorPowerService * self)
for (i=0; i<N_PROFILES; ++i)
create_menu(self, i);
+ p->menus_built = TRUE;
g_signal_connect_swapped(p->brightness, "notify::auto-brightness-supported",
G_CALLBACK(on_auto_brightness_supported_changed), self);