[gnome-commander] Remove the option to skip mounting of a GnomeCommander device



commit e4fd1d7d50a866d22accc7124941cb8f4f0c46e9
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sat Jul 10 23:15:11 2021 +0200

    Remove the option to skip mounting of a GnomeCommander device

 data/org.gnome.gnome-commander.gschema.xml |  7 -------
 doc/C/index.docbook                        | 13 ++-----------
 src/dialogs/gnome-cmd-options-dialog.cc    |  7 -------
 src/gnome-cmd-data.cc                      | 17 -----------------
 src/gnome-cmd-data.h                       |  5 +----
 src/gnome-cmd-main-win.cc                  |  3 +--
 6 files changed, 4 insertions(+), 48 deletions(-)
---
diff --git a/data/org.gnome.gnome-commander.gschema.xml b/data/org.gnome.gnome-commander.gschema.xml
index 8187fc2b..a5b5cc16 100644
--- a/data/org.gnome.gnome-commander.gschema.xml
+++ b/data/org.gnome.gnome-commander.gschema.xml
@@ -472,13 +472,6 @@
           This option defines if only device icons should be shown instead of icons and text label.
       </description>
     </key>
-    <key name="dev-skip-mounting" type="b">
-      <default>false</default>
-      <summary>Skip device mounting</summary>
-      <description>
-          This option defines if mounting of devices should be skipped when they are opened.
-      </description>
-    </key>
     <key name="mainmenu-visibility" type="b">
       <default>true</default>
       <summary>Main menu visibility</summary>
diff --git a/doc/C/index.docbook b/doc/C/index.docbook
index 946789dd..c6c154d4 100644
--- a/doc/C/index.docbook
+++ b/doc/C/index.docbook
@@ -6076,7 +6076,6 @@
                <listitem><para>Below the <guilabel>Devices</guilabel> window you have two options:
        <itemizedlist>
          <listitem><para><guilabel>Show only the icons</guilabel>: If activated, device icons are shown 
without their alias name in the device buttons toolbar.</para></listitem>
-         <listitem><para><guilabel>Skip mounting</guilabel>: If activated, &app; will not try to mount the 
devices by clicking on them.</para></listitem>
        </itemizedlist></para></listitem>
       </itemizedlist>
       <para>On the right hand side there are five buttons, described in the <xref linkend="gcmd-dev"></xref> 
table below.</para>
@@ -7478,9 +7477,6 @@
        </sect2>
        <sect2 id="gnome-commander-removable-media">
          <title>Using removable media</title>
-          <warning>
-            <para>This info might be partially outdated since modern desktop environments or Linux 
distributions use automounters to mount devices into /media.</para>
-          </warning>
           <para>If you use removable devices such as CDs, floppies and cameras a lot you can make &app;
           automatically take care of mounting them by following this guide:</para>
           <itemizedlist>
@@ -7504,17 +7500,12 @@
                </screenshot>
              </figure>
              <!-- ==== End of Figure ==== -->
-             <para>In the last image the red circle <guimenu>A</guimenu> shows the available 
-             devices. If a device was mounted by &app; there is also a button to press if you 
+             <para>In the last image the red circle <guimenu>A</guimenu> shows the available
+             devices. If a device was mounted by &app; there is also a button to press if you
              want to unmount the device, shown in the red circle <guimenu>B</guimenu>.
              The icons that are used for the devices in the example should be available
              in the $(prefix)/share/pixmaps/gnome-commander/device-icons folder on your computer.</para>
             </listitem>
-            <listitem>
-              <para>There is also an option to skip mounting in the option device tab.
-              This can be useful for making shortcuts to directories, or if you have some automounting 
feature
-              that mounts it at its mountpoint when available, or if you use Supermount that does it on 
access basis.</para>
-            </listitem>
           </itemizedlist>
        </sect2>
        <sect2 id="gnome-commander-mime-types">
diff --git a/src/dialogs/gnome-cmd-options-dialog.cc b/src/dialogs/gnome-cmd-options-dialog.cc
index 3009710d..a2d583ad 100644
--- a/src/dialogs/gnome-cmd-options-dialog.cc
+++ b/src/dialogs/gnome-cmd-options-dialog.cc
@@ -2101,11 +2101,6 @@ static GtkWidget *create_devices_tab (GtkWidget *parent, GnomeCmdData::Options &
     gtk_container_add (GTK_CONTAINER (cat_box), check);
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), cfg.device_only_icon);
 
-    check = create_check (parent, _("Skip mounting (useful when using super-mount)"), "skip_mounting");
-    gtk_container_add (GTK_CONTAINER (cat_box), check);
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), cfg.skip_mounting);
-
-
     clist = (GtkWidget *) g_object_get_data (G_OBJECT (parent), "device_clist");
     for (GList *devices = gnome_cmd_con_list_get_all_dev (gnome_cmd_con_list_get ()); devices; devices = 
devices->next)
         if (!gnome_cmd_con_device_get_autovol ((GnomeCmdConDevice *) devices->data))
@@ -2118,10 +2113,8 @@ static GtkWidget *create_devices_tab (GtkWidget *parent, GnomeCmdData::Options &
 void store_devices_options (GtkWidget *dialog, GnomeCmdData::Options &cfg)
 {
     GtkWidget *device_only_icon = lookup_widget (dialog, "device_only_icon");
-    GtkWidget *skip_mounting = lookup_widget (dialog, "skip_mounting");
 
     cfg.device_only_icon = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (device_only_icon));
-    cfg.skip_mounting = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (skip_mounting));
 }
 
 
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 968303e9..c10b9f0f 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -818,14 +818,6 @@ static void on_quick_search_exact_match_end_changed()
     gnome_cmd_data.options.quick_search_exact_match_end = quick_search_exact_match;
 }
 
