From 0b48d9230b2f3c93e8ae43dc6a324efa8c833f3a Mon Sep 17 00:00:00 2001 From: Benedikt Meurer <benny@xfce.org> Date: Mon, 1 Aug 2005 22:55:52 +0000 Subject: [PATCH] 2005-08-02 Benedikt Meurer <benny@xfce.org> * thunar/thunar-local-file.c(thunar_local_file_monitor): Actually reload the file info when the VFS monitor notices a change. * thunar/thunar-list-model.c: Apply Jens Luedickes patch to add sub-sorting on the filename. * thunar-vfs/thunar-vfs-monitor.c: Add missing header files. * configure.in.in: Drop the kevent related checks. (Old svn revision: 16433) --- ChangeLog | 9 +++++++++ configure.in.in | 5 ++--- thunar-vfs/thunar-vfs-monitor.c | 6 ++++++ thunar/thunar-list-model.c | 18 ++++++++++++++---- thunar/thunar-local-file.c | 5 ++--- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5428ab282..21bac234b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-08-02 Benedikt Meurer <benny@xfce.org> + + * thunar/thunar-local-file.c(thunar_local_file_monitor): Actually + reload the file info when the VFS monitor notices a change. + * thunar/thunar-list-model.c: Apply Jens Luedickes patch to add + sub-sorting on the filename. + * thunar-vfs/thunar-vfs-monitor.c: Add missing header files. + * configure.in.in: Drop the kevent related checks. + 2005-08-02 Benedikt Meurer <benny@xfce.org> * configure.in.in: Add check for the FAM/Gamin library. diff --git a/configure.in.in b/configure.in.in index 5e08dcf3b..328a34f5a 100644 --- a/configure.in.in +++ b/configure.in.in @@ -54,14 +54,13 @@ dnl ********************************** dnl *** Check for standard headers *** dnl ********************************** AC_CHECK_HEADERS([dirent.h errno.h fcntl.h fstab.h grp.h locale.h \ - math.h memory.h pwd.h \ - stdlib.h string.h sys/cdio.h sys/event.h \ + math.h memory.h pwd.h stdlib.h string.h sys/cdio.h \ sys/mount.h sys/stat.h sys/time.h sys/param.h time.h]) dnl ************************************ dnl *** Check for standard functions *** dnl ************************************ -AC_CHECK_FUNCS([kqueue lchmod localtime_r readdir_r setgroupent setpassent]) +AC_CHECK_FUNCS([lchmod localtime_r readdir_r setgroupent setpassent]) dnl *********************************** dnl *** Check for required packages *** diff --git a/thunar-vfs/thunar-vfs-monitor.c b/thunar-vfs/thunar-vfs-monitor.c index 1cf340394..187eaac38 100644 --- a/thunar-vfs/thunar-vfs-monitor.c +++ b/thunar-vfs/thunar-vfs-monitor.c @@ -25,6 +25,12 @@ #ifdef HAVE_FAM_H #include <fam.h> #endif +#ifdef HAVE_MEMORY_H +#include <memory.h> +#endif +#ifdef HAVE_STRING_H +#include <string.h> +#endif #include <gdk/gdk.h> diff --git a/thunar/thunar-list-model.c b/thunar/thunar-list-model.c index 6a411f527..2f327701d 100644 --- a/thunar/thunar-list-model.c +++ b/thunar/thunar-list-model.c @@ -1322,7 +1322,8 @@ sort_by_date_accessed (ThunarFile *a, return -1; else if (date_a > date_b) return 1; - return 0; + + return sort_by_name (a, b); } @@ -1350,7 +1351,8 @@ sort_by_date_modified (ThunarFile *a, return -1; else if (date_a > date_b) return 1; - return 0; + + return sort_by_name (a, b); } @@ -1382,6 +1384,9 @@ sort_by_mime_type (ThunarFile *a, result = strcasecmp (thunar_vfs_mime_info_get_name (info_a), thunar_vfs_mime_info_get_name (info_b)); + if (result == 0) + result = sort_by_name (a, b); + thunar_vfs_mime_info_unref (info_b); thunar_vfs_mime_info_unref (info_a); @@ -1414,7 +1419,8 @@ sort_by_permissions (ThunarFile *a, return -1; else if (mode_a > mode_b) return 1; - return 0; + + return sort_by_name (a, b); } @@ -1442,7 +1448,8 @@ sort_by_size (ThunarFile *a, return -1; else if (size_a > size_b) return 1; - return 0; + + return sort_by_name (a, b); } @@ -1474,6 +1481,9 @@ sort_by_type (ThunarFile *a, result = strcasecmp (thunar_vfs_mime_info_get_comment (info_a), thunar_vfs_mime_info_get_comment (info_b)); + if (result == 0) + result = sort_by_name (a, b); + thunar_vfs_mime_info_unref (info_b); thunar_vfs_mime_info_unref (info_a); diff --git a/thunar/thunar-local-file.c b/thunar/thunar-local-file.c index b648396f6..f410c15bb 100644 --- a/thunar/thunar-local-file.c +++ b/thunar/thunar-local-file.c @@ -504,12 +504,11 @@ thunar_local_file_monitor (ThunarVfsMonitor *monitor, { case THUNAR_VFS_MONITOR_EVENT_CHANGED: case THUNAR_VFS_MONITOR_EVENT_CREATED: - // FIXME: We need to reload the file data here - thunar_file_changed (THUNAR_FILE (user_data)); + thunar_local_file_reload (THUNAR_FILE (local_file)); break; case THUNAR_VFS_MONITOR_EVENT_DELETED: - gtk_object_destroy (GTK_OBJECT (user_data)); + gtk_object_destroy (GTK_OBJECT (local_file)); break; } } -- GitLab