Merge lp:~seb128/unity-control-center/bluetooth-leftover-button into lp:unity-control-center

Proposed by Sebastien Bacher on 2016-05-12
Status: Merged
Approved by: Sebastien Bacher on 2016-05-17
Approved revision: 12862
Merged at revision: 12862
Proposed branch: lp:~seb128/unity-control-center/bluetooth-leftover-button
Merge into: lp:unity-control-center
Diff against target: 64 lines (+3/-32)
2 files modified
panels/bluetooth/bluetooth.ui (+0/-28)
panels/bluetooth/cc-bluetooth-panel.c (+3/-4)
To merge this branch: bzr merge lp:~seb128/unity-control-center/bluetooth-leftover-button
Reviewer Review Type Date Requested Status
Iain Lane 2016-05-12 Needs Information on 2016-05-12
Review via email: mp+294508@code.launchpad.net

Commit message

bluetooh: remove leftover "browse" button, the backend used was removed
during the bluez5 update and the panel callbacks were cleaned out, the button
is doing nothing else than confusing users

Description of the change

bluetooh: remove leftover "browse" button, the backend used was removed
during the bluez5 update and the panel callbacks were cleaned out, the button
is doing nothing else than confusing users

To post a comment you must log in.
Iain Lane (laney) wrote :

Thanks, looks good, just one improvement to suggest

review: Needs Information
Sebastien Bacher (seb128) wrote :

thanks, I guess that could be improved, I cherry picked that bit from upstream https://git.gnome.org/browse/gnome-control-center/commit/?&id=6b95bb27d81f56acc74c99dd3e131e8b228b8209

seems the code is still the same in trunk
https://git.gnome.org/browse/gnome-control-center/tree/panels/bluetooth/cc-bluetooth-panel.c?id=6b95bb27d81f56acc74c99dd3e131e8b228b8209#n353

I'm going to SRU the no-refactoring version but feel free to block that mp if you think the code should be improvement in the same landing (needs to create a bug upstream/suggest a patch/backport that, so it's going to take a bit longer but that's fine we are early in the cycle)

Sebastien Bacher (seb128) wrote :

let's land that fix and improve later

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-03-12 17:29:59 +0000
3+++ panels/bluetooth/bluetooth.ui 2016-05-12 13:51:25 +0000
4@@ -545,34 +545,6 @@
5 <property name="position">3</property>
6 </packing>
7 </child>
8- <child>
9- <object class="GtkBox" id="browse_box">
10- <property name="visible">True</property>
11- <property name="can_focus">False</property>
12- <child>
13- <placeholder/>
14- </child>
15- <child>
16- <object class="GtkButton" id="browse_button">
17- <property name="label" translatable="yes">Browse Files…</property>
18- <property name="can_focus">True</property>
19- <property name="receives_default">True</property>
20- <property name="use_action_appearance">False</property>
21- </object>
22- <packing>
23- <property name="expand">False</property>
24- <property name="fill">False</property>
25- <property name="pack_type">end</property>
26- <property name="position">1</property>
27- </packing>
28- </child>
29- </object>
30- <packing>
31- <property name="expand">False</property>
32- <property name="fill">True</property>
33- <property name="position">4</property>
34- </packing>
35- </child>
36 </object>
37 <packing>
38 <property name="expand">False</property>
39
40=== modified file 'panels/bluetooth/cc-bluetooth-panel.c'
41--- panels/bluetooth/cc-bluetooth-panel.c 2016-03-09 21:55:46 +0000
42+++ panels/bluetooth/cc-bluetooth-panel.c 2016-05-12 13:51:25 +0000
43@@ -276,7 +276,6 @@
44 gtk_widget_hide (WID ("keyboard_box"));
45 gtk_widget_hide (WID ("sound_box"));
46 gtk_widget_hide (WID ("mouse_box"));
47- gtk_widget_hide (WID ("browse_box"));
48 gtk_widget_hide (WID ("send_box"));
49
50 bdaddr = bluetooth_chooser_get_selected_device (BLUETOOTH_CHOOSER (self->priv->chooser));
51@@ -332,10 +331,10 @@
52
53 uuids = (const char **) g_value_get_boxed (&value);
54 for (i = 0; uuids && uuids[i] != NULL; i++) {
55- if (g_str_equal (uuids[i], "OBEXObjectPush"))
56+ if (g_str_equal (uuids[i], "OBEXObjectPush")) {
57 gtk_widget_show (WID ("send_box"));
58- else if (g_str_equal (uuids[i], "OBEXFileTransfer"))
59- gtk_widget_show (WID ("browse_box"));
60+ break;
61+ }
62 }
63 g_value_unset (&value);
64 }

Subscribers

People subscribed via source and target branches