Re: [evolution-patches] Please review my patch for bug #45908
- From: Antonio Xu <antonio xu sun com>
- To: Ettore Perazzoli <ettore ximian com>
- Cc: Jeffrey Stedfast <fejj ximian com>, evolution-patches ximian com, Not Zed <notzed ximian com>, Glynn Foster <glynn foster sun com>
- Subject: Re: [evolution-patches] Please review my patch for bug #45908
- Date: Fri, 25 Jul 2003 16:14:52 +0800
Hello Ettore Perazzoli
Can I add compiling option in this patch such as "ifdef LIBGNOME2.2"?
I'm sure that will not break GNOME 2.0 build of evolution. This patch is
very important for us.
Anto
Ettore Perazzoli wrote:
On Thu, 2003-07-24 at 10:50, Jeffrey Stedfast wrote:
sure, looks fine.
Hmm actually, GnomeIconTheme is a GNOME 2.2 API and we have to stick
with GNOME 2.0 APIs for Evo 1.4... So this patch shouldn't go in.
-- Ettore
_______________________________________________
Evolution-patches mailing list
Evolution-patches lists ximian com
http://lists.ximian.com/mailman/listinfo/evolution-patches
Index: composer/e-msg-composer-attachment-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-attachment-bar.c,v
retrieving revision 1.67.4.2
diff -u -r1.67.4.2 e-msg-composer-attachment-bar.c
--- composer/e-msg-composer-attachment-bar.c 17 Jul 2003 05:32:56 -0000 1.67.4.2
+++ composer/e-msg-composer-attachment-bar.c 24 Jul 2003 09:15:05 -0000
@@ -32,6 +32,7 @@
#include <gconf/gconf.h>
#include <gconf/gconf-client.h>
#include <libgnome/gnome-util.h>
+#include <libgnomeui/libgnomeui.h>
#include <libgnomeui/gnome-app.h>
#include <libgnomeui/gnome-app-helper.h>
#include <libgnomeui/gnome-popup-menu.h>
@@ -209,6 +210,7 @@
const char *icon_name;
char *filename = NULL;
GdkPixbuf *pixbuf;
+ GnomeIconTheme *icon_theme;
/* Special-case these two since GNOME VFS doesn't know about them and
they are used every time the user forwards one or more messages
@@ -233,8 +235,14 @@
if (pixbuf)
return pixbuf;
}
-
- filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, icon_name, TRUE, NULL);
+
+ icon_theme = gnome_icon_theme_new ();
+ filename = gnome_icon_theme_lookup_icon (icon_theme, icon_name, 48, NULL, NULL);
+ g_object_unref (icon_theme);
+
+ if (!filename)
+ filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, icon_name, TRUE, NULL);
+
if (!filename) {
char *fm_icon;
@@ -253,13 +261,17 @@
g_free (filename);
return pixbuf;
}
-
- g_free (filename);
- filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "gnome-unknown.png", TRUE, NULL);
-
+
+ icon_theme = gnome_icon_theme_new ();
+ filename = gnome_icon_theme_lookup_icon (icon_theme, "gnome-unknown.png", 48, NULL, NULL);
+ g_object_unref (icon_theme);
+
+ if (!filename)
+ filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "gnome-unknown.png", TRUE, NULL);
+
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
+
g_free (filename);
-
return pixbuf;
}
@@ -327,7 +339,9 @@
if (!error) {
int ratio, width, height;
-
+
+ gdk_pixbuf_loader_close (loader, NULL);
+
/* Shrink pixbuf */
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
width = gdk_pixbuf_get_width (pixbuf);
Index: composer/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.544.2.6
diff -u -r1.544.2.6 ChangeLog
--- composer/ChangeLog 18 Jul 2003 13:49:22 -0000 1.544.2.6
+++ composer/ChangeLog 24 Jul 2003 09:26:15 -0000
@@ -1,3 +1,11 @@
+2003-07-24 Antonio Xu <antonio xu sun com>
+
+ * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): use
+ gnome_icon_theme_lookup_icon to do some enhancements for attachments
+ icon loading.
+ (update): add gdk_pixbuf_loader_close to close pix buffer loading.
+ [#45908]
+
2003-07-17 Maxx Cao <maxx cao sun com>
** For bug #46013
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]