diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c
index 4b27e00..5dfdfe7 100644
--- a/source/ubinstall-gtk.c
+++ b/source/ubinstall-gtk.c
@@ -719,6 +719,16 @@ void on_keyboard_clicked (GtkWidget *, main_window *widgets){
gtk_widget_show(window->MainWindow);
}
+void on_keyboard_removed(GtkWidget *, main_window *widgets);
+void on_keyboard_removed(GtkWidget *, main_window *widgets){
+ GtkTreeModel *model;
+ GtkTreeIter iter, childiter;
+ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LayoutTree)),&model,&iter)){
+ gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(widgets->LayoutsFilter),&childiter,&iter);
+ gtk_tree_store_set(widgets->LayoutList,&childiter,3,0,-1);
+ }
+}
+
void yon_language_selection_changed(GtkCellRenderer *, char *path, ubinstall_language_window *window);
void yon_language_selection_changed(GtkCellRenderer *, char *path, ubinstall_language_window *window){
GtkTreeIter iter;
@@ -736,6 +746,11 @@ void on_language_window_accept(GtkWidget *,dictionary *dict){
ubinstall_language_window *window = yon_dictionary_get_data(dict->first->next,ubinstall_language_window*);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultCheck))){
gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),"");
+ GtkTreeIter iter;
+ for_iter(widgets->LanguagesList,&iter){
+ gtk_list_store_set(widgets->LanguagesList,&iter,0,0,-1);
+ }
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguagesCombo),-1);
} else {
yon_gtk_list_store_copy_full(widgets->LanguagesList,window->liststore1);
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
@@ -749,10 +764,17 @@ void on_language_window_accept(GtkWidget *,dictionary *dict){
if (status)
yon_char_parsed_add_or_create_if_exists(parsed,&size,current);
}
- char *final = yon_char_parsed_to_string(parsed,size,"; ");
- gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),final);
- free(final);
- yon_char_parsed_free(parsed,size);
+ if (parsed){
+ char *final = yon_char_parsed_to_string(parsed,size,"; ");
+ gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),!yon_char_is_empty(final)?final:"");
+ if (yon_char_is_empty(final)) {
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguagesCombo),-1);
+ }
+ if (final) free(final);
+ yon_char_parsed_free(parsed,size);
+ } else
+ gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),"");
+
}
on_subwindow_close(window->MainWindow);
free(window);
@@ -786,11 +808,16 @@ void on_language_clicked(GtkWidget *, main_window *widgets){
gtk_tree_view_set_model(GTK_TREE_VIEW(window->LanguagesTree),GTK_TREE_MODEL(window->liststore1));
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->MainWindow),TITLE_LABEL,icon_path,"language-chooser-window");
+ if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->AvailableLanguagesEntry)))){
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->DefaultCheck),1);
+ }
+
dictionary *dict=NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);
yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_language_window_accept),dict);
gtk_widget_show(window->MainWindow);
+
}
/**config_init()
@@ -832,11 +859,11 @@ int cur_slide=0;
int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled);
int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled) {
- int width = gtk_widget_get_allocated_width(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(target))));
- int height = gtk_widget_get_allocated_height(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(target))));
+ int width = gtk_widget_get_allocated_width((gtk_widget_get_parent(GTK_WIDGET(target))));
+ int height = gtk_widget_get_allocated_height((gtk_widget_get_parent(GTK_WIDGET(target))));
int newImgWidthDef = (width <= 217) ? width : width - 30;
- int newImgHeightDef = (height <= 120) ? height : height - 217;
+ int newImgHeightDef = (height <= 120) ? height : height - 80;
int originalWidth = gdk_pixbuf_get_width(pixbuf_unscaled);
int originalHeight = gdk_pixbuf_get_height(pixbuf_unscaled);
@@ -1058,6 +1085,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
main_config.install_complete=0;
main_config.save_done=0;
+ textdomain(LocaleName);
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))),
@@ -1074,6 +1102,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
main_config.install_complete=0;
main_config.save_done=0;
+ textdomain(LocaleName);
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))),
@@ -1091,6 +1120,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
main_config.install_complete=0;
main_config.save_done=0;
+ textdomain(LocaleName);
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);
@@ -1119,6 +1149,13 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
}
}
+void *on_install_success(main_window *widgets){
+ gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel),"");
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION);
+
+ return NULL;
+}
+
void *on_setup_system_configuration(void *data);
void *on_setup_system_configuration(void * data){
main_window *widgets = (main_window*)data;
@@ -1147,6 +1184,7 @@ void *on_setup_system_configuration(void * data){
free(command);
if (parameter_string) free(parameter_string);
}
+ g_thread_new("success func",(GThreadFunc)on_install_success,widgets);
return NULL;
}
@@ -1239,7 +1277,7 @@ void on_process_log_view(GtkWidget *,main_window *widgets){
g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_log_closed),dict);
gtk_widget_set_sensitive(widgets->ReadFullLogButton,0);
gtk_widget_set_sensitive(widgets->ReadShortLogButton,0);
- yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,LOG_VIEW_LABEL,icon_path,"log_viewer");
+ yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,INSTALL_LOG_LABEL,icon_path,"log_viewer");
window->command = yon_char_new(short_log_path);
gdk_threads_add_timeout(500,(GSourceFunc)yon_read_log,window);
}
@@ -1252,7 +1290,7 @@ void on_summary_log_view(GtkWidget *,main_window *widgets){
g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_log_closed),dict);
gtk_widget_set_sensitive(widgets->ReadFullLogButton,0);
gtk_widget_set_sensitive(widgets->ReadShortLogButton,0);
- yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,LOG_VIEW_LABEL,icon_path,"log_viewer");
+ yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,PROGRESS_LOG_LABEL,icon_path,"log_viewer");
window->command = yon_char_new(full_log_path);
gdk_threads_add_timeout(500,(GSourceFunc)yon_read_log,window);
@@ -1668,6 +1706,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
}
if (gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress))>0.9){
+ gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel),CONFIGURATION_LABEL);
pthread_t tid;
pthread_create(&tid,NULL,on_setup_system_configuration,widgets);
yon_debug_output("%s\n","installation ending configuration startup");
@@ -1680,9 +1719,8 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
yon_debug_output("Save changed to: %s\n",yon_char_from_int(main_config.save_done));
yon_debug_output("Install state: %s\n",yon_char_from_int(main_config.install_complete));
- if (main_config.install_complete){
- gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_COMPLETION);
- } else {
+ if (!main_config.install_complete){
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALLATION);
printf("still deactivated\n");
gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
gtk_widget_set_sensitive(widgets->NextButton,0);
@@ -2328,6 +2366,7 @@ main_window *yon_main_window_complete(){
g_signal_connect(G_OBJECT(widgets->AvailableLanguagesButton),"clicked",G_CALLBACK(on_language_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->RegionCombo),"changed",G_CALLBACK(on_region_changed),widgets);
g_signal_connect(G_OBJECT(widgets->AddButton),"clicked",G_CALLBACK(on_keyboard_clicked),widgets);
+ g_signal_connect(G_OBJECT(widgets->RemoveButton),"clicked",G_CALLBACK(on_keyboard_removed),widgets);
g_signal_connect(G_OBJECT(widgets->UsersToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->LicenceToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h
index 8cfba08..372dda6 100755
--- a/source/ubinstall-gtk.h
+++ b/source/ubinstall-gtk.h
@@ -463,4 +463,6 @@ void on_toggle_button_switch_on(GtkWidget *, GtkToggleButton *toggle);
void on_autohostname_sensitiveness_check(GtkWidget *, main_window *widgets);
void on_autohostname_check(GtkWidget *, main_window *widgets);
-void on_hostname_entry_changed (GtkWidget *, main_window *widgets);
\ No newline at end of file
+void on_hostname_entry_changed (GtkWidget *, main_window *widgets);
+
+void *on_install_success(main_window *widgets);
\ No newline at end of file
diff --git a/source/ubl-strings.h b/source/ubl-strings.h
index 42384a7..357d8a7 100644
--- a/source/ubl-strings.h
+++ b/source/ubl-strings.h
@@ -21,10 +21,10 @@
#define LOCATION_TAB_LABEL _("Location")
#define KEYBOARD_TAB_LABEL _("Keyboard")
#define USERS_TAB_LABEL _("Users")
-#define COMPLETION_TAB_LABEL _("Completion")
+#define COMPLETION_TAB_LABEL _("Installation completion")
#define COMMON_INSTALL_INFO_LABEL _("Deleting all data on the selected disk and then installing the UBLinux system")
#define NEAR_INSTALL_LABEL _("Installation next to another system")
-#define NEAR_INSTALL_INFO_LABEL _("Shrinking a partition and creating a new one for installing UBLinux")
+#define NEAR_INSTALL_INFO_LABEL _("Shrinking a partition and creating a new one for installing OS")
#define SHRINK_SECTION_INSTALL_LABEL _("Installation on the same partition as another system")
#define SHRINK_SECTION_INSTALL_INFO_LABEL _("Unpacking the UBLinux file system into an existing system")
#define ADDITIONAL_INSTALL_INFO_LABEL _("Selecting additional software to install from the repository via the Internet")
@@ -53,11 +53,11 @@
#define COMPUTER_NAME_LABEL _("Host name:")
#define AUTOMATICALLY_LABEL _("Automatically")
#define USER_LABEL _("User")
-#define COMPLETION_LABEL _("Completion")
+#define COMPLETION_LABEL _("Installation completion")
#define INSTALLATION_COMPLETION_LABEL _("Installation completion")
#define SELECT_DEVICE_LABEL _("Select device:")
#define CHOOSE_SECTION_LABEL _("Choose a section:")
-#define ATTENSION_LABEL _("Attention! The selected partition will be modified: the size will be reduced. In the resulting free space, a partition will be created into which the UBLinux OS will be\ninstalled.")
+#define ATTENSION_LABEL _("Attention! The selected partition will be modified: the size will be reduced. In the resulting free space, a partition will be created into which the UBLinux OS will be\ninstalled.")
#define DEVICE_LABEL _("Device")
#define MARK_LABEL _("Mark")
#define SIZE_LABEL _("Size")
@@ -173,4 +173,12 @@
#define ACCEPT_LABEL _("Accept")
#define GPARTED_LABEL _("Start GParted")
-#define EXIT_WARNING_LABEL _("Are you sure want to exit and interrupt installation process?")
\ No newline at end of file
+#define EXIT_WARNING_LABEL _("Are you sure want to exit and interrupt installation process?")
+
+#define PROGRESS_LOG_LABEL _("Progress log")
+#define INSTALL_LOG_LABEL _("Installation log")
+
+#define ADD_LAYOUT_LABEL _("Add layouts")
+#define REMOVE_LAYOUT_LABEL _("Remove layout")
+
+#define CONFIGURATION_LABEL _("System configuration...")
\ No newline at end of file
diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade
index 2988de9..ea6e2da 100644
--- a/ubinstall-gtk.glade
+++ b/ubinstall-gtk.glade
@@ -808,6 +808,7 @@ and help you install UBLinux on your computer
@@ -884,7 +885,8 @@ and help you install UBLinux on your computer
@@ -960,7 +962,8 @@ and help you install UBLinux on your computer
@@ -1035,6 +1038,7 @@ and help you install UBLinux on your computer
@@ -1110,6 +1114,7 @@ and help you install UBLinux on your computer
@@ -1493,9 +1498,15 @@ and help you install UBLinux on your computer
vertical
5
-
+
+
+ True
+ False
+
+
+ False
+ True
+ 1
+
+
6
@@ -2159,6 +2181,7 @@ and help you install UBLinux on your computer
False
True
True
+ Add layouts
image13