diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-04-26 15:15:56 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-04-26 15:24:28 -0400 |
commit | 5ab3050f22da718264a35e61ada4be1a386a6e2d (patch) | |
tree | 9bb322e696ec4935bb5de3aefb35bc3db17ecedb /src/nautilus-pathbar.c | |
parent | 042b7990acb0f68432d4a1eed7d410c6b33a94dd (diff) | |
download | nautilus-5ab3050f22da718264a35e61ada4be1a386a6e2d.tar.gz |
all: remove desktop-is-home-dir GSetting preference
These days, still having the desktop in Nautilus is alone questionable;
having an additional option to make the desktop be the home directory is
even weirder (and kind of redundant, since the user can control that
with XDG dirs already).
https://bugzilla.gnome.org/show_bug.cgi?id=469614
Diffstat (limited to 'src/nautilus-pathbar.c')
-rw-r--r-- | src/nautilus-pathbar.c | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c index 36fe6a32e..c0317bb0c 100644 --- a/src/nautilus-pathbar.c +++ b/src/nautilus-pathbar.c @@ -61,8 +61,6 @@ typedef enum { static guint path_bar_signals [LAST_SIGNAL] = { 0 }; -static gboolean desktop_is_home; - #define NAUTILUS_PATH_BAR_ICON_SIZE 16 typedef struct _ButtonData ButtonData; @@ -130,43 +128,6 @@ get_slider_button (NautilusPathBar *path_bar, } static void -update_button_types (NautilusPathBar *path_bar) -{ - GList *list; - GFile *path = NULL; - - for (list = path_bar->button_list; list; list = list->next) { - ButtonData *button_data; - button_data = BUTTON_DATA (list->data); - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_data->button))) { - path = g_object_ref (button_data->path); - break; - } - } - if (path != NULL) { - nautilus_path_bar_update_path (path_bar, path, TRUE); - g_object_unref (path); - } -} - - -static void -desktop_location_changed_callback (gpointer user_data) -{ - NautilusPathBar *path_bar; - - path_bar = NAUTILUS_PATH_BAR (user_data); - - g_object_unref (path_bar->desktop_path); - g_object_unref (path_bar->home_path); - path_bar->desktop_path = nautilus_get_desktop_location (); - path_bar->home_path = g_file_new_for_path (g_get_home_dir ()); - desktop_is_home = g_file_equal (path_bar->home_path, path_bar->desktop_path); - - update_button_types (path_bar); -} - -static void trash_state_changed_cb (NautilusTrashMonitor *monitor, gboolean state, NautilusPathBar *path_bar) @@ -274,11 +235,6 @@ nautilus_path_bar_init (NautilusPathBar *path_bar) g_free (p); path_bar->home_path = g_file_new_for_path (g_get_home_dir ()); path_bar->root_path = g_file_new_for_path ("/"); - desktop_is_home = g_file_equal (path_bar->home_path, path_bar->desktop_path); - - g_signal_connect_swapped (nautilus_preferences, "changed::" NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR, - G_CALLBACK(desktop_location_changed_callback), - path_bar); g_signal_connect_swapped (path_bar->up_slider_button, "clicked", G_CALLBACK (nautilus_path_bar_scroll_up), path_bar); g_signal_connect_swapped (path_bar->down_slider_button, "clicked", G_CALLBACK (nautilus_path_bar_scroll_down), path_bar); @@ -339,9 +295,6 @@ nautilus_path_bar_finalize (GObject *object) g_signal_handlers_disconnect_by_func (nautilus_trash_monitor_get (), trash_state_changed_cb, path_bar); - g_signal_handlers_disconnect_by_func (nautilus_preferences, - desktop_location_changed_callback, - path_bar); G_OBJECT_CLASS (nautilus_path_bar_parent_class)->finalize (object); } @@ -1455,11 +1408,7 @@ setup_button_type (ButtonData *button_data, button_data->type = HOME_BUTTON; button_data->fake_root = TRUE; } else if (path_bar->desktop_path != NULL && g_file_equal (location, path_bar->desktop_path)) { - if (!desktop_is_home) { - button_data->type = DESKTOP_BUTTON; - } else { - button_data->type = NORMAL_BUTTON; - } + button_data->type = DESKTOP_BUTTON; } else if (setup_file_path_mounted_mount (location, button_data)) { /* already setup */ } else { |