summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/actionhandlers.c13
-rw-r--r--plugins/gtkui/actionhandlers.h6
-rw-r--r--plugins/gtkui/callbacks.c7
-rw-r--r--plugins/gtkui/gtkui.c4
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
};