[Goodies-commits] r2932 - ristretto/trunk/src
Stephan Arts
stephan at xfce.org
Mon Jul 30 17:33:00 CEST 2007
Author: stephan
Date: 2007-07-30 15:33:00 +0000 (Mon, 30 Jul 2007)
New Revision: 2932
Modified:
ristretto/trunk/src/navigator.c
Log:
filter out folders
Modified: ristretto/trunk/src/navigator.c
===================================================================
--- ristretto/trunk/src/navigator.c 2007-07-29 22:40:37 UTC (rev 2931)
+++ ristretto/trunk/src/navigator.c 2007-07-30 15:33:00 UTC (rev 2932)
@@ -138,12 +138,18 @@
{
ThunarVfsPath *file_path = thunar_vfs_path_relative(navigator->path, filename);
ThunarVfsInfo *file_info = thunar_vfs_info_new_for_path(file_path, NULL);
-
- navigator->file_list = g_list_prepend(navigator->file_list, file_info);
+ if(strcmp(thunar_vfs_mime_info_get_name(file_info->mime_info), "inode/directory"))
+ {
+ navigator->file_list = g_list_prepend(navigator->file_list, file_info);
- if(thunar_vfs_path_equal(path, file_path))
+ if(thunar_vfs_path_equal(path, file_path))
+ {
+ navigator->file_iter = navigator->file_list;
+ }
+ }
+ else
{
- navigator->file_iter = navigator->file_list;
+ thunar_vfs_info_unref(file_info);
}
thunar_vfs_path_unref(file_path);
@@ -185,7 +191,10 @@
gchar *filename = thunar_vfs_path_dup_string(((ThunarVfsInfo *)navigator->file_iter->data)->path);
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(filename , NULL);
if(!pixbuf)
+ {
pixbuf = gtk_icon_theme_load_icon(navigator->icon_theme, GTK_STOCK_MISSING_IMAGE, 48, 0, NULL);
+ rstto_picture_viewer_set_scale(navigator->viewer, 1);
+ }
rstto_picture_viewer_set_pixbuf(navigator->viewer, pixbuf);
if(pixbuf)
More information about the Goodies-commits
mailing list