Index: src/flash.c
===================================================================
RCS file: /cvs/gnome/gnomeicu/src/flash.c,v
retrieving revision 1.49
diff -u -5 -r1.49 flash.c
--- src/flash.c	5 Jul 2002 20:20:44 -0000	1.49
+++ src/flash.c	5 Aug 2002 20:03:21 -0000
@@ -17,10 +17,11 @@
 guint flash_messages( void )
 {
 	static gboolean flash = FALSE;
 	static char prev_status = 0;
 	int have_message = 0;
+        int type;
 
 	GSList *contact;
 
 	flash = !flash;
 
@@ -29,18 +30,27 @@
 
 	for (contact = Contacts; contact; contact = contact->next )
 	{
 		if( g_slist_length( kontakt->stored_messages ) )
 		{
-			int type = ((STORED_MESSAGE_PTR)kontakt->stored_messages->data)->type;
+			type = ((STORED_MESSAGE_PTR)kontakt->stored_messages->data)->type;
 			have_message = TRUE;
 			if( flash )
 				set_contact_icon (contact, get_pixbuf_for_message (type));
 			else
 				set_contact_icon (contact, icon_blank_pixbuf);
 		}
 	}
+
+
+        if(have_message)
+        {
+           if( flash )
+              set_window_icon(GTK_WIDGET(MainData->window), get_filename_for_message(type));
+           else
+               set_window_icon(GTK_WIDGET(MainData->window), "gnomeicu-blank.png");
+        }
 
 	if( have_message != prev_status )
 	{
 		prev_status = have_message;
 		gtk_window_set_title (GTK_WINDOW (MainData->window),
Index: src/icons.c
===================================================================
RCS file: /cvs/gnome/gnomeicu/src/icons.c,v
retrieving revision 1.19
diff -u -5 -r1.19 icons.c
--- src/icons.c	1 Aug 2002 01:54:18 -0000	1.19
+++ src/icons.c	5 Aug 2002 20:03:21 -0000
@@ -179,10 +179,34 @@
 		g_warning("No icon for this message type: %d\n", type);
 		return icon_message_pixbuf;
 	}
 }
 
+gchar *get_filename_for_message (gint type)
+{
+	switch (type)
+	{
+	case MESSAGE_TEXT:
+		return "gnomeicu-message.png";
+	case MESSAGE_CONT_LIST:
+		return "gnomeicu-contact.png";
+	case MESSAGE_CHAT_REQ:
+		return "gnomeicu-chat.png";
+	case MESSAGE_FILE_REQ:
+		return "gnomeicu-file.png";
+	case MESSAGE_URL:
+		return "gnomeicu-url.png";
+	case MESSAGE_AUTH_REQ:
+	case MESSAGE_USER_ADD:
+	case MESSAGE_USER_AUTHD:
+		return "gnomeicu-auth.png";
+	default:
+		g_warning("No icon for this message type: %d\n", type);
+		return "gnomeicu-message.png";
+	}
+}
+
 void set_window_icon (GtkWidget * window, gchar * name)
 {
 	gchar *path = make_icon_path (name);
 	gnome_window_icon_set_from_file (GTK_WINDOW (window), path);
 	g_free (path);
Index: src/icons.h
===================================================================
RCS file: /cvs/gnome/gnomeicu/src/icons.h,v
retrieving revision 1.8
diff -u -5 -r1.8 icons.h
--- src/icons.h	1 Aug 2002 01:54:18 -0000	1.8
+++ src/icons.h	5 Aug 2002 20:03:21 -0000
@@ -41,10 +41,11 @@
 gchar *make_icon_path (gchar *file_name);
 
 GdkPixbuf *get_pixbuf_for_status (DWORD status);
 
 GdkPixbuf *get_pixbuf_for_message (gint type);
+gchar     *get_filename_for_message (gint type);
 
 void set_window_icon (GtkWidget *window, gchar *icon_name);
 GtkWidget* make_button_with_pixmap (const char *label_text, const char *pixmap_name);
 
 #endif /* __ICONS_H__ */
