|
|
|
|
@ -200,11 +200,11 @@ void on_config_autostart_clicked(GtkCellRenderer *, char *path, main_window *wid
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
// 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){
|
|
|
|
|
@ -215,7 +215,7 @@ void on_config_autostart_clicked(GtkCellRenderer *, char *path, main_window *wid
|
|
|
|
|
} else {
|
|
|
|
|
parsed = yon_char_parsed_rip(parsed,&size,place);
|
|
|
|
|
if (parsed)
|
|
|
|
|
yon_config_set("SERVICES_ENABLE",yon_char_parsed_to_string(parsed,size,","));
|
|
|
|
|
yon_config_register("SERVICES_ENABLE",SERVICES_ENABLE_get_command,yon_char_parsed_to_string(parsed,size,","));
|
|
|
|
|
else yon_config_remove_by_key("SERVICES_ENABLE");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -223,7 +223,7 @@ void on_config_autostart_clicked(GtkCellRenderer *, char *path, main_window *wid
|
|
|
|
|
if (place !=-1){
|
|
|
|
|
parsed = yon_char_parsed_rip(parsed,&size,place);
|
|
|
|
|
if (parsed)
|
|
|
|
|
yon_config_set("SERVICES_ENABLE",yon_char_parsed_to_string(parsed,size,","));
|
|
|
|
|
yon_config_register("SERVICES_ENABLE",SERVICES_ENABLE_get_command,yon_char_parsed_to_string(parsed,size,","));
|
|
|
|
|
else yon_config_remove_by_key("SERVICES_ENABLE");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -608,6 +608,16 @@ void on_system_restart_clicked(GtkWidget *, main_window *widgets){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_configs_selection_changed(GtkWidget *,main_window *widgets){
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GtkTreeModel *model;
|
|
|
|
|
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->ConfigMainTree)),&model,&iter)){
|
|
|
|
|
gtk_widget_set_sensitive(widgets->ConfigEditButton,1);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_widget_set_sensitive(widgets->ConfigEditButton,0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_sessions_selection_changed(GtkWidget *, main_window *widgets){
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GtkTreeModel *model;
|
|
|
|
|
@ -2084,6 +2094,7 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SessionStopButton),"clicked",G_CALLBACK(on_session_end),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SessionBlockButton),"clicked",G_CALLBACK(on_session_block),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SessionMainTree),"cursor-changed",G_CALLBACK(on_sessions_selection_changed),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->ConfigMainTree),"cursor-changed",G_CALLBACK(on_configs_selection_changed),widgets);
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->SystemServicesStatusMenuItem),"activate",G_CALLBACK(on_system_services_status),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->InstalledUnitsStatusMenuItem),"activate",G_CALLBACK(on_units_status),widgets);
|
|
|
|
|
|