[Xfce4-commits] <thunar:migration-to-gio> Avoid GIO 2.20 symbols. Avoid INSTALL file being tracked.

Jannis Pohlmann jannis at xfce.org
Mon Aug 17 00:04:01 CEST 2009


Updating branch refs/heads/migration-to-gio
         to ad654af892d44b6393655face8ed88859e6f2706 (commit)
       from 0f916f1581462526c0cbc84ab7f08ced4b9a2c0f (commit)

commit ad654af892d44b6393655face8ed88859e6f2706
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Mon Aug 17 00:02:18 2009 +0200

    Avoid GIO 2.20 symbols. Avoid INSTALL file being tracked.

 thunar/thunar-file.c           |    3 +--
 thunar/thunar-gio-extensions.c |    8 ++++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index c613028..9d203a0 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -2652,8 +2652,7 @@ thunar_file_get_preview_icon (const ThunarFile *file)
   _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL);
   _thunar_return_val_if_fail (file->info != NULL, NULL);
 
-  return G_ICON (g_file_info_get_attribute_object (file->info,
-                                                   G_FILE_ATTRIBUTE_PREVIEW_ICON));
+  return G_ICON (g_file_info_get_attribute_object (file->info, "preview::icon"));
 }
 
 
diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c
index 3636be7..b0309d7 100644
--- a/thunar/thunar-gio-extensions.c
+++ b/thunar/thunar-gio-extensions.c
@@ -181,8 +181,12 @@ g_file_write_key_file (GFile        *file,
 
   /* try to replace the file contents with the key file data */
   if (!g_file_replace_contents (file, contents, length, NULL, FALSE, 
-                                G_FILE_CREATE_REPLACE_DESTINATION, NULL,
-                                cancellable, error))
+#if GLIB_CHECK_VERSION(2,20,0)
+                                G_FILE_CREATE_REPLACE_DESTINATION,
+#else
+                                G_FILE_CREATE_NONE,
+#endif
+                                NULL, cancellable, error))
     {
       g_free (contents);
       return FALSE;



More information about the Xfce4-commits mailing list