From 4b436cbc62e24be848d1466348c337cab3eec1f8 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 14 Nov 2025 17:18:23 +0600 Subject: [PATCH 1/2] Wiki link fix --- source/ubl-settings-datetime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h index 0997f2e..9c00620 100644 --- a/source/ubl-settings-datetime.h +++ b/source/ubl-settings-datetime.h @@ -16,7 +16,7 @@ #endif #include "ubl-strings.h" -#define WIKI_LINK "https://wiki.ublinux.com/Software/Programs_and_utilities/All/ubl-settings-datetime" +#define WIKI_LINK "https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-datetime" #define _(String) gettext(String) From 5f10c83f5843590fe93b54e9eb83219aa063ca76 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 19 Nov 2025 14:18:31 +0600 Subject: [PATCH 2/2] Added new tooltips; Added new status messages --- locale/ubl-settings-datetime.pot | 16 ++++++++++++++++ locale/ubl-settings-datetime_ru.po | 16 ++++++++++++++++ source/ubl-settings-datetime.c | 13 +++++++++---- source/ubl-settings-datetime.h | 1 + source/ubl-strings.h | 7 ++++++- ubl-settings-datetime.glade | 4 +++- 6 files changed, 51 insertions(+), 6 deletions(-) diff --git a/locale/ubl-settings-datetime.pot b/locale/ubl-settings-datetime.pot index b52f340..ac827d0 100644 --- a/locale/ubl-settings-datetime.pot +++ b/locale/ubl-settings-datetime.pot @@ -69,6 +69,14 @@ msgstr "" msgid "Synchronize via NTP" msgstr "" +#: source/ubl-strings.h:16 +msgid "The selected date and time are set" +msgstr "" + +#: source/ubl-strings.h:16 +msgid "The selected date and time are set" +msgstr "" + #: source/ubl-strings.h:17 msgid "Default" msgstr "" @@ -152,3 +160,11 @@ msgstr "" #: source/ubl-strings.h:40 msgid "MM-DD-YYYY" msgstr "" + +#: source/ubl-strings.h:16 +msgid "Set the selected date and time" +msgstr "" + +#: source/ubl-strings.h:16 +msgid "Set the selected date and time in the BIOS" +msgstr "" diff --git a/locale/ubl-settings-datetime_ru.po b/locale/ubl-settings-datetime_ru.po index 13ad9b2..de77fa0 100644 --- a/locale/ubl-settings-datetime_ru.po +++ b/locale/ubl-settings-datetime_ru.po @@ -69,6 +69,14 @@ msgstr "Синхронизировать аппаратное время:" msgid "Synchronize via NTP" msgstr "Синхронизировать через NTP" +#: source/ubl-strings.h:16 +msgid "The selected date and time are set" +msgstr "Установлена выбранная дата и время" + +#: source/ubl-strings.h:16 +msgid "The selected date and time are set in the BIOS" +msgstr "Установлена выбранная дата и время в BIOS" + #: source/ubl-strings.h:17 msgid "Default" msgstr "По умолчанию" @@ -157,6 +165,14 @@ msgstr "ДД/ММ/ГГГГ" msgid "MM-DD-YYYY" msgstr "ММ-ДД-ГГГГ" +#: source/ubl-strings.h:16 +msgid "Set the selected date and time" +msgstr "Установить выбранную дату и время" + +#: source/ubl-strings.h:16 +msgid "Set the selected date and time in the BIOS" +msgstr "Установить выбранную дату и время в BIOS" + msgid "Stopped" msgstr "Остановлен" diff --git a/source/ubl-settings-datetime.c b/source/ubl-settings-datetime.c index cfedd84..1be8f8f 100644 --- a/source/ubl-settings-datetime.c +++ b/source/ubl-settings-datetime.c @@ -369,9 +369,7 @@ void on_date_format_changed(GtkWidget *, main_window *widgets){ } gboolean on_operation_success(void*){ - textdomain(template_ui_LocaleName); - yon_ubl_status_box_render(SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); - textdomain(LocaleName); + yon_ubl_status_box_render(SYNC_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); return G_SOURCE_REMOVE; } @@ -491,9 +489,16 @@ void on_ntp_sync(GtkWidget *, main_window *widgets){ } } +gboolean on_hardware_operation_success(void*){ + yon_ubl_status_box_render(SYNC_HARDWARE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + return G_SOURCE_REMOVE; +} + void *yon_sync_hardware_thread_start(void*){ if (system(hardware_datetime_sync_command)){ - gdk_threads_add_idle((GSourceFunc)on_sync_error,NULL); + g_idle_add((GSourceFunc)on_sync_error,NULL); + } else { + g_idle_add((GSourceFunc)on_hardware_operation_success,NULL); } pthread_exit(NULL); } diff --git a/source/ubl-settings-datetime.h b/source/ubl-settings-datetime.h index 9c00620..9cc6321 100644 --- a/source/ubl-settings-datetime.h +++ b/source/ubl-settings-datetime.h @@ -113,6 +113,7 @@ void on_region_changed(GtkComboBox *self, main_window *widgets); void yon_interface_update(main_window *widgets); gboolean on_sync_error(void*); +gboolean on_hardware_operation_success(void*); void *yon_sync_hardware_thread_start(void*); void *yon_sync_thread_start(void*); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 82439d4..e5cb0bd 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -14,6 +14,8 @@ #define SYNC_HARDWARE_BUTTON_LABEL _("Synchronize hardware time") #define SYNC_HARDWARE_LABEL _("Synchronize hardware time:") #define SYNC_NTP_LABEL _("Synchronize via NTP") +#define SYNC_SUCCESS_LABEL _("The selected date and time are set") +#define SYNC_HARDWARE_SUCCESS_LABEL _("The selected date and time are set in the BIOS") #define DEFAULT_LABEL _("Default") #define STOPPED_LABEL _("Do not configure") #define DISABLED_LABEL _("Stop") @@ -37,4 +39,7 @@ #define DMY_FORMAT_LABEL _("DD.MM.YYYY") #define DMY_MINUS_FORMAT_LABEL _("DD-MM-YYYY") #define DMY_SLASH_FORMAT_LABEL _("DD/MM/YYYY") -#define MDY_FORMAT_LABEL _("MM-DD-YYYY") \ No newline at end of file +#define MDY_FORMAT_LABEL _("MM-DD-YYYY") + +#define SYNC_TOOLTIP_LABEL _("Set the selected date and time") +#define SYNC_HARDWARE_TOOLTIP_LABEL _("Set the selected date and time in the BIOS") \ No newline at end of file diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index 949b7d7..66e1e51 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -1,5 +1,5 @@ - + @@ -185,6 +185,7 @@ format True True True + Set the selected date and time image1 @@ -199,6 +200,7 @@ format True True True + Set the selected date and time in the BIOS True