[gnome-commander/GSettings] Moves quick-search to 'general' path, accidentally deleted from keybindings in 66a67e6



commit b3a05f456700f235155c428874bbbec38ffed9b7
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Fri Aug 5 22:27:10 2016 +0200

    Moves quick-search to 'general' path, accidentally deleted from keybindings in 66a67e6

 data/org.gnome.gnome-commander.gschema.xml |   12 ++++++++++++
 src/gnome-cmd-data.cc                      |   13 +++++--------
 src/gnome-cmd-data.h                       |    4 +---
 3 files changed, 18 insertions(+), 11 deletions(-)
---
diff --git a/data/org.gnome.gnome-commander.gschema.xml b/data/org.gnome.gnome-commander.gschema.xml
index c861f4b..303083e 100644
--- a/data/org.gnome.gnome-commander.gschema.xml
+++ b/data/org.gnome.gnome-commander.gschema.xml
@@ -65,6 +65,11 @@
     <value nick="styled text" value="2"/>
   </enum>
 
+  <enum id="org.gnome.gnome-commander.preferences.general.quick-search-enum">
+    <value nick="CTRL+ALT+letter" value="0"/>
+    <value nick="ALT+letter" value="1"/>
+  </enum>
+
   <enum id="org.gnome.gnome-commander.preferences.confirmations.delete-default-enum">
     <value nick="cancel" value="3"/>
     <value nick="delete" value="1"/>
@@ -377,6 +382,13 @@
           This option defines if the main menu is visible or not.
       </description>
     </key>
+    <key name="quick-search" enum="org.gnome.gnome-commander.preferences.general.quick-search-enum">
+      <default>'CTRL+ALT+letter'</default>
+      <summary>Quick search shortcut</summary>
+      <description>
+          This option defines the shortcut for quick search.
+      </description>
+    </key>
   </schema>
   <schema gettext-domain="gnome-commander" id="org.gnome.gnome-commander.preferences.network" 
path="/org/gnome/gnome-commander/preferences/network/">
     <key name="quick-connect-uri" type="s">
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 242b340..28f82f4 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -69,7 +69,6 @@ struct _GcmdSettings
     GSettings *confirm;
     GSettings *colors;
     GSettings *programs;
-    GSettings *keybindings;
     GSettings *network;
     GSettings *internalviewer;
     GSettings *plugins;
@@ -95,7 +94,6 @@ static void gcmd_settings_dispose (GObject *object)
     g_clear_object (&gs->confirm);
     g_clear_object (&gs->colors);
     g_clear_object (&gs->programs);
-    g_clear_object (&gs->keybindings);
     g_clear_object (&gs->network);
     g_clear_object (&gs->internalviewer);
     g_clear_object (&gs->plugins);
@@ -751,7 +749,7 @@ void on_use_internal_viewer_changed()
 void on_quick_search_shortcut_changed()
 {
     gint quick_search;
-    quick_search = g_settings_get_enum (gnome_cmd_data.options.gcmd_settings->keybindings, 
GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT);
+    quick_search = g_settings_get_enum (gnome_cmd_data.options.gcmd_settings->general, 
GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT);
     gnome_cmd_data.options.quick_search = (GnomeCmdQuickSearchShortcut) quick_search;
 }
 
@@ -1191,7 +1189,7 @@ static void gcmd_connect_gsettings_signals(GcmdSettings *gs)
                       G_CALLBACK (on_use_internal_viewer_changed),
                       NULL);
 
