changeset 23178:41171963c986

Highlight the mail window for new mails.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 24 May 2008 23:03:20 +0000
parents 4d8dced30fa2
children a2016d486f87 89713caa9ade
files finch/gntnotify.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntnotify.c	Sat May 24 22:54:06 2008 +0000
+++ b/finch/gntnotify.c	Sat May 24 23:03:20 2008 +0000
@@ -208,8 +208,10 @@
 	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 @@
 					*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;
 	}