Merge pull request 'master' (#43) from YanTheKaller/ubinstall-gtk:master into master

Reviewed-on: #43
master v1.12
Dmitry Razumov 1 year ago
commit 5429a9a2f8

@ -956,7 +956,7 @@ gboolean yon_installation_progress_update(void *data) {
yon_char_parsed_free(text, size);
if (!strstr(percentage, "#pb")) {
double fraction = atof(percentage);
double fraction = atof(percentage+1);
gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel), current_copy);
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress), fraction / 100);
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), 0);
@ -1028,6 +1028,8 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
case YON_PAGE_INSTALLATION:{
yon_switch_page_render(widgets,3);
gtk_widget_set_sensitive(widgets->BackButton,0);
if ((!main_config.configure_mode))
gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
if (main_config.config_save_thread&&!main_config.configure_mode)
g_thread_join(main_config.config_save_thread);
if (!main_config.progress_thread&&!main_config.configure_mode)
@ -1044,9 +1046,24 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
gtk_widget_hide(widgets->SaveButton);
break;
case YON_PAGE_INSTALL_ERROR:
case YON_PAGE_INSTALL_ERROR:{
on_summary_log_view((GtkWidget*)NULL);
[[fallthrough]];
yon_switch_page_render(widgets,7);
gtk_widget_set_sensitive(widgets->BackButton,0);
gtk_widget_hide(gtk_widget_get_parent(widgets->PackageInstallationProgress));
gtk_widget_hide(widgets->InstallationLabel);
gtk_widget_hide(widgets->PackageInstallationLabel);
gtk_widget_set_sensitive(widgets->NextButton,1);
gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
main_config.install_complete=0;
main_config.save_done=0;
gtk_button_set_label(GTK_BUTTON(widgets->NextButton),RESTART_LABEL);
gtk_button_set_label(GTK_BUTTON(widgets->CancelInstallButton),EXIT_LABEL);
gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))),
"com.ublinux.ubinstall-gtk.sync-symbolic",GTK_ICON_SIZE_BUTTON);
} break;
case YON_PAGE_COMPLETION:{
yon_switch_page_render(widgets,7);
gtk_widget_set_sensitive(widgets->BackButton,0);
@ -1196,7 +1213,6 @@ if (window->Window){
main_config.log_progress_buzy=0;
if (size){
char *final = yon_char_parsed_to_string(parsed,size,"");
// char *prev = (char*)gtk_label_get_text(GTK_LABEL(window->LogLabel));
gtk_label_set_text(GTK_LABEL(window->LogLabel),final);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ScrollToEndCheck))){
gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow)),gtk_adjustment_get_upper(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow))));
@ -1637,9 +1653,11 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
if (gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress))>0.9){
pthread_t tid;
pthread_create(&tid,NULL,on_setup_system_configuration,widgets);
yon_debug_output("%s\n","installation ending configuration startup");
} else {
pthread_t tid;
pthread_create(&tid,NULL,on_save_system_configuration,widgets);
yon_debug_output("%s\n","installation process configuration startup");
}
main_config.save_done=1;
yon_debug_output("Save changed to: %s\n",yon_char_from_int(main_config.save_done));
@ -1831,6 +1849,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
switch (page){
case YON_PAGE_COMPLETION:
case YON_PAGE_INSTALL_ERROR:{
// GtkWidget *dialog = gtk_dialog_new();
gtk_main_quit();
}break;
default:{
@ -2153,8 +2172,8 @@ main_window *yon_main_window_complete(){
widgets->GpartedSameButton = yon_gtk_builder_get_widget(builder,"GpartedSameButton");
widgets->ConfigurationModeMenuItem = yon_gtk_builder_get_widget(builder,"ConfigurationModeMenuItem");
widgets->DocumentationMenuItem = yon_gtk_builder_get_widget(builder,"DocumentationMenuItem");
widgets->AboutMenuItem = yon_gtk_builder_get_widget(builder,"AboutMenuItem");
widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL);
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
widgets->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
widgets->AdditionalSoftwareCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdditionalSoftwareCell"));
@ -2224,6 +2243,12 @@ main_window *yon_main_window_complete(){
widgets->SameFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameFSTypeSensitiveCheck");
widgets->SameLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameLabelSensitiveCheck");
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle");
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop");
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem);
g_signal_connect(G_OBJECT(widgets->LoadGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_load),widgets);
g_signal_connect(G_OBJECT(widgets->LoadLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets);
g_signal_connect(G_OBJECT(widgets->LoadExternalConfigurationMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets);

@ -106,7 +106,7 @@ NULL
#define locale_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[locale]"
#define device_format_parameter "AUTOINSTALL[device_format]"
#define device_format_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[device_format]"
#define device_label_parameter "AUTOINSTALL[device_label]"
#define device_label_parameter "AUTOINSTALL[part_label]"
#define device_label_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_label]"
#define part_size_parameter "AUTOINSTALL[part_size]"
#define part_size_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[part_size]"

@ -210,30 +210,11 @@
<property name="can-focus">False</property>
<property name="label" translatable="yes">Configuration mode</property>
<property name="use-underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="DocumentationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Documentation</property>
<property name="use-underline">True</property>
<style>
<class name="menuitemtop"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem" id="AboutMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">About</property>
<property name="use-underline">True</property>
<style>
<class name="menuitembottom"/>
</style>
</object>
</child>
</object>
<object class="GtkMenu" id="menu3">
<property name="visible">True</property>
@ -581,6 +562,7 @@ agreement</property>
<object class="GtkLabel" id="WelcomeTitleLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="label" translatable="yes">Welcome to UBLinux installation</property>
<property name="wrap">True</property>
<attributes>
@ -598,6 +580,7 @@ agreement</property>
<object class="GtkLabel" id="WelcomeInfoLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="label" translatable="yes">This program will ask you few questions
and help you install UBLinux on your computer</property>
<property name="wrap">True</property>
@ -615,6 +598,8 @@ and help you install UBLinux on your computer</property>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="pixel-size">128</property>
<property name="resource">/com/ublinux/images/language.png</property>
</object>

@ -251,8 +251,8 @@ msgid "User root password:"
msgstr "Пароль пользователя root:"
#: source/ubl-strings.h:49
msgid "Computer name:"
msgstr "Имя компьютера"
msgid "Host name:"
msgstr "Имя компьютера:"
#: source/ubl-strings.h:50
msgid "Automatically"
@ -517,7 +517,7 @@ msgstr "Начало установки ОС UBLinux"
#: source/ubl-strings.h:123
msgid "Documentation"
msgstr "Документация"
msgstr "Справка"
#: source/ubl-strings.h:124
msgid "About"

Loading…
Cancel
Save