-    g_signal_connect (gs->keybindings,
+    g_signal_connect (gs->general,
                       "changed::quick-search",
                       G_CALLBACK (on_quick_search_shortcut_changed),
                       NULL);
@@ -1271,7 +1269,6 @@ static void gcmd_settings_init (GcmdSettings *gs)
     gs->confirm        = g_settings_new (GCMD_PREF_CONFIRM);
     gs->colors         = g_settings_new (GCMD_PREF_COLORS);
     gs->programs       = g_settings_new (GCMD_PREF_PROGRAMS);
-    gs->keybindings    = g_settings_new (GCMD_PREF_KEYBINDINGS);
     gs->network        = g_settings_new (GCMD_PREF_NETWORK);
     gs->internalviewer = g_settings_new (GCMD_PREF_INTERNAL_VIEWER);
     gs->plugins        = g_settings_new (GCMD_PREF_PLUGINS);
@@ -2919,7 +2916,7 @@ void GnomeCmdData::migrate_all_data_to_gsettings()
                                               options.gcmd_settings->programs, 
GCMD_SETTINGS_USE_INTERNAL_VIEWER);
         //alt_quick_search
         migrate_data_int_value_into_gsettings(gnome_cmd_data_get_bool ("/programs/alt_quick_search", FALSE) 
? 1 : 0,
-                                              options.gcmd_settings->keybindings, 
GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT);
+                                              options.gcmd_settings->general, 
GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT);
         //quick_search_exact_match_begin
         migrate_data_int_value_into_gsettings(gnome_cmd_data_get_bool 
("/programs/quick_search_exact_match_begin", TRUE) ? 1 : 0,
                                               options.gcmd_settings->general, 
GCMD_SETTINGS_QUICK_SEARCH_EXACT_MATCH_BEGIN);
@@ -3416,7 +3413,7 @@ void GnomeCmdData::load()
     options.honor_expect_uris = g_settings_get_boolean (options.gcmd_settings->programs, 
GCMD_SETTINGS_DONT_DOWNLOAD);
     options.allow_multiple_instances = g_settings_get_boolean (options.gcmd_settings->general, 
GCMD_SETTINGS_MULTIPLE_INSTANCES);
     options.use_internal_viewer = g_settings_get_boolean (options.gcmd_settings->programs, 
GCMD_SETTINGS_USE_INTERNAL_VIEWER);
-    options.quick_search = (GnomeCmdQuickSearchShortcut) g_settings_get_enum 
(options.gcmd_settings->keybindings, GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT);
+    options.quick_search = (GnomeCmdQuickSearchShortcut) g_settings_get_enum 
(options.gcmd_settings->general, GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT);
     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);
 
@@ -3937,7 +3934,7 @@ void GnomeCmdData::save()
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_HORIZONTAL_ORIENTATION, 
&(horizontal_orientation));
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_GUI_UPDATE_RATE, 
&(gui_update_rate));
     set_gsettings_when_changed      (options.gcmd_settings->general, GCMD_SETTINGS_MULTIPLE_INSTANCES, 
&(options.allow_multiple_instances));
-    set_gsettings_enum_when_changed (options.gcmd_settings->keybindings, 
GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT, options.quick_search);
+    set_gsettings_enum_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT, 
options.quick_search);
 
     set_gsettings_when_changed      (options.gcmd_settings->programs, GCMD_SETTINGS_DONT_DOWNLOAD, 
&(options.honor_expect_uris));
     set_gsettings_when_changed      (options.gcmd_settings->programs, GCMD_SETTINGS_USE_INTERNAL_VIEWER, 
&(options.use_internal_viewer));
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 8967eaa..e51d30c 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -98,6 +98,7 @@ GcmdSettings *gcmd_settings_new (void);
 #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"
 
 #define GCMD_PREF_FILTER                              "org.gnome.gnome-commander.preferences.filter"
 #define GCMD_SETTINGS_FILTER_HIDE_UNKNOWN             "hide-unknown"
@@ -158,9 +159,6 @@ GcmdSettings *gcmd_settings_new (void);
 #define GCMD_SETTINGS_TERMINAL_EXEC_CMD               "terminal-exec-cmd"
 #define GCMD_SETTINGS_USE_GCMD_BLOCK                  "use-gcmd-block"
 
-#define GCMD_PREF_KEYBINDINGS                         "org.gnome.gnome-commander.preferences.keybindings"
-#define GCMD_SETTINGS_QUICK_SEARCH_SHORTCUT           "quick-search"
-
 #define GCMD_PREF_NETWORK                             "org.gnome.gnome-commander.preferences.network"
 #define GCMD_SETTINGS_QUICK_CONNECT_URI               "quick-connect-uri"
 #define GCMD_SETTINGS_FTP_ANONYMOUS_PASSWORD          "ftp-anonymous-password"


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