|
|
|
|
@ -30,7 +30,7 @@ void on_startup_apps_remove(GtkWidget *self,main_window *widgets){
|
|
|
|
|
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupAppsTree)),&model,&iter)){
|
|
|
|
|
char *unit;
|
|
|
|
|
int deletable;
|
|
|
|
|
gtk_tree_model_get(model,&iter,2,&unit,4,&deletable,-1);
|
|
|
|
|
gtk_tree_model_get(model,&iter,1,&unit,4,&deletable,-1);
|
|
|
|
|
if (!deletable) return;
|
|
|
|
|
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
|
|
|
|
|
data->action_text = SERVICE_REMOVE_CONFIRMATION_LABEL(unit);
|
|
|
|
|
@ -103,7 +103,11 @@ void yon_startup_apps_init(main_window *widgets){
|
|
|
|
|
if (parsed_size&&parsed){
|
|
|
|
|
for (int i=0;i<parsed_size;i++){
|
|
|
|
|
gtk_list_store_append(widgets->StartupAppsList,&iter);
|
|
|
|
|
gtk_list_store_set(widgets->StartupAppsList,&iter,0,1,1,parsed[i],4,1,-1);
|
|
|
|
|
char *app = NULL;
|
|
|
|
|
char *description = NULL;
|
|
|
|
|
yon_window_config_get_parameter("service_app",parsed[i],&app,YON_TYPE_STRING);
|
|
|
|
|
yon_window_config_get_parameter("service_desc",parsed[i],&description,YON_TYPE_STRING);
|
|
|
|
|
gtk_list_store_set(widgets->StartupAppsList,&iter,0,1,1,parsed[i],2,app,3,description,4,1,-1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
yon_char_parsed_free(parsed,parsed_size);
|
|
|
|
|
@ -204,9 +208,12 @@ int yon_startup_app_save(main_window *widgets){
|
|
|
|
|
list_size++;
|
|
|
|
|
char *target;
|
|
|
|
|
int status;
|
|
|
|
|
gtk_tree_model_get(model,&iter,0,&status,1,&target,-1);
|
|
|
|
|
char *app, *description;
|
|
|
|
|
gtk_tree_model_get(model,&iter,0,&status,1,&target,2,&app,3,&description,-1);
|
|
|
|
|
if (status){
|
|
|
|
|
yon_char_parsed_add_or_create_if_exists(modules,&size,target);
|
|
|
|
|
yon_window_config_add_instant_parameter(target,"service_app",app,YON_TYPE_STRING);
|
|
|
|
|
yon_window_config_add_instant_parameter(target,"service_desc",description,YON_TYPE_STRING);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (size){
|
|
|
|
|
|