|
|
|
@ -391,7 +391,25 @@ void *yon_interface_update(main_window *widgets){
|
|
|
|
kernels = yon_resource_open_file(kernels_addon_path, &kernels_size);
|
|
|
|
kernels = yon_resource_open_file(kernels_addon_path, &kernels_size);
|
|
|
|
for (int i=1;i<kernels_size;i++){
|
|
|
|
for (int i=1;i<kernels_size;i++){
|
|
|
|
additions_kernels_tab *tab = yon_additions_tab_row_new(GTK_LIST_BOX(widgets->AdditionsPackageBox),kernels[i],widgets);
|
|
|
|
additions_kernels_tab *tab = yon_additions_tab_row_new(GTK_LIST_BOX(widgets->AdditionsPackageBox),kernels[i],widgets);
|
|
|
|
g_thread_new("tags_install_tread",(GThreadFunc)yon_tab_set_installed,tab);
|
|
|
|
if (i+1==kernels_size) {
|
|
|
|
|
|
|
|
g_thread_join(g_thread_new("tags_install_tread",(GThreadFunc)yon_tab_set_installed,tab));
|
|
|
|
|
|
|
|
char *status_text = NULL;
|
|
|
|
|
|
|
|
switch (main_config.action){
|
|
|
|
|
|
|
|
case ACTION_LOAD:
|
|
|
|
|
|
|
|
status_text = main_config.load_mode==1?main_config.local_load_success_localised:main_config.global_load_success_localised;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACTION_SAVE:
|
|
|
|
|
|
|
|
status_text = "";
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACTION_TERMINAL_EXECUTE_SUCCESS:
|
|
|
|
|
|
|
|
status_text = OPERATION_SUCCESS_LABEL;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACTION_TERMINAL_EXECUTE_FAIL:
|
|
|
|
|
|
|
|
status_text = OPERATION_ERROR_LABEL;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
yon_ubl_status_box_render(status_text,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
|
|
|
}
|
|
|
|
gtk_widget_set_can_focus(gtk_widget_get_parent(tab->main_box),0);
|
|
|
|
gtk_widget_set_can_focus(gtk_widget_get_parent(tab->main_box),0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -472,11 +490,10 @@ gboolean on_command_execute_success(GtkWidget *,gint status,main_window *widgets
|
|
|
|
main_config.progress_active=0;
|
|
|
|
main_config.progress_active=0;
|
|
|
|
g_mutex_unlock(&main_config.progress_mutex);
|
|
|
|
g_mutex_unlock(&main_config.progress_mutex);
|
|
|
|
if (!status){
|
|
|
|
if (!status){
|
|
|
|
yon_ubl_status_box_render(OPERATION_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
|
|
|
on_update_clicked(NULL,widgets);
|
|
|
|
on_update_clicked(NULL,widgets);
|
|
|
|
|
|
|
|
main_config.action=ACTION_TERMINAL_EXECUTE_SUCCESS;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_ubl_status_box_render(OPERATION_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
main_config.action=ACTION_TERMINAL_EXECUTE_FAIL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gtk_widget_set_sensitive(widgets->UpdateButton,1);
|
|
|
|
gtk_widget_set_sensitive(widgets->UpdateButton,1);
|
|
|
|
dictionary *dict = NULL;
|
|
|
|
dictionary *dict = NULL;
|
|
|
|
@ -762,6 +779,7 @@ dialog_window *yon_dialog_window_new(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_module_install_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
void on_module_install_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
|
|
|
|
main_config.action=ACTION_TERMINAL_EXECUTE_SUCCESS;
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*);
|
|
|
|
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*);
|
|
|
|
char *action_text = NULL;
|
|
|
|
char *action_text = NULL;
|
|
|
|
@ -814,6 +832,7 @@ void on_module_install_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_package_install_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
void on_package_install_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
|
|
|
|
main_config.action=ACTION_TERMINAL_EXECUTE_SUCCESS;
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*);
|
|
|
|
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*);
|
|
|
|
char *action_text = NULL;
|
|
|
|
char *action_text = NULL;
|
|
|
|
@ -876,6 +895,7 @@ void on_module_remove_done(GtkWidget *self, int state, kernels_tab *tab){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_module_remove_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
void on_module_remove_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
|
|
|
|
main_config.action=ACTION_TERMINAL_EXECUTE_SUCCESS;
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*);
|
|
|
|
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*);
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
@ -965,6 +985,7 @@ void on_module_remove_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_package_remove_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
void on_package_remove_clicked(GtkWidget *self,dictionary *dict){
|
|
|
|
|
|
|
|
main_config.action=ACTION_TERMINAL_EXECUTE_SUCCESS;
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*);
|
|
|
|
kernels_tab *tab = yon_dictionary_get_data(dict->first->next,kernels_tab*);
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
@ -1269,9 +1290,16 @@ void config_init(){
|
|
|
|
main_config.addition_tabs=NULL;
|
|
|
|
main_config.addition_tabs=NULL;
|
|
|
|
main_config.progress_active=0;
|
|
|
|
main_config.progress_active=0;
|
|
|
|
main_config.update_active=0;
|
|
|
|
main_config.update_active=0;
|
|
|
|
|
|
|
|
main_config.action = ACTION_LOAD;
|
|
|
|
|
|
|
|
textdomain(template_ui_LocaleName);
|
|
|
|
|
|
|
|
main_config.local_load_success_localised = LOCAL_LOAD_SUCCESS_LABEL;
|
|
|
|
|
|
|
|
main_config.global_load_success_localised = GLOBAL_LOAD_SUCCESS_LABEL;
|
|
|
|
|
|
|
|
textdomain(LocaleName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_update_clicked(GtkWidget *, main_window *widgets){
|
|
|
|
void on_update_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
|
|
|
if (self)
|
|
|
|
|
|
|
|
main_config.action=ACTION_LOAD;
|
|
|
|
int lock=0;
|
|
|
|
int lock=0;
|
|
|
|
g_mutex_lock(&main_config.update_mutex);
|
|
|
|
g_mutex_lock(&main_config.update_mutex);
|
|
|
|
lock = main_config.update_active;
|
|
|
|
lock = main_config.update_active;
|
|
|
|
|