From d4b4c188e1a89a268af33ff0381eeca04e5528dc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 15 Dec 2008 15:52:54 +0000 Subject: [PATCH] Remove code that supports KDE2 style trash handling. * src/nautilus-application.c: Remove code that supports KDE2 style trash handling. svn path=/trunk/; revision=14814 --- ChangeLog | 7 +++++ src/nautilus-application.c | 53 -------------------------------------- 2 files changed, 7 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84f2f5bfa..0ab2b6deb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-15 Matthias Clasen + + Bug 564207 – don't look for old kde trash + + * src/nautilus-application.c: Remove code that supports KDE2 + style trash handling. + 2008-12-15 Tomas Bzatek * libnautilus-private/nautilus-mime-actions.c: diff --git a/src/nautilus-application.c b/src/nautilus-application.c index 91d0406a7..e2a123bb0 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -497,57 +497,6 @@ finish_startup (NautilusApplication *application) application, NULL); } -static void -initialize_kde_trash_hack (void) -{ - char *desktop_dir, *desktop_uri, *kde_trash_dir; - char *dir, *basename; - - desktop_uri = nautilus_get_desktop_directory_uri_no_create (); - desktop_dir = g_filename_from_uri (desktop_uri, NULL, NULL); - g_free (desktop_uri); - - if (g_file_test (desktop_dir, G_FILE_TEST_EXISTS)) { - gboolean res; - GKeyFile *keyfile; - char **dirs; - - /* Look for trash directory */ - - keyfile = g_key_file_new (); - dirs = g_new0 (char *, 3); - dirs[0] = g_build_filename (g_get_home_dir(), ".kde/share/config", NULL); - dirs[1] = g_strdup ("/usr/share/config"); - dirs[2] = NULL; - - res = g_key_file_load_from_dirs (keyfile, "kdeglobals", - (const char **) dirs, NULL, 0, NULL); - if (res) { - kde_trash_dir = g_key_file_get_string (keyfile, - "Paths", "Trash", - NULL); - if (kde_trash_dir != NULL) { - basename = g_path_get_basename (kde_trash_dir); - - dir = g_build_filename (desktop_dir, basename, NULL); - - if (g_file_test (dir, G_FILE_TEST_IS_DIR)) { - nautilus_set_kde_trash_name (basename); - } - - g_free (basename); - g_free (dir); - g_free (kde_trash_dir); - } - } - - g_key_file_free (keyfile); - g_strfreev (dirs); - } - - g_free (desktop_dir); -} - static void open_window (NautilusApplication *application, const char *startup_id, @@ -680,8 +629,6 @@ nautilus_application_startup (NautilusApplication *application, return; } - initialize_kde_trash_hack (); - if (kill_shell) { if (unique_app_is_running (application->unique_app)) { unique_app_send_message (application->unique_app, -- GitLab