From 486874768b34611ef9ddbea3237c4c54c505bfce Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 9 Aug 2024 15:06:18 +0600 Subject: [PATCH] Test fix for keyboard navigation; Added tooltips for progress log buttons; Progress log buttons become unsensitive when log window is opened --- source/ubinstall-gtk.c | 33 +++++++++++++++------ source/ubinstall-gtk.h | 2 +- source/ubl-strings.h | 5 +++- ubinstall-gtk.glade | 65 ++++++++++++++++++++++-------------------- ubinstall-gtk.pot | 8 ++++++ ubinstall-gtk_ru.po | 8 ++++++ 6 files changed, 80 insertions(+), 41 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 5c105c6..dc46dd5 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -1047,7 +1047,7 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){ break; case YON_PAGE_INSTALL_ERROR:{ - on_summary_log_view((GtkWidget*)NULL); + on_summary_log_view((GtkWidget*)NULL,widgets); yon_switch_page_render(widgets,7); gtk_widget_set_sensitive(widgets->BackButton,0); @@ -1150,8 +1150,14 @@ void *on_setup_system_configuration(void * data){ return NULL; } -void on_log_closed(GtkWidget *, log_window *window); -void on_log_closed(GtkWidget *, log_window *window){ +void on_log_closed(GtkWidget *, dictionary *dict); +void on_log_closed(GtkWidget *, dictionary *dict){ + main_window *widgets = yon_dictionary_get_data(dict->first,main_window*); + log_window *window = yon_dictionary_get_data(dict->first->next,log_window*); + + gtk_widget_set_sensitive(widgets->ReadFullLogButton,1); + gtk_widget_set_sensitive(widgets->ReadShortLogButton,1); + free(window->command); window->Window=NULL; } @@ -1197,7 +1203,6 @@ log_window *yon_log_window_new(){ 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; } @@ -1225,16 +1230,28 @@ if (window->Window){ return 0; } -void on_process_log_view(GtkWidget *); -void on_process_log_view(GtkWidget *){ +void on_process_log_view(GtkWidget *,main_window *widgets); +void on_process_log_view(GtkWidget *,main_window *widgets){ log_window *window = yon_log_window_new(); + 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->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"); window->command = yon_char_new(short_log_path); gdk_threads_add_timeout(500,(GSourceFunc)yon_read_log,window); } -void on_summary_log_view(GtkWidget *){ +void on_summary_log_view(GtkWidget *,main_window *widgets){ log_window *window = yon_log_window_new(); + 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->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"); window->command = yon_char_new(full_log_path); gdk_threads_add_timeout(500,(GSourceFunc)yon_read_log,window); @@ -2526,7 +2543,7 @@ int main(int argc, char *argv[]){ } gtk_init(&argc,&argv); main_window *widgets = NULL; - widgets = yon_main_window_complete((main_window*)widgets); + widgets = yon_main_window_complete(); yon_window_config_setup(GTK_WINDOW(widgets->MainWindow)); yon_window_config_load(config_path); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index ac07455..dbd9c74 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -448,7 +448,7 @@ char* yon_debug_output(char *pattern,char*text); char *yon_save_command_prepare(char *command, char *target); void yon_interface_update(main_window *widgets); -void on_summary_log_view(GtkWidget *); +void on_summary_log_view(GtkWidget *,main_window *widgets); void on_near_installation_device_changed(GtkWidget *self, main_window *widgets); void on_toggle_button_switch_on(GtkWidget *, GtkToggleButton *toggle); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index d38a92d..5a1e5ea 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -165,4 +165,7 @@ #define SCROLL_TO_END_LABEL _("Scroll to the end") #define ADMINISTRATOR_LABEL _("Administrator") -#define DEFAULT_LOCALES_LABEL _("English, U.S.A.; Russian, Russia") \ No newline at end of file +#define DEFAULT_LOCALES_LABEL _("English, U.S.A.; Russian, Russia") + +#define READ_INSTALL_LOG_LABEL _("Read installation log") +#define READ_PROGRESS_LOG_LABEL _("Read progress log") \ No newline at end of file diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 1d9f769..723e56d 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -583,6 +583,7 @@ agreement center This program will ask you few questions and help you install UBLinux on your computer + center True @@ -1588,7 +1589,7 @@ and help you install UBLinux on your computer True - False + True Region: @@ -1614,7 +1615,7 @@ and help you install UBLinux on your computer True False - False + True False @@ -1651,7 +1652,7 @@ and help you install UBLinux on your computer True False - False + True False @@ -1699,7 +1700,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -1764,7 +1765,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -1786,7 +1787,7 @@ and help you install UBLinux on your computer True False - False + True LanguagesFilter 2 @@ -1893,7 +1894,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -1915,7 +1916,7 @@ and help you install UBLinux on your computer True False - False + True 0 Default (Regular 105-key) @@ -1943,7 +1944,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -1965,7 +1966,7 @@ and help you install UBLinux on your computer True False - False + True 0 Default (L_Alt + L_Shift) @@ -2025,7 +2026,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -2290,7 +2291,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -2338,7 +2339,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -2386,7 +2387,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -2408,7 +2409,7 @@ and help you install UBLinux on your computer True False - False + True 0 Default @@ -2453,7 +2454,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -2497,7 +2498,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -2519,7 +2520,7 @@ and help you install UBLinux on your computer True False - False + True 0 Default @@ -2575,7 +2576,7 @@ and help you install UBLinux on your computer True - False + True False True @@ -3068,7 +3069,7 @@ or continue working in the UBLinux Live environment. True - False + True False True @@ -3090,7 +3091,7 @@ or continue working in the UBLinux Live environment. True False - False + True 1 ext3 @@ -3126,7 +3127,7 @@ or continue working in the UBLinux Live environment. True - False + True False True @@ -3575,7 +3576,7 @@ installed. True - False + True False True @@ -3614,7 +3615,7 @@ installed. True False - False + True 1 Mb @@ -3651,14 +3652,14 @@ installed. True - False + True False True True - False + True Choose file system type for the section: @@ -3673,7 +3674,7 @@ installed. True False - False + True 1 ext3 @@ -3724,7 +3725,7 @@ installed. True - False + True False True @@ -4168,7 +4169,7 @@ installed. True - False + True False True @@ -4190,7 +4191,7 @@ installed. True False - False + True 1 ext3 @@ -4242,7 +4243,7 @@ installed. True - False + True False True @@ -7242,6 +7243,7 @@ separately into the selected partition. True True True + Read installation log image16