summaryrefslogtreecommitdiff
path: root/community/cinnamon-control-center/remove_obex.patch
blob: abcf1be88339b246e5b9b8c47c6dd45dbcd87fd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
--- a/panels/bluetooth/bluetooth.ui
+++ b/panels/bluetooth/bluetooth.ui
@@ -543,34 +543,6 @@
                                 <property name="position">3</property>
                               </packing>
                             </child>
-                            <child>
-                              <object class="GtkBox" id="browse_box">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <object class="GtkButton" id="browse_button">
-                                    <property name="label" translatable="yes">Browse Files...</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="use_action_appearance">False</property>
-                                  </object>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="pack_type">end</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">4</property>
-                              </packing>
-                            </child>
                           </object>
                           <packing>
                             <property name="expand">False</property>
--- a/panels/bluetooth/cc-bluetooth-panel.c
+++ b/panels/bluetooth/cc-bluetooth-panel.c
@@ -311,7 +311,6 @@ cc_bluetooth_panel_update_properties (Cc
 	gtk_widget_hide (WID ("keyboard_box"));
 	gtk_widget_hide (WID ("sound_box"));
 	gtk_widget_hide (WID ("mouse_box"));
-	gtk_widget_hide (WID ("browse_box"));
 	gtk_widget_hide (WID ("send_box"));
 
 	bdaddr = bluetooth_chooser_get_selected_device (BLUETOOTH_CHOOSER (self->priv->chooser));
@@ -367,10 +366,10 @@ cc_bluetooth_panel_update_properties (Cc
 
 			uuids = (const char **) g_value_get_boxed (&value);
 			for (i = 0; uuids && uuids[i] != NULL; i++) {
-				if (g_str_equal (uuids[i], "OBEXObjectPush"))
+				if (g_str_equal (uuids[i], "OBEXObjectPush")) {
 					gtk_widget_show (WID ("send_box"));
-				else if (g_str_equal (uuids[i], "OBEXFileTransfer"))
-					gtk_widget_show (WID ("browse_box"));
+					break;
+				}
 			}
 			g_value_unset (&value);
 		}
@@ -538,34 +537,6 @@ send_callback (GtkButton        *button,
 	g_free (alias);
 }
 
-static void
-mount_finish_cb (GObject *source_object,
-		 GAsyncResult *res,
-		 gpointer user_data)
-{
-	GError *error = NULL;
-
-	if (bluetooth_browse_address_finish (source_object, res, &error) == FALSE) {
-		g_printerr ("Failed to mount OBEX volume: %s", error->message);
-		g_error_free (error);
-		return;
-	}
-}
-
-static void
-browse_callback (GtkButton        *button,
-		 CcBluetoothPanel *self)
-{
-	char *bdaddr;
-
-	bdaddr = bluetooth_chooser_get_selected_device (BLUETOOTH_CHOOSER (self->priv->chooser));
-
-	bluetooth_browse_address (G_OBJECT (self), bdaddr,
-				  GDK_CURRENT_TIME, mount_finish_cb, NULL);
-
-	g_free (bdaddr);
-}
-
 /* Visibility/Discoverable */
 static void discoverable_changed (BluetoothClient  *client,
 				  GParamSpec       *spec,
@@ -894,8 +865,6 @@ cc_bluetooth_panel_init (CcBluetoothPane
 			  G_CALLBACK (keyboard_callback), self);
 	g_signal_connect (G_OBJECT (WID ("sound_link")), "activate-link",
 			  G_CALLBACK (sound_callback), self);
-	g_signal_connect (G_OBJECT (WID ("browse_button")), "clicked",
-			  G_CALLBACK (browse_callback), self);
 	g_signal_connect (G_OBJECT (WID ("send_button")), "clicked",
 			  G_CALLBACK (send_callback), self);
 	g_signal_connect (G_OBJECT (WID ("switch_connection")), "notify::active",