diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index b187a57..d283a05 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -155,6 +155,7 @@ void yon_os_row_setup(os_row *row, char *name, char *version,char *tags, char *d gboolean yon_os_component_insert(os_row *row){ main_window *widgets = g_object_get_data(G_OBJECT(row->row),"widgets"); gtk_list_box_insert(GTK_LIST_BOX(widgets->OSSoftwareListBox),row->row,-1); + yon_os_row_setup(row,row->name,row->version,row->tags,row->description); return G_SOURCE_REMOVE; } @@ -171,13 +172,12 @@ void *yon_os_components_setup(main_window *widgets){ yon_char_remove_last_symbol(base[i],'\n'); int parsed_size; config_str parsed = yon_char_parse(base[i],&parsed_size,";"); - char *version = parsed[1]; - char *name = parsed[0]; - char *tags = yon_char_replace(parsed[2]," ",", "); - char *description = parsed[3]; os_row *row = yon_os_row_new(); + row->version = parsed[1]; + row->name = parsed[0]; + row->tags = yon_char_replace(parsed[2]," ",", "); + row->description = parsed[3]; g_object_set_data(G_OBJECT(row->row),"widgets",widgets); - yon_os_row_setup(row,name,version,tags,description); g_idle_add((GSourceFunc)yon_os_component_insert,row); } g_idle_add((GSourceFunc)yon_spinner_switch_off,widgets->OSSpinner); diff --git a/source/ubinstall-gtk-page-switch.c b/source/ubinstall-gtk-page-switch.c index e33331f..52522d9 100644 --- a/source/ubinstall-gtk-page-switch.c +++ b/source/ubinstall-gtk-page-switch.c @@ -29,9 +29,10 @@ enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){ case YON_PAGE_RECOVERY_GRUB_UPDATE: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break; case YON_PAGE_RECOVERY_OS_ONLY: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break; case YON_PAGE_RECOVERY_USRDATA_ONLY: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_INSTALLATION_BEGIN; break; - case YON_PAGE_COMPLETED: + // case YON_PAGE_COMPLETED: case YON_PAGE_INSTALL_ERROR: case YON_PAGE_CONFIGURE_END: + case YON_PAGE_COMPLETION: on_reboot_accepted(widgets); break; default:return YON_PAGE_WELCOME; diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index b363bf9..dcb080a 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -354,14 +354,13 @@ void on_gparted_open(){ } -void on_reboot_accepted(main_window *widgets){ +void on_reboot_accepted(main_window *){ g_mutex_lock(&main_config.install_mutex); if (main_config.install_thread){ pthread_cancel((pthread_t)main_config.install_thread); g_mutex_unlock(&main_config.install_mutex); } main_config.exit_accepted=1; - g_signal_emit_by_name(G_OBJECT(widgets->MainWindow),"delete-event"); while(gtk_events_pending()) gtk_main_iteration(); if (system("reboot")){}; } @@ -373,7 +372,6 @@ void on_exit_accepted(main_window *widgets){ g_mutex_unlock(&main_config.install_mutex); } main_config.exit_accepted=1; - // g_signal_emit_by_name(G_OBJECT(widgets->MainWindow),"delete-event"); while(gtk_events_pending()) gtk_main_iteration(); gtk_widget_destroy(widgets->MainWindow); } diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 1879dfe..98729f2 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -870,6 +870,8 @@ typedef struct { char *name; char *modules; char *version; + char *tags; + char *description; } os_row; typedef struct {