-static void on_dev_skip_mounting_changed()
-{
-    gboolean skip_mounting;
-
-    skip_mounting = g_settings_get_boolean (gnome_cmd_data.options.gcmd_settings->general, 
GCMD_SETTINGS_DEV_SKIP_MOUNTING);
-    gnome_cmd_data.options.skip_mounting = skip_mounting;
-}
-
 static void on_dev_only_icon_changed()
 {
     gboolean dev_only_icon;
@@ -1273,11 +1265,6 @@ static void gcmd_connect_gsettings_signals(GcmdSettings *gs)
                       G_CALLBACK (on_quick_search_exact_match_end_changed),
                       nullptr);
 
-    g_signal_connect (gs->general,
-                      "changed::dev-skip-mounting",
-                      G_CALLBACK (on_dev_skip_mounting_changed),
-                      nullptr);
-
     g_signal_connect (gs->general,
                       "changed::dev-only-icon",
                       G_CALLBACK (on_dev_only_icon_changed),
@@ -1434,7 +1421,6 @@ GnomeCmdData::Options::Options(const Options &cfg)
     termexec = g_strdup (cfg.termexec);
     fav_apps = cfg.fav_apps;
     device_only_icon = cfg.device_only_icon;
-    skip_mounting = cfg.skip_mounting;
     gcmd_settings = nullptr;
 }
 
@@ -1496,7 +1482,6 @@ GnomeCmdData::Options &GnomeCmdData::Options::operator = (const Options &cfg)
         termexec = g_strdup (cfg.termexec);
         fav_apps = cfg.fav_apps;
         device_only_icon = cfg.device_only_icon;
-        skip_mounting = cfg.skip_mounting;
         gcmd_settings = nullptr;
     }
 
@@ -3096,7 +3081,6 @@ void GnomeCmdData::load()
     options.quick_search_exact_match_begin = g_settings_get_boolean (options.gcmd_settings->general, 
GCMD_SETTINGS_QUICK_SEARCH_EXACT_MATCH_BEGIN);
     options.quick_search_exact_match_end = g_settings_get_boolean (options.gcmd_settings->general, 
GCMD_SETTINGS_QUICK_SEARCH_EXACT_MATCH_END);
 
-    options.skip_mounting = g_settings_get_boolean (options.gcmd_settings->general, 
GCMD_SETTINGS_DEV_SKIP_MOUNTING);
     options.device_only_icon = g_settings_get_boolean(options.gcmd_settings->general, 
GCMD_SETTINGS_DEV_ONLY_ICON);
 
     options.symlink_prefix = g_settings_get_string(options.gcmd_settings->general, 
GCMD_SETTINGS_SYMLINK_PREFIX);
@@ -3473,7 +3457,6 @@ void GnomeCmdData::save()
     set_gsettings_when_changed      (options.gcmd_settings->general, 
GCMD_SETTINGS_QUICK_SEARCH_EXACT_MATCH_BEGIN, &(options.quick_search_exact_match_begin));
     set_gsettings_when_changed      (options.gcmd_settings->general, 
GCMD_SETTINGS_QUICK_SEARCH_EXACT_MATCH_END, &(options.quick_search_exact_match_end));
 
-    set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_DEV_SKIP_MOUNTING, 
&(options.skip_mounting));
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_DEV_ONLY_ICON, 
&(options.device_only_icon));
 
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_SHOW_TOOLBAR, 
&(show_toolbar));
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 747342c5..5483973d 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -95,7 +95,6 @@ GcmdSettings *gcmd_settings_new (void);
 #define GCMD_SETTINGS_MULTIPLE_INSTANCES              "allow-multiple-instances"
 #define GCMD_SETTINGS_QUICK_SEARCH_EXACT_MATCH_BEGIN  "quick-search-exact-match-begin"
 #define GCMD_SETTINGS_QUICK_SEARCH_EXACT_MATCH_END    "quick-search-exact-match-end"
-#define GCMD_SETTINGS_DEV_SKIP_MOUNTING               "dev-skip-mounting"
 #define GCMD_SETTINGS_DEV_ONLY_ICON                   "dev-only-icon"
 #define GCMD_SETTINGS_MAINMENU_VISIBILITY             "mainmenu-visibility"
 #define GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT           "quick-search"
@@ -372,7 +371,6 @@ struct GnomeCmdData
         GList                       *fav_apps;
         //  Devices
         gboolean                     device_only_icon;
-        gboolean                     skip_mounting;
 
         Options(): gcmd_settings(nullptr),
                    left_mouse_button_mode(LEFT_BUTTON_OPENS_WITH_DOUBLE_CLICK),
@@ -421,8 +419,7 @@ struct GnomeCmdData
                    termopen(nullptr),
                    termexec(nullptr),
                    fav_apps(nullptr),
-                   device_only_icon(FALSE),
-                   skip_mounting(FALSE)
+                   device_only_icon(FALSE)
         {
             memset(&color_themes, 0, sizeof(color_themes));
             memset(&ls_colors_palette, 0, sizeof(ls_colors_palette));
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 900c99f9..47ed729d 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -649,8 +649,7 @@ void GnomeCmdMainWin::update_drop_con_button(GnomeCmdFileList *fl)
     if (!con)
         return;
 
-    if (!gnome_cmd_data.show_toolbar
-        || (gnome_cmd_data.options.skip_mounting && GNOME_CMD_IS_CON_DEVICE (con)))
+    if (!gnome_cmd_data.show_toolbar)
         return;
 
     GtkWidget *btn = priv->tb_con_drop_btn;


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