master #33

Merged
asmeron merged 4 commits from YanTheKaller/ubinstall-gtk:master into master 1 year ago

@ -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);

@ -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;

@ -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.")
#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")

@ -41,6 +41,21 @@
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="ScrollToEndCheck">
<property name="label" translatable="yes">Scroll to the end</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="ScrollWindow">
<property name="visible">True</property>

@ -1574,7 +1574,7 @@ and help you install UBLinux on your computer</property>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@ -2146,7 +2146,7 @@ and help you install UBLinux on your computer</property>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
@ -2311,9 +2311,20 @@ and help you install UBLinux on your computer</property>
</packing>
</child>
<child>
<object class="GtkImage">
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>

@ -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 ""

Loading…
Cancel
Save