[evolution-patches] in an attempt to find out the problem in bug #41513...



The attached patch litters the code with printfs to see why anna isn't
getting an icon when she attaches text files (and it happens to
christine when she attaches Microsoft Excel files?).

seems to work fine for me no matter what I attach...

Jeff

-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com
? composer.patch
? debug-printfs.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.533
diff -u -r1.533 ChangeLog
--- ChangeLog	24 Apr 2003 01:57:47 -0000	1.533
+++ ChangeLog	25 Apr 2003 19:42:15 -0000
@@ -1,3 +1,9 @@
+2003-04-25  Jeffrey Stedfast  <fejj ximian com>
+
+	* e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): Added a
+	bunch of debugging printfs in an attempt to find out why this
+	isn't working for Anna and Christine (works for everyone else??).
+
 2003-04-23  Not Zed  <NotZed Ximian com>
 
 	* e-msg-composer.c (map_default_cb): removed debug printfs.
Index: e-msg-composer-attachment-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-attachment-bar.c,v
retrieving revision 1.65
diff -u -r1.65 e-msg-composer-attachment-bar.c
--- e-msg-composer-attachment-bar.c	9 Apr 2003 19:30:21 -0000	1.65
+++ e-msg-composer-attachment-bar.c	25 Apr 2003 19:42:15 -0000
@@ -26,6 +26,7 @@
 #include <config.h>
 #endif
 
+#include <stdio.h>
 #include <string.h>
 #include <gtk/gtk.h>
 #include <glade/glade.h>
@@ -228,31 +229,47 @@
 	
 	icon_name = gnome_vfs_mime_get_icon (mime_type);
 	if (icon_name) {
+		printf ("debug for bug #41513: icon_name=\"%s\"\n", icon_name);
+		
 		if (*icon_name == '/') {
 			pixbuf = gdk_pixbuf_new_from_file (icon_name, NULL);
-			if (pixbuf)
+			if (pixbuf) {
+				printf ("debug for bug #41513: found pixbuf for \"%s\"\n", icon_name);
 				return pixbuf;
+			}
 		}
 		
 		filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, icon_name, TRUE, NULL);
 		if (!filename) {
 			char *fm_icon;
 			
+			printf ("debug for bug #41513: gnome_program_locate_file() failed for \"%s\"\n", icon_name);
+			
 			fm_icon = g_strdup_printf ("nautilus/%s", icon_name);
 			filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, fm_icon, TRUE, NULL);
 			if (!filename) {
+				printf ("debug for bug #41513: gnome_program_locate_file() failed for \"%s\"\n", fm_icon);
 				g_free (fm_icon);
 				fm_icon = g_strdup_printf ("mc/%s", icon_name);
 				filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, fm_icon, TRUE, NULL);
+				if (!filename)
+					printf ("debug for bug #41513: gnome_program_locate_file() failed for \"%s\"\n", fm_icon);
 			}
 			g_free (fm_icon);
 		}
+	} else {
+		printf ("debug for bug #41513: gnome_vfs_mime_get_icon() for %s failed\n", mime_type);
 	}
 	
 	if (!filename)
 		filename = gnome_pixmap_file ("gnome-unknown.png");
 	
+	printf ("debug for bug #41513: loading pixbuf from file \"%s\"\n", filename);
+	
 	pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
+	if (!pixbuf)
+		printf ("debug for bug #41513: loading pixbuf from file \"%s\" failed\n", filename);
+	
 	g_free (filename);
 	
 	return pixbuf;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]