diff --git a/dbus_constants.h b/dbus_constants.h
index 8c44cc81..2d205b28 100644
--- a/dbus_constants.h
+++ b/dbus_constants.h
@@ -94,4 +94,7 @@
#define LADISH_DBUS_ERROR_UNFINISHED_TASK DBUS_NAME_BASE ".Error.UnfinishedTask"
#define LADISH_DBUS_ERROR_KEY_NOT_FOUND DBUS_NAME_BASE ".Error.KeyNotFound"
+#define LADISH_CONF_KEY_JACK_CONF_TOOL "/org/ladish/jack_conf_tool"
+#define LADISH_CONF_KEY_JACK_CONF_TOOL_DEFAULT "ladiconf"
+
#endif /* #ifndef DBUS_CONSTANTS_H__C21DE0EE_C19C_42F0_8D63_D613E4806C0E__INCLUDED */
diff --git a/gui/gladish.ui b/gui/gladish.ui
index 543ceb1c..37a37468 100644
--- a/gui/gladish.ui
+++ b/gui/gladish.ui
@@ -1741,7 +1741,7 @@ along with LADI Session Handler; if not, write to the Free Software Foundation,
1
diff --git a/gui/jack.c b/gui/jack.c
index cbc8063c..8d479dff 100644
--- a/gui/jack.c
+++ b/gui/jack.c
@@ -34,6 +34,7 @@
#include "action.h"
#include "../proxies/jack_proxy.h"
#include "../proxies/a2j_proxy.h"
+#include "../proxies/conf_proxy.h"
#include "gtk_builder.h"
#include "ask_dialog.h"
@@ -282,11 +283,19 @@ void menu_request_a2jmidid_exit(void)
void menu_request_jack_configure(void)
{
GError * error_ptr;
- gchar * argv[] = {"ladiconf", NULL};
+ gchar * argv[] = {NULL, NULL};
GtkWidget * dialog;
+ const char * jack_conf_tool;
log_info("JACK configure request");
+ if (!conf_get(LADISH_CONF_KEY_JACK_CONF_TOOL, &jack_conf_tool))
+ {
+ jack_conf_tool = LADISH_CONF_KEY_JACK_CONF_TOOL_DEFAULT;
+ }
+
+ argv[0] = (gchar *)jack_conf_tool;
+
error_ptr = NULL;
if (!g_spawn_async(
NULL, /* working directory */
@@ -299,7 +308,7 @@ void menu_request_jack_configure(void)
&error_ptr))
{
dialog = get_gtk_builder_widget("error_dialog");
- gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), _("Error executing ladiconf.\nAre LADI Tools installed?"));
+ gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), _("Error executing JACK configuration tool.\n"));
gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(dialog), "%s", error_ptr->message);
gtk_widget_show(dialog);
gtk_dialog_run(GTK_DIALOG(dialog));
diff --git a/gui/main.c b/gui/main.c
index 58ab8de4..5c35d603 100644
--- a/gui/main.c
+++ b/gui/main.c
@@ -166,6 +166,11 @@ int main(int argc, char** argv)
return 1;
}
+ if (!conf_register(LADISH_CONF_KEY_JACK_CONF_TOOL, NULL, NULL))
+ {
+ return 1;
+ }
+
if (!init_jack())
{
return 1;
diff --git a/gui/settings.c b/gui/settings.c
index 6ded1153..dbc0ac41 100644
--- a/gui/settings.c
+++ b/gui/settings.c
@@ -38,17 +38,20 @@ void menu_request_settings(void)
GtkEntry * shell_entry;
GtkEntry * terminal_entry;
GtkSpinButton * js_delay_spin;
+ GtkEntry * jack_conf_tool_entry;
bool autostart;
bool notify;
const char * shell;
const char * terminal;
unsigned int js_delay;
+ const char * jack_conf_tool;
autostart_studio_button = GTK_TOGGLE_BUTTON(get_gtk_builder_widget("settings_studio_autostart_checkbutton"));
send_notifications_button = GTK_TOGGLE_BUTTON(get_gtk_builder_widget("settings_send_notifications_checkbutton"));
shell_entry = GTK_ENTRY(get_gtk_builder_widget("settings_shell_entry"));
terminal_entry = GTK_ENTRY(get_gtk_builder_widget("settings_terminal_entry"));
js_delay_spin = GTK_SPIN_BUTTON(get_gtk_builder_widget("settings_js_delay_spin"));
+ jack_conf_tool_entry = GTK_ENTRY(get_gtk_builder_widget("settings_jack_conf_tool_entry"));
dialog = GTK_DIALOG(get_gtk_builder_widget("settings_dialog"));
@@ -77,11 +80,17 @@ void menu_request_settings(void)
js_delay = LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY_DEFAULT;
}
+ if (!conf_get(LADISH_CONF_KEY_JACK_CONF_TOOL, &jack_conf_tool))
+ {
+ jack_conf_tool = LADISH_CONF_KEY_JACK_CONF_TOOL_DEFAULT;
+ }
+
gtk_toggle_button_set_active(autostart_studio_button, autostart);
gtk_toggle_button_set_active(send_notifications_button, notify);
gtk_entry_set_text(shell_entry, shell);
gtk_entry_set_text(terminal_entry, terminal);
+ gtk_entry_set_text(jack_conf_tool_entry, jack_conf_tool);
gtk_spin_button_set_range(js_delay_spin, 0, 1000);
gtk_spin_button_set_increments(js_delay_spin, 1, 2);
@@ -100,12 +109,14 @@ void menu_request_settings(void)
shell = gtk_entry_get_text(shell_entry);
terminal = gtk_entry_get_text(terminal_entry);
js_delay = gtk_spin_button_get_value(js_delay_spin);
+ jack_conf_tool = gtk_entry_get_text(jack_conf_tool_entry);
if (!conf_set_bool(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART, autostart) ||
!conf_set_bool(LADISH_CONF_KEY_DAEMON_NOTIFY, notify) ||
!conf_set(LADISH_CONF_KEY_DAEMON_SHELL, shell) ||
!conf_set(LADISH_CONF_KEY_DAEMON_TERMINAL, terminal) ||
- !conf_set_uint(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, js_delay))
+ !conf_set_uint(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, js_delay) ||
+ !conf_set(LADISH_CONF_KEY_JACK_CONF_TOOL, jack_conf_tool))
{
error_message_box(_("Storing settings"));
}