From 2ab8c32c38738fb448bd5f31548fdbed96fe37457803f635995e2b31db8001a0 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Fri, 21 Oct 2011 16:10:46 +0000 Subject: [PATCH] Accepting request 89013 from home:RBrownCCB:branches:GNOME:Factory - Add gnome-shell-cleanup-signal-handlers-on-destroy.patch to fix some issue when using extensions changing the usermenu [bgo#660520 and bnc#725004] OBS-URL: https://build.opensuse.org/request/show/89013 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=86 --- ...l-cleanup-signal-handlers-on-destroy.patch | 41 +++++++++++++++++++ gnome-shell.changes | 7 ++++ gnome-shell.spec | 3 ++ 3 files changed, 51 insertions(+) create mode 100644 gnome-shell-cleanup-signal-handlers-on-destroy.patch diff --git a/gnome-shell-cleanup-signal-handlers-on-destroy.patch b/gnome-shell-cleanup-signal-handlers-on-destroy.patch new file mode 100644 index 0000000..c19cd78 --- /dev/null +++ b/gnome-shell-cleanup-signal-handlers-on-destroy.patch @@ -0,0 +1,41 @@ +From 7945c56a9f2cb5c2dc8736bc46e92d225cca9251 Mon Sep 17 00:00:00 2001 +From: Giovanni Campagna +Date: Mon, 17 Oct 2011 15:18:25 +0200 +Subject: [PATCH] IMStatusChooserItem: clean up signal handlers on destroy() + +Extensions (like alternative-status-menu) expect that calling +destroy() on a menu item will not leave signal handlers around. + +https://bugzilla.gnome.org/show_bug.cgi?id=660520 +--- + js/ui/userMenu.js | 15 +++++++++++++++ + 1 files changed, 15 insertions(+), 0 deletions(-) + +diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js +index 40ca2f3..8bedfb9 100644 +--- a/js/ui/userMenu.js ++++ b/js/ui/userMenu.js +@@ -199,6 +199,21 @@ IMStatusChooserItem.prototype = { + })); + }, + ++ destroy: function() { ++ // clean up signal handlers ++ if (this._userLoadedId != 0) { ++ this._user.disconnect(this._userLoadedId); ++ this._userLoadedId = 0; ++ } ++ ++ if (this._userChangedId != 0) { ++ this._user.disconnect(this._userChangedId); ++ this._userChangedId = 0; ++ } ++ ++ PopupMenu.PopupBaseMenuItem.prototype.destroy.call(this); ++ }, ++ + // Override getColumnWidths()/setColumnWidths() to make the item + // independent from the overall column layout of the menu + getColumnWidths: function() { +-- +1.7.6.4 diff --git a/gnome-shell.changes b/gnome-shell.changes index d7efbec..be08f7a 100644 --- a/gnome-shell.changes +++ b/gnome-shell.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Oct 20 12:02:48 UTC 2011 - sysrich@linux.com + +- Add gnome-shell-cleanup-signal-handlers-on-destroy.patch to fix + some issue when using extensions changing the usermenu + [bgo#660520 and bnc#725004] + ------------------------------------------------------------------- Tue Oct 18 07:40:48 UTC 2011 - dimstar@opensuse.org diff --git a/gnome-shell.spec b/gnome-shell.spec index 093ea89..d17a378 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -25,6 +25,8 @@ Summary: GNOME Shell Group: System/GUI/GNOME Url: http://live.gnome.org/GnomeShell Source: http://download.gnome.org/sources/gnome-shell/3.2/%{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM gnome-shell-cleanup-signal-handlers-on-destroy.patch bnc#725004 sysrich@linux.com -- patch to fix some issue when using extensions changing the usermenu +Patch0: gnome-shell-cleanup-signal-handlers-on-destroy.patch BuildRequires: intltool BuildRequires: translation-update-upstream BuildRequires: update-desktop-files @@ -108,6 +110,7 @@ to enable, disable and install them. %lang_package %prep %setup -q +%patch0 -p1 translation-update-upstream %build