Changeset e85a6e96fec941da0083a18e4c21c46ccc577eea
- Timestamp:
- 12/19/11 00:16:51 (17 months ago)
- Author:
- Nedko Arnaudov <nedko@…>
- Children:
- ac5a278f109f407b0022155417560ee48a462bdc
- Parents:
- d66d57ae8a9669bb821254e3956579bd9b9bc533
- git-committer:
- Nedko Arnaudov <nedko@arnaudov.name> / 2011-12-19T00:16:51Z+0200
- Message:
-
setting for jack conf tool
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r9202dae
|
re85a6e9
|
|
| 95 | 95 | #define LADISH_DBUS_ERROR_KEY_NOT_FOUND DBUS_NAME_BASE ".Error.KeyNotFound" |
| 96 | 96 | |
| | 97 | #define LADISH_CONF_KEY_JACK_CONF_TOOL "/org/ladish/jack_conf_tool" |
| | 98 | #define LADISH_CONF_KEY_JACK_CONF_TOOL_DEFAULT "ladiconf" |
| | 99 | |
| 97 | 100 | #endif /* #ifndef DBUS_CONSTANTS_H__C21DE0EE_C19C_42F0_8D63_D613E4806C0E__INCLUDED */ |
-
|
r640ca88
|
re85a6e9
|
|
| 1742 | 1742 | <property name="column_spacing">5</property> |
| 1743 | 1743 | <property name="n_columns">2</property> |
| 1744 | | <property name="n_rows">3</property> |
| | 1744 | <property name="n_rows">4</property> |
| 1745 | 1745 | <property name="row_spacing">5</property> |
| 1746 | 1746 | <property name="visible">True</property> |
| … |
… |
|
| 1812 | 1812 | <property name="right_attach">2</property> |
| 1813 | 1813 | <property name="top_attach">2</property> |
| | 1814 | </packing> |
| | 1815 | </child> |
| | 1816 | <child> |
| | 1817 | <object class="GtkLabel" id="settings_jack_conf_tool_label"> |
| | 1818 | <property name="label" translatable="yes">JACK conf tool:</property> |
| | 1819 | <property name="visible">True</property> |
| | 1820 | <property name="xalign">0</property> |
| | 1821 | </object> |
| | 1822 | <packing> |
| | 1823 | <property name="bottom_attach">4</property> |
| | 1824 | <property name="top_attach">3</property> |
| | 1825 | </packing> |
| | 1826 | </child> |
| | 1827 | <child> |
| | 1828 | <object class="GtkEntry" id="settings_jack_conf_tool_entry"> |
| | 1829 | <property name="can_focus">True</property> |
| | 1830 | <property name="invisible_char">●</property> |
| | 1831 | <property name="visible">True</property> |
| | 1832 | </object> |
| | 1833 | <packing> |
| | 1834 | <property name="bottom_attach">4</property> |
| | 1835 | <property name="left_attach">1</property> |
| | 1836 | <property name="right_attach">2</property> |
| | 1837 | <property name="top_attach">3</property> |
| 1814 | 1838 | </packing> |
| 1815 | 1839 | </child> |
-
|
re0ec247
|
re85a6e9
|
|
| 35 | 35 | #include "../proxies/jack_proxy.h" |
| 36 | 36 | #include "../proxies/a2j_proxy.h" |
| | 37 | #include "../proxies/conf_proxy.h" |
| 37 | 38 | #include "gtk_builder.h" |
| 38 | 39 | #include "ask_dialog.h" |
| … |
… |
|
| 283 | 284 | { |
| 284 | 285 | GError * error_ptr; |
| 285 | | gchar * argv[] = {"ladiconf", NULL}; |
| | 286 | gchar * argv[] = {NULL, NULL}; |
| 286 | 287 | GtkWidget * dialog; |
| | 288 | const char * jack_conf_tool; |
| 287 | 289 | |
| 288 | 290 | log_info("JACK configure request"); |
| | 291 | |
| | 292 | if (!conf_get(LADISH_CONF_KEY_JACK_CONF_TOOL, &jack_conf_tool)) |
| | 293 | { |
| | 294 | jack_conf_tool = LADISH_CONF_KEY_JACK_CONF_TOOL_DEFAULT; |
| | 295 | } |
| | 296 | |
| | 297 | argv[0] = (gchar *)jack_conf_tool; |
| 289 | 298 | |
| 290 | 299 | error_ptr = NULL; |
| … |
… |
|
| 300 | 309 | { |
| 301 | 310 | dialog = get_gtk_builder_widget("error_dialog"); |
| 302 | | gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), _("<b><big>Error executing ladiconf.\nAre LADI Tools installed?</big></b>")); |
| | 311 | gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), _("<b><big>Error executing JACK configuration tool.\n</big></b>")); |
| 303 | 312 | gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(dialog), "%s", error_ptr->message); |
| 304 | 313 | gtk_widget_show(dialog); |
-
|
r640ca88
|
re85a6e9
|
|
| 167 | 167 | } |
| 168 | 168 | |
| | 169 | if (!conf_register(LADISH_CONF_KEY_JACK_CONF_TOOL, NULL, NULL)) |
| | 170 | { |
| | 171 | return 1; |
| | 172 | } |
| | 173 | |
| 169 | 174 | if (!init_jack()) |
| 170 | 175 | { |
-
|
r640ca88
|
re85a6e9
|
|
| 39 | 39 | GtkEntry * terminal_entry; |
| 40 | 40 | GtkSpinButton * js_delay_spin; |
| | 41 | GtkEntry * jack_conf_tool_entry; |
| 41 | 42 | bool autostart; |
| 42 | 43 | bool notify; |
| … |
… |
|
| 44 | 45 | const char * terminal; |
| 45 | 46 | unsigned int js_delay; |
| | 47 | const char * jack_conf_tool; |
| 46 | 48 | |
| 47 | 49 | autostart_studio_button = GTK_TOGGLE_BUTTON(get_gtk_builder_widget("settings_studio_autostart_checkbutton")); |
| … |
… |
|
| 50 | 52 | terminal_entry = GTK_ENTRY(get_gtk_builder_widget("settings_terminal_entry")); |
| 51 | 53 | js_delay_spin = GTK_SPIN_BUTTON(get_gtk_builder_widget("settings_js_delay_spin")); |
| | 54 | jack_conf_tool_entry = GTK_ENTRY(get_gtk_builder_widget("settings_jack_conf_tool_entry")); |
| 52 | 55 | |
| 53 | 56 | dialog = GTK_DIALOG(get_gtk_builder_widget("settings_dialog")); |
| … |
… |
|
| 78 | 81 | } |
| 79 | 82 | |
| | 83 | if (!conf_get(LADISH_CONF_KEY_JACK_CONF_TOOL, &jack_conf_tool)) |
| | 84 | { |
| | 85 | jack_conf_tool = LADISH_CONF_KEY_JACK_CONF_TOOL_DEFAULT; |
| | 86 | } |
| | 87 | |
| 80 | 88 | gtk_toggle_button_set_active(autostart_studio_button, autostart); |
| 81 | 89 | gtk_toggle_button_set_active(send_notifications_button, notify); |
| … |
… |
|
| 83 | 91 | gtk_entry_set_text(shell_entry, shell); |
| 84 | 92 | gtk_entry_set_text(terminal_entry, terminal); |
| | 93 | gtk_entry_set_text(jack_conf_tool_entry, jack_conf_tool); |
| 85 | 94 | |
| 86 | 95 | gtk_spin_button_set_range(js_delay_spin, 0, 1000); |
| … |
… |
|
| 101 | 110 | terminal = gtk_entry_get_text(terminal_entry); |
| 102 | 111 | js_delay = gtk_spin_button_get_value(js_delay_spin); |
| | 112 | jack_conf_tool = gtk_entry_get_text(jack_conf_tool_entry); |
| 103 | 113 | |
| 104 | 114 | if (!conf_set_bool(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART, autostart) || |
| … |
… |
|
| 106 | 116 | !conf_set(LADISH_CONF_KEY_DAEMON_SHELL, shell) || |
| 107 | 117 | !conf_set(LADISH_CONF_KEY_DAEMON_TERMINAL, terminal) || |
| 108 | | !conf_set_uint(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, js_delay)) |
| | 118 | !conf_set_uint(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, js_delay) || |
| | 119 | !conf_set(LADISH_CONF_KEY_JACK_CONF_TOOL, jack_conf_tool)) |
| 109 | 120 | { |
| 110 | 121 | error_message_box(_("Storing settings")); |