From 8ecb4668e107df6c9bab925776bd23d9c523e7a6 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 31 Jan 2024 09:45:33 +0600 Subject: [PATCH 1/3] Desktop fixes --- ubl-settings-services.desktop | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ubl-settings-services.desktop b/ubl-settings-services.desktop index f6e6627..3df33d6 100644 --- a/ubl-settings-services.desktop +++ b/ubl-settings-services.desktop @@ -1,14 +1,14 @@ [Desktop Entry] Encoding=UTF-8 -Name=Службы и процесссы systemd -Name[ru]=Настройка процессов systemd -GenericName=ubl-settings-service +Name=Services and processes systemd +Name[ru]=Службы и процесссы systemd +GenericName=ubl-settings-services GenericName[ru]=Службы и процесссы systemd -Comment=System vervices and processes configuration +Comment=System cervices and processes configuration Comment[ru]=Настройка работы служб и процессов системы Type=Application -Exec=pkexec ubl-settings-service -Icon=com.ublinux.libublsettingsui-gtk3 +Exec=pkexec ubl-settings-services +Icon=com.ublinux.ubl-settings-services Terminal=false X-XfcePluggable=true X-UBLPluggable=true From 3c94538b0ec08cf50bb933c97faff1369671ee87 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 31 Jan 2024 10:58:51 +0600 Subject: [PATCH 2/3] Css updates --- ubl-settings-services.css | 44 +++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/ubl-settings-services.css b/ubl-settings-services.css index 5853948..d6b13ef 100644 --- a/ubl-settings-services.css +++ b/ubl-settings-services.css @@ -39,6 +39,10 @@ background:transparent; border-right-width:inherit; } +.menuitemmiddlemargin{ + margin-top: 6px; +} + .menuitemtop{ margin-bottom:0px; border-color:inherit; @@ -46,17 +50,17 @@ background:transparent; border-left-width:inherit; border-right-width:inherit; } - .menuitemtop>*{ - margin:2px 2px 0 2px; + .menuitemtop *{ + margin:4px 2px 0 2px; padding: 3px 10px 3px 5px; border:transparent; } - .menuitemmiddle>*{ + .menuitemmiddle *{ margin:0 2px 0 2px; padding: 3px 10px 3px 5px; border:transparent; } - .menuitembottom>*{ + .menuitembottom *{ margin:0 2px 2px 2px; padding: 3px 10px 3px 5px; } @@ -81,19 +85,19 @@ background:transparent; border-right-width:inherit; } - .menuitemtop:hover>* { - margin:2px 2px 0 2px; + .menuitemtop:hover* { + margin:4px 2px 0 2px; padding: 3px 10px 3px 5px; background:@theme_selected_bg_color; border-radius:2px; } - .menuitemmiddle:hover>* { - margin:0 2px 0px 2px; + .menuitemmiddle:hover* { + margin:0 2px 0 2px; padding: 3px 10px 3px 5px; background:@theme_selected_bg_color; border-radius:2px; } - .menuitembottom:hover>* { + .menuitembottom:hover* { margin:0 2px 2px 2px; padding: 3px 10px 3px 5px; background:@theme_selected_bg_color; @@ -105,4 +109,26 @@ background:transparent; .boxInfoMessOK{ background-color: #f3f0ac; +} +.errorBox { + border-width: 2px; + border-color: #ea9999; + border-style:solid; +} + +.chosenOutline{ + transition: 0ms; + border-width: 1px; + border-color: #f3f0ac; + border-style:solid; +} + +.debugborders *{ + border-width: 2px; + border-color: #000000; + border-style: solid; +} + +.marginright image{ + margin-right: 2px; } \ No newline at end of file From 14f278883640f71027e93f899a25f3722d8a2445 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 31 Jan 2024 11:31:00 +0600 Subject: [PATCH 3/3] Config loading is threaded --- source/ubl-settings-services.c | 24 ++++++++++++++++++------ source/ubl-settings-services.h | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 84d1626..24aaf4a 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -14,18 +14,20 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ void on_config_local_load(GtkWidget *self,main_window *widgets){ if (self){}; yon_load_proceed(YON_CONFIG_LOCAL); - yon_interface_update(widgets); + yon_ubl_status_box_render(LIST_LOAD_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + g_thread_new("",(GThreadFunc)yon_interface_update,widgets); + main_config.load_mode=1; textdomain(template_ui_LocaleName); - yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); textdomain(LocaleName); } void on_config_global_load(GtkWidget *self,main_window *widgets){ if (self){}; yon_load_proceed(YON_CONFIG_GLOBAL); - yon_interface_update(widgets); + yon_ubl_status_box_render(LIST_LOAD_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + g_thread_new("",(GThreadFunc)yon_interface_update,widgets); + main_config.load_mode=0; textdomain(template_ui_LocaleName); - yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); textdomain(LocaleName); } @@ -378,7 +380,7 @@ void on_update(GtkWidget *self,main_window *widgets){ g_thread_new("",(GThreadFunc)yon_unthreaded_config_load,widgets); } -void yon_interface_update(main_window *widgets){ +void *yon_interface_update(main_window *widgets){ int size; GtkTreeIter iter; gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->MainTree),NULL); @@ -449,7 +451,15 @@ void yon_interface_update(main_window *widgets){ } free(name_parsed); } + textdomain(template_ui_LocaleName); + if (main_config.load_mode){ + yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + } else { + yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + } + textdomain(LocaleName); gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->MainTree),GTK_TREE_MODEL(widgets->liststore2)); + return NULL; } void on_column_resize(GtkTreeViewColumn *self,GParamSpec *pspec,main_window *widgets){ @@ -564,6 +574,7 @@ void config_init(){ main_config.lock_load_global=0; main_config.lock_save_global=0; main_config.lock_save_local=0; + main_config.load_mode=1; } void on_activate(GtkTreeView *self, main_window *widgets){ @@ -659,7 +670,8 @@ void yon_main_window_complete(main_window *widgets){ gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(main_config.BlockedFilter),(GtkTreeModelFilterVisibleFunc)on_blocked_filter,NULL,NULL); gtk_tree_view_set_search_entry(GTK_TREE_VIEW(widgets->MainTree),GTK_ENTRY(widgets->SearchEntry)); yon_load_proceed(YON_CONFIG_LOCAL); - yon_interface_update(widgets); + yon_ubl_status_box_render(LIST_LOAD_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + g_thread_new("",(GThreadFunc)yon_interface_update,widgets); } int main(int argc, char *argv[]){ diff --git a/source/ubl-settings-services.h b/source/ubl-settings-services.h index c66d42f..aca45c8 100644 --- a/source/ubl-settings-services.h +++ b/source/ubl-settings-services.h @@ -181,7 +181,7 @@ void on_config_local_save(); void on_config_global_save(); -void yon_interface_update(main_window *widgets); +void *yon_interface_update(main_window *widgets); GtkWidget *yon_menu_button_create(char *icon_name, char *text);