|
|
|
|
@ -451,8 +451,7 @@ void on_filter_changed(GtkWidget *self, main_window *widgets){
|
|
|
|
|
|
|
|
|
|
void on_system_kill_confirmed(GtkWidget *self,char *service_name){
|
|
|
|
|
if (self){};
|
|
|
|
|
char *command = service_kill_command(service_name);
|
|
|
|
|
yon_launch_app_with_arguments(command,"");
|
|
|
|
|
yon_launch_app_with_arguments(service_name,"");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_system_launch_clicked(GtkWidget *self, char *path, main_window *widgets){
|
|
|
|
|
@ -477,7 +476,7 @@ void on_system_launch_clicked(GtkWidget *self, char *path, main_window *widgets)
|
|
|
|
|
if (status){
|
|
|
|
|
dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data));
|
|
|
|
|
data->action_text=SERVICE_STOP_WARNING_LABEL(service_name);
|
|
|
|
|
data->data=service_name;
|
|
|
|
|
data->data=service_stop_command(service_name);
|
|
|
|
|
data->function=(void*)(void*)on_system_kill_confirmed;
|
|
|
|
|
int size;
|
|
|
|
|
config_str result = yon_config_load(service_check_active_command(service_name),&size);
|
|
|
|
|
@ -491,15 +490,31 @@ void on_system_launch_clicked(GtkWidget *self, char *path, main_window *widgets)
|
|
|
|
|
}
|
|
|
|
|
yon_char_parsed_free(result,size);
|
|
|
|
|
} else {
|
|
|
|
|
yon_launch(service_start_command(service_name));
|
|
|
|
|
dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data));
|
|
|
|
|
data->action_text=SERVICE_START_WARNING_LABEL(service_name);
|
|
|
|
|
data->data=service_start_command(service_name);
|
|
|
|
|
data->function=(void*)(void*)on_system_kill_confirmed;
|
|
|
|
|
int size;
|
|
|
|
|
config_str result = yon_config_load(service_check_active_command(service_name),&size);
|
|
|
|
|
yon_char_remove_last_symbol(result[0],'\n');
|
|
|
|
|
if (size>0&&!strcmp(result[0],"active")){
|
|
|
|
|
gtk_list_store_set(GTK_LIST_STORE(model),&iter,4,1,-1);
|
|
|
|
|
} else {
|
|
|
|
|
yon_ubl_status_box_render(SERVICE_START_FAILED_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
int responce = yon_confirmation_dialog_call(widgets->Window,data);
|
|
|
|
|
if (responce == GTK_RESPONSE_ACCEPT){
|
|
|
|
|
gtk_list_store_set(GTK_LIST_STORE(model),&iter,4,1,-1);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// yon_char_parsed_free(result,size);
|
|
|
|
|
// yon_launch(service_start_command(service_name));
|
|
|
|
|
// int size;
|
|
|
|
|
// config_str result = yon_config_load(service_check_active_command(service_name),&size);
|
|
|
|
|
// yon_char_remove_last_symbol(result[0],'\n');
|
|
|
|
|
// if (size>0&&!strcmp(result[0],"active")){
|
|
|
|
|
// gtk_list_store_set(GTK_LIST_STORE(model),&iter,4,1,-1);
|
|
|
|
|
// } else {
|
|
|
|
|
// yon_ubl_status_box_render(SERVICE_START_FAILED_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|