Changeset 67a1dd501331bba8bcb39ddb141685879f82c944
- Timestamp:
- 12/03/09 01:49:08 (3 years ago)
- Author:
- Nedko Arnaudov <nedko@…>
- Children:
- 094d7ba9d7b4e9483c1f14d8280c3d7a31057015
- Parents:
- 94c197fe3390887d8841edc20b9c2a0b16c76ad0
- git-committer:
- Nedko Arnaudov <nedko@arnaudov.name> / 2009-12-03T01:49:08Z+0200
- Message:
-
gui: dialog for starting programs now starts them through ladishd
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r57a7eb7
|
r67a1dd5
|
|
| 29 | 29 | #include "glade.h" |
| 30 | 30 | #include "world_tree.h" |
| | 31 | #include "app_supervisor_proxy.h" |
| 31 | 32 | |
| 32 | 33 | struct graph_view |
| … |
… |
|
| 37 | 38 | graph_proxy_handle graph; |
| 38 | 39 | GtkWidget * canvas_widget; |
| | 40 | ladish_app_supervisor_proxy_handle app_supervisor; |
| 39 | 41 | }; |
| 40 | 42 | |
| … |
… |
|
| 57 | 59 | const char * object, |
| 58 | 60 | bool graph_dict_supported, |
| | 61 | bool app_supervisor_supported, |
| 59 | 62 | bool force_activate, |
| 60 | 63 | graph_view_handle * handle_ptr) |
| … |
… |
|
| 76 | 79 | } |
| 77 | 80 | |
| | 81 | if (app_supervisor_supported) |
| | 82 | { |
| | 83 | if (!ladish_app_supervisor_proxy_create(service, object, &view_ptr->app_supervisor)) |
| | 84 | { |
| | 85 | goto free_name; |
| | 86 | } |
| | 87 | } |
| | 88 | else |
| | 89 | { |
| | 90 | view_ptr->app_supervisor = NULL; |
| | 91 | } |
| | 92 | |
| 78 | 93 | if (!graph_proxy_create(service, object, graph_dict_supported, &view_ptr->graph)) |
| 79 | 94 | { |
| 80 | | goto free_name; |
| | 95 | goto free_app_supervisor; |
| 81 | 96 | } |
| 82 | 97 | |
| … |
… |
|
| 114 | 129 | destroy_graph: |
| 115 | 130 | graph_proxy_destroy(view_ptr->graph); |
| | 131 | free_app_supervisor: |
| | 132 | if (view_ptr->app_supervisor != NULL) |
| | 133 | { |
| | 134 | ladish_app_supervisor_proxy_destroy(view_ptr->app_supervisor); |
| | 135 | } |
| 116 | 136 | free_name: |
| 117 | 137 | free(view_ptr->name); |
| … |
… |
|
| 178 | 198 | graph_canvas_destroy(view_ptr->graph_canvas); |
| 179 | 199 | graph_proxy_destroy(view_ptr->graph); |
| | 200 | |
| | 201 | if (view_ptr->app_supervisor != NULL) |
| | 202 | { |
| | 203 | ladish_app_supervisor_proxy_destroy(view_ptr->app_supervisor); |
| | 204 | } |
| | 205 | |
| 180 | 206 | free(view_ptr->name); |
| 181 | 207 | free(view_ptr); |
| … |
… |
|
| 226 | 252 | return graph_canvas_get_canvas(g_current_view->graph_canvas); |
| 227 | 253 | } |
| | 254 | |
| | 255 | bool app_run_custom(graph_view_handle view, const char * command, const char * name, bool run_in_terminal) |
| | 256 | { |
| | 257 | return ladish_app_supervisor_proxy_run_custom(view_ptr->app_supervisor, command, name, run_in_terminal); |
| | 258 | } |
-
|
rfa47499
|
r67a1dd5
|
|
| 40 | 40 | const char * object, |
| 41 | 41 | bool graph_dict_supported, |
| | 42 | bool app_supervisor_supported, |
| 42 | 43 | bool force_activate, |
| 43 | 44 | graph_view_handle * handle_ptr); |
| … |
… |
|
| 49 | 50 | canvas_handle get_current_canvas(); |
| 50 | 51 | |
| | 52 | bool app_run_custom(graph_view_handle view, const char * command, const char * name, bool run_in_terminal); |
| | 53 | |
| 51 | 54 | /* not very good place for this prototype, because it is not implemented in graph_view.c */ |
| 52 | 55 | void set_main_window_title(graph_view_handle view); |
-
|
r94c197f
|
r67a1dd5
|
|
| 42 | 42 | #include "../studio_proxy.h" |
| 43 | 43 | #include "ask_dialog.h" |
| | 44 | #include "app_supervisor_proxy.h" |
| 44 | 45 | |
| 45 | 46 | GtkWidget * g_main_win; |
| … |
… |
|
| 247 | 248 | { |
| 248 | 249 | log_info("'%s':'%s' %s", gtk_entry_get_text(name_entry), gtk_entry_get_text(command_entry), gtk_toggle_button_get_active(terminal_button) ? "terminal" : "shell"); |
| | 250 | if (!app_run_custom(g_studio_view, gtk_entry_get_text(command_entry), gtk_entry_get_text(name_entry), gtk_toggle_button_get_active(terminal_button))) |
| | 251 | { |
| | 252 | error_message_box("Execution failed. I know you want to know more for the reson but currently you can only check the log file."); |
| | 253 | } |
| 249 | 254 | } |
| 250 | 255 | |
| … |
… |
|
| 491 | 496 | } |
| 492 | 497 | |
| 493 | | if (!create_view(name, SERVICE_NAME, STUDIO_OBJECT_PATH, true, false, &g_studio_view)) |
| | 498 | if (!create_view(name, SERVICE_NAME, STUDIO_OBJECT_PATH, true, true, false, &g_studio_view)) |
| 494 | 499 | { |
| 495 | 500 | log_error("create_view() failed for studio"); |
| … |
… |
|
| 579 | 584 | |
| 580 | 585 | #if defined(SHOW_RAW_JACK) |
| 581 | | if (!create_view("Raw JACK", JACKDBUS_SERVICE_NAME, JACKDBUS_OBJECT_PATH, false, true, &g_jack_view)) |
| | 586 | if (!create_view("Raw JACK", JACKDBUS_SERVICE_NAME, JACKDBUS_OBJECT_PATH, false, false, true, &g_jack_view)) |
| 582 | 587 | { |
| 583 | 588 | log_error("create_view() failed for jack"); |
-
|
re46ea7b
|
r67a1dd5
|
|
| 297 | 297 | 'glade.c', |
| 298 | 298 | 'control_proxy.c', |
| | 299 | 'app_supervisor_proxy.c', |
| 299 | 300 | 'ask_dialog.c', |
| 300 | 301 | ]: |