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
=== modified file 'panels/bluetooth/bluetooth.ui'
--- panels/bluetooth/bluetooth.ui 2014-02-19 23:36:18 +0000
+++ panels/bluetooth/bluetooth.ui 2014-02-20 23:00:28 +0000
@@ -671,6 +671,26 @@
671 </packing>671 </packing>
672 </child>672 </child>
673 <child>673 <child>
674 <object class="GtkCheckButton" id="menubar_visibility_toggle">
675 <property name="label" translatable="yes">_Show Bluetooth status in the menu bar</property>
676 <property name="use_action_appearance">False</property>
677 <property name="visible">True</property>
678 <property name="can_focus">True</property>
679 <property name="receives_default">False</property>
680 <property name="margin_top">6</property>
681 <property name="use_action_appearance">False</property>
682 <property name="use_underline">True</property>
683 <property name="xalign">0</property>
684 <property name="draw_indicator">True</property>
685 </object>
686 <packing>
687 <property name="left_attach">0</property>
688 <property name="top_attach">2</property>
689 <property name="width">2</property>
690 <property name="height">1</property>
691 </packing>
692 </child>
693 <child>
674 <object class="GtkBox" id="box_vis">694 <object class="GtkBox" id="box_vis">
675 <property name="visible">True</property>695 <property name="visible">True</property>
676 <property name="can_focus">False</property>696 <property name="can_focus">False</property>
677697
=== modified file 'panels/bluetooth/cc-bluetooth-panel.c'
--- panels/bluetooth/cc-bluetooth-panel.c 2014-02-19 23:36:18 +0000
+++ panels/bluetooth/cc-bluetooth-panel.c 2014-02-20 23:00:28 +0000
@@ -57,6 +57,7 @@
57 gboolean debug;57 gboolean debug;
58 GHashTable *connecting_devices;58 GHashTable *connecting_devices;
59 GCancellable *cancellable;59 GCancellable *cancellable;
60 GSettings *indicator_settings;
60};61};
6162
62static void cc_bluetooth_panel_finalize (GObject *object);63static void cc_bluetooth_panel_finalize (GObject *object);
@@ -108,6 +109,7 @@
108 g_clear_object (&self->priv->builder);109 g_clear_object (&self->priv->builder);
109 g_clear_object (&self->priv->killswitch);110 g_clear_object (&self->priv->killswitch);
110 g_clear_object (&self->priv->client);111 g_clear_object (&self->priv->client);
112 g_clear_object (&self->priv->indicator_settings);
111113
112 g_clear_pointer (&self->priv->connecting_devices, g_hash_table_destroy);114 g_clear_pointer (&self->priv->connecting_devices, g_hash_table_destroy);
113 g_clear_pointer (&self->priv->selected_bdaddr, g_free);115 g_clear_pointer (&self->priv->selected_bdaddr, g_free);
@@ -908,6 +910,12 @@
908 G_CALLBACK (killswitch_changed), self);910 G_CALLBACK (killswitch_changed), self);
909 cc_bluetooth_panel_update_power (self);911 cc_bluetooth_panel_update_power (self);
910912
913 /* Set up the menubar visibility toggle */
914 self->priv->indicator_settings = g_settings_new ("com.canonical.indicator.bluetooth");
915 g_settings_bind (self->priv->indicator_settings, "visible",
916 WID("menubar_visibility_toggle"), "active",
917 G_SETTINGS_BIND_DEFAULT);
918
911 gtk_widget_show_all (GTK_WIDGET (self));919 gtk_widget_show_all (GTK_WIDGET (self));
912}920}
913921

Subscribers

People subscribed via source and target branches