From 9f284bcc6f536d6f4e40ebca040b1da37e341516 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 11 Jan 2024 12:36:40 +0600 Subject: [PATCH] Fixed missing save success localisation --- libublsettingsui-gtk3.css | 15 +++++++++++++++ libublsettingsui-gtk3.glade | 3 +++ source/libublsettingsui-gtk3.c | 9 +++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/libublsettingsui-gtk3.css b/libublsettingsui-gtk3.css index 88e8c57..a08bca0 100644 --- a/libublsettingsui-gtk3.css +++ b/libublsettingsui-gtk3.css @@ -111,4 +111,19 @@ background:transparent; .boxInfoMessOK{ background-color: #f3f0ac; +} +.instant { + transition: 0ms; +} +.errorBox { + border-width: 2px; + border-color: #ea9999; + border-style:solid; +} + +.chosenOutline{ + transition: 0ms; + border-width: 2px; + border-color: #f3f0ac; + border-style:solid; } \ No newline at end of file diff --git a/libublsettingsui-gtk3.glade b/libublsettingsui-gtk3.glade index aa4b402..3915044 100644 --- a/libublsettingsui-gtk3.glade +++ b/libublsettingsui-gtk3.glade @@ -159,6 +159,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. False False False + True diff --git a/source/libublsettingsui-gtk3.c b/source/libublsettingsui-gtk3.c index f821018..5ea5bf4 100644 --- a/source/libublsettingsui-gtk3.c +++ b/source/libublsettingsui-gtk3.c @@ -136,13 +136,15 @@ void on_save_parameters(GtkWidget *self, template_saving_window *window){ free(final_command); } } + textdomain(template_ui_LocaleName); if (window->type == YON_CONFIG_GLOBAL) yon_ubl_status_box_render(GLOBAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); else if (window->type == YON_CONFIG_LOCAL) yon_ubl_status_box_render(LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); else if (window->type == YON_CONFIG_BOTH) yon_ubl_status_box_render(GLOBAL_LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); - + textdomain(template_app_information.app_locale); + yon_window_config_custom_window_set(GTK_WINDOW(window->Window),"SaveWindow"); on_subwindow_close(self); } @@ -150,12 +152,14 @@ void on_save_parameters(GtkWidget *self, template_saving_window *window){ template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...){ if (((type==YON_CONFIG_LOCAL&& template_config->load_mode==1)||(type==YON_CONFIG_GLOBAL&& template_config->load_mode==0))){ yon_config_save_registered(path); + textdomain(template_ui_LocaleName); if (type == YON_CONFIG_GLOBAL) yon_ubl_status_box_render(GLOBAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); else if (type == YON_CONFIG_LOCAL) yon_ubl_status_box_render(LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); else if (type == YON_CONFIG_BOTH) yon_ubl_status_box_render(GLOBAL_LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + textdomain(template_app_information.app_locale); } else { char *config_to_save = NULL; if (type==YON_CONFIG_GLOBAL) config_to_save="global"; @@ -431,13 +435,14 @@ template_main_window *yon_ubl_window_setup(){ template_main_window *widgets = setup_window(); yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,ui_banner_path); - + textdomain(template_ui_LocaleName); if (yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel)){ if (getuid()!=0) yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); else yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); } + textdomain(template_app_information.app_locale); template_config->load_mode=1; if(template_config) yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,template_config->socket_id,template_config->load_socket_id,template_config->save_socket_id);