Merge lp:~muktupavels/gnome-panel/lp-1076830 into lp:ubuntu/utopic/gnome-panel

Proposed by Alberts Muktupāvels
Status: Merged
Merge reported by: Dmitry Shachnev
Merged at revision: not available
Proposed branch: lp:~muktupavels/gnome-panel/lp-1076830
Merge into: lp:ubuntu/utopic/gnome-panel
Diff against target: 92 lines (+72/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/lp-1076830.patch (+64/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~muktupavels/gnome-panel/lp-1076830
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+233108@code.launchpad.net

Commit message

Fix crash when removing in-process applet from panel and then again adding it back. (LP: #1076830)

Description of the change

Fix crash when removing in-process applet from panel and then again adding it back. (LP: #1076830)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-08-23 18:48:54 +0000
3+++ debian/changelog 2014-09-02 19:54:20 +0000
4@@ -1,3 +1,10 @@
5+gnome-panel (1:3.8.1-1ubuntu2) UNRELEASED; urgency=medium
6+
7+ * Fix crash when in-process applet is removed from panel and then
8+ added back to panel. (LP: #1076830)
9+
10+ -- Alberts Muktupāvels <alberts.muktupavels@gmail.com> Tue, 02 Sep 2014 22:38:05 +0300
11+
12 gnome-panel (1:3.8.1-1ubuntu1) utopic; urgency=medium
13
14 * Merge with Debian unreleased Svn, remaining changes:
15
16=== added file 'debian/patches/lp-1076830.patch'
17--- debian/patches/lp-1076830.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/lp-1076830.patch 2014-09-02 19:54:20 +0000
19@@ -0,0 +1,64 @@
20+From 4cc44248050cf2603e2a5c9185c7a63704529e3e Mon Sep 17 00:00:00 2001
21+From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <alberts.muktupavels@gmail.com>
22+Date: Tue, 2 Sep 2014 22:17:01 +0300
23+Subject: [PATCH] libpanel-applet: unown bus name and unregister dbus object
24+
25+https://bugzilla.gnome.org/show_bug.cgi?id=692610
26+---
27+ libpanel-applet/panel-applet-factory.c | 19 +++++++++++++++++--
28+ 1 file changed, 17 insertions(+), 2 deletions(-)
29+
30+diff --git a/libpanel-applet/panel-applet-factory.c b/libpanel-applet/panel-applet-factory.c
31+index 7e8895c..57ac8f4 100644
32+--- a/libpanel-applet/panel-applet-factory.c
33++++ b/libpanel-applet/panel-applet-factory.c
34+@@ -28,6 +28,10 @@ struct _PanelAppletFactory {
35+ guint n_applets;
36+ GType applet_type;
37+ GClosure *closure;
38++
39++ GDBusConnection *connection;
40++ gint owner_id;
41++ gint registration_id;
42+ };
43+
44+ struct _PanelAppletFactoryClass {
45+@@ -44,6 +48,16 @@ panel_applet_factory_finalize (GObject *object)
46+ {
47+ PanelAppletFactory *factory = PANEL_APPLET_FACTORY (object);
48+
49++ if (factory->registration_id) {
50++ g_dbus_connection_unregister_object (factory->connection, factory->registration_id);
51++ factory->registration_id = 0;
52++ }
53++
54++ if (factory->owner_id) {
55++ g_bus_unown_name (factory->owner_id);
56++ factory->owner_id = 0;
57++ }
58++
59+ if (factory->factory_id) {
60+ g_free (factory->factory_id);
61+ factory->factory_id = NULL;
62+@@ -218,7 +232,8 @@ on_bus_acquired (GDBusConnection *connection,
63+ if (!introspection_data)
64+ introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
65+ object_path = g_strdup_printf (PANEL_APPLET_FACTORY_OBJECT_PATH, factory->factory_id);
66+- g_dbus_connection_register_object (connection,
67++ factory->connection = connection;
68++ factory->registration_id = g_dbus_connection_register_object (connection,
69+ object_path,
70+ introspection_data->interfaces[0],
71+ &interface_vtable,
72+@@ -246,7 +261,7 @@ panel_applet_factory_register_service (PanelAppletFactory *factory)
73+ gchar *service_name;
74+
75+ service_name = g_strdup_printf (PANEL_APPLET_FACTORY_SERVICE_NAME, factory->factory_id);
76+- g_bus_own_name (G_BUS_TYPE_SESSION,
77++ factory->owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
78+ service_name,
79+ G_BUS_NAME_OWNER_FLAGS_NONE,
80+ (GBusAcquiredCallback) on_bus_acquired,
81+--
82+2.1.0
83+
84
85=== modified file 'debian/patches/series'
86--- debian/patches/series 2014-08-23 18:48:54 +0000
87+++ debian/patches/series 2014-09-02 19:54:20 +0000
88@@ -8,3 +8,4 @@
89 51_desktop_file.patch
90 lp-1314706.patch
91 clock-fix-expanding.patch
92+lp-1076830.patch

Subscribers

People subscribed via source and target branches