From 10ecaeb36db40b23a662890bb7b39668a103f1e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=B8=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D1=82=D0=BE=D1=80?= Date: Mon, 29 Jul 2024 10:34:12 +0000 Subject: [PATCH 1/4] Layouts tree width increased --- ubinstall-gtk.glade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index c1441ab..eb4c7d5 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -1,5 +1,5 @@ - + @@ -2146,7 +2146,7 @@ and help you install UBLinux on your computer - True + False True 0 -- 2.35.1 From 59ca028cc27295f411d08b45bba899ff4f889296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=B8=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D1=82=D0=BE=D1=80?= Date: Mon, 29 Jul 2024 10:37:40 +0000 Subject: [PATCH 2/4] Localisation update --- source/ubl-strings.h | 1 + ubinstall-gtk.pot | 4 ++++ ubinstall-gtk_ru.po | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/source/ubl-strings.h b/source/ubl-strings.h index d1176b9..a8c35ca 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -66,6 +66,7 @@ #define GB_LABEL _("Gb") #define MB_LABEL _("Mb") #define AVALIABLE_LANGUAGES_LABEL _("Available languages in the system:") +#define AVALIABLE_LANGUAGES_TITLE_LABEL _("Available languages in the system") #define NO_DEVICE_CHOSEN_LABEL _("No device were chosen") diff --git a/ubinstall-gtk.pot b/ubinstall-gtk.pot index ec770d3..6054adf 100644 --- a/ubinstall-gtk.pot +++ b/ubinstall-gtk.pot @@ -303,6 +303,10 @@ msgstr "" msgid "Available languages in the system:" msgstr "" +#: source/ubl-strings.h:66 +msgid "Available languages in the system" +msgstr "" + #: source/ubl-strings.h:67 msgid "No device were chosen" msgstr "" diff --git a/ubinstall-gtk_ru.po b/ubinstall-gtk_ru.po index 285dfed..14ebf42 100644 --- a/ubinstall-gtk_ru.po +++ b/ubinstall-gtk_ru.po @@ -317,6 +317,10 @@ msgstr "Мб" msgid "Available languages in the system:" msgstr "Доступные языки в системе:" +#: source/ubl-strings.h:66 +msgid "Available languages in the system" +msgstr "Доступные языки в системе" + #: source/ubl-strings.h:67 msgid "No device were chosen" msgstr "Устройство не выбрано" -- 2.35.1 From 09c065927ee1373e5f1499e7cb532c44bb65a8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=B8=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D1=82=D0=BE=D1=80?= Date: Mon, 29 Jul 2024 12:12:04 +0000 Subject: [PATCH 3/4] Fixes --- source/ubinstall-gtk.c | 10 ++++++++-- ubinstall-gtk-log-view.glade | 16 +++++++++++++++- ubinstall-gtk_ru.po | 4 ---- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 6a31f18..6310fef 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -839,6 +839,8 @@ gboolean on_image_slide(void *data){ config_str target = yon_char_parsed_new(&size,slide_repeat_path); g_object_unref(widgets->slides_original); widgets->slides_original = gdk_pixbuf_new_from_resource_at_scale(target[cur_slide],600,400,1,NULL); + if (size) + yon_char_parsed_free(target,size); GtkWidget *parent = gtk_widget_get_parent(widgets->SlidesImage); gtk_widget_destroy(widgets->SlidesImage); widgets->SlidesImage = gtk_image_new(); @@ -892,7 +894,7 @@ gboolean yon_installation_progress_update(void *data){ while (gtk_events_pending()) gtk_main_iteration(); int size; while (main_config.log_progress_buzy){ - while (gtk_events_pending()) gtk_main_iteration();}; + while (gtk_events_pending()) gtk_main_iteration();}; main_config.log_progress_buzy=1; config_str text = yon_file_open(progress_path,&size); main_config.log_progress_buzy=0; @@ -1109,10 +1111,14 @@ 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); + yon_debug_output("%s\n",yon_char_from_long((long)gtk_adjustment_get_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow))))); + yon_debug_output("%s\n",yon_char_from_long((long)gtk_adjustment_get_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow))))); + if (strcmp(final,prev)||gtk_adjustment_get_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)))-100) + 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)))); free(final); yon_char_parsed_free(parsed,size); - 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)))); } return 1; } diff --git a/ubinstall-gtk-log-view.glade b/ubinstall-gtk-log-view.glade index 42d453e..72e47e5 100644 --- a/ubinstall-gtk-log-view.glade +++ b/ubinstall-gtk-log-view.glade @@ -1,5 +1,5 @@ - + @@ -41,6 +41,20 @@ 5 vertical 5 + + + Scroll to the end + True + True + False + True + + + False + True + 0 + + True diff --git a/ubinstall-gtk_ru.po b/ubinstall-gtk_ru.po index 14ebf42..285dfed 100644 --- a/ubinstall-gtk_ru.po +++ b/ubinstall-gtk_ru.po @@ -317,10 +317,6 @@ msgstr "Мб" msgid "Available languages in the system:" msgstr "Доступные языки в системе:" -#: source/ubl-strings.h:66 -msgid "Available languages in the system" -msgstr "Доступные языки в системе" - #: source/ubl-strings.h:67 msgid "No device were chosen" msgstr "Устройство не выбрано" -- 2.35.1 From 5d6134abbd6405be2b55f1a1e104ae90a2e5c795 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 30 Jul 2024 15:26:27 +0600 Subject: [PATCH 4/4] Added check for autoscrolling; AUTOINSTALL[zone] test fix --- source/ubinstall-gtk.c | 13 +++++++++---- source/ubinstall-gtk.h | 2 ++ source/ubl-strings.h | 4 +++- ubinstall-gtk-log-view.glade | 3 ++- ubinstall-gtk.glade | 17 ++++++++++++++--- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 6310fef..205ef12 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -770,6 +770,7 @@ void config_init(){ main_config.configure_mode=0; main_config.load_mode=-1; main_config.log_progress_buzy=0; + main_config.log_end=0; } void on_configuration_mode_switch(GtkWidget *self); @@ -782,6 +783,8 @@ 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)))); + yon_debug_output("width: %s\n",yon_char_from_int(width)); + yon_debug_output("height: %s\n\n",yon_char_from_int(height)); int newImgWidthDef = (width <= 217) ? width : width - 30; int newImgHeightDef = (height <= 120) ? height : height - 217; GdkPixbuf *pixBuf = pixbuf_unscaled; @@ -1095,6 +1098,7 @@ log_window *yon_log_window_new(){ window->HeadLabel = yon_gtk_builder_get_widget(builder,"headerTopic"); window->LogLabel = yon_gtk_builder_get_widget(builder,"LogLabel"); window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox"); + window->ScrollToEndCheck = yon_gtk_builder_get_widget(builder,"ScrollToEndCheck"); g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_log_closed),window); gtk_widget_show(window->Window); return window; @@ -1111,12 +1115,11 @@ 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)); + // char *prev = (char*)gtk_label_get_text(GTK_LABEL(window->LogLabel)); gtk_label_set_text(GTK_LABEL(window->LogLabel),final); - yon_debug_output("%s\n",yon_char_from_long((long)gtk_adjustment_get_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow))))); - yon_debug_output("%s\n",yon_char_from_long((long)gtk_adjustment_get_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow))))); - if (strcmp(final,prev)||gtk_adjustment_get_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)))-100) + 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)))); + } free(final); yon_char_parsed_free(parsed,size); } @@ -1243,6 +1246,8 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RegionSensitiveCheck))){ char *region = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->RegionCombo)); char *zone = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->ZoneCombo)); + yon_debug_output("%s",region); + yon_debug_output("/%s\n\n",zone); yon_config_register(zone_parameter,zone_parameter_command,yon_char_unite(region,"/",zone,NULL)); } else { yon_config_remove_by_key(zone_parameter); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 133639c..9ae3adb 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -205,6 +205,7 @@ typedef struct { int log_progress_buzy; int autologin_default; int format_default; + int log_end; } config; typedef struct { @@ -428,6 +429,7 @@ typedef struct { GtkWidget *StatusBox; GtkWidget *HeadLabel; GtkWidget *LogLabel; + GtkWidget *ScrollToEndCheck; char *command; } log_window; diff --git a/source/ubl-strings.h b/source/ubl-strings.h index a8c35ca..a3927ec 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -160,4 +160,6 @@ #define CONFIGURATION_FINISH_LABEL _("Choose a save option on the header bar") #define CONFIGURATION_SAVE_HEAD_LABEL _("Configuration has been saved") -#define CONFIGURATION_SAVE_LABEL _("You can safely exit configurator or return and create new configuration file.") \ No newline at end of file +#define CONFIGURATION_SAVE_LABEL _("You can safely exit configurator or return and create new configuration file.") + +#define SCROLL_TO_END_LABEL _("Scroll to the end") \ No newline at end of file diff --git a/ubinstall-gtk-log-view.glade b/ubinstall-gtk-log-view.glade index 72e47e5..6bd7dbc 100644 --- a/ubinstall-gtk-log-view.glade +++ b/ubinstall-gtk-log-view.glade @@ -1,5 +1,5 @@ - + @@ -47,6 +47,7 @@ True True False + True True diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index eb4c7d5..efdf931 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -1,5 +1,5 @@ - + @@ -1574,7 +1574,7 @@ and help you install UBLinux on your computer - False + True True 1 @@ -2311,9 +2311,20 @@ and help you install UBLinux on your computer - + True False + 0 + none + + + True + False + + + + + False -- 2.35.1