[Xfce4-commits] <thunar:master> Fix an inconsistency in the internal API.

Jannis Pohlmann noreply at xfce.org
Wed Nov 10 00:16:02 CET 2010


Updating branch refs/heads/master
         to 03838b1f6f9e236d7d8077b85ff53245d70e05ca (commit)
       from 02b132833ea4453f4fafe5be0c216435b1e338d1 (commit)

commit 03838b1f6f9e236d7d8077b85ff53245d70e05ca
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Wed Nov 10 00:11:57 2010 +0100

    Fix an inconsistency in the internal API.
    
    I guess this is more like a mini-feature than a bug though.

 thunar/thunar-file.c           |   10 +---------
 thunar/thunar-gio-extensions.c |   17 +++++++++++++++++
 thunar/thunar-gio-extensions.h |    1 +
 3 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 6ab7dfc..b5544d1 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -2237,16 +2237,8 @@ thunar_file_is_hidden (const ThunarFile *file)
 gboolean
 thunar_file_is_home (const ThunarFile *file)
 {
-  gboolean is_home = FALSE;
-  GFile   *home;
-
   _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
-
-  home = thunar_g_file_new_for_home ();
-  is_home = g_file_equal (file->gfile, home);
-  g_object_unref (home);
-
-  return is_home;
+  return thunar_g_file_is_home (file->gfile);
 }
 
 
diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c
index 11b34fb..e4717b3 100644
--- a/thunar/thunar-gio-extensions.c
+++ b/thunar/thunar-gio-extensions.c
@@ -113,6 +113,23 @@ thunar_g_file_is_trashed (GFile *file)
 
 
 gboolean
+thunar_g_file_is_home (GFile *file)
+{
+  GFile   *home;
+  gboolean is_home = FALSE;
+
+  _thunar_return_val_if_fail (G_IS_FILE (file), FALSE);
+
+  home = thunar_g_file_new_for_home ();
+  is_home = g_file_equal (home, file);
+  g_object_unref (home);
+
+  return is_home;
+}
+
+
+
+gboolean
 thunar_g_file_is_desktop (GFile *file)
 {
   GFile   *desktop;
diff --git a/thunar/thunar-gio-extensions.h b/thunar/thunar-gio-extensions.h
index c5f3333..51fd75a 100644
--- a/thunar/thunar-gio-extensions.h
+++ b/thunar/thunar-gio-extensions.h
@@ -33,6 +33,7 @@ GFile    *thunar_g_file_new_for_user_special_dir (GUserDirectory        dir);
                                                                       
 gboolean  thunar_g_file_is_root                  (GFile                *file);
 gboolean  thunar_g_file_is_trashed               (GFile                *file);
+gboolean  thunar_g_file_is_home                  (GFile                *file);
 gboolean  thunar_g_file_is_desktop               (GFile                *file);
                                                                       
 GKeyFile *thunar_g_file_query_key_file           (GFile                *file,



More information about the Xfce4-commits mailing list