changeset 12744:fcd9477e4476

[gaim-migrate @ 15091] " Adds an emblem to a buddy if they have a queued message (hidden conversation). In the large buddy list it is added in the northwest corner, sliding the existing northwest emblem (if specified) to the northeast position and discarding the northeast emblem. In the small buddy list, the emblem is added to the southeast. Attached is a patch and an emblem image to be dropped in pixmaps/status/default/. The emblem image is a scaled down version of the send-im.png image." -- Casey Harkins as I asked for this patch, and since there don't seem to be objections to it (yet), I'm going ahead and applying it. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 06 Jan 2006 04:46:00 +0000
parents 33ed71b35a43
children e788741f4840
files pixmaps/status/default/Makefile.am pixmaps/status/default/pending.png src/gtkblist.c
diffstat 3 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pixmaps/status/default/Makefile.am	Fri Jan 06 04:17:16 2006 +0000
+++ b/pixmaps/status/default/Makefile.am	Fri Jan 06 04:46:00 2006 +0000
@@ -33,6 +33,7 @@
 	occupied.png \
 	offline.png \
 	op.png \
+	pending.png \
 	secure.png \
 	silc.png \
 	simple.png \
Binary file pixmaps/status/default/pending.png has changed
--- a/src/gtkblist.c	Fri Jan 06 04:17:16 2006 +0000
+++ b/src/gtkblist.c	Fri Jan 06 04:46:00 2006 +0000
@@ -2859,6 +2859,25 @@
 		}
 	}
 
+	if(buddy) {
+		GaimConversation *conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM,
+																	 gaim_buddy_get_name(buddy),
+																	 gaim_buddy_get_account(buddy));
+		if(conv != NULL) {
+			GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv);
+			if(gtkconv != NULL && gaim_gtkconv_is_hidden(gtkconv)) {
+				/* add pending emblem */
+				if(size == GAIM_STATUS_ICON_SMALL) {
+					emblems[0].filename="pending";
+				}
+				else {
+					emblems[3].filename=emblems[2].filename;
+					emblems[2].filename="pending";
+				}
+			}
+		}
+	}
+
 	if(size == GAIM_STATUS_ICON_SMALL) {
 		scalesize = 15;
 		/* So that only the se icon will composite */
@@ -3302,6 +3321,12 @@
 	if (type != GAIM_CONV_UPDATE_UNSEEN)
 		return;
 
+	if(conv->account != NULL && conv->name != NULL) {
+		GaimBuddy *buddy = gaim_find_buddy(conv->account, conv->name);
+		if(buddy != NULL)
+			gaim_gtk_blist_update_buddy(NULL, (GaimBlistNode *)buddy);
+	}
+
 	if (gtkblist->menutrayicon) {
 		gtk_widget_destroy(gtkblist->menutrayicon);
 		gtkblist->menutrayicon = NULL;