Merge lp:~seb128/unity-control-center/bluetooth-hide-indicator into lp:unity-control-center

Proposed by Sebastien Bacher
Status: Merged
Approved by: Iain Lane
Approved revision: 12721
Merged at revision: 12725
Proposed branch: lp:~seb128/unity-control-center/bluetooth-hide-indicator
Merge into: lp:unity-control-center
Diff against target: 62 lines (+28/-0)
2 files modified
panels/bluetooth/bluetooth.ui (+20/-0)
panels/bluetooth/cc-bluetooth-panel.c (+8/-0)
To merge this branch: bzr merge lp:~seb128/unity-control-center/bluetooth-hide-indicator
Reviewer Review Type Date Requested Status
Iain Lane Approve
PS Jenkins bot (community) continuous-integration Approve
Robert Ancell Pending
Unity Control Center development team Pending
Review via email: mp+207567@code.launchpad.net

Commit message

bluetooth: let hide the bluetooth indicator, thanks Charles Kerr

Description of the change

bluetooth: let hide the bluetooth indicator, thanks Charles Kerr

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Iain Lane (laney) wrote :

Good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panels/bluetooth/bluetooth.ui'
2--- panels/bluetooth/bluetooth.ui 2014-02-19 23:36:18 +0000
3+++ panels/bluetooth/bluetooth.ui 2014-02-20 23:00:28 +0000
4@@ -671,6 +671,26 @@
5 </packing>
6 </child>
7 <child>
8+ <object class="GtkCheckButton" id="menubar_visibility_toggle">
9+ <property name="label" translatable="yes">_Show Bluetooth status in the menu bar</property>
10+ <property name="use_action_appearance">False</property>
11+ <property name="visible">True</property>
12+ <property name="can_focus">True</property>
13+ <property name="receives_default">False</property>
14+ <property name="margin_top">6</property>
15+ <property name="use_action_appearance">False</property>
16+ <property name="use_underline">True</property>
17+ <property name="xalign">0</property>
18+ <property name="draw_indicator">True</property>
19+ </object>
20+ <packing>
21+ <property name="left_attach">0</property>
22+ <property name="top_attach">2</property>
23+ <property name="width">2</property>
24+ <property name="height">1</property>
25+ </packing>
26+ </child>
27+ <child>
28 <object class="GtkBox" id="box_vis">
29 <property name="visible">True</property>
30 <property name="can_focus">False</property>
31
32=== modified file 'panels/bluetooth/cc-bluetooth-panel.c'
33--- panels/bluetooth/cc-bluetooth-panel.c 2014-02-19 23:36:18 +0000
34+++ panels/bluetooth/cc-bluetooth-panel.c 2014-02-20 23:00:28 +0000
35@@ -57,6 +57,7 @@
36 gboolean debug;
37 GHashTable *connecting_devices;
38 GCancellable *cancellable;
39+ GSettings *indicator_settings;
40 };
41
42 static void cc_bluetooth_panel_finalize (GObject *object);
43@@ -108,6 +109,7 @@
44 g_clear_object (&self->priv->builder);
45 g_clear_object (&self->priv->killswitch);
46 g_clear_object (&self->priv->client);
47+ g_clear_object (&self->priv->indicator_settings);
48
49 g_clear_pointer (&self->priv->connecting_devices, g_hash_table_destroy);
50 g_clear_pointer (&self->priv->selected_bdaddr, g_free);
51@@ -908,6 +910,12 @@
52 G_CALLBACK (killswitch_changed), self);
53 cc_bluetooth_panel_update_power (self);
54
55+ /* Set up the menubar visibility toggle */
56+ self->priv->indicator_settings = g_settings_new ("com.canonical.indicator.bluetooth");
57+ g_settings_bind (self->priv->indicator_settings, "visible",
58+ WID("menubar_visibility_toggle"), "active",
59+ G_SETTINGS_BIND_DEFAULT);
60+
61 gtk_widget_show_all (GTK_WIDGET (self));
62 }
63

Subscribers

People subscribed via source and target branches