summaryrefslogtreecommitdiff
path: root/plugins/gtkui/gtkui.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-27 18:49:16 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-27 18:49:16 +0100
commit476bb04cbbacee2d68bbe3e66de9a948e643f4eb (patch)
tree078889eac47b97ded2dfafdec4b63d92c5017637 /plugins/gtkui/gtkui.c
parent7112a75378eae33fafb114cc7b8efafa2abc0d39 (diff)
gtkui: automatically import global hotkeys from 0.5, fixed initializing hotkeys on 1st run
Diffstat (limited to 'plugins/gtkui/gtkui.c')
-rw-r--r--plugins/gtkui/gtkui.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index a590d51d..5bf06308 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -61,6 +61,7 @@
#endif
#include "actionhandlers.h"
#include "hotkeys.h"
+#include "../hotkeys/hotkeys.h"
#define trace(...) { fprintf(stderr, __VA_ARGS__); }
//#define trace(fmt,...)
@@ -995,6 +996,11 @@ gtkui_thread (void *ctx) {
// check if any hotkeys were created manually (e.g. beta versions of 0.6)
if (!deadbeef->conf_find ("hotkey.key", NULL)) {
gtkui_set_default_hotkeys ();
+ gtkui_import_0_5_global_hotkeys ();
+ DB_plugin_t *hkplug = deadbeef->plug_get_for_id ("hotkeys");
+ if (hkplug) {
+ ((DB_hotkeys_plugin_t *)hkplug)->reset ();
+ }
}
deadbeef->conf_set_int ("hotkeys_created", 1);
deadbeef->conf_save ();