? flashingicon.patch
? src/.icons.c.swp
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	6 Aug 2002 05:54:51 -0000
@@ -17,10 +17,11 @@
 guint flash_messages( void )
 {
 	static gboolean flash = FALSE;
 	static char prev_status = 0;
 	int have_message = 0;
+        gint first_message; /* type of the first message in the queue */
 
 	GSList *contact;
 
 	flash = !flash;
 
@@ -35,13 +36,30 @@
 			have_message = TRUE;
 			if( flash )
 				set_contact_icon (contact, get_pixbuf_for_message (type));
 			else
 				set_contact_icon (contact, icon_blank_pixbuf);
+                        first_message = type;
 		}
 	}
 
+        if( have_message )
+        {
+                if( flash )
+                        gnome_window_icon_set_from_file(GTK_WINDOW(MainData->window), 
+                                get_filename_for_message(first_message)); 
+                else
+                        gnome_window_icon_set_from_file(GTK_WINDOW(MainData->window), 
+                                GNOMEICU_DATADIR "/pixmaps/gnome-gnomeicu.xpm" );
+                
+        } else {
+                if( have_message != prev_status) /* This is our first time w/o a message */
+                {
+                        gnome_window_icon_set_from_file(GTK_WINDOW(MainData->window), 
+                                GNOMEICU_DATADIR "/pixmaps/gnome-gnomeicu.xpm" );
+                }
+        }
 	if( have_message != prev_status )
 	{
 		prev_status = have_message;
 		gtk_window_set_title (GTK_WINDOW (MainData->window),
 		                      have_message ? _("GnomeICU: Msgs") : "GnomeICU");
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	6 Aug 2002 05:54:52 -0000
@@ -39,13 +39,10 @@
 GdkPixbuf *icon_cancel_pixbuf;
 GdkPixbuf *icon_rename_pixbuf;
 GdkPixbuf *icon_group_pixbuf;
 GdkPixbuf *icon_shortcut_pixbuf;
 
-/*** Local functions ***/
-GdkPixbuf *init_one_pixmap (gchar * icon_name);
-
 /*** Global functions ***/
 gchar *make_icon_path_theme (const gchar * file_name, const gchar * theme_name)
 {
 	gchar *file;
 
@@ -177,10 +174,45 @@
 		return icon_auth_pixbuf;
 	default:
 		g_warning("No icon for this message type: %d\n", type);
 		return icon_message_pixbuf;
 	}
+}
+
+gchar *get_filename_for_message (gint type)
+{
+        gchar *icon_filename;
+
+	switch (type)
+	{
+	case MESSAGE_TEXT:
+		icon_filename = "gnomeicu-message.png";
+                break;
+	case MESSAGE_CONT_LIST:
+		icon_filename = "gnomeicu-contact.png";
+                break;
+	case MESSAGE_CHAT_REQ:
+		icon_filename = "gnomeicu-chat.png";
+                break;
+	case MESSAGE_FILE_REQ:
+		icon_filename = "gnomeicu-file.png";
+                break;
+	case MESSAGE_URL:
+		icon_filename = "gnomeicu-url.png";
+                break;
+	case MESSAGE_AUTH_REQ:
+	case MESSAGE_USER_ADD:
+	case MESSAGE_USER_AUTHD:
+		icon_filename = "gnomeicu-auth.png";
+                break;
+	default:
+		g_warning("No icon for this message type: %d\n", type);
+		icon_filename = "gnomeicu-message.png";
+                break;
+	}
+
+        return(make_icon_path(icon_filename));
 }
 
 void set_window_icon (GtkWidget * window, gchar * name)
 {
 	gchar *path = make_icon_path (name);
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	6 Aug 2002 05:54:52 -0000
@@ -38,12 +38,14 @@
 
 void icons_init (void);
 gchar *make_icon_path_theme (const gchar *file_name, const gchar *theme_name);
 gchar *make_icon_path (gchar *file_name);
 
-GdkPixbuf *get_pixbuf_for_status (DWORD status);
+GdkPixbuf *init_one_pixmap (gchar * icon_name);
 
+gchar *get_filename_for_message (gint type);
+GdkPixbuf *get_pixbuf_for_status (DWORD status);
 GdkPixbuf *get_pixbuf_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);
 
