|
|
|
@ -361,7 +361,7 @@ void on_config_block_clicked(GtkCellRenderer *, char *path, main_window *widgets
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_system_autostart_confirmed(GtkWidget *,char *service_command){
|
|
|
|
void on_system_autostart_confirmed(GtkWidget *,char *service_command){
|
|
|
|
yon_launch_app_with_arguments(service_command,"");
|
|
|
|
yon_launch_app_with_arguments(yon_debug_output("%s\n",service_command),"");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_system_autostart_clicked(GtkCellRenderer *, char *path, main_window *widgets){
|
|
|
|
void on_system_autostart_clicked(GtkCellRenderer *, char *path, main_window *widgets){
|
|
|
|
@ -504,7 +504,7 @@ void on_filter_changed(GtkWidget *, main_window *widgets){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_system_kill_confirmed(GtkWidget *,char *service_name){
|
|
|
|
void on_system_kill_confirmed(GtkWidget *,char *service_name){
|
|
|
|
yon_launch(service_name);
|
|
|
|
yon_launch(yon_debug_output("%s\n",service_name));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_system_launch_clicked(GtkWidget *, char *path, main_window *widgets){
|
|
|
|
void on_system_launch_clicked(GtkWidget *, char *path, main_window *widgets){
|
|
|
|
@ -579,7 +579,7 @@ void on_system_launch_clicked(GtkWidget *, char *path, main_window *widgets){
|
|
|
|
void on_service_restart_confirmed(GtkWidget *self,char *service_name){
|
|
|
|
void on_service_restart_confirmed(GtkWidget *self,char *service_name){
|
|
|
|
if (self){};
|
|
|
|
if (self){};
|
|
|
|
char *command = restart_command(service_name);
|
|
|
|
char *command = restart_command(service_name);
|
|
|
|
yon_launch_app_with_arguments(command,"");
|
|
|
|
yon_launch_app_with_arguments(yon_debug_output("%s\n",command),"");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_system_restart_clicked(GtkWidget *, main_window *widgets){
|
|
|
|
void on_system_restart_clicked(GtkWidget *, main_window *widgets){
|
|
|
|
@ -657,7 +657,7 @@ void on_session_activate(GtkWidget *self, main_window *widgets){
|
|
|
|
data->action_text = SESSION_ACTIVATE_TOOLTIP_LABEL(convert);
|
|
|
|
data->action_text = SESSION_ACTIVATE_TOOLTIP_LABEL(convert);
|
|
|
|
data->title = SESSION_SWITCH_TITLE_LABEL(convert);
|
|
|
|
data->title = SESSION_SWITCH_TITLE_LABEL(convert);
|
|
|
|
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
|
|
|
|
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
|
|
|
|
yon_launch(session_activate_session(convert));
|
|
|
|
yon_launch(yon_debug_output("%s\n",session_activate_session(convert)));
|
|
|
|
free(convert);
|
|
|
|
free(convert);
|
|
|
|
yon_sessions_update(widgets);
|
|
|
|
yon_sessions_update(widgets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -675,7 +675,7 @@ void on_session_end(GtkWidget *self, main_window *widgets){
|
|
|
|
data->action_text = SESSION_END_TOOLTIP_LABEL(convert);
|
|
|
|
data->action_text = SESSION_END_TOOLTIP_LABEL(convert);
|
|
|
|
data->title = SESSION_TERMINATE_TITLE_LABEL(convert);
|
|
|
|
data->title = SESSION_TERMINATE_TITLE_LABEL(convert);
|
|
|
|
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
|
|
|
|
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
|
|
|
|
if (!system(session_terminate_session(convert))){
|
|
|
|
if (!system(yon_debug_output("%s\n",session_terminate_session(convert)))){
|
|
|
|
GtkTreeModel *model;
|
|
|
|
GtkTreeModel *model;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SessionMainTree)),&model, &iter)){
|
|
|
|
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SessionMainTree)),&model, &iter)){
|
|
|
|
@ -701,7 +701,7 @@ void on_session_unlock(GtkWidget *self, main_window *widgets){
|
|
|
|
data->function = NULL;
|
|
|
|
data->function = NULL;
|
|
|
|
data->title = SESSION_UNLOCK_TITLE_LABEL(convert);
|
|
|
|
data->title = SESSION_UNLOCK_TITLE_LABEL(convert);
|
|
|
|
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
|
|
|
|
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
|
|
|
|
yon_launch(session_unlock_session(convert));
|
|
|
|
yon_launch(yon_debug_output("%s\n",session_unlock_session(convert)));
|
|
|
|
free(convert);
|
|
|
|
free(convert);
|
|
|
|
yon_sessions_update(widgets);
|
|
|
|
yon_sessions_update(widgets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -721,7 +721,7 @@ void on_session_block(GtkWidget *self, main_window *widgets){
|
|
|
|
data->function = NULL;
|
|
|
|
data->function = NULL;
|
|
|
|
data->title = SESSION_LOCK_TITLE_LABEL(convert);
|
|
|
|
data->title = SESSION_LOCK_TITLE_LABEL(convert);
|
|
|
|
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
|
|
|
|
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
|
|
|
|
yon_launch(session_lock_session(convert));
|
|
|
|
yon_launch(yon_debug_output("%s\n",session_lock_session(convert)));
|
|
|
|
free(convert);
|
|
|
|
free(convert);
|
|
|
|
yon_sessions_update(widgets);
|
|
|
|
yon_sessions_update(widgets);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -754,14 +754,14 @@ log_window *yon_log_window_new(){
|
|
|
|
void yon_system_systemd_restart(GtkWidget *, main_window *widgets){
|
|
|
|
void yon_system_systemd_restart(GtkWidget *, main_window *widgets){
|
|
|
|
if (widgets){
|
|
|
|
if (widgets){
|
|
|
|
if (!getuid()&>k_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==0){
|
|
|
|
if (!getuid()&>k_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==0){
|
|
|
|
if (system(reload_systemd_root_command)){
|
|
|
|
if (system(yon_debug_output("%s\n",reload_systemd_root_command))){
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_RELAUNCH_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_RELAUNCH_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_RELAUNCH_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_RELAUNCH_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (system(reload_systemd_user_command)){
|
|
|
|
if (system(yon_debug_output("%s\n",reload_systemd_user_command))){
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_RELAUNCH_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_RELAUNCH_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_RELAUNCH_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_RELAUNCH_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
@ -774,14 +774,14 @@ void yon_system_systemd_restart(GtkWidget *, main_window *widgets){
|
|
|
|
void yon_system_systemd_reexec(GtkWidget *, main_window *widgets){
|
|
|
|
void yon_system_systemd_reexec(GtkWidget *, main_window *widgets){
|
|
|
|
if (widgets){
|
|
|
|
if (widgets){
|
|
|
|
if (getuid()!=0&>k_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==0){
|
|
|
|
if (getuid()!=0&>k_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==0){
|
|
|
|
if (system(reexec_systemd_root_command)){
|
|
|
|
if (system(yon_debug_output("%s\n",reexec_systemd_root_command))){
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_REEXEC_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_REEXEC_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_REEXEC_SUCCESS_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_REEXEC_SUCCESS_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (system(reexec_systemd_user_command)){
|
|
|
|
if (system(yon_debug_output("%s\n",reexec_systemd_user_command))){
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_REEXEC_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_REEXEC_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_REEXEC_SUCCESS_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_render(SYSTEMD_REEXEC_SUCCESS_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|