Commit abd66001 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Remove dead code

2008-03-06  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-icon-container.c:
        (nautilus_icon_container_update_icon):
	Remove dead code
	
        * libnautilus-private/nautilus-icon-info.c:
        (nautilus_icon_info_lookup):
	Resize custom icons (#513102)



svn path=/trunk/; revision=13891
parent cb76ea0e
2008-03-06 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-icon-container.c:
(nautilus_icon_container_update_icon):
Remove dead code
* libnautilus-private/nautilus-icon-info.c:
(nautilus_icon_info_lookup):
Resize custom icons (#513102)
2008-03-06 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-directory-view.c (add_template_to_templates_menus):
......
......@@ -5797,9 +5797,6 @@ nautilus_icon_container_update_icon (NautilusIconContainer *container,
nautilus_icon_container_start_monitor_top_left (container, icon->data, icon, large_embedded_text);
}
icon_size = MAX (nautilus_get_icon_size_for_zoom_level (container->details->zoom_level)
* icon->scale, NAUTILUS_ICON_SIZE_SMALLEST);
nautilus_icon_container_get_icon_text (container,
icon->data,
&editable_text,
......
......@@ -353,11 +353,25 @@ nautilus_icon_info_lookup (GIcon *icon,
size,
NULL, NULL, NULL);
if (stream) {
GdkPixbuf *scaled_pixbuf;
int w, h, s;
double scale;
pixbuf = eel_gdk_pixbuf_load_from_stream (stream);
/* TODO: resize icon? */
g_object_unref (stream);
w = gdk_pixbuf_get_width (pixbuf);
h = gdk_pixbuf_get_height (pixbuf);
s = MAX (w, h);
if (size != s) {
scale = (double)size / s;
scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
w * scale, h * scale,
GDK_INTERP_HYPER);
g_object_unref (pixbuf);
pixbuf = scaled_pixbuf;
}
}
icon_info = nautilus_icon_info_new_for_pixbuf (pixbuf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment