[gnome-commander/ConfigurableFileListColumns: 26/26] Remove old fs_col_width array and associated entries in gschema file



commit 7fb3df83da34f9e295f2cdc333cda2d020898021
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun May 12 15:16:23 2019 +0200

    Remove old fs_col_width array and associated entries in gschema file

 data/org.gnome.gnome-commander.gschema.xml | 63 ------------------------------
 src/gnome-cmd-data.cc                      | 20 ----------
 src/gnome-cmd-data.h                       | 10 -----
 src/gnome-cmd-main-win.cc                  |  1 -
 4 files changed, 94 deletions(-)
---
diff --git a/data/org.gnome.gnome-commander.gschema.xml b/data/org.gnome.gnome-commander.gschema.xml
index ed817551..effded7f 100644
--- a/data/org.gnome.gnome-commander.gschema.xml
+++ b/data/org.gnome.gnome-commander.gschema.xml
@@ -304,69 +304,6 @@
           This list defines the width and the visibility of the main window tab columns.
       </description>
     </key>
-    <key name="column-width-icon" type="u">
-      <default>16</default>
-      <summary>Width of icon column</summary>
-      <description>
-          This option defines the width of the icon column.
-      </description>
-    </key>
-    <key name="column-width-name" type="u">
-      <default>140</default>
-      <summary>Width of name column</summary>
-      <description>
-          This option defines the width of the name column.
-      </description>
-    </key>
-    <key name="column-width-ext" type="u">
-      <default>40</default>
-      <summary>Width of extension column</summary>
-      <description>
-          This option defines the width of the extension column.
-      </description>
-    </key>
-    <key name="column-width-dir" type="u">
-      <default>240</default>
-      <summary>Width of directory column</summary>
-      <description>
-          This option defines the width of the directory column.
-      </description>
-    </key>
-    <key name="column-width-size" type="u">
-      <default>70</default>
-      <summary>Width of size column</summary>
-      <description>
-          This option defines the width of the size column.
-      </description>
-    </key>
-    <key name="column-width-date" type="u">
-      <default>150</default>
-      <summary>Width of date column</summary>
-      <description>
-          This option defines the width of the date column.
-      </description>
-    </key>
-    <key name="column-width-perm" type="u">
-      <default>70</default>
-      <summary>Width of permissions column</summary>
-      <description>
-          This option defines the width of the permissions column.
-      </description>
-    </key>
-    <key name="column-width-owner" type="u">
-      <default>50</default>
-      <summary>Width of owner column</summary>
-      <description>
-          This option defines the width of the owner column.
-      </description>
-    </key>
-    <key name="column-width-group" type="u">
-      <default>50</default>
-      <summary>Width of group column</summary>
-      <description>
-          This option defines the width of the group column.
-      </description>
-    </key>
     <key name="keybindings" type="a(sssbbbbbb)">
       <default>[]</default>
       <summary>List of keybindings</summary>
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index a6bfcfa6..ae342a76 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -2661,8 +2661,6 @@ GnomeCmdData::GnomeCmdData(): search_defaults(profiles)
 {
     quick_connect = nullptr;
 
-    //TODO: Include into GnomeCmdData::Options
-    memset(fs_col_width, 0, sizeof(fs_col_width));
     gui_update_rate = DEFAULT_GUI_UPDATE_RATE;
 
     cmdline_history = nullptr;
@@ -3140,15 +3138,6 @@ void GnomeCmdData::load()
     main_win_height = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_MAIN_WIN_HEIGHT);
     opts_dialog_width = g_settings_get_uint (options.gcmd_settings->general, 
GCMD_SETTINGS_OPTS_DIALOG_WIDTH);
     opts_dialog_height = g_settings_get_uint (options.gcmd_settings->general, 
GCMD_SETTINGS_OPTS_DIALOG_HEIGHT);
-    fs_col_width[0] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_ICON);
-    fs_col_width[1] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_NAME);
-    fs_col_width[2] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_EXT);
-    fs_col_width[3] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_DIR);
-    fs_col_width[4] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_SIZE);
-    fs_col_width[5] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_DATE);
-    fs_col_width[6] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_PERM);
-    fs_col_width[7] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_OWNER);
-    fs_col_width[8] = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_GROUP);
 
     options.color_mode = gcmd_owner.is_root() ? (GnomeCmdColorMode) GNOME_CMD_COLOR_DEEP_BLUE
                                               : (GnomeCmdColorMode) g_settings_get_enum 
(options.gcmd_settings->colors, GCMD_SETTINGS_COLORS_THEME);
@@ -3591,15 +3580,6 @@ void GnomeCmdData::save()
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_MAIN_WIN_HEIGHT, 
&(main_win_height));
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_OPTS_DIALOG_WIDTH, 
&(opts_dialog_width));
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_OPTS_DIALOG_HEIGHT, 
&(opts_dialog_height));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_ICON, 
&(fs_col_width[0]));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_NAME, 
&(fs_col_width[1]));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_EXT, 
&(fs_col_width[2]));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_DIR, 
&(fs_col_width[3]));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_SIZE, 
&(fs_col_width[4]));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_DATE, 
&(fs_col_width[5]));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_PERM, 
&(fs_col_width[6]));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_OWNER, 
&(fs_col_width[7]));
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_COLUMN_WIDTH_GROUP, 
&(fs_col_width[8]));
 
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_SAVE_DIRS_ON_EXIT, 
&(options.save_dirs_on_exit));
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_SAVE_TABS_ON_EXIT, 
&(options.save_tabs_on_exit));
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 76cca3c3..8610c4db 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -103,15 +103,6 @@ GcmdSettings *gcmd_settings_new (void);
 #define GCMD_SETTINGS_MAIN_WIN_HEIGHT                 "main-win-height"
 #define GCMD_SETTINGS_OPTS_DIALOG_WIDTH               "opts-dialog-width"
 #define GCMD_SETTINGS_OPTS_DIALOG_HEIGHT              "opts-dialog-height"
-#define GCMD_SETTINGS_COLUMN_WIDTH_ICON               "column-width-icon"
-#define GCMD_SETTINGS_COLUMN_WIDTH_NAME               "column-width-name"
-#define GCMD_SETTINGS_COLUMN_WIDTH_EXT                "column-width-ext"
-#define GCMD_SETTINGS_COLUMN_WIDTH_DIR                "column-width-dir"
-#define GCMD_SETTINGS_COLUMN_WIDTH_SIZE               "column-width-size"
-#define GCMD_SETTINGS_COLUMN_WIDTH_DATE               "column-width-date"
-#define GCMD_SETTINGS_COLUMN_WIDTH_PERM               "column-width-perm"
-#define GCMD_SETTINGS_COLUMN_WIDTH_OWNER              "column-width-owner"
-#define GCMD_SETTINGS_COLUMN_WIDTH_GROUP              "column-width-group"
 #define GCMD_SETTINGS_ADVRENAME_TOOL_WIDTH            "advrename-win-width"
 #define GCMD_SETTINGS_ADVRENAME_TOOL_HEIGHT           "advrename-win-height"
 #define GCMD_SETTINGS_ADVRENAME_TOOL_TEMPLATE_HISTORY "advrename-template-history"
@@ -671,7 +662,6 @@ struct GnomeCmdData
     gboolean                     mainmenu_visibility {TRUE};
 
     guint                        dev_icon_size {16};
-    guint                        fs_col_width[GnomeCmdFileList::NUM_COLUMNS];
     FileListColumnLayout         fileListColumnLayouts[GnomeCmdFileList::NUM_COLUMNS];
     guint                        gui_update_rate;
 
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index fae8142d..4ffdf335 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -538,7 +538,6 @@ static void on_fs_list_resize_column (GtkCList *clist, gint column, gint width,
     if (!column_resize_lock)
     {
         column_resize_lock = TRUE;
-        gnome_cmd_data.fs_col_width[column] = width;
         gnome_cmd_data.fileListColumnLayouts[column].width = width;
         gtk_clist_set_column_width (other_clist, column, width);
         column_resize_lock = FALSE;


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