[gnome-commander/GSettings] Removes deprecated loading of key-bindings from gnome_config file
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/GSettings] Removes deprecated loading of key-bindings from gnome_config file
- Date: Sat, 6 Aug 2016 09:44:04 +0000 (UTC)
commit bdc9d8d9a461227e33502cf2547c8203e9a0723e
Author: Uwe Scholz <uwescholz src gnome org>
Date: Sat Aug 6 11:42:06 2016 +0200
Removes deprecated loading of key-bindings from gnome_config file
Key-bindings are loaded via xml config-file already since < v1.6.
src/gnome-cmd-data.cc | 4 ---
src/gnome-cmd-user-actions.cc | 46 -----------------------------------------
src/gnome-cmd-user-actions.h | 2 -
3 files changed, 0 insertions(+), 52 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 938ded8..198e64b 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -3702,10 +3702,6 @@ void GnomeCmdData::load()
quick_connect = gnome_cmd_con_remote_new (NULL, quick_connect_uri);
g_free (quick_connect_uri);
- // if number of registered user actions does not exceed 10 (nothing has been read), try to read old cfg
file
- if (gcmd_user_actions.size()<10)
- gcmd_user_actions.load("key-bindings");
-
load_intviewer_defaults();
load_auto_load_plugins();
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index d08f3da..64d307b 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <config.h>
#include <gtk/gtkclipboard.h>
#include <libgnome/gnome-util.h>
#include <libgnomeui/gnome-url.h>
@@ -493,51 +492,6 @@ void GnomeCmdUserActions::shutdown()
}
-void GnomeCmdUserActions::load(const gchar *section)
-{
- string section_path = G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S;
- section_path += section;
- section_path += G_DIR_SEPARATOR;
-
- char *key = NULL;
- char *action_name = NULL;
-
- for (gpointer i=gnome_config_init_iterator(section_path.c_str()); (i=gnome_config_iterator_next(i, &key,
&action_name)); )
- {
- DEBUG('u',"[%s]\t%s=%s\n", section, key, action_name);
-
- char *action_options = strchr(action_name, '|');
-
- if (action_options)
- {
- *action_options = '\0';
- g_strstrip (++action_options);
- }
-
- gchar *action_name__lowercase = g_ascii_strdown (g_strstrip (action_name), -1);
-
- if (action_func[action_name__lowercase])
- {
- guint keyval;
- guint state;
-
- str2key(key, state, keyval);
-
- if (keyval!=GDK_VoidSymbol)
- register_action(state, keyval, action_name__lowercase, action_options);
- else
- g_warning ("[%s] invalid key name: '%s' - ignored", section, key);
- }
- else
- g_warning ("[%s] unknown user action: '%s' - ignored", section, action_name__lowercase);
-
- g_free (key);
- g_free (action_name);
- g_free (action_name__lowercase);
- }
-}
-
-
gboolean GnomeCmdUserActions::register_action(guint state, guint keyval, const gchar *name, const char
*user_data)
{
GnomeCmdUserActionFunc func = action_func[name];
diff --git a/src/gnome-cmd-user-actions.h b/src/gnome-cmd-user-actions.h
index afd11cc..b242ddd 100644
--- a/src/gnome-cmd-user-actions.h
+++ b/src/gnome-cmd-user-actions.h
@@ -171,8 +171,6 @@ class GnomeCmdUserActions
void shutdown();
GcmdUserActionSettings *settings;
- void load(const gchar *section);
-
void clear() { action.clear();
}
gboolean has_action(const gchar *a) { return action_func[a]!=NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]