aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-09-27 19:09:46 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-09-27 19:09:46 +0800
commit3e1c3f7c236a3e7586c771df2df1732dc015fb51 (patch)
treea94608c9b6ee5743c4bb270c0fd258951494fcbd
parenteed2331e611eb281440c1bcb5f76b2e547f1e0a7 (diff)
downloadgsoc2013-epiphany-3e1c3f7c236a3e7586c771df2df1732dc015fb51.tar
gsoc2013-epiphany-3e1c3f7c236a3e7586c771df2df1732dc015fb51.tar.gz
gsoc2013-epiphany-3e1c3f7c236a3e7586c771df2df1732dc015fb51.tar.bz2
gsoc2013-epiphany-3e1c3f7c236a3e7586c771df2df1732dc015fb51.tar.lz
gsoc2013-epiphany-3e1c3f7c236a3e7586c771df2df1732dc015fb51.tar.xz
gsoc2013-epiphany-3e1c3f7c236a3e7586c771df2df1732dc015fb51.tar.zst
gsoc2013-epiphany-3e1c3f7c236a3e7586c771df2df1732dc015fb51.zip
Simpler implementation.
2003-09-27 Marco Pesenti Gritti <marco@gnome.org> * lib/ephy-gui.c: (ephy_gui_get_pixbuf_from_mime_type): Simpler implementation. * lib/widgets/ephy-spinner.c: (ephy_spinner_load_images): * src/ephy-shell.c: (ephy_shell_init): Pass 0 as flags
-rw-r--r--ChangeLog11
-rw-r--r--lib/ephy-gui.c33
-rw-r--r--lib/widgets/ephy-spinner.c2
-rw-r--r--src/ephy-shell.c2
4 files changed, 15 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index cb3bfda04..b28ff6423 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2003-09-27 Marco Pesenti Gritti <marco@gnome.org>
+ * lib/ephy-gui.c: (ephy_gui_get_pixbuf_from_mime_type):
+
+ Simpler implementation.
+
+ * lib/widgets/ephy-spinner.c: (ephy_spinner_load_images):
+ * src/ephy-shell.c: (ephy_shell_init):
+
+ Pass 0 as flags
+
+2003-09-27 Marco Pesenti Gritti <marco@gnome.org>
+
* embed/mozilla/ContentHandler.cpp:
* lib/ephy-gui.c: (make_mime_name),
(ephy_gui_get_pixbuf_from_mime_type):
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c
index af959b5aa..9393fc295 100644
--- a/lib/ephy-gui.c
+++ b/lib/ephy-gui.c
@@ -143,9 +143,7 @@ ephy_gui_get_pixbuf_from_mime_type (const char *mime_type,
int size)
{
GdkPixbuf *pixbuf;
- GtkIconInfo *icon_info;
GtkIconTheme *icon_theme;
- const char *icon;
char *icon_name;
icon_name = make_mime_name (mime_type);
@@ -153,35 +151,8 @@ ephy_gui_get_pixbuf_from_mime_type (const char *mime_type,
icon_theme = gtk_icon_theme_get_default ();
g_return_val_if_fail (icon_theme != NULL, NULL);
- icon_info = gtk_icon_theme_lookup_icon
- (icon_theme, icon_name, size, -1);
- g_free (icon_name);
-
- /* try without specific size */
- if (icon_info == NULL)
- {
- icon_info = gtk_icon_theme_lookup_icon
- (icon_theme, icon_name, -1, -1);
- }
-
- /* no icon found */
- if (icon_info == NULL) return NULL;
-
- icon = gtk_icon_info_get_filename (icon_info);
- pixbuf = gdk_pixbuf_new_from_file (icon, NULL);
- g_return_val_if_fail (pixbuf != NULL, NULL);
-
- if (size != gtk_icon_info_get_base_size (icon_info))
- {
- GdkPixbuf *tmp;
-
- tmp = gdk_pixbuf_scale_simple (pixbuf, size, size,
- GDK_INTERP_BILINEAR);
- g_object_unref (pixbuf);
- pixbuf = tmp;
- }
-
- gtk_icon_info_free (icon_info);
+ pixbuf = gtk_icon_theme_load_icon (icon_theme, icon_name,
+ size, 0, NULL);
return pixbuf;
}
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c
index 2f4e9e3d9..546fed1fd 100644
--- a/lib/widgets/ephy-spinner.c
+++ b/lib/widgets/ephy-spinner.c
@@ -463,7 +463,7 @@ ephy_spinner_load_images (EphySpinner *spinner)
/* Load the rest icon */
icon_info = gtk_icon_theme_lookup_icon (spinner->details->icon_theme,
- "gnome-spinner-rest", -1, -1);
+ "gnome-spinner-rest", -1, 0);
if (icon == NULL) {
g_warning ("Throbber rest icon not found");
return;
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 93041eadd..fa4650b61 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -260,7 +260,7 @@ ephy_shell_init (EphyShell *gs)
/* FIXME listen on icon changes */
icon_theme = gtk_icon_theme_get_default ();
- icon_info = gtk_icon_theme_lookup_icon (icon_theme, "web-browser", -1, -1);
+ icon_info = gtk_icon_theme_lookup_icon (icon_theme, "web-browser", -1, 0);
if (icon_info)
{