[file-roller/wip/jtojnar/gir-cleanups: 8/12] init: Remove GNOME 2 options migration




commit 1afad1f78c0f6b9558bd723cdc1dab01de6cc9ef
Author: Jan Tojnar <jtojnar gmail com>
Date:   Thu Aug 18 01:37:55 2022 +0200

    init: Remove GNOME 2 options migration
    
    GNOME 2 is long dead and the options are not that critical anyway.

 src/dlg-add.c  |  1 +
 src/fr-init.c  | 27 ---------------------------
 src/typedefs.h |  2 --
 3 files changed, 1 insertion(+), 29 deletions(-)
---
diff --git a/src/dlg-add.c b/src/dlg-add.c
index dff13b0e..9fdf407f 100644
--- a/src/dlg-add.c
+++ b/src/dlg-add.c
@@ -33,6 +33,7 @@
 #include "gtk-utils.h"
 #include "preferences.h"
 
+#define ADD_FOLDER_OPTIONS_DIR  "file-roller/options"
 
 #define GET_WIDGET(x) (_gtk_builder_get_widget (data->builder, (x)))
 
diff --git a/src/fr-init.c b/src/fr-init.c
index 94f23808..37d94fcc 100644
--- a/src/fr-init.c
+++ b/src/fr-init.c
@@ -208,32 +208,6 @@ int           open_type[G_N_ELEMENTS (mime_type_desc)];
 int           create_type[G_N_ELEMENTS (mime_type_desc)];
 
 
-static void
-migrate_options_directory (void)
-{
-       char *old_directory_path;
-       GFile *old_directory;
-       GFile *new_directory;
-
-       old_directory_path = get_home_relative_path (".gnome2/file-roller/options");
-       old_directory = g_file_new_for_path (old_directory_path);
-       new_directory = _g_file_new_user_config_subdir (ADD_FOLDER_OPTIONS_DIR, FALSE);
-       if (g_file_query_exists (old_directory, NULL) && ! g_file_query_exists (new_directory, NULL)) {
-               GFile *parent;
-
-               parent = g_file_get_parent (new_directory);
-               if (_g_file_make_directory_tree (parent, 0700, NULL))
-                       g_file_move (old_directory, new_directory, 0, NULL, NULL, NULL, NULL);
-
-               g_object_unref (parent);
-       }
-
-       g_object_unref (new_directory);
-       g_object_unref (old_directory);
-       g_free (old_directory_path);
-}
-
-
 /* -- FrRegisteredArchive -- */
 
 
@@ -638,7 +612,6 @@ initialize_data (void)
        gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
                                           PRIVDATADIR G_DIR_SEPARATOR_S "icons");
 
-       migrate_options_directory ();
        register_archives ();
        compute_supported_archive_types ();
 }
diff --git a/src/typedefs.h b/src/typedefs.h
index 8b05860b..5af3571e 100644
--- a/src/typedefs.h
+++ b/src/typedefs.h
@@ -25,8 +25,6 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#define ADD_FOLDER_OPTIONS_DIR  "file-roller/options"
-
 typedef enum {
        FR_CLIPBOARD_OP_CUT,
        FR_CLIPBOARD_OP_COPY


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