Hello, the attached patch makes the Information side pane show a thumbnail instead of a generic icon (useful with my other patch that makes this panel follow current selection) reviews are welcome (patch against 2.22.0) cheers A. -- Amos Brocco | Ph.D Student | Computer Science Department - DIUF | University of Fribourg | A406 Pérolles 21 | Bd. Pérolles 90 | CH-1700 Fribourg | http://diuf.unifr.ch/pai/people/broccoa
--- nautilus-2.22.0-orig/src/nautilus-sidebar-title.c 2008-03-07 16:28:03.000000000 +0100 +++ nautilus-2.22.0/src/nautilus-sidebar-title.c 2008-03-22 17:55:53.000000000 +0100 @@ -61,6 +61,9 @@ #define MIN_TITLE_FONT_SIZE 12 #define TITLE_PADDING 4 +/* Preview icons need to be scaled a little bit */ +#define PREVIEW_ICON_SCALE 2 + static void nautilus_sidebar_title_class_init (NautilusSidebarTitleClass *klass); static void nautilus_sidebar_title_destroy (GtkObject *object); static void nautilus_sidebar_title_init (NautilusSidebarTitle *pixmap); @@ -260,7 +263,7 @@ nautilus_sidebar_title_select_text_color SHADOW_OFFSET); eel_gtk_label_set_drop_shadow_offset (GTK_LABEL (sidebar_title->details->more_info_label), SHADOW_OFFSET); - + g_free (sidebar_title_color); g_free (sidebar_info_title_color); g_free (sidebar_title_shadow_color); @@ -280,7 +283,7 @@ get_best_icon_size (NautilusSidebarTitle { gint width; - width = GTK_WIDGET (sidebar_title)->allocation.width - TITLE_PADDING; + width = GTK_WIDGET (sidebar_title)->allocation.width / PREVIEW_ICON_SCALE - TITLE_PADDING; if (width < 0) { /* use smallest available icon size */ @@ -298,7 +301,7 @@ update_icon (NautilusSidebarTitle *sideb NautilusIconInfo *info; char *icon_name; gboolean leave_pixbuf_unchanged; - + leave_pixbuf_unchanged = FALSE; /* see if the current content view is specifying an icon */ @@ -311,11 +314,11 @@ update_icon (NautilusSidebarTitle *sideb g_object_unref (info); } else if (sidebar_title->details->file != NULL && nautilus_file_check_if_ready (sidebar_title->details->file, - NAUTILUS_FILE_ATTRIBUTES_FOR_ICON)) { + NAUTILUS_FILE_ATTRIBUTES_FOR_ICON)) { pixbuf = nautilus_file_get_icon_pixbuf (sidebar_title->details->file, sidebar_title->details->best_icon_size, FALSE, - NAUTILUS_FILE_ICON_FLAGS_FOR_DRAG_ACCEPT); + NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS | NAUTILUS_FILE_ICON_FLAGS_FOR_DRAG_ACCEPT); } else if (sidebar_title->details->determined_icon) { /* We used to know the icon for this file, but now the file says it isn't * ready. This means that some file info has been invalidated, which
Attachment:
signature.asc
Description: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio firmata digitalmente