Merge lp:~seb128/unity-control-center/bluetooth-backport-commit into lp:unity-control-center

Proposed by Sebastien Bacher
Status: Merged
Approved by: Robert Ancell
Approved revision: 12713
Merged at revision: 12718
Proposed branch: lp:~seb128/unity-control-center/bluetooth-backport-commit
Merge into: lp:unity-control-center
Diff against target: 174 lines (+41/-16)
4 files modified
panels/bluetooth/Makefile.am (+13/-6)
panels/bluetooth/bluetooth.gresource.xml (+6/-0)
panels/bluetooth/bluetooth.ui (+2/-2)
panels/bluetooth/cc-bluetooth-panel.c (+20/-8)
To merge this branch: bzr merge lp:~seb128/unity-control-center/bluetooth-backport-commit
Reviewer Review Type Date Requested Status
Robert Ancell Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+207323@code.launchpad.net

Commit message

[bluetooth] backport some upstream changes

Description of the change

[bluetooth] backport some upstream changes

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
12713. By Sebastien Bacher

[bluetooth] backport some upstream changes

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Missing bluetooth.gresource.xml

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hmm, no it's there. I'll get Jenkins to retry.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

> Hmm, no it's there. I'll get Jenkins to retry.

yeah, sorry, I pushed --overwrite over the version that was missign it, should probably have added it in another commit to be less confusing ;-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'panels/bluetooth/Makefile.am'
--- panels/bluetooth/Makefile.am 2013-11-29 06:28:37 +0000
+++ panels/bluetooth/Makefile.am 2014-02-19 23:36:47 +0000
@@ -8,26 +8,33 @@
8 $(PANEL_CFLAGS) \8 $(PANEL_CFLAGS) \
9 $(BLUETOOTH_CFLAGS) \9 $(BLUETOOTH_CFLAGS) \
10 -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \10 -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
11 -DPKGDATADIR="\"$(pkgdatadir)\"" \
12 $(NULL)11 $(NULL)
1312
13BUILT_SOURCES = \
14 cc-bluetooth-resources.h \
15 cc-bluetooth-resources.c
16
14libbluetooth_la_SOURCES = \17libbluetooth_la_SOURCES = \
18 $(BUILT_SOURCES) \
15 cc-bluetooth-panel.c \19 cc-bluetooth-panel.c \
16 cc-bluetooth-panel.h20 cc-bluetooth-panel.h
1721
18libbluetooth_la_LIBADD = $(PANEL_LIBS) $(BLUETOOTH_LIBS)22libbluetooth_la_LIBADD = $(PANEL_LIBS) $(BLUETOOTH_LIBS)
19libbluetooth_la_LDFLAGS = $(PANEL_LDFLAGS)23libbluetooth_la_LDFLAGS = $(PANEL_LDFLAGS)
2024
25resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/bluetooth.gresource.xml)
26cc-bluetooth-resources.c: bluetooth.gresource.xml $(resource_files)
27 $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name cc_bluetooth $<
28cc-bluetooth-resources.h: bluetooth.gresource.xml $(resource_files)
29 $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name cc_bluetooth $<
30
21desktopdir = $(datadir)/applications31desktopdir = $(datadir)/applications
22desktop_in_in_files = untiy-bluetooth-panel.desktop.in.in32desktop_in_in_files = untiy-bluetooth-panel.desktop.in.in
23desktop_in_files = unity-bluetooth-panel.desktop.in33desktop_in_files = unity-bluetooth-panel.desktop.in
24desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)34desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
25@INTLTOOL_DESKTOP_RULE@35@INTLTOOL_DESKTOP_RULE@
2636
27ui_DATA = bluetooth.ui37CLEANFILES = $(desktop_DATA) $(BUILT_SOURCES)
28uidir = $(pkgdatadir)38EXTRA_DIST = $(man_MANS) $(desktop_in_in_files) $(resource_files) bluetooth.gresource.xml
29
30CLEANFILES = $(desktop_DATA)
31EXTRA_DIST = $(man_MANS) $(desktop_in_in_files) $(ui_DATA)
3239
33-include $(top_srcdir)/git.mk40-include $(top_srcdir)/git.mk
3441
=== added file 'panels/bluetooth/bluetooth.gresource.xml'
--- panels/bluetooth/bluetooth.gresource.xml 1970-01-01 00:00:00 +0000
+++ panels/bluetooth/bluetooth.gresource.xml 2014-02-19 23:36:47 +0000
@@ -0,0 +1,6 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<gresources>
3 <gresource prefix="/org/gnome/control-center/bluetooth">
4 <file preprocess="xml-stripblanks">bluetooth.ui</file>
5 </gresource>
6</gresources>
07
=== modified file 'panels/bluetooth/bluetooth.ui'
--- panels/bluetooth/bluetooth.ui 2014-02-12 18:58:26 +0000
+++ panels/bluetooth/bluetooth.ui 2014-02-19 23:36:47 +0000
@@ -526,7 +526,7 @@
526 </child>526 </child>
527 <child>527 <child>
528 <object class="GtkButton" id="send_button">528 <object class="GtkButton" id="send_button">
529 <property name="label" translatable="yes">Send Files...</property>529 <property name="label" translatable="yes">Send Files…</property>
530 <property name="can_focus">True</property>530 <property name="can_focus">True</property>
531 <property name="receives_default">True</property>531 <property name="receives_default">True</property>
532 <property name="use_action_appearance">False</property>532 <property name="use_action_appearance">False</property>
@@ -554,7 +554,7 @@
554 </child>554 </child>
555 <child>555 <child>
556 <object class="GtkButton" id="browse_button">556 <object class="GtkButton" id="browse_button">
557 <property name="label" translatable="yes">Browse Files...</property>557 <property name="label" translatable="yes">Browse Files…</property>
558 <property name="can_focus">True</property>558 <property name="can_focus">True</property>
559 <property name="receives_default">True</property>559 <property name="receives_default">True</property>
560 <property name="use_action_appearance">False</property>560 <property name="use_action_appearance">False</property>
561561
=== modified file 'panels/bluetooth/cc-bluetooth-panel.c'
--- panels/bluetooth/cc-bluetooth-panel.c 2014-02-18 03:09:04 +0000
+++ panels/bluetooth/cc-bluetooth-panel.c 2014-02-19 23:36:47 +0000
@@ -29,6 +29,7 @@
29#include <shell/cc-shell.h>29#include <shell/cc-shell.h>
3030
31#include "cc-bluetooth-panel.h"31#include "cc-bluetooth-panel.h"
32#include "cc-bluetooth-resources.h"
3233
33#include <bluetooth-client.h>34#include <bluetooth-client.h>
34#include <bluetooth-utils.h>35#include <bluetooth-utils.h>
@@ -55,6 +56,7 @@
55 BluetoothKillswitch *killswitch;56 BluetoothKillswitch *killswitch;
56 gboolean debug;57 gboolean debug;
57 GHashTable *connecting_devices;58 GHashTable *connecting_devices;
59 GCancellable *cancellable;
58};60};
5961
60static void cc_bluetooth_panel_finalize (GObject *object);62static void cc_bluetooth_panel_finalize (GObject *object);
@@ -100,6 +102,9 @@
100 bluetooth_plugin_manager_cleanup ();102 bluetooth_plugin_manager_cleanup ();
101103
102 self = CC_BLUETOOTH_PANEL (object);104 self = CC_BLUETOOTH_PANEL (object);
105 g_cancellable_cancel (self->priv->cancellable);
106 g_clear_object (&self->priv->cancellable);
107
103 g_clear_object (&self->priv->builder);108 g_clear_object (&self->priv->builder);
104 g_clear_object (&self->priv->killswitch);109 g_clear_object (&self->priv->killswitch);
105 g_clear_object (&self->priv->client);110 g_clear_object (&self->priv->client);
@@ -163,10 +168,13 @@
163 CcBluetoothPanel *self;168 CcBluetoothPanel *self;
164 char *bdaddr;169 char *bdaddr;
165 gboolean success;170 gboolean success;
171 GError *error = NULL;
166 ConnectData *data = (ConnectData *) user_data;172 ConnectData *data = (ConnectData *) user_data;
167173
168 success = bluetooth_client_connect_service_finish (BLUETOOTH_CLIENT (source_object),174 success = bluetooth_client_connect_service_finish (BLUETOOTH_CLIENT (source_object),
169 res, NULL);175 res, &error);
176 if (!success && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
177 goto out;
170178
171 self = data->self;179 self = data->self;
172180
@@ -185,7 +193,9 @@
185 remove_connecting (self, data->bdaddr);193 remove_connecting (self, data->bdaddr);
186194
187 g_free (bdaddr);195 g_free (bdaddr);
188 g_object_unref (data->self);196
197out:
198 g_clear_error (&error);
189 g_free (data->bdaddr);199 g_free (data->bdaddr);
190 g_free (data);200 g_free (data);
191}201}
@@ -219,12 +229,12 @@
219229
220 data = g_new0 (ConnectData, 1);230 data = g_new0 (ConnectData, 1);
221 data->bdaddr = bdaddr;231 data->bdaddr = bdaddr;
222 data->self = g_object_ref (self);232 data->self = self;
223233
224 bluetooth_client_connect_service (self->priv->client,234 bluetooth_client_connect_service (self->priv->client,
225 proxy,235 proxy,
226 gtk_switch_get_active (button),236 gtk_switch_get_active (button),
227 NULL,237 self->priv->cancellable,
228 connect_done,238 connect_done,
229 data);239 data);
230240
@@ -796,8 +806,10 @@
796 GtkStyleContext *context;806 GtkStyleContext *context;
797807
798 self->priv = BLUETOOTH_PANEL_PRIVATE (self);808 self->priv = BLUETOOTH_PANEL_PRIVATE (self);
809 g_resources_register (cc_bluetooth_get_resource ());
799810
800 bluetooth_plugin_manager_init ();811 bluetooth_plugin_manager_init ();
812 self->priv->cancellable = g_cancellable_new ();
801 self->priv->killswitch = bluetooth_killswitch_new ();813 self->priv->killswitch = bluetooth_killswitch_new ();
802 self->priv->client = bluetooth_client_new ();814 self->priv->client = bluetooth_client_new ();
803 self->priv->connecting_devices = g_hash_table_new_full (g_str_hash,815 self->priv->connecting_devices = g_hash_table_new_full (g_str_hash,
@@ -808,11 +820,11 @@
808820
809 self->priv->builder = gtk_builder_new ();821 self->priv->builder = gtk_builder_new ();
810 gtk_builder_set_translation_domain (self->priv->builder, GETTEXT_PACKAGE);822 gtk_builder_set_translation_domain (self->priv->builder, GETTEXT_PACKAGE);
811 gtk_builder_add_from_file (self->priv->builder,823 gtk_builder_add_from_resource (self->priv->builder,
812 PKGDATADIR "/bluetooth.ui",824 "/org/gnome/control-center/bluetooth/bluetooth.ui",
813 &error);825 &error);
814 if (error != NULL) {826 if (error != NULL) {
815 g_warning ("Failed to load '%s': %s", PKGDATADIR "/bluetooth.ui", error->message);827 g_warning ("Could not load ui: %s", error->message);
816 g_error_free (error);828 g_error_free (error);
817 return;829 return;
818 }830 }

Subscribers

People subscribed via source and target branches