pidgin: f28a758a: Highlight the mail window for new mails.

sadrul at pidgin.im sadrul at pidgin.im
Sat May 24 19:05:47 EDT 2008


-----------------------------------------------------------------
Revision: f28a758a8344c88a83bfc3be1f70311a644780b3
Ancestor: 5774a9e66b31b8dcccca6eb3eb81521086ecd801
Author: sadrul at pidgin.im
Date: 2008-05-24T23:03:20
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f28a758a8344c88a83bfc3be1f70311a644780b3

Modified files:
        finch/gntnotify.c

ChangeLog: 

Highlight the mail window for new mails.

-------------- next part --------------
============================================================
--- finch/gntnotify.c	db19417820b314eff06a0ad9a2fcd394b23da9e3
+++ finch/gntnotify.c	1f0ab01884f233ee137c054d2570a02e14b0853f
@@ -208,8 +208,10 @@ finch_notify_emails(PurpleConnection *gc
 	else
 	{
 		char *to;
+		gboolean newwin = (emaildialog.window == NULL);
 
-		setup_email_dialog();
+		if (newwin)
+			setup_email_dialog();
 
 		to = g_strdup_printf("%s (%s)", tos ? *tos : purple_account_get_username(account),
 					purple_account_get_protocol_name(account));
@@ -219,7 +221,10 @@ finch_notify_emails(PurpleConnection *gc
 					*subjects),
 				NULL, NULL);
 		g_free(to);
-		gnt_widget_show(emaildialog.window);
+		if (newwin)
+			gnt_widget_show(emaildialog.window);
+		else
+			gnt_window_present(emaildialog.window);
 		return NULL;
 	}
 


More information about the Commits mailing list