[empathy/f18] Pull upstream patches to fix crash in IRC network chooser widget. (#881434)
Brian Pepple
bpepple at fedoraproject.org
Mon Mar 11 16:22:47 UTC 2013
commit b8372d0b90c44121ccefd3eef5ac21bd94a8966c
Author: Brian Pepple <bpepple at fedoraproject.org>
Date: Mon Mar 11 12:22:43 2013 -0400
Pull upstream patches to fix crash in IRC network chooser widget. (#881434)
001-hook_widget_not_null.patch | 24 ++++++++++
002-disconnect_live_search_signal.patch | 61 ++++++++++++++++++++++++++
003-break_live_search_references_cycle.patch | 28 ++++++++++++
empathy.spec | 11 ++++-
4 files changed, 123 insertions(+), 1 deletions(-)
---
diff --git a/001-hook_widget_not_null.patch b/001-hook_widget_not_null.patch
new file mode 100644
index 0000000..4f98e9f
--- /dev/null
+++ b/001-hook_widget_not_null.patch
@@ -0,0 +1,24 @@
+From f5940b4bb9c483759ada19a887e1789b08cab917 Mon Sep 17 00:00:00 2001
+From: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
+Date: Mon, 11 Mar 2013 15:46:57 +0000
+Subject: live_search_unmap: check if priv->hook_widget is not NULL
+
+https://bugzilla.gnome.org/show_bug.cgi?id=692105
+---
+diff --git a/libempathy-gtk/empathy-live-search.c b/libempathy-gtk/empathy-live-search.c
+index bb1881f..443882f 100644
+--- a/libempathy-gtk/empathy-live-search.c
++++ b/libempathy-gtk/empathy-live-search.c
+@@ -499,7 +499,9 @@ live_search_unmap (GtkWidget *widget)
+ gtk_widget_hide (widget);
+
+ gtk_entry_set_text (GTK_ENTRY (priv->search_entry), "");
+- gtk_widget_grab_focus (priv->hook_widget);
++
++ if (priv->hook_widget != NULL)
++ gtk_widget_grab_focus (priv->hook_widget);
+ }
+
+ static void
+--
+cgit v0.9.1
diff --git a/002-disconnect_live_search_signal.patch b/002-disconnect_live_search_signal.patch
new file mode 100644
index 0000000..7aa8913
--- /dev/null
+++ b/002-disconnect_live_search_signal.patch
@@ -0,0 +1,61 @@
+From 1051341e404a481c3296dddc8f75d5decc28f21d Mon Sep 17 00:00:00 2001
+From: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
+Date: Mon, 11 Mar 2013 15:50:46 +0000
+Subject: irc-network-chooser-dialog: disconnect live search signals in dispose
+
+The 'destroyed' signal is called to late, we have to disconnect those signals
+before destroying the live search object.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=692105
+---
+diff --git a/libempathy-gtk/empathy-irc-network-chooser-dialog.c b/libempathy-gtk/empathy-irc-network-chooser-dialog.c
+index 755eb58..13efaa5 100644
+--- a/libempathy-gtk/empathy-irc-network-chooser-dialog.c
++++ b/libempathy-gtk/empathy-irc-network-chooser-dialog.c
+@@ -505,16 +505,6 @@ search_text_notify_cb (EmpathyLiveSearch *search,
+ }
+
+ static void
+-dialog_destroy_cb (GtkWidget *widget,
+- EmpathyIrcNetworkChooserDialog *self)
+-{
+- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+-
+- g_signal_handler_disconnect (priv->search, priv->search_sig);
+- g_signal_handler_disconnect (priv->search, priv->activate_sig);
+-}
+-
+-static void
+ empathy_irc_network_chooser_dialog_constructed (GObject *object)
+ {
+ EmpathyIrcNetworkChooserDialog *self = (EmpathyIrcNetworkChooserDialog *) object;
+@@ -598,8 +588,6 @@ empathy_irc_network_chooser_dialog_constructed (GObject *object)
+
+ g_signal_connect (self, "response",
+ G_CALLBACK (dialog_response_cb), self);
+- g_signal_connect (self, "destroy",
+- G_CALLBACK (dialog_destroy_cb), self);
+
+ /* Request a side ensuring to display at least some networks */
+ gtk_widget_set_size_request (GTK_WIDGET (self), -1, 300);
+@@ -613,6 +601,18 @@ empathy_irc_network_chooser_dialog_dispose (GObject *object)
+ EmpathyIrcNetworkManager *self = (EmpathyIrcNetworkManager *) object;
+ EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+
++ if (priv->search_sig != 0)
++ {
++ g_signal_handler_disconnect (priv->search, priv->search_sig);
++ priv->search_sig = 0;
++ }
++
++ if (priv->activate_sig != 0)
++ {
++ g_signal_handler_disconnect (priv->search, priv->activate_sig);
++ priv->activate_sig = 0;
++ }
++
+ tp_clear_object (&priv->settings);
+ tp_clear_object (&priv->network);
+ tp_clear_object (&priv->network_manager);
+--
+cgit v0.9.1
diff --git a/003-break_live_search_references_cycle.patch b/003-break_live_search_references_cycle.patch
new file mode 100644
index 0000000..ddf5532
--- /dev/null
+++ b/003-break_live_search_references_cycle.patch
@@ -0,0 +1,28 @@
+From 278b6cf31b679e8473f81ec84a90e092d544c3b1 Mon Sep 17 00:00:00 2001
+From: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
+Date: Mon, 11 Mar 2013 15:54:45 +0000
+Subject: irc-network-chooser-dialog: break live search references cycle
+
+https://bugzilla.gnome.org/show_bug.cgi?id=692105
+---
+diff --git a/libempathy-gtk/empathy-irc-network-chooser-dialog.c b/libempathy-gtk/empathy-irc-network-chooser-dialog.c
+index 13efaa5..598f923 100644
+--- a/libempathy-gtk/empathy-irc-network-chooser-dialog.c
++++ b/libempathy-gtk/empathy-irc-network-chooser-dialog.c
+@@ -613,6 +613,14 @@ empathy_irc_network_chooser_dialog_dispose (GObject *object)
+ priv->activate_sig = 0;
+ }
+
++ if (priv->search != NULL)
++ {
++ empathy_live_search_set_hook_widget (EMPATHY_LIVE_SEARCH (priv->search),
++ NULL);
++
++ priv->search = NULL;
++ }
++
+ tp_clear_object (&priv->settings);
+ tp_clear_object (&priv->network);
+ tp_clear_object (&priv->network_manager);
+--
+cgit v0.9.1
diff --git a/empathy.spec b/empathy.spec
index 7ce7dfc..0219a1c 100644
--- a/empathy.spec
+++ b/empathy.spec
@@ -17,7 +17,7 @@
Name: empathy
Version: 3.6.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Instant Messaging Client for GNOME
License: GPLv2+
@@ -25,6 +25,9 @@ URL: http://live.gnome.org/Empathy
Source0: http://download.gnome.org/sources/%{name}/3.6/%{name}-%{version}.tar.xz
Source1: %{name}-README.ConnectionManagers
+Patch0: 001-hook_widget_not_null.patch
+Patch1: 002-disconnect_live_search_signal.patch
+Patch2: 003-break_live_search_references_cycle.patch
BuildRequires: enchant-devel >= %{enchant_version}
BuildRequires: iso-codes-devel
@@ -80,6 +83,9 @@ It is built on top of the Telepathy framework.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
# force this to be regenerated
rm data/empathy.desktop
@@ -190,6 +196,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/adium/message-styles/PlanetGNOME.AdiumMessageStyle/Contents/Resources/main.css
%changelog
+* Mon Mar 11 2013 Brian Pepple <bpepple at fedoraproject.org> - 3.6.4-2
+- Pull upstream patches to fix crash in IRC network chooser widget. (#881434)
+
* Mon Mar 11 2013 Brian Pepple <bpepple at fedoraproject.org> - 3.6.4-1
- Update to 3.6.4.
- Drop favorite rooms patch. Fixed upstream.
More information about the scm-commits
mailing list