From e721d311cd11cf1cfb7cac55b53b001a4aa0acfb Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 14 Apr 2025 12:10:28 +0600 Subject: [PATCH 01/23] Added confirmation windows for session button; Localisation changes --- source/ubl-settings-services.c | 49 ++++++-- source/ubl-strings.h | 15 ++- ubl-settings-services.glade | 12 +- ubl-settings-services.pot | 181 +++++++++++++++------------ ubl-settings-services_ru.po | 218 +++++++++++++++++++-------------- 5 files changed, 280 insertions(+), 195 deletions(-) diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 06810d7..11dcce4 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -580,42 +580,61 @@ void yon_sessions_update(main_window *widgets){ gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->SessionMainTree),GTK_TREE_MODEL(widgets->SessionsList)); } -void on_session_activate(GtkWidget *, main_window *widgets){ +void on_session_activate(GtkWidget *self, main_window *widgets){ GtkTreeModel *model = GTK_TREE_MODEL(widgets->SessionsList); GtkTreeIter iter; if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SessionMainTree)),&model,&iter)){ + int id; gtk_tree_model_get(model,&iter,0,&id,-1); + dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); char *convert = yon_char_from_int(id); - yon_launch(session_activate_session(convert)); - free(convert); - yon_sessions_update(widgets); + data->action_text = SESSION_ACTIVATE_TOOLTIP_LABEL(convert); + data->data = NULL; + data->function = NULL; + if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){ + yon_launch(session_activate_session(convert)); + free(convert); + yon_sessions_update(widgets); + } } } -void on_session_end(GtkWidget *, main_window *widgets){ +void on_session_end(GtkWidget *self, main_window *widgets){ GtkTreeModel *model = GTK_TREE_MODEL(widgets->SessionsList); GtkTreeIter iter; if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SessionMainTree)),&model,&iter)){ int id; gtk_tree_model_get(model,&iter,0,&id,-1); + dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); char *convert = yon_char_from_int(id); - yon_launch(session_terminate_session(convert)); - free(convert); - yon_sessions_update(widgets); + data->action_text = SESSION_END_TOOLTIP_LABEL(convert); + data->data = NULL; + data->function = NULL; + if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){ + yon_launch(session_terminate_session(convert)); + free(convert); + yon_sessions_update(widgets); + } } } -void on_session_block(GtkWidget *, main_window *widgets){ +void on_session_block(GtkWidget *self, main_window *widgets){ GtkTreeModel *model = GTK_TREE_MODEL(widgets->SessionsList); GtkTreeIter iter; if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SessionMainTree)),&model,&iter)){ int id; gtk_tree_model_get(model,&iter,0,&id,-1); + dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); char *convert = yon_char_from_int(id); - yon_launch(session_lock_session(convert)); - free(convert); - yon_sessions_update(widgets); + data->action_text = SESSION_BLOCK_TOOLTIP_LABEL(convert); + data->data = NULL; + data->function = NULL; + if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){ + yon_launch(session_lock_session(convert)); + free(convert); + yon_sessions_update(widgets); + } } } @@ -687,7 +706,11 @@ typedef void (*data_function)(void*,void*); void on_system_update_hz_clicked(GtkWidget *self, main_window *widgets){ if (widgets){ dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); - data->action_text = RELOAD_SERVICE_WARMING_LABEL("systemd"); + if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==0){ + data->action_text = RELOAD_SYSTEM_SETTINGS_WARNING_LABEL; + }else if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==1){ + data->action_text = RELOAD_USER_SETTINGS_WARNING_LABEL; + } data->data = widgets; data->function = (data_function)yon_system_systemd_restart; yon_confirmation_dialog_call(self,data); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 479e0b4..fc991ea 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -69,6 +69,11 @@ #define RELOAD_SERVICE_WARMING_LABEL(target) yon_char_unite(_("Are you sure want to reload "),target,"?\n",_("The system may become unstable."),NULL) #define SERVICE_ENABLE_WARNING_LABEL(target) yon_char_unite(_("Are you sure want to enable "),target,"?\n",_("The system may become unstable."),NULL) #define SERVICE_DISABLE_WARNING_LABEL(target) yon_char_unite(_("Are you sure want to disable "),target,"?\n",_("The system may become unstable."),NULL) +#define RELOAD_SYSTEM_SETTINGS_WARNING_LABEL yon_char_unite(_("Are you sure want to reload system units settings?"),"\n",_("The system may become unstable."),NULL) +#define RELOAD_USER_SETTINGS_WARNING_LABEL yon_char_unite(_("Are you sure want to reload user units settings?"),"\n",_("The system may become unstable."),NULL) +#define SESSION_ACTIVATE_TOOLTIP_LABEL(target) yon_char_unite(_("Are you sure you want to switch on session")," ID-",target,"?",NULL) +#define SESSION_END_TOOLTIP_LABEL(target) yon_char_unite(_("Attention!")," ",_("You are about to end your session")," ID-",target,"? ",_("If this is your active session, you will be taken to the login screen. Make sure to save all files before performing this operation."),NULL) +#define SESSION_BLOCK_TOOLTIP_LABEL(target) yon_char_unite(_("Are you sure you want to block session")," ID-",target,"?",NULL) #define DAYS_LABEL _("Days") #define HOURS_LABEL _("Hours") #define MINUTES_LABEL _("Minutes") @@ -94,12 +99,12 @@ #define RELAUNCH_SYSTEMCTL_LABEL _("Reload settings") #define REEXEC_SYSTEMCTL_LABEL _("Reexec systemd") -#define SHOW_SERVICE_INFO_LABEL _("Show service information") +#define SHOW_SERVICE_INFO_LABEL _("Service information") #define RELAUNCH_SERVICE_LABEL _("Relaunch with new configuration") -#define SHOW_SERVICE_LOG_LABEL _("Show service log") -#define SHOW_SERVICE_SOURCE_LABEL _("Show service source file") -#define SHOW_SERVICE_PROPERTIES_LABEL _("Show service properties") -#define SHOW_LABEL _("Show...") +#define SHOW_SERVICE_LOG_LABEL _("Service log") +#define SHOW_SERVICE_SOURCE_LABEL _("Service source file") +#define SHOW_SERVICE_PROPERTIES_LABEL _("Service properties") +#define SHOW_LABEL _("Additional information") #define EDIT_CONFIG_LABEL _("Edit configuration file") diff --git a/ubl-settings-services.glade b/ubl-settings-services.glade index 3a2b971..51e65fe 100644 --- a/ubl-settings-services.glade +++ b/ubl-settings-services.glade @@ -19,7 +19,7 @@ - + @@ -760,7 +760,7 @@ False True True - Show service information + Service information image3 + + + False + True + 0 + + + + + False + True + 0 + + True @@ -2254,7 +2288,7 @@ True True - 0 + 1 From a88c853dac67f541042a86bdaaf995c729b3c45e Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 14 Apr 2025 14:01:37 +0600 Subject: [PATCH 03/23] Config tab fixes --- source/ubl-settings-services.c | 4 +++- source/ubl-settings-services.h | 1 + ubl-settings-services.glade | 24 +++++++++++++++++++++++- ubl-settings-services_ru.po | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 311e166..21fbfad 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -1258,7 +1258,7 @@ void* yon_interface_update(main_window *widgets){ int config_size; config_str config_files = yon_config_load(get_config_files_command,&config_size); int timers_size; - config_str timers = yon_config_load(get_timers_command,&timers_size); + config_str timers = yon_config_load(get_timers_command,&timers_size); struct json_object *jsobject = json_tokener_parse(timers[0]); int launched_size; config_str launched = yon_config_load(load_launched_command,&launched_size); @@ -1750,6 +1750,7 @@ void yon_main_window_complete(main_window *widgets){ PROPERTIES_LABEL,properties_icon_path,on_user_status_clicked,widgets, NULL); + widgets->ConfigUpdateButton=yon_gtk_builder_get_widget(builder,"ConfigUpdateButton"); widgets->ConfigEditButton=yon_gtk_builder_get_widget(builder,"ConfigEditButton"); widgets->ConfigMainTree=yon_gtk_builder_get_widget(builder,"ConfigMainTree"); @@ -1813,6 +1814,7 @@ void yon_main_window_complete(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->UserUnloadedShowCheck),"toggled",G_CALLBACK(on_filter_changed),widgets); g_signal_connect(G_OBJECT(widgets->ConfigEditButton),"clicked",G_CALLBACK(on_config_edit_clicked),widgets); + g_signal_connect(G_OBJECT(widgets->ConfigUpdateButton),"clicked",G_CALLBACK(on_interface_update),widgets); g_signal_connect(G_OBJECT(widgets->SessionRestartButton),"clicked",G_CALLBACK(on_interface_update),widgets); g_signal_connect(G_OBJECT(widgets->SessionStartButton),"clicked",G_CALLBACK(on_session_activate),widgets); diff --git a/source/ubl-settings-services.h b/source/ubl-settings-services.h index 2fde9ee..ab20d3e 100644 --- a/source/ubl-settings-services.h +++ b/source/ubl-settings-services.h @@ -222,6 +222,7 @@ typedef struct { GtkWidget *UserDescriptionLabel; GtkWidget *ConfigEditButton; + GtkWidget *ConfigUpdateButton; GtkWidget *ConfigMainTree; GtkWidget *SessionRestartButton; diff --git a/ubl-settings-services.glade b/ubl-settings-services.glade index 8aad2ea..9cd9768 100644 --- a/ubl-settings-services.glade +++ b/ubl-settings-services.glade @@ -436,6 +436,11 @@ False com.ublinux.ubl-settings-services.sync-symbolic + + True + False + com.ublinux.libublsettingsui-gtk3.sync-symbolic + True False @@ -1787,6 +1792,23 @@ True False vertical + 5 + + + True + True + True + image23 + + + + False + True + 0 + + True @@ -1801,7 +1823,7 @@ False True - 0 + 1 diff --git a/ubl-settings-services_ru.po b/ubl-settings-services_ru.po index 1772dda..41740f8 100644 --- a/ubl-settings-services_ru.po +++ b/ubl-settings-services_ru.po @@ -370,7 +370,7 @@ msgstr "Дополнительная информация" #: source/ubl-strings.h:109 msgid "Edit configuration file" -msgstr "Редактировать в конфигурации" +msgstr "Редактировать конфигурационный файл" #: source/ubl-strings.h:111 msgid "Show inactive" From 99360ddc9441ad8a46d40521f6fa0b70f5bc58b8 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 14 Apr 2025 15:48:59 +0600 Subject: [PATCH 04/23] Added switch to session button --- source/ubl-settings-services.c | 32 ++++++++++++++++++++--- source/ubl-settings-services.h | 5 +++- ubl-settings-services.glade | 47 +++++++++++++++++++++++++--------- 3 files changed, 67 insertions(+), 17 deletions(-) diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 21fbfad..22c5bdd 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -553,14 +553,16 @@ void on_sessions_selection_changed(GtkWidget *, main_window *widgets){ gtk_widget_set_sensitive(widgets->SessionStopButton,1); gtk_widget_set_sensitive(widgets->SessionBlockButton,1); gtk_widget_set_sensitive(widgets->SessionStartButton,1); + gtk_widget_set_sensitive(widgets->SessionSwitchButton,1); } else { gtk_widget_set_sensitive(widgets->SessionStopButton,0); gtk_widget_set_sensitive(widgets->SessionBlockButton,0); gtk_widget_set_sensitive(widgets->SessionStartButton,0); + gtk_widget_set_sensitive(widgets->SessionSwitchButton,0); } } -void yon_sessions_update(main_window *widgets){ +gboolean yon_sessions_update(main_window *widgets){ gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->SessionMainTree),NULL); gtk_list_store_clear(widgets->SessionsList); int sessions_size; @@ -574,10 +576,11 @@ void yon_sessions_update(main_window *widgets){ else parsed[1]=INACTIVE_LABEL; if (parsed&&size>4){ gtk_list_store_append(widgets->SessionsList,&iter); - gtk_list_store_set(widgets->SessionsList,&iter,0,atoi(parsed[0]),1,parsed[1],2,atoi(parsed[2]),3,parsed[3],4,parsed[4],-1); + gtk_list_store_set(widgets->SessionsList,&iter,0,atoi(parsed[0]),1,parsed[1],2,atoi(parsed[2]),3,parsed[3],4,yon_char_unite(parsed[4]," | ",parsed[5],NULL),5,parsed[4],6,parsed[5],-1); } } gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->SessionMainTree),GTK_TREE_MODEL(widgets->SessionsList)); + return G_SOURCE_REMOVE; } void on_session_activate(GtkWidget *self, main_window *widgets){ @@ -619,6 +622,25 @@ void on_session_end(GtkWidget *self, main_window *widgets){ } } +void on_session_unlock(GtkWidget *self, main_window *widgets){ + GtkTreeModel *model = GTK_TREE_MODEL(widgets->SessionsList); + GtkTreeIter iter; + if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SessionMainTree)),&model,&iter)){ + int id; + gtk_tree_model_get(model,&iter,0,&id,-1); + dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); + char *convert = yon_char_from_int(id); + data->action_text = SESSION_ACTIVATE_TOOLTIP_LABEL(convert); + data->data = NULL; + data->function = NULL; + if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){ + yon_launch(session_activate_session(convert)); + free(convert); + yon_sessions_update(widgets); + } + } +} + void on_session_block(GtkWidget *self, main_window *widgets){ GtkTreeModel *model = GTK_TREE_MODEL(widgets->SessionsList); GtkTreeIter iter; @@ -1349,7 +1371,7 @@ void* yon_interface_update(main_window *widgets){ g_idle_add((GSourceFunc)yon_system_config_set,data); } } - yon_sessions_update(widgets); + g_idle_add((GSourceFunc)yon_sessions_update,widgets); for (size_t i=0;iSessionRestartButton=yon_gtk_builder_get_widget(builder,"SessionRestartButton"); widgets->SessionMainTree=yon_gtk_builder_get_widget(builder,"SessionMainTree"); + widgets->SessionSwitchButton=yon_gtk_builder_get_widget(builder,"SessionSwitchButton"); widgets->SessionStartButton=yon_gtk_builder_get_widget(builder,"SessionStartButton"); widgets->SessionStopButton=yon_gtk_builder_get_widget(builder,"SessionStopButton"); widgets->SessionBlockButton=yon_gtk_builder_get_widget(builder,"SessionBlockButton"); @@ -1817,7 +1840,8 @@ void yon_main_window_complete(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->ConfigUpdateButton),"clicked",G_CALLBACK(on_interface_update),widgets); g_signal_connect(G_OBJECT(widgets->SessionRestartButton),"clicked",G_CALLBACK(on_interface_update),widgets); - g_signal_connect(G_OBJECT(widgets->SessionStartButton),"clicked",G_CALLBACK(on_session_activate),widgets); + g_signal_connect(G_OBJECT(widgets->SessionSwitchButton),"clicked",G_CALLBACK(on_session_activate),widgets); + g_signal_connect(G_OBJECT(widgets->SessionStartButton),"clicked",G_CALLBACK(on_session_unlock),widgets); g_signal_connect(G_OBJECT(widgets->SessionStopButton),"clicked",G_CALLBACK(on_session_end),widgets); g_signal_connect(G_OBJECT(widgets->SessionBlockButton),"clicked",G_CALLBACK(on_session_block),widgets); g_signal_connect(G_OBJECT(widgets->SessionMainTree),"cursor-changed",G_CALLBACK(on_sessions_selection_changed),widgets); diff --git a/source/ubl-settings-services.h b/source/ubl-settings-services.h index ab20d3e..f6083a8 100644 --- a/source/ubl-settings-services.h +++ b/source/ubl-settings-services.h @@ -227,6 +227,7 @@ typedef struct { GtkWidget *SessionRestartButton; GtkWidget *SessionMainTree; + GtkWidget *SessionSwitchButton; GtkWidget *SessionStartButton; GtkWidget *SessionStopButton; GtkWidget *SessionBlockButton; @@ -388,7 +389,9 @@ void on_service_restart_confirmed(GtkWidget *self,char *service_name); void on_system_system_restart_clicked(GtkWidget *self, main_window *widgets); -void yon_sessions_update(main_window *widgets); +gboolean yon_sessions_update(main_window *widgets); + +void on_session_unlock(GtkWidget *self, main_window *widgets); void on_session_activate(); diff --git a/ubl-settings-services.glade b/ubl-settings-services.glade index 9cd9768..e4c66c8 100644 --- a/ubl-settings-services.glade +++ b/ubl-settings-services.glade @@ -369,12 +369,12 @@ True False - com.ublinux.ubl-settings-services.stop-symbolic + com.ublinux.libublsettingsui-gtk3.move-away-symbolic True False - com.ublinux.ubl-settings-services.play-symbolic + com.ublinux.libublsettingsui-gtk3.changes-allow-symbolic True @@ -441,6 +441,11 @@ False com.ublinux.libublsettingsui-gtk3.sync-symbolic + + True + False + com.ublinux.libublsettingsui-gtk3.move-in-symbolic + True False @@ -474,7 +479,7 @@ True False - com.ublinux.ubl-settings-services.lock-symbolic + com.ublinux.libublsettingsui-gtk3.changes-prevent-symbolic @@ -1970,13 +1975,13 @@ - + True False True True - Activate session - image11 + Terminate session + image24 @@ -1988,13 +1993,13 @@ - + True False True True - Terminate session - image10 + Lock session + image9 @@ -2006,13 +2011,13 @@ - + True False True True - Lock session - image9 + Activate session + image11 @@ -2023,6 +2028,24 @@ 4 + + + True + False + True + True + Terminate session + image10 + + + + False + True + 5 + + False From 56a8fd3f731354c58bdb713c9337f874f701163d Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 14 Apr 2025 15:52:15 +0600 Subject: [PATCH 05/23] Localisation fixes --- source/ubl-strings.h | 2 +- ubl-settings-services.pot | 3 +++ ubl-settings-services_ru.po | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/ubl-strings.h b/source/ubl-strings.h index fc991ea..2951166 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -72,7 +72,7 @@ #define RELOAD_SYSTEM_SETTINGS_WARNING_LABEL yon_char_unite(_("Are you sure want to reload system units settings?"),"\n",_("The system may become unstable."),NULL) #define RELOAD_USER_SETTINGS_WARNING_LABEL yon_char_unite(_("Are you sure want to reload user units settings?"),"\n",_("The system may become unstable."),NULL) #define SESSION_ACTIVATE_TOOLTIP_LABEL(target) yon_char_unite(_("Are you sure you want to switch on session")," ID-",target,"?",NULL) -#define SESSION_END_TOOLTIP_LABEL(target) yon_char_unite(_("Attention!")," ",_("You are about to end your session")," ID-",target,"? ",_("If this is your active session, you will be taken to the login screen. Make sure to save all files before performing this operation."),NULL) +#define SESSION_END_TOOLTIP_LABEL(target) yon_char_unite("",_("Attention!")," ",_("You are about to end your session")," ID-",target,"? ",_("If this is your active session, you will be taken to the login screen. Make sure to save all files before performing this operation."),NULL) #define SESSION_BLOCK_TOOLTIP_LABEL(target) yon_char_unite(_("Are you sure you want to block session")," ID-",target,"?",NULL) #define DAYS_LABEL _("Days") #define HOURS_LABEL _("Hours") diff --git a/ubl-settings-services.pot b/ubl-settings-services.pot index dcc88a9..c8dae84 100644 --- a/ubl-settings-services.pot +++ b/ubl-settings-services.pot @@ -251,6 +251,9 @@ msgstr "" msgid "You are about to end your session" msgstr "" +msgid "Are you sure you want to block session" +msgstr "" + #: source/ubl-strings.h:75 msgid "" "If this is your active session, you will be taken to the login screen. Make " diff --git a/ubl-settings-services_ru.po b/ubl-settings-services_ru.po index 41740f8..c87ac87 100644 --- a/ubl-settings-services_ru.po +++ b/ubl-settings-services_ru.po @@ -623,5 +623,5 @@ msgstr "Файлы конфигурации управления файлами msgid "Configuration file controlling NTP network time synchronization" msgstr "Файл конфигурации, управляющий синхронизацией времени сети NTP" -#~ msgid "Are you sure you want to block session" -#~ msgstr "Вы уверены, что хотите заблокировать сессию" +msgid "Are you sure you want to block session" +msgstr "Вы уверены, что хотите заблокировать сессию" From 3ecfe60c8ef943a27b1457ce26452ddb350916b4 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 16 Apr 2025 14:20:50 +0600 Subject: [PATCH 06/23] Seat and TTY columns are separated --- source/ubl-settings-services.c | 2 +- ubl-settings-services.glade | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 22c5bdd..da341ab 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -576,7 +576,7 @@ gboolean yon_sessions_update(main_window *widgets){ else parsed[1]=INACTIVE_LABEL; if (parsed&&size>4){ gtk_list_store_append(widgets->SessionsList,&iter); - gtk_list_store_set(widgets->SessionsList,&iter,0,atoi(parsed[0]),1,parsed[1],2,atoi(parsed[2]),3,parsed[3],4,yon_char_unite(parsed[4]," | ",parsed[5],NULL),5,parsed[4],6,parsed[5],-1); + gtk_list_store_set(widgets->SessionsList,&iter,0,atoi(parsed[0]),1,parsed[1],2,atoi(parsed[2]),3,parsed[3],4,parsed[4],5,parsed[4],6,parsed[5],-1); } } gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->SessionMainTree),GTK_TREE_MODEL(widgets->SessionsList)); diff --git a/ubl-settings-services.glade b/ubl-settings-services.glade index e4c66c8..7f8ffeb 100644 --- a/ubl-settings-services.glade +++ b/ubl-settings-services.glade @@ -2135,8 +2135,7 @@ 20 - Seat ID | TTY - True + Seat ID 4 @@ -2146,6 +2145,19 @@ + + + 20 + TTY + True + + + + 6 + + + + From 96f64905f3eb9db06775d70c0e6cb613a31952a0 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 23 Apr 2025 14:51:01 +0600 Subject: [PATCH 07/23] Tooltip fix --- source/ubl-settings-services.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index da341ab..2a9c4f1 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -1632,7 +1632,7 @@ gboolean on_tooltip_show(GtkWidget*, gint x, gint y, gboolean, GtkTooltip* toolt char *temp = date_parsed[0]; date_parsed[0]=date_parsed[2]; date_parsed[2]=temp; - formatted_deactiva = yon_char_unite(date_parsed?yon_char_parsed_to_string(date_parsed,date_size,"."):""," ",activated_parsed[2],NULL); + formatted_activa = yon_char_unite(date_parsed?yon_char_parsed_to_string(date_parsed,date_size,"."):""," ",activated_parsed[2],NULL); if (date_size) yon_char_parsed_free(date_parsed,date_size); } if (activated_size) yon_char_parsed_free(activated_parsed,activated_size); From 5fe77a06a61ad5dce9c0154b8cdb0836bb9e8700 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 23 Apr 2025 15:45:53 +0600 Subject: [PATCH 08/23] Design fixes; Localisation fixes --- source/ubl-settings-services.c | 2 +- source/ubl-strings.h | 8 +++++--- ubl-settings-services.glade | 28 ++++++++++++++------------- ubl-settings-services.pot | 11 +++++++++-- ubl-settings-services_ru.po | 35 ++++++++++++++++++---------------- 5 files changed, 49 insertions(+), 35 deletions(-) diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 2a9c4f1..f8ca6c9 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -630,7 +630,7 @@ void on_session_unlock(GtkWidget *self, main_window *widgets){ gtk_tree_model_get(model,&iter,0,&id,-1); dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); char *convert = yon_char_from_int(id); - data->action_text = SESSION_ACTIVATE_TOOLTIP_LABEL(convert); + data->action_text = SESSION_UNLOCK_TOOLTIP_LABEL(convert); data->data = NULL; data->function = NULL; if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){ diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 2951166..ce2b8d3 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -50,9 +50,10 @@ #define SHOW_LOG_LABEL _("Show log") #define SHOW_SOURCE_LABEL _("Show source") #define PROPERTIES_LABEL _("Properties") -#define ACTIVATE_SESSION_LABEL _("Activate session") +#define ACTIVATE_SESSION_LABEL _("Switch to session") #define END_SESSION_LABEL _("Terminate session") -#define BLOCK_SESSION_LABEL _("Block session") +#define BLOCK_SESSION_LABEL _("Lock session") +#define UNLOCK_SESSION_LABEL _("Unlock session") #define SOURCE_UNFOUND_LABEL _("Service source were not loaded") #define SERVICE_START_FAILED_LABEL _("Failed to launch service") @@ -72,8 +73,9 @@ #define RELOAD_SYSTEM_SETTINGS_WARNING_LABEL yon_char_unite(_("Are you sure want to reload system units settings?"),"\n",_("The system may become unstable."),NULL) #define RELOAD_USER_SETTINGS_WARNING_LABEL yon_char_unite(_("Are you sure want to reload user units settings?"),"\n",_("The system may become unstable."),NULL) #define SESSION_ACTIVATE_TOOLTIP_LABEL(target) yon_char_unite(_("Are you sure you want to switch on session")," ID-",target,"?",NULL) -#define SESSION_END_TOOLTIP_LABEL(target) yon_char_unite("",_("Attention!")," ",_("You are about to end your session")," ID-",target,"? ",_("If this is your active session, you will be taken to the login screen. Make sure to save all files before performing this operation."),NULL) +#define SESSION_END_TOOLTIP_LABEL(target) yon_char_unite("",_("Attention!")," ",_("You are about to end your session")," ID-",target,". ",_("If this is your active session, you will be taken to the login screen. Make sure to save all files before performing this operation."),NULL) #define SESSION_BLOCK_TOOLTIP_LABEL(target) yon_char_unite(_("Are you sure you want to block session")," ID-",target,"?",NULL) +#define SESSION_UNLOCK_TOOLTIP_LABEL(target) yon_char_unite(_("Are you sure you want to unlock session")," ID-",target,"?",NULL) #define DAYS_LABEL _("Days") #define HOURS_LABEL _("Hours") #define MINUTES_LABEL _("Minutes") diff --git a/ubl-settings-services.glade b/ubl-settings-services.glade index 7f8ffeb..9ff5ef2 100644 --- a/ubl-settings-services.glade +++ b/ubl-settings-services.glade @@ -1,5 +1,5 @@ - + @@ -434,7 +434,7 @@ True False - com.ublinux.ubl-settings-services.sync-symbolic + com.ublinux.libublsettingsui-gtk3.sync-symbolic True @@ -775,7 +775,7 @@ False True True - Service information + Unit information image3