diff -Nru pidgin-libnotify-0.14/debian/changelog pidgin-libnotify-0.14/debian/changelog --- pidgin-libnotify-0.14/debian/changelog 2012-11-16 10:37:40.000000000 +0000 +++ pidgin-libnotify-0.14/debian/changelog 2013-06-14 13:13:24.000000000 +0000 @@ -1,3 +1,13 @@ +pidgin-libnotify (0.14-9ubuntu2) saucy; urgency=low + + * debian/patches/messaging_menu.patch: + - Use purple_buddy_get_name() instead of sender in unique id if possible + (LP: #1175537) + - Associate a buddy name with a conversation if possible, otherwise fall + back to the name of the conversation. + + -- Jason Conti Mon, 20 May 2013 18:20:04 -0400 + pidgin-libnotify (0.14-9ubuntu1) raring; urgency=low * libmessaging-menu support (LP: #1040259) diff -Nru pidgin-libnotify-0.14/debian/patches/messaging_menu.patch pidgin-libnotify-0.14/debian/patches/messaging_menu.patch --- pidgin-libnotify-0.14/debian/patches/messaging_menu.patch 2012-11-16 09:16:40.000000000 +0000 +++ pidgin-libnotify-0.14/debian/patches/messaging_menu.patch 2013-06-14 13:13:24.000000000 +0000 @@ -1,8 +1,6 @@ === modified file 'configure.ac' -Index: pidgin-libnotify-0.14/configure.ac -=================================================================== ---- pidgin-libnotify-0.14.orig/configure.ac 2012-11-16 10:15:18.535589954 +0100 -+++ pidgin-libnotify-0.14/configure.ac 2012-11-16 10:15:29.695589561 +0100 +--- a/configure.ac ++++ b/configure.ac @@ -74,6 +74,15 @@ AC_SUBST(LIBNOTIFY_LIBS) @@ -19,10 +17,8 @@ # Check for GTK+ # PKG_CHECK_MODULES(GTK, gtk+-2.0) -Index: pidgin-libnotify-0.14/src/Makefile.am -=================================================================== ---- pidgin-libnotify-0.14.orig/src/Makefile.am 2012-11-16 10:15:19.187589931 +0100 -+++ pidgin-libnotify-0.14/src/Makefile.am 2012-11-16 10:15:29.695589561 +0100 +--- a/src/Makefile.am ++++ b/src/Makefile.am @@ -13,7 +13,7 @@ request.c \ gln_intl.h @@ -40,10 +36,8 @@ $(DBUS_CFLAGS) \ $(GTK_CFLAGS) -Index: pidgin-libnotify-0.14/src/pidgin-libnotify.c -=================================================================== ---- pidgin-libnotify-0.14.orig/src/pidgin-libnotify.c 2012-11-16 10:15:27.039589654 +0100 -+++ pidgin-libnotify-0.14/src/pidgin-libnotify.c 2012-11-16 10:15:29.699589560 +0100 +--- a/src/pidgin-libnotify.c ++++ b/src/pidgin-libnotify.c @@ -24,6 +24,8 @@ #include "common.h" #include "gln_intl.h" @@ -79,7 +73,7 @@ static gboolean notify_supports_actions = FALSE; static gboolean notify_supports_append = FALSE; static gboolean notify_supports_truncation = FALSE; -@@ -844,10 +849,402 @@ +@@ -844,10 +849,422 @@ extern void attach_request_ui_ops (); extern void detach_request_ui_ops (); @@ -174,6 +168,19 @@ + return messaging_type; +} + ++static const char * ++messaging_conversation_get_name (PurpleConversation *conv, ++ PurpleAccount *account) ++{ ++ PurpleBuddy *buddy = NULL; ++ ++ if (purple_conversation_get_type (conv) == PURPLE_CONV_TYPE_IM) ++ buddy = purple_find_buddy (account, purple_conversation_get_name (conv)); ++ if (buddy != NULL) ++ return purple_buddy_get_name (buddy); ++ return purple_conversation_get_name (conv); ++} ++ +static void +messaging_conversation_updated_cb (PurpleConversation *conv, + PurpleConvUpdateType type, @@ -218,7 +225,8 @@ + if (type == PURPLE_CONV_UPDATE_UNSEEN) { + unseen_count = GPOINTER_TO_INT(purple_conversation_get_data (conv, "unseen-count")); + account = purple_conversation_get_account (conv); -+ buddy_id = messaging_unique_id (conv_type, account, purple_conversation_get_name (conv)); ++ buddy_id = messaging_unique_id (conv_type, account, ++ messaging_conversation_get_name (conv, account)); + + if (buddy_id != NULL) { + if (messaging_menu_app_has_source (m_menu_app, buddy_id)) { @@ -247,7 +255,8 @@ + gchar *buddy_id; + + account = purple_conversation_get_account (conv); -+ buddy_id = messaging_unique_id (conv_type, account, purple_conversation_get_name (conv)); ++ buddy_id = messaging_unique_id (conv_type, account, ++ messaging_conversation_get_name (conv, account)); + + if (buddy_id != NULL) { + if (messaging_menu_app_has_source (m_menu_app, buddy_id)) { @@ -289,6 +298,7 @@ + + PurpleBuddy *buddy = NULL; + gchar *buddy_id; ++ const char *buddy_name = NULL; + + if (name_blacklisted(account, sender)) + return; @@ -300,7 +310,11 @@ + return; + + buddy = purple_find_buddy (account, sender); -+ buddy_id = messaging_unique_id ("im", account, sender); ++ ++ if (buddy != NULL) ++ buddy_name = purple_buddy_get_name (buddy); ++ ++ buddy_id = messaging_unique_id ("im", account, buddy_name != NULL ? buddy_name : sender); + + if (buddy_id != NULL) { + purple_debug_info (PLUGIN_ID, "Sender: (%s) ID (%s) \n", sender, buddy_id); @@ -483,7 +497,7 @@ if (!notify_is_initted () && !notify_init ("Pidgin")) { purple_debug_error (PLUGIN_ID, "libnotify not running!\n"); -@@ -862,9 +1259,21 @@ +@@ -862,9 +1279,21 @@ notify_check_caps(); @@ -505,7 +519,7 @@ buddy_hash = g_hash_table_new (NULL, NULL); -@@ -883,6 +1292,21 @@ +@@ -883,6 +1312,21 @@ purple_signal_connect (conv_handle, "deleting-conversation", plugin, PURPLE_CALLBACK(conv_delete_cb), NULL); @@ -527,7 +541,7 @@ /* used just to not display the flood of guifications we'd get */ purple_signal_connect (conn_handle, "signed-on", plugin, PURPLE_CALLBACK(event_connection_throttle), NULL); -@@ -895,11 +1319,12 @@ +@@ -895,11 +1339,12 @@ static gboolean plugin_unload (PurplePlugin *plugin) { @@ -541,7 +555,7 @@ purple_signal_disconnect (blist_handle, "buddy-signed-on", plugin, PURPLE_CALLBACK(notify_buddy_signon_cb)); -@@ -916,6 +1341,21 @@ +@@ -916,6 +1361,21 @@ purple_signal_disconnect (conv_handle, "deleting-conversation", plugin, PURPLE_CALLBACK(conv_delete_cb)); @@ -563,7 +577,7 @@ purple_signal_disconnect (conn_handle, "signed-on", plugin, PURPLE_CALLBACK(event_connection_throttle)); -@@ -925,6 +1365,12 @@ +@@ -925,6 +1385,12 @@ notify_uninit ();