[Xfce4-commits] r29768 - in thunar/branches/migration-to-gio: . thunar
Jannis Pohlmann
jannis at xfce.org
Sat Apr 11 21:56:14 CEST 2009
Author: jannis
Date: 2009-04-11 19:56:14 +0000 (Sat, 11 Apr 2009)
New Revision: 29768
Modified:
thunar/branches/migration-to-gio/ChangeLog
thunar/branches/migration-to-gio/thunar/thunar-file.c
thunar/branches/migration-to-gio/thunar/thunar-window.c
Log:
* thunar/thunar-file.c: Add assertion to thunar_file_load() to see for
which files it fails rather than to see that in some random function
later.
* thunar/thunar-window.c: Re-implement thunar_window_open_trash()
based on GFile.
* thunar/thunar-file.c: Fix segfault in thunar_file_get().
Modified: thunar/branches/migration-to-gio/ChangeLog
===================================================================
--- thunar/branches/migration-to-gio/ChangeLog 2009-04-11 19:45:00 UTC (rev 29767)
+++ thunar/branches/migration-to-gio/ChangeLog 2009-04-11 19:56:14 UTC (rev 29768)
@@ -1,6 +1,14 @@
2009-04-11 Jannis Pohlmann <jannis at xfce.org>
- * thunar/thunar-file.c: Fix segfault in thunar_file_get().
+ * thunar/thunar-file.c: Add assertion to thunar_file_load() to see for
+ which files it fails rather than to see that in some random function
+ later.
+ * thunar/thunar-window.c: Re-implement thunar_window_open_trash()
+ based on GFile.
+
+2009-04-11 Jannis Pohlmann <jannis at xfce.org>
+
+ * thunar/thunar-file.c: Fix segfault in thunar_file_get().
* thunar/thunar-window.c: Re-implement
thunar_window_open_user_folder() based on GFile.
Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-11 19:45:00 UTC (rev 29767)
+++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-04-11 19:56:14 UTC (rev 29768)
@@ -835,6 +835,9 @@
cancellable,
error);
+ /* FIXME This is just temporary */
+ g_assert (file->ginfo != NULL);
+
return (file->ginfo != NULL);
}
Modified: thunar/branches/migration-to-gio/thunar/thunar-window.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-04-11 19:45:00 UTC (rev 29767)
+++ thunar/branches/migration-to-gio/thunar/thunar-window.c 2009-04-11 19:56:14 UTC (rev 29768)
@@ -2134,19 +2134,19 @@
thunar_window_action_open_trash (GtkAction *action,
ThunarWindow *window)
{
- ThunarVfsPath *trash_bin_path;
- ThunarFile *trash_bin;
- GError *error = NULL;
+ GFile *trash_bin;
+ ThunarFile *trash_bin_file;
+ GError *error = NULL;
_thunar_return_if_fail (GTK_IS_ACTION (action));
_thunar_return_if_fail (THUNAR_IS_WINDOW (window));
/* determine the path to the trash bin */
- trash_bin_path = thunar_vfs_path_get_for_trash ();
+ trash_bin = g_file_new_for_trash ();
/* determine the file for the trash bin */
- trash_bin = thunar_file_get_for_path (trash_bin_path, &error);
- if (G_UNLIKELY (trash_bin == NULL))
+ trash_bin_file = thunar_file_get (trash_bin, &error);
+ if (G_UNLIKELY (trash_bin_file == NULL))
{
/* display an error to the user */
thunar_dialogs_show_error (GTK_WIDGET (window), error, _("Failed to display the contents of the trash can"));
@@ -2155,12 +2155,12 @@
else
{
/* open the trash folder */
- thunar_window_set_current_directory (window, trash_bin);
+ thunar_window_set_current_directory (window, trash_bin_file);
g_object_unref (G_OBJECT (trash_bin));
}
/* release our reference on the trash bin path */
- thunar_vfs_path_unref (trash_bin_path);
+ g_object_unref (trash_bin);
}
More information about the Xfce4-commits
mailing list