summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-02-03 19:57:29 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-02-03 19:57:29 +0100
commit4f649a4f0afd87bd9612fbc856e631e352e4595d (patch)
tree8abe4ebdae5f64f29a3082000f38b89b012775bb /plugins
parentc91638bf404a9814d325ab419a97d197546026ce (diff)
gtkui option to run with --sync
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/gtkui.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index 6b810541..e24047e3 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -375,9 +375,13 @@ gtkui_thread (void *ctx) {
notify_init ("DeaDBeeF");
#endif
- int argc = 1;
- const char **argv = alloca (sizeof (char *));
+ int argc = 2;
+ const char **argv = alloca (sizeof (char *) * argc);
argv[0] = "deadbeef";
+ argv[1] = "--sync";
+ if (!deadbeef->conf_get_int ("gtkui.sync", 0)) {
+ argc = 1;
+ }
gtk_init (&argc, (char ***)&argv);
// system tray icon
@@ -508,12 +512,13 @@ gtkui_load (DB_functions_t *api) {
return DB_PLUGIN (&plugin);
}
-#if HAVE_NOTIFY
static const char settings_dlg[] =
+ "property \"Run gtk_init with --sync (debug mode)\" checkbox gtkui.enable 0;\n"
+#if HAVE_NOTIFY
"property \"Enable OSD notifications\" checkbox libnotify.enable 0;\n"
"property \"Notification format\" entry libnotify.format \"" NOTIFY_DEFAULT_FORMAT "\";\n"
-;
#endif
+;
// define plugin interface
static DB_gui_t plugin = {
@@ -529,7 +534,5 @@ static DB_gui_t plugin = {
.plugin.website = "http://deadbeef.sf.net",
.plugin.start = gtkui_start,
.plugin.stop = gtkui_stop,
-#if HAVE_NOTIFY
.plugin.configdialog = settings_dlg,
-#endif
};