From 18d69d70327f863226defea4ed06ef541d7ea5c9 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 22 Sep 2011 21:39:32 -0400 Subject: [PATCH] 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 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/shell-util.c b/src/shell-util.c index bdf2330e4..0f5e16463 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))