diff options
author | waker <wakeroid@gmail.com> | 2012-11-23 23:29:38 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-11-23 23:29:38 +0100 |
commit | 9cfd3e731d9a8a43de1657a8f6fc54d72d0dbd5d (patch) | |
tree | 2b4efbdb19b1c6b13dc3b57eb14848b03bd504e5 | |
parent | 50861b90707678b0d06d31430f6bda7ba590febe (diff) |
gtkui: added preferences window hotkey
-rw-r--r-- | plugins/gtkui/actionhandlers.c | 13 | ||||
-rw-r--r-- | plugins/gtkui/actionhandlers.h | 6 | ||||
-rw-r--r-- | plugins/gtkui/callbacks.c | 7 | ||||
-rw-r--r-- | plugins/gtkui/gtkui.c | 4 |
4 files changed, 21 insertions, 9 deletions
diff --git a/plugins/gtkui/actionhandlers.c b/plugins/gtkui/actionhandlers.c index 61468a31..0530a811 100644 --- a/plugins/gtkui/actionhandlers.c +++ b/plugins/gtkui/actionhandlers.c @@ -36,6 +36,7 @@ #include "wingeom.h" #include "interface.h" #include "trkproperties.h" +#include "callbacks.h" extern GtkWidget *mainwin; extern DB_functions_t *deadbeef; @@ -822,4 +823,16 @@ action_toggle_designmode_handler (DB_plugin_action_t *act, int ctx) { return 0; } +gboolean +action_preferences_handler_cb (void *data) { + on_preferences_activate (NULL, NULL); + return FALSE; +} + +int +action_preferences_handler (DB_plugin_action_t *act, int ctx) { + gdk_threads_add_idle (action_preferences_handler_cb, NULL); + return 0; +} + diff --git a/plugins/gtkui/actionhandlers.h b/plugins/gtkui/actionhandlers.h index 6d549170..2c3c89cc 100644 --- a/plugins/gtkui/actionhandlers.h +++ b/plugins/gtkui/actionhandlers.h @@ -162,4 +162,10 @@ action_toggle_designmode_handler_cb (void *data); int action_toggle_designmode_handler (DB_plugin_action_t *act, int ctx); +gboolean +action_preferences_handler_cb (void *data); + +int +action_preferences_handler (DB_plugin_action_t *act, int ctx); + #endif diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index d2319eac..777f46bb 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -85,13 +85,6 @@ on_add_folders_activate (GtkMenuItem *menuitem, void -on_preferences1_activate (GtkMenuItem *menuitem, - gpointer user_data) -{ - -} - -void on_quit_activate (GtkMenuItem *menuitem, gpointer user_data) { diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 8600a886..93f3cbd2 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -1430,10 +1430,10 @@ static DB_plugin_action_t action_toggle_designmode = { }; static DB_plugin_action_t action_preferences = { - .title = "Edit/[stub] Preferences", + .title = "Edit/Preferences", .name = "preferences", .flags = DB_ACTION_COMMON, - .callback = NULL, + .callback = action_preferences_handler, .next = &action_toggle_designmode }; |