|
|
|
|
@ -7,9 +7,13 @@ config main_config;
|
|
|
|
|
void on_save_done(main_window *widgets, config_str output, int size){
|
|
|
|
|
if (widgets) {};
|
|
|
|
|
char *final_output = yon_char_parsed_to_string(output,size,"");
|
|
|
|
|
if (!yon_char_is_empty(final_output)){
|
|
|
|
|
printf("%s\n",final_output);
|
|
|
|
|
free(final_output);
|
|
|
|
|
}
|
|
|
|
|
if (output&&size>0){
|
|
|
|
|
yon_char_parsed_free(output,size);
|
|
|
|
|
}
|
|
|
|
|
textdomain(template_ui_LocaleName);
|
|
|
|
|
switch (main_config.save_config){
|
|
|
|
|
case 0:
|
|
|
|
|
@ -18,7 +22,7 @@ void on_save_done(main_window *widgets, config_str output, int size){
|
|
|
|
|
case 1:
|
|
|
|
|
yon_ubl_status_box_render(LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
case 3:
|
|
|
|
|
yon_ubl_status_box_render(GLOBAL_LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -175,6 +179,7 @@ enum YON_UNIT_TYPE yon_get_unit_type(char *unit_name){
|
|
|
|
|
void on_activate(GtkTreeView *self, main_window *widgets){
|
|
|
|
|
if (self&&widgets){};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_config_autostart_clicked(GtkCellRenderer *self, char *path, main_window *widgets){
|
|
|
|
|
if (self){};
|
|
|
|
|
GtkTreeIter filter_iter;
|
|
|
|
|
@ -203,6 +208,11 @@ void on_config_autostart_clicked(GtkCellRenderer *self, char *path, main_window
|
|
|
|
|
char *config_sting = yon_config_get_by_key("SERVICES_ENABLE");
|
|
|
|
|
int size;
|
|
|
|
|
config_str parsed = yon_char_parse(config_sting,&size,",");
|
|
|
|
|
if (strstr(name,".service")){
|
|
|
|
|
char *temp = yon_char_divide_search(name,".",-1);
|
|
|
|
|
free(name);
|
|
|
|
|
name = temp;
|
|
|
|
|
}
|
|
|
|
|
int place = yon_char_parsed_check_exist(parsed,size,name);
|
|
|
|
|
if (status==0){
|
|
|
|
|
if (place ==-1){
|
|
|
|
|
@ -257,6 +267,11 @@ void on_config_autostop_clicked(GtkCellRenderer *self, char *path, main_window *
|
|
|
|
|
char *config_sting = yon_config_get_by_key("SERVICES_DISABLE");
|
|
|
|
|
int size;
|
|
|
|
|
config_str parsed = yon_char_parse(config_sting,&size,",");
|
|
|
|
|
if (strstr(name,".service")){
|
|
|
|
|
char *temp = yon_char_divide_search(name,".",-1);
|
|
|
|
|
free(name);
|
|
|
|
|
name = temp;
|
|
|
|
|
}
|
|
|
|
|
int place = yon_char_parsed_check_exist(parsed,size,name);
|
|
|
|
|
if (status==0){
|
|
|
|
|
if (place ==-1){
|
|
|
|
|
@ -312,6 +327,11 @@ void on_config_block_clicked(GtkCellRenderer *self, char *path, main_window *wid
|
|
|
|
|
char *config_sting = yon_config_get_by_key("SERVICES_MASK");
|
|
|
|
|
int size;
|
|
|
|
|
config_str parsed = yon_char_parse(config_sting,&size,",");
|
|
|
|
|
if (strstr(name,".service")){
|
|
|
|
|
char *temp = yon_char_divide_search(name,".",-1);
|
|
|
|
|
free(name);
|
|
|
|
|
name = temp;
|
|
|
|
|
}
|
|
|
|
|
int place = yon_char_parsed_check_exist(parsed,size,name);
|
|
|
|
|
if (status==0){
|
|
|
|
|
if (place ==-1){
|
|
|
|
|
@ -509,17 +529,6 @@ void on_system_launch_clicked(GtkWidget *self, char *path, main_window *widgets)
|
|
|
|
|
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);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -722,7 +731,7 @@ void on_system_info_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),SERVICE_STATE_TITLE_LABEL(name));
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),SERVICE_STATE_TITLE_LABEL(name));
|
|
|
|
|
window->target = service_info_command(name);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -741,7 +750,7 @@ void on_system_log_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),SERVICE_LOG_TITLE_LABEL(name));
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),SERVICE_LOG_TITLE_LABEL(name));
|
|
|
|
|
window->target = get_log_command(name);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -752,7 +761,7 @@ void *on_terminal_relaunch(log_window *window){
|
|
|
|
|
gtk_widget_set_sensitive(window->SystemTerminal,0);
|
|
|
|
|
sleep(1);
|
|
|
|
|
gtk_widget_set_sensitive(window->SystemTerminal,1);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -766,7 +775,7 @@ void on_save_clicked(GtkWidget *self, log_window *window){
|
|
|
|
|
|
|
|
|
|
void on_update_clicked(GtkWidget *self, log_window *window){
|
|
|
|
|
if (self){};
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_system_edit_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
@ -782,7 +791,7 @@ void on_system_edit_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),SERVICE_UNIT_EDIT_TITLE_LABEL);
|
|
|
|
|
gtk_widget_show(window->SaveButton);
|
|
|
|
|
window->target=show_source_command(name);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
GdkRGBA rgba;
|
|
|
|
|
rgba.blue=1;
|
|
|
|
|
rgba.green=1;
|
|
|
|
|
@ -808,7 +817,7 @@ void on_system_status_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),PROPERTIES_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),PROPERTIES_LABEL);
|
|
|
|
|
window->target = properties_command(name);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -853,7 +862,7 @@ void on_user_info_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),SERVICE_STATE_TITLE_LABEL(name));
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),SERVICE_STATE_TITLE_LABEL(name));
|
|
|
|
|
window->target = user_service_info_command(name);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -872,7 +881,7 @@ void on_user_log_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),SERVICE_LOG_TITLE_LABEL(name));
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),SERVICE_LOG_TITLE_LABEL(name));
|
|
|
|
|
window->target = user_get_log_command(name);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -892,7 +901,7 @@ void on_user_edit_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),SERVICE_UNIT_EDIT_TITLE_LABEL);
|
|
|
|
|
gtk_widget_show(window->SaveButton);
|
|
|
|
|
window->target=user_show_source_command(name);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
GdkRGBA rgba;
|
|
|
|
|
rgba.blue=1;
|
|
|
|
|
rgba.green=1;
|
|
|
|
|
@ -918,7 +927,7 @@ void on_user_status_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),PROPERTIES_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),PROPERTIES_LABEL);
|
|
|
|
|
window->target = user_properties_command(name);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -978,7 +987,7 @@ void on_system_services_status(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),SYSTEM_STATUS_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),SYSTEM_STATUS_LABEL);
|
|
|
|
|
window->target = system_services_status_command;
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -992,7 +1001,7 @@ void on_user_services_status(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),USER_STATUS_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),USER_STATUS_LABEL);
|
|
|
|
|
window->target = user_services_status_command;
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -1006,7 +1015,7 @@ void on_units_status(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),INSTALLED_UNIT_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),INSTALLED_UNIT_LABEL);
|
|
|
|
|
window->target = !gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))?installed_units_states_command:user_installed_units_states_command;
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -1020,7 +1029,7 @@ void on_units_list_status(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),UNITS_LIST_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),UNITS_LIST_LABEL);
|
|
|
|
|
window->target = !gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))?list_of_units_states_command:user_list_of_units_states_command;
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -1034,7 +1043,7 @@ void on_sockets_list_status(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),SOCKETS_LIST_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),SOCKETS_LIST_LABEL);
|
|
|
|
|
window->target = !gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))?list_of_sockets_states_command:user_list_of_sockets_states_command;
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -1048,7 +1057,7 @@ void on_timers_list_status(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->webHeaderNameLabel),TIMERS_LIST_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),TIMERS_LIST_LABEL);
|
|
|
|
|
window->target = !gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))?list_of_timers_states_command:user_list_of_timers_states_command;
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target,NULL,NULL);
|
|
|
|
|
yon_terminal_integrated_start(window->SystemTerminal,window->target);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -1333,6 +1342,8 @@ gboolean yon_interface_update(main_window *widgets){
|
|
|
|
|
void on_interface_update(GtkWidget *self, main_window *widgets){
|
|
|
|
|
if (self){};
|
|
|
|
|
if (!main_config.update_thread_active){
|
|
|
|
|
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SystemUnitsTree)));
|
|
|
|
|
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UserUnitsTree)));
|
|
|
|
|
main_config.update_thread_active=1;
|
|
|
|
|
pthread_t tid;
|
|
|
|
|
pthread_create(&tid,NULL,(void*)(void*)((yon_interface_update)),widgets);
|
|
|
|
|
@ -1397,6 +1408,7 @@ void on_tree_selection_changed(GtkWidget *self, main_window *widgets){
|
|
|
|
|
if (getuid()==0){
|
|
|
|
|
gtk_widget_set_sensitive(widgets->SystemEditButton,1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->SystemLogButton,1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->SystemUpdateServiceButton,1);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
@ -1407,6 +1419,7 @@ void on_tree_selection_changed(GtkWidget *self, main_window *widgets){
|
|
|
|
|
if (getuid()==0){
|
|
|
|
|
gtk_widget_set_sensitive(widgets->SystemEditButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->SystemLogButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->SystemUpdateServiceButton,0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (page==1){
|
|
|
|
|
@ -1422,7 +1435,7 @@ void on_tree_selection_changed(GtkWidget *self, main_window *widgets){
|
|
|
|
|
if (getuid()==0){
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserEditButton,1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserLogButton,1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserServiceUpdateButton,1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserUpdateServiceButton,1);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->UserServiceLabel),"");
|
|
|
|
|
@ -1432,7 +1445,7 @@ void on_tree_selection_changed(GtkWidget *self, main_window *widgets){
|
|
|
|
|
if (getuid()==0){
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserEditButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserLogButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserServiceUpdateButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserUpdateServiceButton,0);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -1486,6 +1499,7 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
|
widgets->SystemPrevButton=yon_gtk_builder_get_widget(builder,"SystemPrevButton");
|
|
|
|
|
widgets->SystemUpdateButton=yon_gtk_builder_get_widget(builder,"SystemUpdateButton");
|
|
|
|
|
widgets->SystemServiceUpdateButton=yon_gtk_builder_get_widget(builder,"SystemServiceUpdateButton");
|
|
|
|
|
widgets->SystemUpdateServiceButton=yon_gtk_builder_get_widget(builder,"SystemUpdateServiceButton");
|
|
|
|
|
widgets->SystemInfoButton=yon_gtk_builder_get_widget(builder,"SystemInfoButton");
|
|
|
|
|
widgets->SystemLogButton=yon_gtk_builder_get_widget(builder,"SystemLogButton");
|
|
|
|
|
widgets->SystemEditButton=yon_gtk_builder_get_widget(builder,"SystemEditButton");
|
|
|
|
|
@ -1522,6 +1536,7 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
|
widgets->UserPrevButton=yon_gtk_builder_get_widget(builder,"UserPrevButton");
|
|
|
|
|
widgets->UserUpdateButton=yon_gtk_builder_get_widget(builder,"UserUpdateButton");
|
|
|
|
|
widgets->UserServiceUpdateButton=yon_gtk_builder_get_widget(builder,"UserServiceUpdateButton");
|
|
|
|
|
widgets->UserUpdateServiceButton=yon_gtk_builder_get_widget(builder,"UserUpdateServiceButton");
|
|
|
|
|
widgets->UserInfoButton=yon_gtk_builder_get_widget(builder,"UserInfoButton");
|
|
|
|
|
widgets->UserLogButton=yon_gtk_builder_get_widget(builder,"UserLogButton");
|
|
|
|
|
widgets->UserEditButton=yon_gtk_builder_get_widget(builder,"UserEditButton");
|
|
|
|
|
@ -1570,7 +1585,8 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemPrevButton),"clicked",G_CALLBACK(on_system_update_hz_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemUpdateButton),"clicked",G_CALLBACK(on_interface_update),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemServiceUpdateButton),"clicked",G_CALLBACK(on_system_restart_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemServiceUpdateButton),"clicked",G_CALLBACK(on_system_update_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemUpdateServiceButton),"clicked",G_CALLBACK(on_system_restart_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemInfoButton),"clicked",G_CALLBACK(on_system_info_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemLogButton),"clicked",G_CALLBACK(on_system_log_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemEditButton),"clicked",G_CALLBACK(on_system_edit_clicked),widgets);
|
|
|
|
|
@ -1582,7 +1598,8 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserPrevButton),"clicked",G_CALLBACK(on_user_update_hz_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserUpdateButton),"clicked",G_CALLBACK(on_interface_update),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserServiceUpdateButton),"clicked",G_CALLBACK(on_system_restart_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserServiceUpdateButton),"clicked",G_CALLBACK(on_user_update_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserUpdateServiceButton),"clicked",G_CALLBACK(on_system_restart_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserInfoButton),"clicked",G_CALLBACK(on_user_info_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserLogButton),"clicked",G_CALLBACK(on_user_log_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserEditButton),"clicked",G_CALLBACK(on_user_edit_clicked),widgets);
|
|
|
|
|
@ -1619,7 +1636,7 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UserConfigBlockCell),"toggled",G_CALLBACK(on_config_block_clicked),widgets);
|
|
|
|
|
|
|
|
|
|
if (getuid()==0){
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserUpdateButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserServiceUpdateButton,0);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->UserPrevButton,0);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemAutostartCell),"toggled",G_CALLBACK(on_system_autostart_clicked),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemLaunchedCell),"toggled",G_CALLBACK(on_system_launch_clicked),widgets);
|
|
|
|
|
|