[gnome-shell] util: don't depend on the nautilus GSettings schema



commit 18d69d70327f863226defea4ed06ef541d7ea5c9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 22 21:39:32 2011 -0400

    util: don't depend on the nautilus GSettings schema
    
    Without the desktop, even Nautilus hardcodes "Home" in all places
    nowadays (except for the desktop itself). I think a run-time dependency
    on nautilus being installed (GSettings will abort if the schema is not
    found) is not worth it to keep compatibility with the desktop.
    
    (Also, nautilus itself could probably hardcode "Home" for the desktop as
    well and remove the preference).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659895

 src/shell-util.c |   23 +++--------------------
 1 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/src/shell-util.c b/src/shell-util.c
index bdf2330..0f5e164 100644
--- a/src/shell-util.c
+++ b/src/shell-util.c
@@ -75,8 +75,6 @@ shell_util_get_file_display_name_if_mount (GFile *file)
   return ret;
 }
 
-#define HOME_NAME_SCHEMA        "org.gnome.nautilus.desktop"
-#define HOME_NAME_KEY           "home-icon-name"
 static char *
 shell_util_get_file_display_for_common_files (GFile *file)
 {
@@ -85,26 +83,11 @@ shell_util_get_file_display_for_common_files (GFile *file)
   compare = g_file_new_for_path (g_get_home_dir ());
   if (g_file_equal (file, compare))
     {
-      GSettings *settings;
-      char *name;
-
       g_object_unref (compare);
-
-      settings = g_settings_new (HOME_NAME_SCHEMA);
-      name = g_settings_get_string (settings, HOME_NAME_KEY);
-      g_object_unref (settings);
-
-      if (!(name && name[0]))
-        {
-          g_free (name);
-          return g_strdup (_("Home Folder"));
-        }
-      else
-        {
-          return name;
-        }
+      /* Translators: this is the same string as the one found in
+       * nautilus */
+      return g_strdup (_("Home"));
     }
-  g_object_unref (compare);
 
   compare = g_file_new_for_path ("/");
   if (g_file_equal (file, compare))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]