diff --git a/debian/changelog b/debian/changelog index c27c268..f785301 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +empathy (2.28.1-2) UNRELEASED; urgency=low + + * d/patches/0001-Ignoring-non-installed-languages.patch + + Added. Fix a crash when trying to spell-check using a dictionary that's + no longer installed. (from upstream git) + * d/patches/0002-empathy-protocol-chooser-don-t-cache-TpConnectionMan.patch + + Added. Prevent TpConnectionManager from being cached as it can be freed + under out feet. Fixes a crash while managing accounts (Closes: #551265) + (from upstream git) + * d/patches/0003-empathy-chat-window-Don-t-update-the-Contact-menu-if.patch, + d/patches/0004-Fix-crash-when-joining-a-chat-GTK_WIDGET_VISIBLE-is-.patch: + + Added. Fixes Empathy blocking when a notication is displayed while the + contact menu is open (from upstream git) + + -- Sjoerd Simons Sun, 25 Oct 2009 17:41:42 +0000 + empathy (2.28.1-1) unstable; urgency=low * New upstream release. diff --git a/debian/patches/0001-Ignoring-non-installed-languages.patch b/debian/patches/0001-Ignoring-non-installed-languages.patch new file mode 100644 index 0000000..d6980cd --- /dev/null +++ b/debian/patches/0001-Ignoring-non-installed-languages.patch @@ -0,0 +1,28 @@ +From 709a7b501e242d13719445e18567c9ffa247bc02 Mon Sep 17 00:00:00 2001 +From: Felix Kaser +Date: Tue, 20 Oct 2009 10:20:02 +0200 +Subject: [PATCH 1/4] Ignoring non installed languages + +Languages which are in the gconf setting but are not installed any more are ignored, fixes bug #598954 +--- + libempathy-gtk/empathy-spell.c | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/libempathy-gtk/empathy-spell.c b/libempathy-gtk/empathy-spell.c +index 076e81a..3443fd9 100644 +--- a/libempathy-gtk/empathy-spell.c ++++ b/libempathy-gtk/empathy-spell.c +@@ -219,7 +219,12 @@ spell_setup_languages (void) + lang->config = enchant_broker_init (); + lang->speller = enchant_broker_request_dict (lang->config, strv[i]); + +- languages = g_list_append (languages, lang); ++ if (lang->speller == NULL) { ++ DEBUG ("language '%s' has no valid dict", strv[i]); ++ } else { ++ languages = g_list_append (languages, lang); ++ } ++ + i++; + } + diff --git a/debian/patches/0002-empathy-protocol-chooser-don-t-cache-TpConnectionMan.patch b/debian/patches/0002-empathy-protocol-chooser-don-t-cache-TpConnectionMan.patch new file mode 100644 index 0000000..0d9ff23 --- /dev/null +++ b/debian/patches/0002-empathy-protocol-chooser-don-t-cache-TpConnectionMan.patch @@ -0,0 +1,216 @@ +From 5d4bbf0d205db82f4f6fdf0ede64a1510979f2e8 Mon Sep 17 00:00:00 2001 +From: Guillaume Desmottes +Date: Fri, 23 Oct 2009 11:17:23 +0100 +Subject: [PATCH 2/4] empathy-protocol-chooser: don't cache TpConnectionManagerProtocol in the store + +TpConnectionManagerProtocol are not garanteed to stay valid so we +shouldn't cache them in the store. Instead, we cache the protocol name +and call tp_connection_manager_get_protocol each time we need it. +This should fix crashers as the ones reported in #599386. +--- + libempathy-gtk/empathy-protocol-chooser.c | 75 ++++++++++++++++++----------- + 1 files changed, 47 insertions(+), 28 deletions(-) + +diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c +index 62fedaf..9c48917 100644 +--- a/libempathy-gtk/empathy-protocol-chooser.c ++++ b/libempathy-gtk/empathy-protocol-chooser.c +@@ -76,7 +76,7 @@ enum + COL_ICON, + COL_LABEL, + COL_CM, +- COL_PROTOCOL, ++ COL_PROTOCOL_NAME, + COL_IS_GTALK, + COL_COUNT + }; +@@ -85,7 +85,7 @@ G_DEFINE_TYPE (EmpathyProtocolChooser, empathy_protocol_chooser, + GTK_TYPE_COMBO_BOX); + + static gint +-protocol_chooser_sort_protocol_value (TpConnectionManagerProtocol *protocol) ++protocol_chooser_sort_protocol_value (const gchar *protocol_name) + { + guint i; + const gchar *names[] = { +@@ -97,7 +97,7 @@ protocol_chooser_sort_protocol_value (TpConnectionManagerProtocol *protocol) + + for (i = 0 ; names[i]; i++) + { +- if (strcmp (protocol->name, names[i]) == 0) ++ if (strcmp (protocol_name, names[i]) == 0) + return i; + } + +@@ -110,22 +110,22 @@ protocol_chooser_sort_func (GtkTreeModel *model, + GtkTreeIter *iter_b, + gpointer user_data) + { +- TpConnectionManagerProtocol *protocol_a; +- TpConnectionManagerProtocol *protocol_b; ++ gchar *protocol_a; ++ gchar *protocol_b; + gint cmp = 0; + + gtk_tree_model_get (model, iter_a, +- COL_PROTOCOL, &protocol_a, ++ COL_PROTOCOL_NAME, &protocol_a, + -1); + gtk_tree_model_get (model, iter_b, +- COL_PROTOCOL, &protocol_b, ++ COL_PROTOCOL_NAME, &protocol_b, + -1); + + cmp = protocol_chooser_sort_protocol_value (protocol_a); + cmp -= protocol_chooser_sort_protocol_value (protocol_b); + if (cmp == 0) + { +- cmp = strcmp (protocol_a->name, protocol_b->name); ++ cmp = strcmp (protocol_a, protocol_b); + /* only happens for jabber where there is one entry for gtalk and one for + * non-gtalk */ + if (cmp == 0) +@@ -139,6 +139,8 @@ protocol_chooser_sort_func (GtkTreeModel *model, + } + } + ++ g_free (protocol_a); ++ g_free (protocol_b); + return cmp; + } + +@@ -169,7 +171,6 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser, + { + GtkTreeIter titer; + gboolean valid; +- const TpConnectionManagerProtocol *haze_proto; + TpConnectionManager *haze_cm; + + /* let's this CM replace the haze implementation */ +@@ -178,28 +179,26 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser, + + while (valid) + { ++ gchar *haze_proto_name = NULL; ++ + gtk_tree_model_get (GTK_TREE_MODEL (priv->store), &titer, +- COL_PROTOCOL, &haze_proto, ++ COL_PROTOCOL_NAME, &haze_proto_name, + COL_CM, &haze_cm, -1); + + if (haze_cm == NULL) + continue; + +- if (haze_proto == NULL) +- { +- g_object_unref (haze_cm); +- continue; +- } +- + if (!tp_strdiff (haze_cm->name, "haze") && +- !tp_strdiff (haze_proto->name, proto->name)) ++ !tp_strdiff (haze_proto_name, proto->name)) + { + gtk_list_store_remove (priv->store, &titer); + g_object_unref (haze_cm); ++ g_free (haze_proto_name); + break; + } + + g_object_unref (haze_cm); ++ g_free (haze_proto_name); + valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->store), + &titer); + } +@@ -219,7 +218,7 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser, + COL_ICON, icon_name, + COL_LABEL, display_name, + COL_CM, cm, +- COL_PROTOCOL, proto, ++ COL_PROTOCOL_NAME, proto->name, + COL_IS_GTALK, FALSE, + -1); + +@@ -232,7 +231,7 @@ protocol_choosers_add_cm (EmpathyProtocolChooser *chooser, + COL_ICON, "im-google-talk", + COL_LABEL, display_name, + COL_CM, cm, +- COL_PROTOCOL, proto, ++ COL_PROTOCOL_NAME, proto->name, + COL_IS_GTALK, TRUE, + -1); + } +@@ -278,16 +277,16 @@ protocol_chooser_constructed (GObject *object) + G_TYPE_STRING, /* Icon name */ + G_TYPE_STRING, /* Label */ + G_TYPE_OBJECT, /* CM */ +- G_TYPE_POINTER, /* protocol */ ++ G_TYPE_STRING, /* protocol name */ + G_TYPE_BOOLEAN); /* is gtalk */ + + /* Set the protocol sort function */ + gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (priv->store), +- COL_PROTOCOL, ++ COL_PROTOCOL_NAME, + protocol_chooser_sort_func, + NULL, NULL); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (priv->store), +- COL_PROTOCOL, ++ COL_PROTOCOL_NAME, + GTK_SORT_ASCENDING); + + gtk_combo_box_set_model (GTK_COMBO_BOX (object), +@@ -394,17 +393,30 @@ protocol_chooser_filter_visible_func (GtkTreeModel *model, + EmpathyProtocolChooser *protocol_chooser = user_data; + EmpathyProtocolChooserPriv *priv = GET_PRIV (protocol_chooser); + TpConnectionManager *cm = NULL; +- TpConnectionManagerProtocol *protocol = NULL; ++ gchar *protocol_name = NULL; + gboolean visible = FALSE; + +- gtk_tree_model_get (model, iter, COL_CM, &cm, COL_PROTOCOL, &protocol, -1); ++ gtk_tree_model_get (model, iter, ++ COL_CM, &cm, ++ COL_PROTOCOL_NAME, &protocol_name, ++ -1); + +- if (cm != NULL && protocol != NULL) ++ if (cm != NULL && protocol_name != NULL) + { +- visible = priv->filter_func (cm, protocol, priv->filter_user_data); +- g_object_unref (cm); ++ TpConnectionManagerProtocol *protocol; ++ ++ protocol = (TpConnectionManagerProtocol *) ++ tp_connection_manager_get_protocol (cm, protocol_name); ++ ++ if (protocol != NULL) ++ { ++ visible = priv->filter_func (cm, protocol, priv->filter_user_data); ++ } + } + ++ if (cm != NULL) ++ g_object_unref (cm); ++ + return visible; + } + +@@ -444,9 +456,16 @@ empathy_protocol_chooser_dup_selected ( + + if (protocol != NULL) + { ++ gchar *protocol_name = NULL; ++ + gtk_tree_model_get (GTK_TREE_MODEL (cur_model), &iter, +- COL_PROTOCOL, protocol, ++ COL_PROTOCOL_NAME, &protocol_name, + -1); ++ ++ *protocol = (TpConnectionManagerProtocol *) ++ tp_connection_manager_get_protocol (cm, protocol_name); ++ ++ g_free (protocol_name); + } + + if (is_gtalk != NULL) diff --git a/debian/patches/0003-empathy-chat-window-Don-t-update-the-Contact-menu-if.patch b/debian/patches/0003-empathy-chat-window-Don-t-update-the-Contact-menu-if.patch new file mode 100644 index 0000000..c53abba --- /dev/null +++ b/debian/patches/0003-empathy-chat-window-Don-t-update-the-Contact-menu-if.patch @@ -0,0 +1,76 @@ +From d276e3dd0cdf1bb19f212af950463968ddf7dc25 Mon Sep 17 00:00:00 2001 +From: Rob Bradford +Date: Fri, 23 Oct 2009 17:18:05 +0100 +Subject: [PATCH 3/4] empathy-chat-window: Don't update the Contact menu if visible + +If the Contact menu is currently visible do not update it. Instead update it +once the menu is hidden. + +Fixes: #591360 +--- + src/empathy-chat-window.c | 31 ++++++++++++++++++++++++++----- + 1 files changed, 26 insertions(+), 5 deletions(-) + +diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c +index 9e89f75..382e293 100644 +--- a/src/empathy-chat-window.c ++++ b/src/empathy-chat-window.c +@@ -113,6 +113,8 @@ static const GtkTargetEntry drag_types_dest[] = { + { "GTK_NOTEBOOK_TAB", GTK_TARGET_SAME_APP, DND_DRAG_TYPE_TAB }, + }; + ++static void chat_window_update (EmpathyChatWindow *window); ++ + G_DEFINE_TYPE (EmpathyChatWindow, empathy_chat_window, G_TYPE_OBJECT); + + static void +@@ -295,6 +297,17 @@ chat_window_create_label (EmpathyChatWindow *window, + } + + static void ++_submenu_notify_visible_changed_cb (GObject *object, ++ GParamSpec *pspec, ++ gpointer userdata) ++{ ++ g_signal_handlers_disconnect_by_func (object, ++ _submenu_notify_visible_changed_cb, ++ userdata); ++ chat_window_update (EMPATHY_CHAT_WINDOW (userdata)); ++} ++ ++static void + chat_window_update (EmpathyChatWindow *window) + { + EmpathyChatWindowPriv *priv = GET_PRIV (window); +@@ -311,8 +324,7 @@ chat_window_update (EmpathyChatWindow *window) + gboolean avatar_in_icon; + GtkWidget *chat; + GtkWidget *chat_close_button; +- GtkWidget *submenu; +- GtkWidget *menu; ++ GtkWidget *menu, *submenu, *orig_submenu; + + /* Get information */ + page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook)); +@@ -336,9 +348,18 @@ chat_window_update (EmpathyChatWindow *window) + /* Update Contact menu */ + menu = gtk_ui_manager_get_widget (priv->ui_manager, + "/chats_menubar/menu_contact"); +- submenu = empathy_chat_get_contact_menu (priv->current_chat); +- gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu), submenu); +- gtk_widget_show (menu); ++ orig_submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu)); ++ if (!GTK_WIDGET_VISIBLE (orig_submenu)) ++ { ++ submenu = empathy_chat_get_contact_menu (priv->current_chat); ++ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu), submenu); ++ gtk_widget_show (menu); ++ } else { ++ empathy_signal_connect_weak (orig_submenu, ++ "notify::visible", ++ (GCallback)_submenu_notify_visible_changed_cb, ++ G_OBJECT (window)); ++ } + + /* Update window title */ + if (n_chats == 1) { diff --git a/debian/patches/0004-Fix-crash-when-joining-a-chat-GTK_WIDGET_VISIBLE-is-.patch b/debian/patches/0004-Fix-crash-when-joining-a-chat-GTK_WIDGET_VISIBLE-is-.patch new file mode 100644 index 0000000..99be4c4 --- /dev/null +++ b/debian/patches/0004-Fix-crash-when-joining-a-chat-GTK_WIDGET_VISIBLE-is-.patch @@ -0,0 +1,23 @@ +From a39915476af1eae4d7c73b664920249172750ceb Mon Sep 17 00:00:00 2001 +From: Xavier Claessens +Date: Sun, 25 Oct 2009 17:54:49 +0100 +Subject: [PATCH 4/4] Fix crash when joining a chat, GTK_WIDGET_VISIBLE is not NULL-safe + +--- + src/empathy-chat-window.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c +index 382e293..985fa88 100644 +--- a/src/empathy-chat-window.c ++++ b/src/empathy-chat-window.c +@@ -349,8 +349,7 @@ chat_window_update (EmpathyChatWindow *window) + menu = gtk_ui_manager_get_widget (priv->ui_manager, + "/chats_menubar/menu_contact"); + orig_submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu)); +- if (!GTK_WIDGET_VISIBLE (orig_submenu)) +- { ++ if (orig_submenu == NULL || !GTK_WIDGET_VISIBLE (orig_submenu)) { + submenu = empathy_chat_get_contact_menu (priv->current_chat); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu), submenu); + gtk_widget_show (menu);