diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 6a31f18..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; @@ -839,6 +842,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 +897,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; @@ -1093,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; @@ -1109,10 +1115,13 @@ 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)))); + } 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; } @@ -1237,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 d1176b9..a3927ec 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") @@ -159,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 42d453e..6bd7dbc 100644 --- a/ubinstall-gtk-log-view.glade +++ b/ubinstall-gtk-log-view.glade @@ -41,6 +41,21 @@ 5 vertical 5 + + + Scroll to the end + True + True + False + True + True + + + False + True + 0 + + True diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index c1441ab..efdf931 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -1574,7 +1574,7 @@ and help you install UBLinux on your computer - False + True True 1 @@ -2146,7 +2146,7 @@ and help you install UBLinux on your computer - True + False True 0 @@ -2311,9 +2311,20 @@ and help you install UBLinux on your computer - + True False + 0 + none + + + True + False + + + + + False 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 ""