From f91d15ede49e33341134797240c242a8e64cba32 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 24 Nov 2025 18:01:59 +0600 Subject: [PATCH 1/7] WIP sections settings --- gresource.xml | 1 + source/CMakeLists.txt | 2 + .../ubl-settings-manager-settings-sections.c | 120 ++++++ source/ubl-settings-manager-settings.c | 15 +- source/ubl-settings-manager-theme.c | 2 +- source/ubl-settings-manager.c | 23 +- source/ubl-settings-manager.h | 6 + ubl-settings-manager-section-element.glade | 61 +++ ubl-settings-manager-settings-sections.glade | 382 ++++++++---------- ...settings-manager-theme-gnome-section.glade | 2 + ubl-settings-manager-theme-gnome.glade | 6 +- 11 files changed, 388 insertions(+), 232 deletions(-) create mode 100644 source/ubl-settings-manager-settings-sections.c create mode 100644 ubl-settings-manager-section-element.glade diff --git a/gresource.xml b/gresource.xml index 15ccfb7..a374f64 100644 --- a/gresource.xml +++ b/gresource.xml @@ -7,6 +7,7 @@ ubl-settings-manager-theme-gnome-section.glade ubl-settings-manager-theme-main.glade ubl-settings-manager-settings-sections.glade + ubl-settings-manager-section-element.glade ubl-settings-manager.css diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index ffb5543..bc716e9 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -35,6 +35,7 @@ set(DEPENDFILES ../ubl-settings-manager-theme-gnome-section.glade ../ubl-settings-manager-theme-main.glade ../ubl-settings-manager-settings-sections.glade + ../ubl-settings-manager-section-element.glade ../gresource.xml ../manager-banner.png ../ubl-settings-manager.css @@ -74,6 +75,7 @@ set(SOURCE_FILES ubl-settings-manager-theme.c ubl-settings-manager-theme-gnome.c ubl-settings-manager-app-sections.c + ubl-settings-manager-settings-sections.c ubl-settings-manager.h ubl-strings.h ) diff --git a/source/ubl-settings-manager-settings-sections.c b/source/ubl-settings-manager-settings-sections.c new file mode 100644 index 0000000..359e70d --- /dev/null +++ b/source/ubl-settings-manager-settings-sections.c @@ -0,0 +1,120 @@ +#include "ubl-settings-manager.h" + +typedef struct { + GtkWidget *Window; + GtkWidget *StatusBox; + GtkWidget *SectionsBox; + GtkWidget *NameEntry; + GtkWidget *CategoriesEntry; + GtkWidget *ClearButton; + GtkWidget *AddButton; + GtkWidget *CancelButton; + GtkWidget *SaveButton; + // section_struct *sections; +} settings_section_window; + +typedef struct { + GtkWidget *SectionBox; + GtkWidget *NameEntry; + GtkWidget *CategoriesEntry; + GtkWidget *RemoveButton; + // GtkWidget *AcceptButton; +} section_struct; + +void on_section_remove(GtkWidget *,section_struct *section); +void on_section_add(GtkWidget *,settings_section_window *window); +void on_section_clear(GtkWidget *,settings_section_window *window); +void on_sections_save(GtkWidget *,settings_section_window *window); +section_struct *yon_section_new(); +settings_section_window *yon_section_window_new(); + + +void on_section_remove(GtkWidget *,section_struct *section){ + gtk_widget_destroy(section->SectionBox); +} + +section_struct *yon_section_new(){ + section_struct *section = malloc(sizeof(section_struct)); + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_section_element); + section->SectionBox = yon_gtk_builder_get_widget(builder,"SectionBox"); + section->NameEntry = yon_gtk_builder_get_widget(builder,"NameEntry"); + section->CategoriesEntry = yon_gtk_builder_get_widget(builder,"CategoriesEntry"); + section->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton"); + // section->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton"); + + g_object_set_data(G_OBJECT(section->SectionBox),"section",section); + + g_signal_connect(G_OBJECT(section->RemoveButton),"clicked",G_CALLBACK(on_section_remove),section); + return section; +} + +void on_section_add(GtkWidget *,settings_section_window *window){ + const char *cat_name = gtk_entry_get_text(GTK_ENTRY(window->NameEntry)); + const char *cat_categories = gtk_entry_get_text(GTK_ENTRY(window->CategoriesEntry)); + if (yon_char_is_empty(cat_name)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(window->NameEntry); + return; + } + section_struct *section = yon_section_new(); + gtk_box_pack_start(GTK_BOX(window->SectionsBox),section->SectionBox,0,0,0); + + gtk_entry_set_text(GTK_ENTRY(section->NameEntry),cat_name); + gtk_entry_set_text(GTK_ENTRY(section->CategoriesEntry),cat_categories); + + gtk_entry_set_text(GTK_ENTRY(window->NameEntry),""); + gtk_entry_set_text(GTK_ENTRY(window->CategoriesEntry),""); +} + +void on_section_clear(GtkWidget *,settings_section_window *window){ + gtk_entry_set_text(GTK_ENTRY(window->NameEntry),""); + gtk_entry_set_text(GTK_ENTRY(window->CategoriesEntry),""); +} + +void on_sections_save(GtkWidget *,settings_section_window *window){ + main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets"); + gsize size; + config_str parameters = yon_window_config_get_section(sections_section,&size); + for (gsize i=0;iSectionsBox)); + GList *iter; + for (iter=list;iter;iter=iter->next){ + section_struct *section = g_object_get_data(G_OBJECT(iter->data),"section"); + char *name = (char*)gtk_entry_get_text(GTK_ENTRY(section->NameEntry)); + char *categories = (char*)gtk_entry_get_text(GTK_ENTRY(section->CategoriesEntry)); + yon_window_config_add_instant_parameter(name,sections_section,categories,YON_TYPE_STRING); + } + on_subwindow_close(window->Window); + yon_interface_update(widgets); + +} + +settings_section_window *yon_section_window_new(){ + settings_section_window *window = malloc(sizeof(settings_section_window)); + + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_settings_section); + window->Window = yon_gtk_builder_get_widget(builder,"Window"); + window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox"); + window->SectionsBox = yon_gtk_builder_get_widget(builder,"SectionsBox"); + window->NameEntry = yon_gtk_builder_get_widget(builder,"NameEntry"); + window->CategoriesEntry = yon_gtk_builder_get_widget(builder,"CategoriesEntry"); + window->ClearButton = yon_gtk_builder_get_widget(builder,"ClearButton"); + window->AddButton = yon_gtk_builder_get_widget(builder,"AddButton"); + window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton"); + window->SaveButton = yon_gtk_builder_get_widget(builder,"SaveButton"); + + g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); + g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_sections_save),window); + g_signal_connect(G_OBJECT(window->AddButton),"clicked",G_CALLBACK(on_section_add),window); + g_signal_connect(G_OBJECT(window->ClearButton),"clicked",G_CALLBACK(on_section_clear),window); + return window; +} + +void yon_section_window_open(GtkWidget *, settings_window *settings){ + main_window *widgets = g_object_get_data(G_OBJECT(settings->Window),"widgets"); + settings_section_window *window = yon_section_window_new(); + g_object_set_data(G_OBJECT(window->Window),"widgets",widgets); + yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(settings->Window),TITLE_LABEL,icon_path,"sections_window"); +} \ No newline at end of file diff --git a/source/ubl-settings-manager-settings.c b/source/ubl-settings-manager-settings.c index 07c10e0..21d9acb 100644 --- a/source/ubl-settings-manager-settings.c +++ b/source/ubl-settings-manager-settings.c @@ -16,14 +16,15 @@ gboolean on_settings_size_changed(GtkRange* , GtkScrollType* , gdouble value, se void on_settings_accept(GtkWidget *, settings_window *window){ main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets"); - yon_window_config_add_instant_parameter(icon_size_parameter,"Settings",&window->icon_size,YON_TYPE_INT); + yon_window_config_add_instant_parameter(icon_size_parameter,settings_section,&window->icon_size,YON_TYPE_INT); + main_config.apps_icon_size = window->icon_size; char *cur_theme = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->ThemeCombo)); if (cur_theme) - yon_window_config_add_instant_parameter(theme_parameter,"Settings",cur_theme,YON_TYPE_STRING); + yon_window_config_add_instant_parameter(theme_parameter,settings_section,cur_theme,YON_TYPE_STRING); int double_click = gtk_switch_get_active(GTK_SWITCH(window->DoubleClickSwitch)); - yon_window_config_add_instant_parameter(double_click_parameter,"Settings",&double_click,YON_TYPE_INT); + yon_window_config_add_instant_parameter(double_click_parameter,settings_section,&double_click,YON_TYPE_INT); yon_interface_update(widgets); on_subwindow_close(window->Window); } @@ -53,19 +54,20 @@ settings_window *yon_settings_window_new(){ gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->ThemeCombo),themes[i],themes[i]); } char *theme_id = NULL; - if (yon_window_config_get_parameter("Settings",theme_parameter,&theme_id,YON_TYPE_STRING)){ + if (yon_window_config_get_parameter(settings_section,theme_parameter,&theme_id,YON_TYPE_STRING)){ gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->ThemeCombo),theme_id); } else { gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->ThemeCombo),GNOME_THEME_LABEL); } window->icon_size; - if (!yon_window_config_get_parameter("Settings",icon_size_parameter,&window->icon_size,YON_TYPE_INT)){ + if (!yon_window_config_get_parameter(settings_section,icon_size_parameter,&window->icon_size,YON_TYPE_INT)){ window->icon_size=32; } gtk_range_set_value(GTK_RANGE(window->SizeSlider),window->icon_size); + on_settings_size_changed(NULL,NULL,window->icon_size,window); int double_click_activate; - if (!yon_window_config_get_parameter("Settings",double_click_parameter,&double_click_activate,YON_TYPE_BOOLEAN)){ + if (!yon_window_config_get_parameter(settings_section,double_click_parameter,&double_click_activate,YON_TYPE_BOOLEAN)){ double_click_activate=0; } gtk_switch_set_active(GTK_SWITCH(window->DoubleClickSwitch),double_click_activate); @@ -75,6 +77,7 @@ settings_window *yon_settings_window_new(){ void on_settings_open(GtkWidget *, main_window *widgets){ settings_window *window = yon_settings_window_new(); + g_signal_connect(G_OBJECT(window->SectionsConfigurationButton),"clicked",G_CALLBACK(yon_section_window_open),window); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"settings_window"); gtk_widget_show(window->Window); g_object_set_data(G_OBJECT(window->Window),"widgets",widgets); diff --git a/source/ubl-settings-manager-theme.c b/source/ubl-settings-manager-theme.c index 4eee16f..b4365a6 100644 --- a/source/ubl-settings-manager-theme.c +++ b/source/ubl-settings-manager-theme.c @@ -2,7 +2,7 @@ theme_struct *yon_theme_update(main_window *widgets){ char *theme_id; - if (!yon_window_config_get_parameter("Settings","theme",&theme_id,YON_TYPE_STRING)){ + if (!yon_window_config_get_parameter(settings_section,theme_parameter,&theme_id,YON_TYPE_STRING)){ theme_id = yon_char_new(GNOME_THEME_LABEL); } diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index 2cee476..9c75884 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -337,13 +337,13 @@ void on_reveal_banner(GtkWidget *, main_window *widgets){ gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),0); gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),GTK_ARROW_RIGHT); int banner = 1; - yon_window_config_add_instant_parameter(hide_banner_parameter,"Settings",&banner,YON_TYPE_BOOLEAN); + yon_window_config_add_instant_parameter(hide_banner_parameter,settings_section,&banner,YON_TYPE_BOOLEAN); } else { gtk_revealer_set_transition_type(GTK_REVEALER(widgets->BannerRevealer),GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT); gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),1); gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),GTK_ARROW_LEFT); int banner = 0; - yon_window_config_add_instant_parameter(hide_banner_parameter,"Settings",&banner,YON_TYPE_BOOLEAN); + yon_window_config_add_instant_parameter(hide_banner_parameter,settings_section,&banner,YON_TYPE_BOOLEAN); } } @@ -432,18 +432,19 @@ void config_init(){ main_config.double_click=0; main_config.apps_icon_size=24; main_config.labelDensity=0; - main_config.themes = g_hash_table_new(g_str_hash,g_str_equal); - yon_theme_init(); }; void yon_config_update(){ - if (!yon_window_config_get_parameter("Setings",double_click_parameter,&main_config.double_click,YON_TYPE_INT)){ + if (!yon_window_config_get_parameter(settings_section,double_click_parameter,&main_config.double_click,YON_TYPE_INT)){ main_config.double_click=0; } - if (!yon_window_config_get_parameter("Setings",icon_size_parameter,&main_config.apps_icon_size,YON_TYPE_INT)){ + if (!yon_window_config_get_parameter(settings_section,icon_size_parameter,&main_config.apps_icon_size,YON_TYPE_INT)){ main_config.apps_icon_size=24; } + + main_config.themes = g_hash_table_new(g_str_hash,g_str_equal); + yon_theme_init(); } int yon_char_parsed_compare(const void *a, const void *b){ @@ -528,14 +529,14 @@ void yon_interface_update(main_window *widgets){ } gsize size; - config_str section_settings = yon_window_config_get_section("Sections",&size); + config_str section_settings = yon_window_config_get_section(sections_section,&size); if (size){ for (gsize i=0;iname = yon_char_new(section_settings[i]); char *categories = NULL; - yon_window_config_get_parameter("Sections",cur_section->name,&categories,YON_TYPE_STRING); + yon_window_config_get_parameter(sections_section,cur_section->name,&categories,YON_TYPE_STRING); cur_section->categories = yon_char_parse(categories,&cur_section->categories_size,";"); yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section); } @@ -604,14 +605,15 @@ main_window *yon_main_window_setup(){ char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); yon_window_config_load(path); free(path); + config_init(); + yon_config_update(); { int banner_hidden = 0; - yon_window_config_get_parameter("Settings",hide_banner_parameter, &banner_hidden,YON_TYPE_BOOLEAN); + yon_window_config_get_parameter(settings_section,hide_banner_parameter, &banner_hidden,YON_TYPE_BOOLEAN); gtk_revealer_set_transition_type(GTK_REVEALER(widgets->BannerRevealer),!banner_hidden?GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT:GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT); gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),!banner_hidden); gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),!banner_hidden?GTK_ARROW_LEFT:GTK_ARROW_RIGHT); } - gtk_widget_show(widgets->Window); yon_interface_update(widgets); return widgets; @@ -641,7 +643,6 @@ int main(int argc, char *argv[]){ } } gtk_init(&argc, &argv); - config_init(); main_window *widgets = yon_main_window_setup(); GtkCssProvider *css=gtk_css_provider_new(); diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index 783c4e5..a721735 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -38,6 +38,8 @@ #define glade_path_gnome_section "/com/ublinux/ui/ubl-settings-manager-theme-gnome-section.glade" #define glade_path_main_theme "/com/ublinux/ui/ubl-settings-manager-theme-main.glade" #define glade_path_settings "/com/ublinux/ui/ubl-settings-manager-settings.glade" +#define glade_path_settings_section "/com/ublinux/ui/ubl-settings-manager-settings-sections.glade" +#define glade_path_section_element "/com/ublinux/ui/ubl-settings-manager-section-element.glade" #define CssPath "/com/ublinux/css/ubl-settings-manager.css" #define GlobalConfigPath "/etc/xdg/ubl-settings-manager/ubl-settings-manager.conf" #define UserConfigPath "/.config/ubl-settings-manager/ubl-settings-manager.conf" @@ -53,6 +55,9 @@ #define launch_command(target) yon_char_unite("xdg-open ",target,NULL) #define launch_args_command(main_socket,load_socket,save_socket) yon_char_unite("--socket-id=",main_socket," --socket-ext-id=",save_socket," --socket-trd-id=",load_socket,NULL) +#define settings_section "Settings" +#define sections_section "Sections" + #define double_click_parameter "double_click" #define icon_size_parameter "icon_size" #define theme_parameter "theme" @@ -222,5 +227,6 @@ int yon_char_parsed_compare(const void *a, const void *b); void yon_interface_update(main_window *widgets); void on_settings_open(GtkWidget *, main_window *widgets); +void yon_section_window_open(GtkWidget *, settings_window *settings); #endif \ No newline at end of file diff --git a/ubl-settings-manager-section-element.glade b/ubl-settings-manager-section-element.glade new file mode 100644 index 0000000..6493942 --- /dev/null +++ b/ubl-settings-manager-section-element.glade @@ -0,0 +1,61 @@ + + + + + + True + False + 5 + + + True + False + 15 + True + False + name + + + True + True + 0 + + + + + True + False + 25 + False + + + True + True + 1 + + + + + True + True + True + center + image2 + + + + False + True + 2 + + + + + True + False + 16 + com.ublinux.libublsettingsui-gtk3.trash-symbolic + + diff --git a/ubl-settings-manager-settings-sections.glade b/ubl-settings-manager-settings-sections.glade index 2fa7881..406f7ce 100644 --- a/ubl-settings-manager-settings-sections.glade +++ b/ubl-settings-manager-settings-sections.glade @@ -3,245 +3,198 @@ - + + True + False + 16 + com.ublinux.libublsettingsui-gtk3.funnel-symbolic + + + True + False + 16 + com.ublinux.libublsettingsui-gtk3.accept-symbolic + + + True + False + com.ublinux.libublsettingsui-gtk3.cancel-uncolored-symbolic + + + True False - 800 - 600 + com.ublinux.libublsettingsui-gtk3.accept-symbolic + + + 450 + 350 + True + False + True + com.ublinux.ubl-settings-manager True False vertical + 5 - + True - True - 5 - 5 + False + vertical + + + + + + False + True + 0 + + + + + True + False 5 5 - 5 5 - in + vertical + 5 - + True - False + True + in - + True False - vertical - + True False - 5 - 5 5 5 5 5 vertical + 5 - - False - True - 0 - + + + + + True + True + 0 + + + + + True + False + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + 5 - + True False - 5 - 5 - 5 - 5 - 0.019999999552965164 - in + 5 - + True - False - 3 - 3 - 5 - 5 - - - True - False - - - True - True - True - center - 3 - 3 - image2 - - - False - True - 0 - - - - - True - True - True - False - Section name - name - - - True - True - 1 - - - - - True - False - - - True - False - center - - - True - True - True - 5 - 5 - image4 - - - False - True - end - 2 - - - - - True - False - 2 - - - True - True - 5 - 10 - 5 - 10 - False - Identifier - - - True - True - 0 - - - - - True - True - 2 - - - - - True - True - 1 - - - - - True - True - 2 - - - - + True + 15 + True + False + Section name + name + + True + True + 0 + - - + + + True + True + 25 + False + Identifier + + + True + True + 1 + + + + + True + True + True + center + image2 + + + + False + True + 2 + + + + + True + True + True + image4 + + + + False + True + end + 3 + - - False - True - 1 - - - - - - True - True - 0 - - - - - True - False - - - Save and apply - True - True - True - 5 - 5 - 5 - image7 - - - False - True - end - 0 - - - - - Close - True - True - True - 15 - 15 - 5 - image6 + + + False True - end 1 - False + True True 1 @@ -249,11 +202,11 @@ - + True False - + True False UBLinux Settings Manager @@ -271,29 +224,32 @@ 5 + + + Cancel + True + True + True + image6 + + + 1 + + + + + Apply + True + True + True + image7 + + + end + 2 + + - - True - False - 16 - user-trash-symbolic - - - True - False - 16 - object-select-symbolic - - - True - False - process-stop-symbolic - - - True - False - emblem-ok-symbolic - diff --git a/ubl-settings-manager-theme-gnome-section.glade b/ubl-settings-manager-theme-gnome-section.glade index 600e2c4..b7ecb20 100644 --- a/ubl-settings-manager-theme-gnome-section.glade +++ b/ubl-settings-manager-theme-gnome-section.glade @@ -6,6 +6,8 @@ True True + True + True True diff --git a/ubl-settings-manager-theme-gnome.glade b/ubl-settings-manager-theme-gnome.glade index 249c798..f2d2ac0 100644 --- a/ubl-settings-manager-theme-gnome.glade +++ b/ubl-settings-manager-theme-gnome.glade @@ -28,11 +28,15 @@ True True - in True False + 5 + 5 + 5 + 5 + none True -- 2.35.1 From 775c5b2555edc648e83f50a0396605fd2e61f190 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 25 Nov 2025 17:15:06 +0600 Subject: [PATCH 2/7] WIP main theme; Fixes --- gresource.xml | 1 + source/CMakeLists.txt | 2 + .../ubl-settings-manager-settings-sections.c | 72 ++++++- source/ubl-settings-manager-theme-gnome.c | 6 +- source/ubl-settings-manager-theme-main.c | 200 ++++++++++++++++++ source/ubl-settings-manager-theme.c | 31 +-- source/ubl-settings-manager.h | 3 +- ubl-settings-manager-section-element.glade | 16 +- ubl-settings-manager-settings-sections.glade | 53 ++++- ubl-settings-manager-theme-gnome.glade | 83 +++++--- ubl-settings-manager-theme-main-section.glade | 56 +++++ ubl-settings-manager-theme-main.glade | 28 ++- ubl-settings-manager.css | 5 + ubl-settings-manager.glade | 119 +---------- 14 files changed, 460 insertions(+), 215 deletions(-) create mode 100644 source/ubl-settings-manager-theme-main.c create mode 100644 ubl-settings-manager-theme-main-section.glade diff --git a/gresource.xml b/gresource.xml index a374f64..d804f02 100644 --- a/gresource.xml +++ b/gresource.xml @@ -6,6 +6,7 @@ ubl-settings-manager-theme-gnome.glade ubl-settings-manager-theme-gnome-section.glade ubl-settings-manager-theme-main.glade + ubl-settings-manager-theme-main-section.glade ubl-settings-manager-settings-sections.glade ubl-settings-manager-section-element.glade diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index bc716e9..1198fd8 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -35,6 +35,7 @@ set(DEPENDFILES ../ubl-settings-manager-theme-gnome-section.glade ../ubl-settings-manager-theme-main.glade ../ubl-settings-manager-settings-sections.glade + ../ubl-settings-manager-theme-main-section.glade ../ubl-settings-manager-section-element.glade ../gresource.xml ../manager-banner.png @@ -74,6 +75,7 @@ set(SOURCE_FILES ubl-settings-manager-settings.c ubl-settings-manager-theme.c ubl-settings-manager-theme-gnome.c + ubl-settings-manager-theme-main.c ubl-settings-manager-app-sections.c ubl-settings-manager-settings-sections.c ubl-settings-manager.h diff --git a/source/ubl-settings-manager-settings-sections.c b/source/ubl-settings-manager-settings-sections.c index 359e70d..04c965b 100644 --- a/source/ubl-settings-manager-settings-sections.c +++ b/source/ubl-settings-manager-settings-sections.c @@ -3,6 +3,7 @@ typedef struct { GtkWidget *Window; GtkWidget *StatusBox; + GtkWidget *DefaultSwitch; GtkWidget *SectionsBox; GtkWidget *NameEntry; GtkWidget *CategoriesEntry; @@ -50,7 +51,12 @@ section_struct *yon_section_new(){ void on_section_add(GtkWidget *,settings_section_window *window){ const char *cat_name = gtk_entry_get_text(GTK_ENTRY(window->NameEntry)); - const char *cat_categories = gtk_entry_get_text(GTK_ENTRY(window->CategoriesEntry)); + char *cat_categories = yon_char_new(gtk_entry_get_text(GTK_ENTRY(window->CategoriesEntry))); + if (cat_categories[strlen(cat_categories)-1]!=';') { + char *temp = yon_char_append_c(cat_categories,';'); + free(cat_categories); + cat_categories = temp; + } if (yon_char_is_empty(cat_name)){ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(window->NameEntry); @@ -64,6 +70,7 @@ void on_section_add(GtkWidget *,settings_section_window *window){ gtk_entry_set_text(GTK_ENTRY(window->NameEntry),""); gtk_entry_set_text(GTK_ENTRY(window->CategoriesEntry),""); + free(cat_categories); } void on_section_clear(GtkWidget *,settings_section_window *window){ @@ -78,25 +85,51 @@ void on_sections_save(GtkWidget *,settings_section_window *window){ for (gsize i=0;iSectionsBox)); - GList *iter; - for (iter=list;iter;iter=iter->next){ - section_struct *section = g_object_get_data(G_OBJECT(iter->data),"section"); - char *name = (char*)gtk_entry_get_text(GTK_ENTRY(section->NameEntry)); - char *categories = (char*)gtk_entry_get_text(GTK_ENTRY(section->CategoriesEntry)); - yon_window_config_add_instant_parameter(name,sections_section,categories,YON_TYPE_STRING); + if (!gtk_switch_get_active(GTK_SWITCH(window->DefaultSwitch))){ + GList *list = gtk_container_get_children(GTK_CONTAINER(window->SectionsBox)); + GList *iter; + for (iter=list;iter;iter=iter->next){ + section_struct *section = g_object_get_data(G_OBJECT(iter->data),"section"); + char *name = (char*)gtk_entry_get_text(GTK_ENTRY(section->NameEntry)); + char *categories = (char*)gtk_entry_get_text(GTK_ENTRY(section->CategoriesEntry)); + yon_window_config_add_instant_parameter(name,sections_section,categories,YON_TYPE_STRING); + } } on_subwindow_close(window->Window); yon_interface_update(widgets); } +void yon_section_window_add_default(settings_section_window *window){ + + section_struct *cur_section = yon_section_new(); + gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),"Personal"); + gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-PersonalSettings;"); + + cur_section = yon_section_new(); + gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),"Hardware"); + gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-HardwareSettings;"); + + cur_section = yon_section_new(); + gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),"System"); + gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-SystemSettings;"); + + cur_section = yon_section_new(); + gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),"Misc"); + gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),""); +} + settings_section_window *yon_section_window_new(){ settings_section_window *window = malloc(sizeof(settings_section_window)); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_settings_section); window->Window = yon_gtk_builder_get_widget(builder,"Window"); window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox"); + window->DefaultSwitch = yon_gtk_builder_get_widget(builder,"DefaultSwitch"); window->SectionsBox = yon_gtk_builder_get_widget(builder,"SectionsBox"); window->NameEntry = yon_gtk_builder_get_widget(builder,"NameEntry"); window->CategoriesEntry = yon_gtk_builder_get_widget(builder,"CategoriesEntry"); @@ -109,6 +142,29 @@ settings_section_window *yon_section_window_new(){ g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_sections_save),window); g_signal_connect(G_OBJECT(window->AddButton),"clicked",G_CALLBACK(on_section_add),window); g_signal_connect(G_OBJECT(window->ClearButton),"clicked",G_CALLBACK(on_section_clear),window); + g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->SectionsBox); + g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->NameEntry); + g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->CategoriesEntry); + g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->AddButton); + g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->ClearButton); + + gsize parameters_size; + config_str parameters = NULL; + parameters = yon_window_config_get_section(sections_section,¶meters_size); + if (parameters_size){ + for (gsize i=0;iSectionsBox),cur_section->SectionBox,0,0,0); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),parameters[i]); + gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),param); + + } + } else { + gtk_switch_set_active(GTK_SWITCH(window->DefaultSwitch),1); + yon_section_window_add_default(window); + } return window; } diff --git a/source/ubl-settings-manager-theme-gnome.c b/source/ubl-settings-manager-theme-gnome.c index 16eee5a..2b194ee 100644 --- a/source/ubl-settings-manager-theme-gnome.c +++ b/source/ubl-settings-manager-theme-gnome.c @@ -63,6 +63,9 @@ gnome_section *yon_gnome_section_new(){ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_gnome_section); cur_section->expander = yon_gtk_builder_get_widget(builder,"MainExpander"); cur_section->AppsList = yon_gtk_builder_get_widget(builder,"AppsList"); + int doubleclick=0; + yon_window_config_get_parameter(settings_section,double_click_parameter,&doubleclick,YON_TYPE_BOOLEAN); + gtk_list_box_set_activate_on_single_click(GTK_LIST_BOX(cur_section->AppsList),!doubleclick); return cur_section; } @@ -85,6 +88,8 @@ void yon_gnome_section_setup_apps(gnome_section *cur_section, const char *target gtk_box_pack_start(GTK_BOX(Box),Image,0,0,0); gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0); gtk_label_set_xalign(GTK_LABEL(Label),0); + gtk_label_set_line_wrap(GTK_LABEL(Label),1); + gtk_label_set_line_wrap_mode(GTK_LABEL(Label),PANGO_WRAP_WORD); gtk_list_box_insert(GTK_LIST_BOX(cur_section->AppsList),Row,-1); g_object_set_data(G_OBJECT(Row),"gnome_section",cur_section); @@ -118,7 +123,6 @@ int yon_gnome_update(gnome_theme_struct *theme){ free(cur_section); } - int size; dictionary *cur; for_dictionaries(cur,main_config.sections){ app_section *section_data = yon_dictionary_get_data(cur,app_section*); diff --git a/source/ubl-settings-manager-theme-main.c b/source/ubl-settings-manager-theme-main.c new file mode 100644 index 0000000..5b42271 --- /dev/null +++ b/source/ubl-settings-manager-theme-main.c @@ -0,0 +1,200 @@ +#include "ubl-settings-manager.h" + +typedef struct { + GtkWidget *expander; + GtkWidget *MainLabel; + GtkWidget *AppsList; + app_section *section; +} main_section; + + +void on_main_plug_connected(GtkWidget *,main_theme_struct *theme){ + gtk_widget_show(theme->SocketBox); + gtk_widget_hide(theme->HideBox); +} + +void on_main_plug_disconnected(GtkWidget *,main_theme_struct *theme){ + gtk_widget_show(theme->HideBox); + gtk_widget_hide(theme->SocketBox); + on_plug_disconnected(GTK_SOCKET(theme->Socket),main_config.widgets); +} + +void on_main_selected(GtkWidget* self, main_theme_struct *theme); +void on_main_selected(GtkWidget* self, main_theme_struct *theme){ + GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree)); + GList *iter; + for (iter=list;iter;iter=iter->next){ + main_section *cur_section = g_object_get_data(G_OBJECT(iter->data),"main_section"); + if (cur_section->AppsList != self){ + g_signal_handlers_block_by_func(G_OBJECT(cur_section->AppsList),G_CALLBACK(on_main_selected),theme); + GList *flowlist = gtk_flow_box_get_selected_children(GTK_FLOW_BOX(cur_section->AppsList)); + if (flowlist){ + gtk_flow_box_unselect_child(GTK_FLOW_BOX(cur_section->AppsList),GTK_FLOW_BOX_CHILD(flowlist->data)); + g_list_free(flowlist); + } + g_signal_handlers_unblock_by_func(G_OBJECT(cur_section->AppsList),G_CALLBACK(on_main_selected),theme); + } + } +} + +void on_main_activate(GtkFlowBox* self, GtkFlowBoxChild* child, main_theme_struct *theme){ + theme->Socket = GTK_WIDGET(yon_sockets_init(GTK_BOX(theme->SocketBox))); + g_signal_connect(G_OBJECT(theme->Socket),"plug_added",G_CALLBACK(on_main_plug_connected),theme); + g_signal_connect(G_OBJECT(theme->Socket),"destroy",G_CALLBACK(on_main_plug_disconnected),theme); + apps *cur_app = g_object_get_data(G_OBJECT(child),"apps"); + char *command = cur_app->Exec;//launch_command(cur_app->Desktop_path); + char *command_args = NULL; + if (cur_app->DualPluggable==1){ + char *save_socket = yon_get_save_socket(); + char *load_socket = yon_get_load_socket(); + char *main_socket_id = yon_char_from_long((long)gtk_socket_get_id(GTK_SOCKET(theme->Socket))); + command_args = launch_args_command(main_socket_id,load_socket,save_socket); + } else if (cur_app->Pluggable){ + char *main_socket_id = yon_char_from_long((long)gtk_socket_get_id(GTK_SOCKET(theme->Socket))); + command_args = yon_char_unite("--socket-id=",main_socket_id,NULL); + + } + yon_launch_app_with_arguments(command,command_args); +} + +void on_main_socket_add(){ + +} + +void yon_main_section_setup_apps(main_section *cur_section, const char *target){ + if (yon_char_is_empty(target)) return; + apps *cur_app = yon_apps_get((char*)target); + GtkIconInfo *info = gtk_icon_theme_lookup_icon_for_scale(gtk_icon_theme_get_default(), !yon_char_is_empty(cur_app->Icon)?cur_app->Icon:icon_path, main_config.apps_icon_size,1,GTK_ICON_LOOKUP_FORCE_SIZE); + GtkWidget *Image = NULL; + if (info){ + Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL)); + } else { + info = gtk_icon_theme_lookup_icon_for_scale(gtk_icon_theme_get_default(), icon_path, main_config.apps_icon_size,1,GTK_ICON_LOOKUP_FORCE_SIZE); + Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL)); + + } + + char *name = yon_char_wrap_to_length_str(cur_app->Name,20); + + GtkWidget *Row = gtk_flow_box_child_new(); + GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); + GtkWidget *Label = gtk_label_new(name); + GtkWidget *Icon = Image; + + gtk_box_pack_start(GTK_BOX(Box),Icon,0,0,0); + gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0); + gtk_container_add(GTK_CONTAINER(Row),Box); + gtk_flow_box_insert(GTK_FLOW_BOX(cur_section->AppsList),Row,-1); + + gtk_widget_set_size_request(Row,50,50); + + gtk_widget_set_halign(Box,GTK_ALIGN_START); + gtk_widget_set_valign(Box,GTK_ALIGN_CENTER); + + gtk_label_set_line_wrap_mode(GTK_LABEL(Label),PANGO_WRAP_WORD); + gtk_label_set_line_wrap(GTK_LABEL(Label),1); + gtk_label_set_xalign(GTK_LABEL(Label),0); + + g_object_set_data(G_OBJECT(Row),"main_section",cur_section); + g_object_set_data(G_OBJECT(Row),"apps",cur_app); + g_object_set_data(G_OBJECT(Row),"Label",Label); + + gtk_widget_show_all(Row); +} + +main_section *yon_main_section_new(){ + main_section *cur_section = malloc(sizeof(main_section)); + memset(cur_section,0,sizeof(cur_section)); + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_main_section); + cur_section->expander = yon_gtk_builder_get_widget(builder,"MainExpander"); + cur_section->MainLabel = yon_gtk_builder_get_widget(builder,"MainLabel"); + cur_section->AppsList = yon_gtk_builder_get_widget(builder,"AppsFlow"); + g_object_set_data(G_OBJECT(cur_section->expander),"main_section",cur_section); + int doubleclick=0; + yon_window_config_get_parameter(settings_section,double_click_parameter,&doubleclick,YON_TYPE_BOOLEAN); + gtk_flow_box_set_activate_on_single_click(GTK_FLOW_BOX(cur_section->AppsList),!doubleclick); + return cur_section; +} + +void yon_main_section_setup(main_theme_struct *theme, app_section *section){ + main_section *cur_section = yon_main_section_new(); + cur_section->section = section; + gtk_label_set_text(GTK_LABEL(cur_section->MainLabel),section->name); + int app_size; + config_str app_list = yon_apps_get_by_categories(section->categories,section->categories_size,&app_size); + for(int i=0;iAppsTree),cur_section->expander,0,0,0); + g_object_set_data(G_OBJECT(cur_section->expander),"main_section",cur_section); + g_signal_connect(G_OBJECT(cur_section->AppsList),"child-activated",G_CALLBACK(on_main_activate),theme); + g_signal_connect(G_OBJECT(cur_section->AppsList),"selected-children-changed",G_CALLBACK(on_main_selected),theme); + +} + +void yon_main_section_get_max_size(main_section *section, int *ret_width, int *ret_height){ + GList *list = gtk_container_get_children(GTK_CONTAINER(section->AppsList)); + GList *iter; + for (iter = list; iter;iter=iter->next){ + gtk_widget_realize(GTK_WIDGET(iter->data)); + int width; + int height; + GtkWidget *Label = g_object_get_data(G_OBJECT(iter->data),"Label"); + + gtk_widget_get_preferred_width(Label,NULL,&width); + gtk_widget_get_preferred_height(Label,NULL,&height); + if ((*ret_width)AppsTree)); + GList *iter; + int max_width=0; + int max_height=0; + for (iter=list;iter;iter=iter->next){ + main_section *section = g_object_get_data(G_OBJECT(iter->data),"main_section"); + yon_main_section_get_max_size(section,&max_width,&max_height); + } + for (iter=list;iter;iter=iter->next){ + main_section *section = g_object_get_data(G_OBJECT(iter->data),"main_section"); + GList *child_list = gtk_container_get_children(GTK_CONTAINER(section->AppsList)); + if (child_list){ + GtkWidget *Label = g_object_get_data(G_OBJECT(child_list->data),"Label"); + gtk_widget_set_size_request(Label,max_width,max_height); + } + } +} + +void yon_main_update(main_theme_struct *theme){ + GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree)); + GList *iter; + for (iter=list;iter;iter->next){ + gtk_widget_destroy(GTK_WIDGET(iter->data)); + } + + dictionary *cur; + for_dictionaries(cur,main_config.sections){ + app_section *section_data = yon_dictionary_get_data(cur,app_section*); + yon_main_section_setup(theme,section_data); + } + + yon_main_theme_resize(theme); +} + +main_theme_struct *yon_main_theme_new(){ + main_theme_struct *theme = malloc(sizeof(main_theme_struct)); + + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_main_theme); + theme->MainBox = yon_gtk_builder_get_widget(builder,"MainBox"); + theme->AppsTree = yon_gtk_builder_get_widget(builder,"AppsTree"); + theme->SocketBox = yon_gtk_builder_get_widget(builder,"SocketBox"); + theme->HideBox = yon_gtk_builder_get_widget(builder,"HideBox"); + theme->theme_name = yon_char_new(MAIN_THEME_LABEL); + theme->Socket = NULL; + theme->list_update_func = (int(*)(struct main_theme_struct*))yon_main_update; + + g_signal_connect(G_OBJECT(theme->SocketBox),"add",G_CALLBACK(on_main_socket_add),theme); + return theme; +} diff --git a/source/ubl-settings-manager-theme.c b/source/ubl-settings-manager-theme.c index b4365a6..501d6df 100644 --- a/source/ubl-settings-manager-theme.c +++ b/source/ubl-settings-manager-theme.c @@ -29,33 +29,4 @@ void yon_theme_init(){ // theme_struct *main_struct = (theme_struct*)yon_main_theme_new(); g_hash_table_insert(main_config.themes,yon_char_new(GNOME_THEME_LABEL),yon_gnome_theme_new); g_hash_table_insert(main_config.themes,yon_char_new(MAIN_THEME_LABEL),yon_main_theme_new); -} - -void yon_main_update(main_theme_struct *theme){ - -} - -void on_main_activate(){ - -} - -void on_main_socket_add(){ - -} - -main_theme_struct *yon_main_theme_new(){ - main_theme_struct *theme = malloc(sizeof(main_theme_struct)); - - GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_main_theme); - theme->MainBox = yon_gtk_builder_get_widget(builder,"MainBox"); - theme->AppsIconView = yon_gtk_builder_get_widget(builder,"AppsIconView"); - theme->SocketBox = yon_gtk_builder_get_widget(builder,"SocketBox"); - theme->AppsList = GTK_LIST_STORE(gtk_builder_get_object(builder,"AppsList")); - theme->theme_name = yon_char_new(MAIN_THEME_LABEL); - theme->Socket = NULL; - theme->list_update_func = (int(*)(struct main_theme_struct*))yon_main_update; - - g_signal_connect(G_OBJECT(theme->AppsIconView),"item-activated",G_CALLBACK(on_main_activate),theme); - g_signal_connect(G_OBJECT(theme->SocketBox),"add",G_CALLBACK(on_main_socket_add),theme); - return theme; -} +} \ No newline at end of file diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index a721735..5b7b4c2 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -36,6 +36,7 @@ #define glade_path "/com/ublinux/ui/ubl-settings-manager.glade" #define glade_path_gnome_theme "/com/ublinux/ui/ubl-settings-manager-theme-gnome.glade" #define glade_path_gnome_section "/com/ublinux/ui/ubl-settings-manager-theme-gnome-section.glade" +#define glade_path_main_section "/com/ublinux/ui/ubl-settings-manager-theme-main-section.glade" #define glade_path_main_theme "/com/ublinux/ui/ubl-settings-manager-theme-main.glade" #define glade_path_settings "/com/ublinux/ui/ubl-settings-manager-settings.glade" #define glade_path_settings_section "/com/ublinux/ui/ubl-settings-manager-settings-sections.glade" @@ -141,7 +142,7 @@ typedef struct main_theme_struct { GtkWidget *SocketBox; GtkWidget *HideBox; int (*list_update_func)(struct main_theme_struct*); - GtkWidget *AppsIconView; + GtkWidget *AppsTree; GtkWidget *Socket; GtkListStore *AppsList; } main_theme_struct; diff --git a/ubl-settings-manager-section-element.glade b/ubl-settings-manager-section-element.glade index 6493942..8cd8823 100644 --- a/ubl-settings-manager-section-element.glade +++ b/ubl-settings-manager-section-element.glade @@ -2,6 +2,12 @@ + + True + False + 16 + com.ublinux.libublsettingsui-gtk3.trash-symbolic + True False @@ -16,7 +22,7 @@ name - True + False True 0 @@ -25,7 +31,7 @@ True False - 25 + 0 False @@ -52,10 +58,4 @@ - - True - False - 16 - com.ublinux.libublsettingsui-gtk3.trash-symbolic - diff --git a/ubl-settings-manager-settings-sections.glade b/ubl-settings-manager-settings-sections.glade index 406f7ce..91314f9 100644 --- a/ubl-settings-manager-settings-sections.glade +++ b/ubl-settings-manager-settings-sections.glade @@ -62,6 +62,43 @@ 5 vertical 5 + + + True + False + 5 + 5 + 5 + + + True + True + + + False + True + 0 + + + + + True + False + Default + + + False + True + 1 + + + + + False + True + 0 + + True @@ -71,14 +108,14 @@ True False + 5 + 5 + 5 + 5 True False - 5 - 5 - 5 - 5 vertical 5 @@ -92,7 +129,7 @@ True True - 0 + 1 @@ -125,7 +162,7 @@ name - True + False True 0 @@ -134,7 +171,7 @@ True True - 25 + 0 False Identifier @@ -189,7 +226,7 @@ False True - 1 + 2 diff --git a/ubl-settings-manager-theme-gnome.glade b/ubl-settings-manager-theme-gnome.glade index f2d2ac0..28dc32f 100644 --- a/ubl-settings-manager-theme-gnome.glade +++ b/ubl-settings-manager-theme-gnome.glade @@ -25,57 +25,71 @@ True True - + True - True + False + 5 + 5 + 5 + 5 + vertical + 5 - + True - False - 5 - 5 - 5 - 5 - none + True + 0 + edit-find-symbolic + False + False + + + False + True + 0 + + + + + True + True - + True False - vertical - 5 + none - - True - True - edit-find-symbolic - False - False - - - False - True - 0 - - - - + True False vertical 5 - + + True + False + vertical + 5 + + + + + + True + True + 1 + - - True - True - 1 - + + True + True + 1 + @@ -168,6 +182,9 @@ True + True diff --git a/ubl-settings-manager-theme-main-section.glade b/ubl-settings-manager-theme-main-section.glade new file mode 100644 index 0000000..36f79fa --- /dev/null +++ b/ubl-settings-manager-theme-main-section.glade @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + True + False + vertical + + + True + False + label + 0 + + + + + + + False + True + 0 + + + + + True + False + start + True + 5 + 5 + 15 + browse + False + + + False + True + 1 + + + + diff --git a/ubl-settings-manager-theme-main.glade b/ubl-settings-manager-theme-main.glade index 306a248..72717ed 100644 --- a/ubl-settings-manager-theme-main.glade +++ b/ubl-settings-manager-theme-main.glade @@ -3,7 +3,6 @@ - True False @@ -15,20 +14,27 @@ vertical - 5 - 5 True True - immediate - never - always in - + True - True - 6 - AppsList + False + 5 + 5 + 5 + 5 + + + True + False + vertical + + + + + @@ -57,7 +63,7 @@ - False + True True 1 diff --git a/ubl-settings-manager.css b/ubl-settings-manager.css index a042536..8cc8f3b 100644 --- a/ubl-settings-manager.css +++ b/ubl-settings-manager.css @@ -10,6 +10,11 @@ border-style: solid; } + +.titlelabel { + color: @theme_bg_color; +} + .nobackground { background:transparent; } diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index 3ed6809..b907e4b 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -3,111 +3,6 @@ - - False - False - dialog-information-symbolic - False - - - True - False - vertical - - - True - False - - - True - False - center - start - 20 - 20 - 20 - 20 - dialog-information-symbolic - 6 - - - False - True - 0 - - - - - True - False - center - start - 10 - 25 - 20 - 20 - Changing the theme is not available due to the small screen resolution! - True - 0 - - - True - True - 1 - - - - - True - True - 0 - - - - - Understood - True - True - True - 5 - 5 - 5 - 5 - - - False - True - 2 - - - - - - - True - False - - - True - False - UBLinux Settings Manager - - - - - - - - True - False - 32 - dialog-information-symbolic - 5 - - - - - True False @@ -164,7 +59,6 @@ True False - 5 True @@ -249,9 +143,7 @@ True False - 5 vertical - 5 True @@ -269,17 +161,11 @@ - Icon True False - 5 - True @@ -346,7 +232,10 @@ True False - com.ublinux.libublsettingsui-gtk3.pan-left + com.ublinux.libublsettingsui-gtk3.pan-left-symbolic + False -- 2.35.1 From 88726b5ff1994847142ac79f80b8c23d6de3adb7 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 25 Nov 2025 18:16:03 +0600 Subject: [PATCH 3/7] Localisation; Documentation dialog fix; About dialog fix --- Makefile | 80 +++--- .../apps/com.ublinux.ubl-settings-manager.svg | 0 locale/ubl-settings-manager.pot | 145 +++++++++++ locale/ubl-settings-manager_ru.po | 146 +++++++++++ source/CMakeLists.txt | 1 + source/ubl-settings-manager-misc.c | 69 +++++ .../ubl-settings-manager-settings-sections.c | 8 +- source/ubl-settings-manager-theme-gnome.c | 27 ++ source/ubl-settings-manager.c | 12 +- source/ubl-settings-manager.h | 11 +- source/ubl-strings.h | 19 +- ubl-settings-manager-section-element.glade | 3 +- ubl-settings-manager-settings-sections.glade | 4 +- ubl-settings-manager-settings.glade | 5 +- ...settings-manager-theme-main-IconView.glade | 60 ----- ubl-settings-manager.conf | 22 -- ubl-settings-manager.glade | 2 +- ubl-settings-manager.pot | 164 ------------ ubl-settings-manager_ru.po | 172 ------------- ublinux-logo.svg | 241 ------------------ 20 files changed, 477 insertions(+), 714 deletions(-) rename com.ublinux.ubl-settings-manager.svg => icons/apps/com.ublinux.ubl-settings-manager.svg (100%) create mode 100644 locale/ubl-settings-manager.pot create mode 100644 locale/ubl-settings-manager_ru.po create mode 100644 source/ubl-settings-manager-misc.c delete mode 100644 ubl-settings-manager-theme-main-IconView.glade delete mode 100644 ubl-settings-manager.conf delete mode 100644 ubl-settings-manager.pot delete mode 100644 ubl-settings-manager_ru.po delete mode 100644 ublinux-logo.svg diff --git a/Makefile b/Makefile index a990f29..2e62183 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,6 @@ DEPENDS = /bin/cmake PREFIX ?= /usr/local PKGNAME = $(MAKEFILE_DIR) FILE_VER = source/${PKGNAME}.h -PKGIDENT=$(subst /,-,${PREFIX}) default_target: all @@ -22,9 +21,9 @@ all: init build init: @echo "Initialize ..."; \ - if [ -d ".git" ]; then \ + if [[ -d ".git" ]]; then \ LATEST_TAG=$$(git describe --abbrev=0 --tags | sed 's/^v//'); \ - if [ -z "$${LATEST_TAG}" ]; \ + if [[ -z "$${LATEST_TAG}" ]]; \ then \ LATEST_TAG=$$"0.0"; \ echo "$${LATEST_TAG} is empty"; \ @@ -38,7 +37,7 @@ init: depend: @echo "Check depends ..." @for FILE_DEPEND in $(DEPENDS); do \ - if [ ! -f $${FILE_DEPEND} ]; then \ + if [[ ! -f "$${FILE_DEPEND}" ]]; then \ echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \ exit 1; \ fi; \ @@ -48,21 +47,21 @@ depend: debug: @echo "Debug ..." - if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ + if [[ ! -d "${CMAKE_BUILD_DIR}" ]]; then \ $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ echo "Debug: OK" prepare: @echo "Prepare ..."; \ - if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ + if [[ ! -d "${CMAKE_BUILD_DIR}" ]]; then \ $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ echo "Prepare: OK" check: @echo "Check ..."; \ - if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \ + if [[ -f "${CMAKE_BUILD_DIR}/${PKGNAME}" ]]; then \ echo "Check: OK"; \ else \ echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not found !"; \ @@ -77,10 +76,9 @@ build: depend prepare uninstall: @echo "Uninstall ..." - @for FILE_PO in $(wildcard *.po); do \ - LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ - FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ - PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ + @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ +# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ + PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ $(RM) "$${PATH_FILE_MO}"; \ done @for SIZE in 16x16 32x32 48x48 scalable; do \ @@ -92,48 +90,64 @@ uninstall: $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \ done; \ done + @for FILE_ICON in $(wildcard icons/*/*.svg); do \ + SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \ + $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/$${SUB_NAME}/$${FILE_ICON##*/}"; \ + done @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" - @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" - @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy" - @if [ -z ${DESTDIR} ]; then \ - [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ + $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy"; \ + else \ +# $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + $(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + fi + @if [[ -z "${DESTDIR}" ]]; then \ + [[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ - [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + [[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ fi @echo "Uninstall: OK" install: check uninstall @echo "Install ..." - @for FILE_PO in $(wildcard *.po); do \ - LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ - install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \ - FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ - PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ - echo "$${FILE_PO}"; \ - msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \ + @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ + install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ +# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ + PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ + PKGNAME_PO="./locale/${PKGNAME}_$${LANG}.po"; [[ -f "$${PKGNAME_PO}" ]] || PKGNAME_PO= ; \ + msgfmt --verbose --use-fuzzy --output-file "$${PATH_FILE_MO}" - < <(msgcat --use-first --no-wrap $${PKGNAME_PO} ./locale/*_$${LANG}.po); \ done @for SIZE in 16 32 48; do \ - install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ - rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ + install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ + rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ + done + @for FILE_ICON in $(wildcard icons/*/*.svg); do \ + SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \ + install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/$${SUB_NAME}" $${FILE_ICON}; \ done - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" - @cp ./com.ublinux.${PKGNAME}.policy ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy - @sed -e 's+/usr/bin+${PREFIX}/bin+' -e 's+.run+${PKGIDENT}.run+g' ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy -i @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" - @install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy" - @if [ -z ${DESTDIR} ]; then \ - [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ + install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"; \ + else \ +# install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ +# sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + fi + @if [[ -z "${DESTDIR}" ]]; then \ + ldconfig -n ${DESTDIR}${PREFIX}/lib; \ + [[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ - [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + [[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ fi @echo "Install: OK" clean: @echo "Clean ..." @$(RM) -rd ${CMAKE_BUILD_DIR} - @if [ -d ${CMAKE_BUILD_DIR} ]; then \ + @if [[ -d "${CMAKE_BUILD_DIR}" ]]; then \ echo "Clean: error, compile directory exist ${CMAKE_BUILD_DIR}"; \ else \ echo "Clean: OK"; \ diff --git a/com.ublinux.ubl-settings-manager.svg b/icons/apps/com.ublinux.ubl-settings-manager.svg similarity index 100% rename from com.ublinux.ubl-settings-manager.svg rename to icons/apps/com.ublinux.ubl-settings-manager.svg diff --git a/locale/ubl-settings-manager.pot b/locale/ubl-settings-manager.pot new file mode 100644 index 0000000..ed32ae0 --- /dev/null +++ b/locale/ubl-settings-manager.pot @@ -0,0 +1,145 @@ +# Language translations for ubl-settings-manager package. +# Copyright (C) 2022, UBTech LLC +# This file is distributed under the same license as the ubl-settings-manager package. +# UBLinux Team , 2022 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: ubl-settings-manager 1.0\n" +"Report-Msgid-Bugs-To: info@ublinux.com\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-04-21 12:33+0000\n" +"PO-Revision-Date: 2023-01-01 00:00+0600\n" +"Last-Translator: UBLinux Team \n" +"Language-Team: Russian - UBLinux Team \n" +"Language: Russian\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: source/ubl-strings.h:3 +msgid "UBLinux Settings Manager" +msgstr "" + +#: source/ubl-strings.h:4 +msgid "About UBLinux Settings Manager" +msgstr "" + +#: source/ubl-strings.h:6 +msgid "" +"https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-" +"manager" +msgstr "" + +#: source/ubl-strings.h:8 +msgid "Settings manager for UBLinux" +msgstr "" + +#: source/ubl-strings.h:9 +msgid "Back to settings" +msgstr "" + +#: source/ubl-strings.h:10 +msgid "Config loading failed!\n" +msgstr "" + +#: source/ubl-strings.h:11 +msgid "Double click selection" +msgstr "" + +#: source/ubl-strings.h:12 +msgid "Sections management" +msgstr "" + +#: source/ubl-strings.h:13 +msgid "Understood" +msgstr "" + +#: source/ubl-strings.h:14 +msgid "Settings" +msgstr "" + +#: source/ubl-strings.h:15 +msgid "Apply" +msgstr "" + +#: source/ubl-strings.h:16 +msgid "Close" +msgstr "" + +#: source/ubl-strings.h:17 +msgid "Cancel" +msgstr "" + +#: source/ubl-strings.h:18 +msgid "About..." +msgstr "" + +#: source/ubl-strings.h:19 +msgid "Documentation" +msgstr "" + +#: source/ubl-strings.h:20 +msgid "Window theme" +msgstr "" + +#: source/ubl-strings.h:21 +msgid "Icon size" +msgstr "" + +#: source/ubl-strings.h:22 +msgid "All settings" +msgstr "" + +#: source/ubl-strings.h:23 +msgid "Failed to load theme" +msgstr "" + +#: source/ubl-strings.h:24 +msgid "Main theme" +msgstr "" + +#: source/ubl-strings.h:25 +msgid "GNOME theme" +msgstr "" + +#: source/ubl-strings.h:26 +msgid "Default" +msgstr "" + +#: source/ubl-strings.h:27 +msgid "Section name" +msgstr "" + +#: source/ubl-strings.h:28 +msgid "Identifier" +msgstr "" + +#: source/ubl-strings.h:29 +msgid "Add section" +msgstr "" + +#: source/ubl-strings.h:30 +msgid "Clear fields" +msgstr "" + +#: source/ubl-strings.h:31 +msgid "Remove section" +msgstr "" + +#: source/ubl-strings.h:32 +msgid "Personal" +msgstr "" + +#: source/ubl-strings.h:33 +msgid "Hardware" +msgstr "" + +#: source/ubl-strings.h:34 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:35 +msgid "Misc" +msgstr "" diff --git a/locale/ubl-settings-manager_ru.po b/locale/ubl-settings-manager_ru.po new file mode 100644 index 0000000..469b1f5 --- /dev/null +++ b/locale/ubl-settings-manager_ru.po @@ -0,0 +1,146 @@ +# Russian translations for ubl-settings-manager package. +# Copyright (C) 2022, UBTech LLC +# This file is distributed under the same license as the ubl-settings-manager package. +# UBLinux Team , 2022 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: ubl-settings-manager 1.0\n" +"Report-Msgid-Bugs-To: info@ublinux.com\n" +"POT-Creation-Date: 2023-04-21 12:33+0000\n" +"PO-Revision-Date: 2023-01-01 00:00+0600\n" +"Last-Translator: UBLinux Team \n" +"Language-Team: Russian - UBLinux Team \n" +"Language: Russian\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: source/ubl-strings.h:3 +msgid "UBLinux Settings Manager" +msgstr "Диспетчер настроек UBLinux" + +#: source/ubl-strings.h:4 +msgid "About UBLinux Settings Manager" +msgstr "О приложении Диспетчер настроек UBLinux" + +#: source/ubl-strings.h:6 +msgid "" +"https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-" +"manager" +msgstr "" +"https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-" +"manager" + +#: source/ubl-strings.h:8 +msgid "Settings manager for UBLinux" +msgstr "Диспетчер настроек UBLinux" + +#: source/ubl-strings.h:9 +msgid "Back to settings" +msgstr "Назад к настройкам" + +#: source/ubl-strings.h:10 +msgid "Config loading failed!\n" +msgstr "Ошибка загрузки конфигурации!\n" + +#: source/ubl-strings.h:11 +msgid "Double click selection" +msgstr "Открывать приложения двойным нажатием" + +#: source/ubl-strings.h:12 +msgid "Sections management" +msgstr "Настройка разделов" + +#: source/ubl-strings.h:13 +msgid "Understood" +msgstr "Понятно" + +#: source/ubl-strings.h:14 +msgid "Settings" +msgstr "Настройки" + +#: source/ubl-strings.h:15 +msgid "Apply" +msgstr "Применить" + +#: source/ubl-strings.h:16 +msgid "Close" +msgstr "Закрыть" + +#: source/ubl-strings.h:17 +msgid "Cancel" +msgstr "Отменить" + +#: source/ubl-strings.h:18 +msgid "About..." +msgstr "О программе..." + +#: source/ubl-strings.h:19 +msgid "Documentation" +msgstr "Справка" + +#: source/ubl-strings.h:20 +msgid "Window theme" +msgstr "Выбор темы" + +#: source/ubl-strings.h:21 +msgid "Icon size" +msgstr "Размер иконок" + +#: source/ubl-strings.h:22 +msgid "All settings" +msgstr "Все настройки" + +#: source/ubl-strings.h:23 +msgid "Failed to load theme" +msgstr "Ошибка загрузки темы" + +#: source/ubl-strings.h:24 +msgid "Main theme" +msgstr "Основная тема" + +#: source/ubl-strings.h:25 +msgid "GNOME theme" +msgstr "GNOME тема" + +#: source/ubl-strings.h:26 +msgid "Default" +msgstr "По умолчанию" + +#: source/ubl-strings.h:27 +msgid "Section name" +msgstr "Название раздела" + +#: source/ubl-strings.h:28 +msgid "Identifier" +msgstr "Идентификатор" + +#: source/ubl-strings.h:29 +msgid "Add section" +msgstr "Добавить раздел" + +#: source/ubl-strings.h:30 +msgid "Clear fields" +msgstr "Очистить поля" + +#: source/ubl-strings.h:31 +msgid "Remove section" +msgstr "Удалить раздел" + +#: source/ubl-strings.h:32 +msgid "Personal" +msgstr "Личные" + +#: source/ubl-strings.h:33 +msgid "Hardware" +msgstr "Оборудование" + +#: source/ubl-strings.h:34 +msgid "System" +msgstr "Система" + +#: source/ubl-strings.h:35 +msgid "Misc" +msgstr "Прочее" diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 1198fd8..dfdad2a 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -78,6 +78,7 @@ set(SOURCE_FILES ubl-settings-manager-theme-main.c ubl-settings-manager-app-sections.c ubl-settings-manager-settings-sections.c + ubl-settings-manager-misc.c ubl-settings-manager.h ubl-strings.h ) diff --git a/source/ubl-settings-manager-misc.c b/source/ubl-settings-manager-misc.c new file mode 100644 index 0000000..a16f698 --- /dev/null +++ b/source/ubl-settings-manager-misc.c @@ -0,0 +1,69 @@ +#include "ubl-settings-manager.h" + + +void yon_open_browser(GtkWidget *self, char *link){ + GtkWidget *window = yon_ubl_browser_window_open(link,template_app_information.app_title); + if (window) + gtk_window_set_icon_name(GTK_WINDOW(window),yon_char_append("com.ublinux.",template_app_information.app_tech_name)); +} + +void on_open_documentation_confirmation(GtkWidget *self, char *link){ + if (main_config.always_open_documentation==0){ + GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path_documentation); + template_documentation_confirmation_window *window = malloc(sizeof(template_documentation_confirmation_window)); + window->Window = yon_gtk_builder_get_widget(builder,"helpConfirmationWindow"); + window->AcceptButton = yon_gtk_builder_get_widget(builder,"ReadHelpButton"); + window->CloseButton = yon_gtk_builder_get_widget(builder,"CancelHelpButton"); + window->HeaderLabel = yon_gtk_builder_get_widget(builder,"webHeaderNameLabel"); + window->AlwaysOpenCheck = yon_gtk_builder_get_widget(builder,"AlwaysOpenDocumentationCheckbox"); + gtk_label_set_text(GTK_LABEL(window->HeaderLabel),TITLE_LABEL); + gtk_window_set_title(GTK_WINDOW(window->Window),TITLE_LABEL); + gtk_window_set_icon_name(GTK_WINDOW(window->Window),yon_char_append("com.ublinux.",template_app_information.app_tech_name)); + gtk_widget_show_all(window->Window); + g_signal_connect(G_OBJECT(window->CloseButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); + g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link)); + g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); + + } else { + yon_open_browser(self,link); + } +} + +/**on_link(GtkWidget *self, char* uri, gpointer user_data) + * [EN] + * Signal for hadnling AboutDialog links. + * Connect to "activate-link" signal. + * [self] is AboutDialog window; + * [uri] is activated link; + * [user_data] is pointer for user data, hasn't used in standard handler; + * [RU] + * Функция для обработки сигнала нажатия на ссылку окна AboutDialog. + * Присоединять к сигналу "activate-link". + * [self] - окно AboutDialog; + * [uri] - ссылка, по которой совершается переход; + * [user_data] - указатель на любые другие данные, не используется в стандартном обработчике; +*/ +void on_link(GtkWidget *self, char* uri, gpointer user_data){ + gtk_widget_destroy(self); + on_open_documentation_confirmation(self,uri); +} + +void on_about(GtkWidget *self, char *version_application){ + GtkBuilder *builder=gtk_builder_new_from_resource(ui_glade_path_about); + GtkWidget *window=yon_gtk_builder_get_widget(builder,"AboutWindow"); + GtkWidget *title=yon_gtk_builder_get_widget(builder,"headerAboutTopic"); + GtkWidget *hideButtonBox=yon_gtk_builder_get_widget(builder,"buttonBoxHide"); + gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(window),version_application); + gtk_about_dialog_set_logo_icon_name(GTK_ABOUT_DIALOG(window),yon_char_append("com.ublinux.",LocaleName)); + gtk_window_set_icon_name(GTK_WINDOW(window),yon_char_append("com.ublinux.",LocaleName)); + char *title_str = about_label(TITLE_LABEL); + gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),title_str); + gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(window),LocaleName); + gtk_label_set_text(GTK_LABEL(title),title_str); + g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),NULL); + gtk_widget_set_visible(hideButtonBox,0); + gtk_widget_destroy(hideButtonBox); + gtk_window_set_title(GTK_WINDOW(window),title_str); + gtk_widget_show(window); + free(title_str); +} \ No newline at end of file diff --git a/source/ubl-settings-manager-settings-sections.c b/source/ubl-settings-manager-settings-sections.c index 04c965b..764ec89 100644 --- a/source/ubl-settings-manager-settings-sections.c +++ b/source/ubl-settings-manager-settings-sections.c @@ -104,22 +104,22 @@ void yon_section_window_add_default(settings_section_window *window){ section_struct *cur_section = yon_section_new(); gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0); - gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),"Personal"); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),_("Personal")); gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-PersonalSettings;"); cur_section = yon_section_new(); gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0); - gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),"Hardware"); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),_("Hardware")); gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-HardwareSettings;"); cur_section = yon_section_new(); gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0); - gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),"System"); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),_("System")); gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-SystemSettings;"); cur_section = yon_section_new(); gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0); - gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),"Misc"); + gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),_("Misc")); gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),""); } diff --git a/source/ubl-settings-manager-theme-gnome.c b/source/ubl-settings-manager-theme-gnome.c index 2b194ee..2a30286 100644 --- a/source/ubl-settings-manager-theme-gnome.c +++ b/source/ubl-settings-manager-theme-gnome.c @@ -131,6 +131,31 @@ int yon_gnome_update(gnome_theme_struct *theme){ return 1; } +void yon_gnome_section_search_show(gnome_section *section, const char *string){ + GList *list = gtk_container_get_children(GTK_CONTAINER(section->AppsList)); + GList *iter; + for (iter=list;iter;iter=iter->next){ + apps *cur_app = g_object_get_data(G_OBJECT(iter->data),"apps"); + if (yon_char_is_empty(string)||yon_char_check_begins_with(cur_app->Name,(char*)string)){ + gtk_widget_show(GTK_WIDGET(iter->data)); + } else { + gtk_widget_hide(GTK_WIDGET(iter->data)); + } + } + g_list_free(list); +} + +void on_gnome_search(GtkWidget *, gnome_theme_struct *theme){ + const char *search_string = gtk_entry_get_text(GTK_ENTRY(theme->SearchEntry)); + GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree)); + GList *iter; + for (iter=list;iter;iter=iter->next){ + gnome_section *cur_section = g_object_get_data(G_OBJECT(iter->data),"gnome_section"); + yon_gnome_section_search_show(cur_section,search_string); + } + g_list_free(list); +} + gnome_theme_struct *yon_gnome_theme_new(){ gnome_theme_struct *theme = malloc(sizeof(gnome_theme_struct)); @@ -139,6 +164,7 @@ gnome_theme_struct *yon_gnome_theme_new(){ theme->AppsTree = yon_gtk_builder_get_widget(builder,"AppsTree"); theme->SocketBox = yon_gtk_builder_get_widget(builder,"SocketBox"); theme->GnomePaned = yon_gtk_builder_get_widget(builder,"GnomePaned"); + theme->SearchEntry = yon_gtk_builder_get_widget(builder,"SearchEntry"); theme->GnomeInfoLogoImage = yon_gtk_builder_get_widget(builder,"GnomeInfoLogoImage"); theme->HideBox = yon_gtk_builder_get_widget(builder,"HideBox"); theme->IconCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"IconCell")); @@ -149,6 +175,7 @@ gnome_theme_struct *yon_gnome_theme_new(){ gtk_box_pack_start(GTK_BOX(theme->SocketBox),theme->Socket,1,1,0); gtk_widget_show(theme->Socket); + g_signal_connect(G_OBJECT(theme->SearchEntry),"changed",G_CALLBACK(on_gnome_search),theme); g_signal_connect(G_OBJECT(theme->SocketBox),"add",G_CALLBACK(on_gnome_socket_add),theme); // gtk_cell_renderer_set_fixed_size(theme->IconCell,main_config.apps_icon_size,main_config.apps_icon_size); return theme; diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index 9c75884..bdc8274 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -543,25 +543,25 @@ void yon_interface_update(main_window *widgets){ } else { { app_section *cur_section = yon_app_section_new(); - cur_section->name = yon_char_new("Personal"); + cur_section->name = yon_char_new(_("Personal")); cur_section->categories = yon_char_parse("X-UBL-SettingsManager;X-UBL-PersonalSettings;",&cur_section->categories_size,";"); yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section); } { app_section *cur_section = yon_app_section_new(); - cur_section->name = yon_char_new("Hardware"); + cur_section->name = yon_char_new(_("Hardware")); cur_section->categories = yon_char_parse("X-UBL-SettingsManager;X-UBL-HardwareSettings;",&cur_section->categories_size,";"); yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section); } { app_section *cur_section = yon_app_section_new(); - cur_section->name = yon_char_new("System"); + cur_section->name = yon_char_new(_("System")); cur_section->categories = yon_char_parse("X-UBL-SettingsManager;X-UBL-SystemSettings;",&cur_section->categories_size,";"); yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section); } { app_section *cur_section = yon_app_section_new(); - cur_section->name = yon_char_new("Misc"); + cur_section->name = yon_char_new(_("Misc")); cur_section->categories = yon_char_parsed_new(&cur_section->categories_size,"",NULL); yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section); } @@ -600,7 +600,9 @@ main_window *yon_main_window_setup(){ g_signal_connect(G_OBJECT(widgets->MainMenuItemSettings),"activate",G_CALLBACK(on_settings_open),widgets); g_signal_connect(G_OBJECT(widgets->BannerButton),"clicked",G_CALLBACK(on_reveal_banner),widgets); - + g_signal_connect(G_OBJECT(widgets->MainMenuItemDocumentation),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK); + g_signal_connect(G_OBJECT(widgets->MainMenuItemAbout),"activate",G_CALLBACK(on_about),version_application); + yon_window_config_setup(GTK_WINDOW(widgets->Window)); char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); yon_window_config_load(path); diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index 5b7b4c2..64ea623 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -113,14 +113,13 @@ typedef struct { GtkWidget *DeleditBox; } SectionSettingSegment; -typedef struct theme_struct { +/// @brief Public fields of theme structs +typedef struct theme_struct { char *theme_name; GtkWidget *MainBox; //theme main box, which connects to window GtkWidget *SocketBox; //main socket box, where socket is being parented to GtkWidget *HideBox; //box to hide when socket has been connected int (*list_update_func)(struct theme_struct*); //function to update theme's lits of application - // GtkWidget *AppsTree; //theme application list container - // GtkWidget *Socket; } theme_struct; typedef struct gnome_theme_struct { @@ -129,6 +128,7 @@ typedef struct gnome_theme_struct { GtkWidget *SocketBox; GtkWidget *HideBox; int (*list_update_func)(struct gnome_theme_struct*); + GtkWidget *SearchEntry; GtkWidget *AppsTree; GtkWidget *Socket; GtkWidget *GnomePaned; @@ -212,6 +212,11 @@ typedef struct { int icon_size; } settings_window; +void yon_open_browser(GtkWidget *self, char *link); +void on_open_documentation_confirmation(GtkWidget *self, char *link); +void on_link(GtkWidget *self, char* uri, gpointer user_data); +void on_about(GtkWidget *self, char *version_application); + void on_settings_accept(GtkWidget *, settings_window *window); void yon_theme_init(); theme_struct *yon_theme_update(main_window *widgets); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 3ef5e19..45dda0b 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -6,21 +6,30 @@ #define WIKI_LINK _("https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-manager") #define ABOUT_PROJECT_COMMENTS_LABEL _("Settings manager for UBLinux") +#define BACK_TO_SETTINGS_LABEL _("Back to settings") #define CONFIG_LOAD_ERROR _("Config loading failed!\n") #define DOUBLE_CLICK_SELECTION_LABEL _("Double click selection") #define SECTIONS_MANAGEMENT_LABEL _("Sections management") #define UNDERSTOOD_LABEL _("Understood") #define SETTINGS_LABEL _("Settings") #define APPLY_LABEL _("Apply") -#define SAVE_AND_APPLY_LABEL _("Save and apply") #define CLOSE_LABEL _("Close") #define CANCEL_LABEL _("Cancel") -#define READ_ONLINE_LABEL _("Read online") -#define REDIRECTION_COMMENT_LABEL _("You will be redirected to documentation site, where user help pages are translated and supported by community.") -#define REDIRECTION_LABEL _("Would you like to read documentation in the Web?") +#define ABOUT__LABEL _("About...") +#define DOCUMENTATION__LABEL _("Documentation") #define WINDOW_THEME_LABEL _("Window theme") #define ICON_SIZE_LABEL _("Icon size") #define BACK_TO_ALL_SETTINGS_LABEL _("All settings") #define THEME_ERROR_LABEL _("Failed to load theme") #define MAIN_THEME_LABEL _("Main theme") -#define GNOME_THEME_LABEL _("GNOME theme") \ No newline at end of file +#define GNOME_THEME_LABEL _("GNOME theme") +#define DEFAULT_LABEL _("Default") +#define SECTION_NAME_LABEL _("Section name") +#define IDENTIFIER_LABEL _("Identifier") +#define ADD_SECTION_TOOLTIP_LABEL _("Add section") +#define CLEAR_SECTION_TOOLTIP_LABEL _("Clear fields") +#define REMOVE_SECTION_TOOLTIP_LABEL _("Remove section") +#define PERSONAL_SECTION_LABEL _("Personal") +#define HARDWARE_SECTION_LABEL _("Hardware") +#define SYSTEM_SECTION_LABEL _("System") +#define MISC_SECTION_LABEL _("Misc") \ No newline at end of file diff --git a/ubl-settings-manager-section-element.glade b/ubl-settings-manager-section-element.glade index 8cd8823..b64d256 100644 --- a/ubl-settings-manager-section-element.glade +++ b/ubl-settings-manager-section-element.glade @@ -1,5 +1,5 @@ - + @@ -45,6 +45,7 @@ True True True + Remove section center image2 - - diff --git a/ubl-settings-manager.conf b/ubl-settings-manager.conf deleted file mode 100644 index 3e8a48b..0000000 --- a/ubl-settings-manager.conf +++ /dev/null @@ -1,22 +0,0 @@ -[window] -WindowPosX=0 -WindowPosY=0 -WindowWidth=800 -WindowHeight=600 -WindowTheme=0 -MainIconSize=3 -GnomeIconSize=3 -IconSegmentSize=250 -MainLabelSize=12 -GnomeLabelSize=12 -LabelDensity=0 -User= -GnomeDoubleClick=false -MainDoubleClick=true -BannerHidden=false - -[sections] -Personal=X-UBL-SettingsManager;X-UBL-PersonalSettings; -Hardware=X-UBL-SettingsManager;X-UBL-HardwareSettings; -System=X-UBL-SettingsManager;X-UBL-SystemSettings; -Misc= diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index b907e4b..07d3236 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -244,7 +244,7 @@ - + True False Back to settings diff --git a/ubl-settings-manager.pot b/ubl-settings-manager.pot deleted file mode 100644 index 52374e8..0000000 --- a/ubl-settings-manager.pot +++ /dev/null @@ -1,164 +0,0 @@ -# Language translations for ubl-settings-manager package. -# Copyright (C) 2022, UBTech LLC -# This file is distributed under the same license as the ubl-settings-manager package. -# UBLinux Team , 2022 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: ubl-settings-manager 1.0\n" -"Report-Msgid-Bugs-To: info@ublinux.com\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-04-21 12:33+0000\n" -"PO-Revision-Date: 2023-01-01 00:00+0600\n" -"Last-Translator: UBLinux Team \n" -"Language-Team: Russian - UBLinux Team \n" -"Language: Russian\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: source/ubl-settings-manager.h:9 -msgid "" -"\n" -"GTK settings manager for UBLinux\n" -"Usage: ubl-settings-manager [OPTIONS...]\n" -"Options:\n" -" -h, --help\t\t Show this help\n" -" -V, --version\t \t Show package version\n" -" --lock-settings Lock menu settings\n" -msgstr "" - -#: source/ubl-settings-manager.h:27 -msgid "About UBLinux Settings Manager" -msgstr "" - -#: source/ubl-settings-manager.h:34 source/ubl-settings-manager.c:1685 -msgid "About..." -msgstr "" - -#: source/ubl-settings-manager.h:37 source/ubl-settings-manager.h:36 -#: source/ubl-settings-manager.c:1683 -msgid "Always redirect" -msgstr "" - -#: source/ubl-settings-manager.h:38 source/ubl-settings-manager.h:37 -#: source/ubl-settings-manager.c:1742 -msgid "Apply" -msgstr "" - -#: source/ubl-settings-manager.h:47 source/ubl-settings-manager.h:46 -#: source/ubl-settings-manager.c:1600 -msgid "All settings" -msgstr "" - -#: source/ubl-settings-manager.h:41 source/ubl-settings-manager.h:40 -#: source/ubl-settings-manager.c:1680 -msgid "Cancel" -msgstr "" - -#: source/ubl-settings-manager.h:40 source/ubl-settings-manager.h:39 -#: source/ubl-settings-manager.c:1681 -msgid "Close" -msgstr "" - -#: source/ubl-settings-manager.h:30 -msgid "Config loading failed!\n" -msgstr "" - -#: source/ubl-settings-manager.h:35 -msgid "Documentation" -msgstr "" - -#: source/ubl-settings-manager.h:31 source/ubl-settings-manager.c:1748 -msgid "Double click selection" -msgstr "" - -#: source/ubl-settings-manager.c:1913 source/ubl-settings-manager.c:1912 -#: source/ubl-settings-manager.c:1793 -msgid "GNOME theme" -msgstr "" - -msgid "Hardware" -msgstr "" - -#: source/ubl-settings-manager.h:46 source/ubl-settings-manager.h:45 -#: source/ubl-settings-manager.c:1675 -msgid "Icon size" -msgstr "" - -msgid "Misc" -msgstr "" - -msgid "Personal" -msgstr "" - -#: source/ubl-settings-manager.h:28 source/ubl-settings-manager.c:636 -msgid "Project Home Page" -msgstr "" - -#: source/ubl-settings-manager.h:42 source/ubl-settings-manager.h:41 -#: source/ubl-settings-manager.c:1679 -msgid "Read online" -msgstr "" - -#: source/ubl-settings-manager.h:39 source/ubl-settings-manager.h:38 -#: source/ubl-settings-manager.c:1682 -msgid "Save and apply" -msgstr "" - -#: source/ubl-settings-manager.h:32 source/ubl-settings-manager.c:1687 -msgid "Sections management" -msgstr "" - -#: source/ubl-settings-manager.h:36 source/ubl-settings-manager.h:35 -#: source/ubl-settings-manager.c:1684 -msgid "Settings" -msgstr "" - -#: source/ubl-settings-manager.h:29 source/ubl-settings-manager.c:632 -msgid "Settings manager for UBLinux" -msgstr "" - -#: source/ubl-settings-manager.c:1912 source/ubl-settings-manager.c:1911 -#: source/ubl-settings-manager.c:1792 -msgid "Standard theme" -msgstr "" - -msgid "System" -msgstr "" - -#: source/ubl-settings-manager.h:26 source/ubl-settings-manager.c:633 -#: source/ubl-settings-manager.c:1601 source/ubl-settings-manager.c:1615 -#: source/ubl-settings-manager.c:1674 -msgid "UBLinux Settings Manager" -msgstr "" - -#: source/ubl-settings-manager.h:33 source/ubl-settings-manager.c:1686 -msgid "Understood" -msgstr "" - -#: source/ubl-settings-manager.h:8 -msgid "Version: " -msgstr "" - -#: source/ubl-settings-manager.h:45 source/ubl-settings-manager.h:44 -#: source/ubl-settings-manager.c:1676 -msgid "Window theme" -msgstr "" - -#: source/ubl-settings-manager.h:44 source/ubl-settings-manager.h:43 -#: source/ubl-settings-manager.c:1677 -msgid "Would you like to read documentation in the Web?" -msgstr "" - -#: source/ubl-settings-manager.h:43 source/ubl-settings-manager.h:42 -#: source/ubl-settings-manager.c:1678 -msgid "" -"You will be redirected to documentation site, where user help pages are\n" -"translated and supported by community." -msgstr "" - -#: source/ubl-settings-manager.h:9 -msgid "ubl-settings-manager version: " -msgstr "" diff --git a/ubl-settings-manager_ru.po b/ubl-settings-manager_ru.po deleted file mode 100644 index 304ac21..0000000 --- a/ubl-settings-manager_ru.po +++ /dev/null @@ -1,172 +0,0 @@ -# Russian translations for ubl-settings-manager package. -# Copyright (C) 2022, UBTech LLC -# This file is distributed under the same license as the ubl-settings-manager package. -# UBLinux Team , 2022 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: ubl-settings-manager 1.0\n" -"Report-Msgid-Bugs-To: info@ublinux.com\n" -"POT-Creation-Date: 2023-04-21 12:33+0000\n" -"PO-Revision-Date: 2023-01-01 00:00+0600\n" -"Last-Translator: UBLinux Team \n" -"Language-Team: Russian - UBLinux Team \n" -"Language: Russian\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: source/ubl-settings-manager.h:9 -msgid "" -"\n" -"GTK settings manager for UBLinux\n" -"Usage: ubl-settings-manager [OPTIONS...]\n" -"Options:\n" -" -h, --help\t\t Show this help\n" -" -V, --version\t \t Show package version\n" -" --lock-settings Lock menu settings\n" -msgstr "" -"\n" -"GTK Менеджер настроек для UBLinux\n" -"Использование: ubl-settings-manager [АРГУМЕНТЫ...]\n" -"Аргументы:\n" -" -h, --help\t\t Показать помощь\n" -" -V, --version\t \t Показать версию пакета\n" -" --lock-settings \t Заблокировать окно настроек\n" - -#: source/ubl-settings-manager.h:27 -msgid "About UBLinux Settings Manager" -msgstr "О приложении Диспетчер настроек UBLinux" - -#: source/ubl-settings-manager.h:34 source/ubl-settings-manager.c:1685 -msgid "About..." -msgstr "О программе" - -#: source/ubl-settings-manager.h:37 source/ubl-settings-manager.h:36 -#: source/ubl-settings-manager.c:1683 -msgid "Always redirect" -msgstr "Всегда перенаправлять" - -#: source/ubl-settings-manager.h:38 source/ubl-settings-manager.h:37 -#: source/ubl-settings-manager.c:1742 -msgid "Apply" -msgstr "Применить" - -#: source/ubl-settings-manager.h:47 source/ubl-settings-manager.h:46 -#: source/ubl-settings-manager.c:1600 -msgid "All settings" -msgstr "Все настройки" - -#: source/ubl-settings-manager.h:41 source/ubl-settings-manager.h:40 -#: source/ubl-settings-manager.c:1680 -msgid "Cancel" -msgstr "Отменить" - -#: source/ubl-settings-manager.h:40 source/ubl-settings-manager.h:39 -#: source/ubl-settings-manager.c:1681 -msgid "Close" -msgstr "Закрыть" - -#: source/ubl-settings-manager.h:30 -msgid "Config loading failed!\n" -msgstr "Ошибка загрузки конфигурации!\n" - -#: source/ubl-settings-manager.h:35 -msgid "Documentation" -msgstr "Справка" - -#: source/ubl-settings-manager.h:31 source/ubl-settings-manager.c:1748 -msgid "Double click selection" -msgstr "Открывать приложения двойным нажатием" - -#: source/ubl-settings-manager.c:1913 source/ubl-settings-manager.c:1912 -#: source/ubl-settings-manager.c:1793 -msgid "GNOME theme" -msgstr "GNOME тема" - -msgid "Hardware" -msgstr "Оборудование" - -#: source/ubl-settings-manager.h:46 source/ubl-settings-manager.h:45 -#: source/ubl-settings-manager.c:1675 -msgid "Icon size" -msgstr "Размер иконок" - -msgid "Misc" -msgstr "Прочее" - -msgid "Personal" -msgstr "Личные" - -#: source/ubl-settings-manager.h:28 source/ubl-settings-manager.c:636 -msgid "Project Home Page" -msgstr "Домашняя страница проекта" - -#: source/ubl-settings-manager.h:42 source/ubl-settings-manager.h:41 -#: source/ubl-settings-manager.c:1679 -msgid "Read online" -msgstr "Прочитать онлайн" - -#: source/ubl-settings-manager.h:39 source/ubl-settings-manager.h:38 -#: source/ubl-settings-manager.c:1682 -msgid "Save and apply" -msgstr "Сохранить и применить" - -#: source/ubl-settings-manager.h:32 source/ubl-settings-manager.c:1687 -msgid "Sections management" -msgstr "Настройка разделов" - -#: source/ubl-settings-manager.h:36 source/ubl-settings-manager.h:35 -#: source/ubl-settings-manager.c:1684 -msgid "Settings" -msgstr "Настройки" - -#: source/ubl-settings-manager.h:29 source/ubl-settings-manager.c:632 -msgid "Settings manager for UBLinux" -msgstr "Диспетчер настроек UBLinux" - -#: source/ubl-settings-manager.c:1912 source/ubl-settings-manager.c:1911 -#: source/ubl-settings-manager.c:1792 -msgid "Standard theme" -msgstr "Стандартная тема" - -msgid "System" -msgstr "Система" - -#: source/ubl-settings-manager.h:26 source/ubl-settings-manager.c:633 -#: source/ubl-settings-manager.c:1601 source/ubl-settings-manager.c:1615 -#: source/ubl-settings-manager.c:1674 -msgid "UBLinux Settings Manager" -msgstr "Диспетчер настроек UBLinux" - -#: source/ubl-settings-manager.h:33 source/ubl-settings-manager.c:1686 -msgid "Understood" -msgstr "Понятно" - -#: source/ubl-settings-manager.h:8 -msgid "Version: " -msgstr "Версия: " - -#: source/ubl-settings-manager.h:45 source/ubl-settings-manager.h:44 -#: source/ubl-settings-manager.c:1676 -msgid "Window theme" -msgstr "Выбор темы" - -#: source/ubl-settings-manager.h:44 source/ubl-settings-manager.h:43 -#: source/ubl-settings-manager.c:1677 -msgid "Would you like to read documentation in the Web?" -msgstr "Вы хотите прочитать справку в Сети?" - -#: source/ubl-settings-manager.h:43 source/ubl-settings-manager.h:42 -#: source/ubl-settings-manager.c:1678 -msgid "" -"You will be redirected to documentation site, where user help pages are\n" -"translated and supported by community." -msgstr "" -"Вы будете перенаправлены на сайт с документацией где страницы помощи\n" -"переводятся и поддерживаются сообществом." - -#: source/ubl-settings-manager.h:9 -msgid "ubl-settings-manager version: " -msgstr "ubl-settings-manager версия: " diff --git a/ublinux-logo.svg b/ublinux-logo.svg deleted file mode 100644 index d44113c..0000000 --- a/ublinux-logo.svg +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- 2.35.1 From 7eeb19e3b3ef8a5a3475a41ae0d7e5f8d1250223 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 26 Nov 2025 09:53:36 +0600 Subject: [PATCH 4/7] Added build safety flags --- com.ublinux.ubl-settings-manager.policy | 125 ++++++++- source/CMakeLists.txt | 27 +- source/ubl-settings-manager-misc.c | 6 +- .../ubl-settings-manager-settings-sections.c | 1 + source/ubl-settings-manager-settings.c | 5 +- source/ubl-settings-manager-theme-gnome.c | 14 +- source/ubl-settings-manager-theme-main.c | 17 +- source/ubl-settings-manager.c | 6 +- source/ubl-settings-manager.h | 19 ++ ubl-settings-manager.desktop | 243 +++++++++++++++++- 10 files changed, 414 insertions(+), 49 deletions(-) diff --git a/com.ublinux.ubl-settings-manager.policy b/com.ublinux.ubl-settings-manager.policy index 63fd4eb..a010b58 100644 --- a/com.ublinux.ubl-settings-manager.policy +++ b/com.ublinux.ubl-settings-manager.policy @@ -3,15 +3,125 @@ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> - UBLinux https://ublinux.ru - - Run ubl-settings-manager as root - Запуск утилиты ubl-settings-manager с правами root - Authentication is required to run ubl-settings-manager - Требуется авторизация для запуска утилиты ubl-settings-manager с правами root + Run settings manager as root + 以 root 身份執行設定管理器 + 以 root 身份运行设置管理器 + రూట్‌గా సెట్టింగ్స్ మేనేజర్‌ను నడపండి + Запустіть диспетчер налаштувань від імені користувача root + Ayar yöneticisini root kullanıcısı olarak çalıştırın + ரூட் பயனரின் பெயரில் அமைப்புகள் மேலாளரை இயக்கவும் + Kör inställningshanteraren som root + Pokrenite upravnik postavkama kao root korisnik + Покрените управник подешавањима као корисник root + Zaženite upravitelja nastavitev kot uporabnik root + Spustite správcu nastavení ako používateľ root + Запустить диспетчер настроек от имени пользователя root + Rulați managerul de setări ca utilizator root + Execute o gerenciador de configurações como usuário root + Execute o gestor de definições como utilizador root + Uruchom menedżera ustawień jako użytkownik root + ਰੂਟ ਯੂਜ਼ਰ ਦੇ ਨਾਂ 'ਤੇ ਸੈਟਿੰਗ ਮੈਨੇਜਰ ਚਲਾਓ + ରୁଟ୍ ବ୍ୟବହାରକାରୀ ନାମରେ ସେଟିଂସ୍ ମ୍ୟାନେଜର୍ ଚାଲାନ୍ତୁ + Lance lo gestor de configuracions coma utilizator root + Kjør innstillingssjefen som root-brukar + Voer instellingenbeheerder uit als root-gebruiker + रूट वापरकर्त्याच्या नावाने सेटिंग्ज मॅनेजर चालवा + root ഉപയോക്താവിന്റെ പേരിൽ സെറ്റിംഗ്സ് മാനേജർ പ്രവർത്തിപ്പിക്കുക + Palaidiet iestatījumu pārvaldnieku kā root lietotājs + Paleiskite nustatymų tvarkyklę kaip root naudotoją + 루트 사용자로 설정 관리자 실행 + ರೂಟ್ ಬಳಕೆದಾರರಾಗಿ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ ಅನ್ನು ಚಾಲನೆ ಮಾಡಿ + root пайдаланушы атынан параметрлер менеджерін іске қосыңыз + root მომხმარებლის სახელით პარამეტრების მენეჯერის გაშვება + rootユーザーとして設定マネージャーを実行する + Esegui il gestore delle impostazioni come utente root + Jalankan pengelola pengaturan sebagai pengguna root + Execurre le manager de configurationes como usator root + Futtassa a beállításkezelőt root felhasználóként + Pokrenite upravitelj postavkama kao korisnik root + रूट उपयोगकर्ता के रूप में सेटिंग्स मैनेजर चलाएँ + הפעל את מנהל ההגדרות בשם משתמש root + રૂટ યૂઝર તરીકે સેટિંગ્સ મેનેજર ચલાવો + Execute o xestor de configuracións como usuario root + Eseguì il gestòr di impostazions come utent root + Exécutez le gestionnaire des paramètres en tant qu'utilisateur root + Suorita asetusten hallinta root-käyttäjänä + Exekutatu ezarpen kudeatzailea root erabiltzaile gisa + Ejecuta el administrador de configuraciones como usuario root + Rulu la agordojn-mastrilon kiel root-uzanto + Run settings manager as root + Εκτελέστε τον διαχειριστή ρυθμίσεων ως χρήστης root + Führen Sie den Einstellungsmanager als root-Benutzer aus + Kør indstillingsadministratoren som root-bruger + Spusťte správce nastavení jako uživatel root + Executeu el gestor de configuracions com a usuari root + রুট ব্যবহারকারী হিসেবে সেটিং ম্যানেজার চালান + Стартирайте мениджъра на настройките като потребител root + Ejecute'l xestor de configuración como usuariu root + root ব্যৱহাৰকাৰী হিচাপে ছেটিংছ মেনেজাৰ চলাও + شغّل مدير الإعدادات باسم مستخدم root + Voer instellingsbestuurder uit as root-gebruiker + Authentication is required to run settings manager as root + 以 root 身份執行設定管理器 + 以 root 身份运行设置管理器 + రూట్‌గా సెట్టింగ్స్ మేనేజర్‌ను నడపండి + Запустіть диспетчер налаштувань від імені користувача root + Ayar yöneticisini root kullanıcısı olarak çalıştırın + ரூட் பயனரின் பெயரில் அமைப்புகள் மேலாளரை இயக்கவும் + Kör inställningshanteraren som root + Pokrenite upravnik postavkama kao root korisnik + Покрените управник подешавањима као корисник root + Zaženite upravitelja nastavitev kot uporabnik root + Spustite správcu nastavení ako používateľ root + Запустить диспетчер настроек от имени пользователя root + Rulați managerul de setări ca utilizator root + Execute o gerenciador de configurações como usuário root + Execute o gestor de definições como utilizador root + Uruchom menedżera ustawień jako użytkownik root + ਰੂਟ ਯੂਜ਼ਰ ਦੇ ਨਾਂ 'ਤੇ ਸੈਟਿੰਗ ਮੈਨੇਜਰ ਚਲਾਓ + ରୁଟ୍ ବ୍ୟବହାରକାରୀ ନାମରେ ସେଟିଂସ୍ ମ୍ୟାନେଜର୍ ଚାଲାନ୍ତୁ + Lance lo gestor de configuracions coma utilizator root + Kjør innstillingssjefen som root-brukar + Voer instellingenbeheerder uit als root-gebruiker + रूट वापरकर्त्याच्या नावाने सेटिंग्ज मॅनेजर चालवा + root ഉപയോക്താവിന്റെ പേരിൽ സെറ്റിംഗ്സ് മാനേജർ പ്രവർത്തിപ്പിക്കുക + Palaidiet iestatījumu pārvaldnieku kā root lietotājs + Paleiskite nustatymų tvarkyklę kaip root naudotoją + 루트 사용자로 설정 관리자 실행 + ರೂಟ್ ಬಳಕೆದಾರರಾಗಿ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ ಅನ್ನು ಚಾಲನೆ ಮಾಡಿ + root пайдаланушы атынан параметрлер менеджерін іске қосыңыз + root მომხმარებლის სახელით პარამეტრების მენეჯერის გაშვება + rootユーザーとして設定マネージャーを実行する + Esegui il gestore delle impostazioni come utente root + Jalankan pengelola pengaturan sebagai pengguna root + Execurre le manager de configurationes como usator root + Futtassa a beállításkezelőt root felhasználóként + Pokrenite upravitelj postavkama kao korisnik root + रूट उपयोगकर्ता के रूप में सेटिंग्स मैनेजर चलाएँ + הפעל את מנהל ההגדרות בשם משתמש root + રૂટ યૂઝર તરીકે સેટિંગ્સ મેનેજર ચલાવો + Execute o xestor de configuracións como usuario root + Eseguì il gestòr di impostazions come utent root + Exécutez le gestionnaire des paramètres en tant qu'utilisateur root + Suorita asetusten hallinta root-käyttäjänä + Exekutatu ezarpen kudeatzailea root erabiltzaile gisa + Ejecuta el administrador de configuraciones como usuario root + Rulu la agordojn-mastrilon kiel root-uzanto + Run settings manager as root + Εκτελέστε τον διαχειριστή ρυθμίσεων ως χρήστης root + Führen Sie den Einstellungsmanager als root-Benutzer aus + Kør indstillingsadministratoren som root-bruger + Spusťte správce nastavení jako uživatel root + Executeu el gestor de configuracions com a usuari root + রুট ব্যবহারকারী হিসেবে সেটিং ম্যানেজার চালান + Стартирайте мениджъра на настройките като потребител root + Ejecute'l xestor de configuración como usuariu root + root ব্যৱহাৰকাৰী হিচাপে ছেটিংছ মেনেজাৰ চলাও + شغّل مدير الإعدادات باسم مستخدم root + Voer instellingsbestuurder uit as root-gebruiker auth_admin auth_admin @@ -20,5 +130,4 @@ /usr/bin/ubl-settings-manager true - - + \ No newline at end of file diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index dfdad2a..ebb3650 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -15,7 +15,9 @@ add_definitions(${VTE291_CFLAGS_OTHER}) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) +option(WEBKIT_FOUND "No" OFF) if(WEBKIT_LIBRARIES_FOUND) + option(WEBKIT_FOUND "Yes" ON) PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0) include_directories(${WEBKIT_INCLUDE_DIRS}) link_directories(${WEBKIT_LIBRARY_DIRS}) @@ -49,26 +51,29 @@ add_custom_command( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${GLIB_COMPILE_RESOURCES} ARGS - --generate-source - --target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} - ${GRESOURCE_XML} + --generate-source + --target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} + ${GRESOURCE_XML} VERBATIM MAIN_DEPENDENCY ${GRESOURCE_XML} DEPENDS - ${GLADE} + ${GLADE} ) add_custom_target( - dummy-resource - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} + dummy-resource + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} ) -#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a") -#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -lm") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ -O2 -pipe -fno-plt -fexceptions \ - -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ + -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection") - + +string(FIND "${CMAKE_CXX_FLAGS}" "-D_FORTIFY_SOURCE" FORTIFY_FOUND) + +if(FORTIFY_FOUND EQUAL -1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wp,-D_FORTIFY_SOURCE=2") +endif() set(SOURCE_FILES ubl-settings-manager.c diff --git a/source/ubl-settings-manager-misc.c b/source/ubl-settings-manager-misc.c index a16f698..408f151 100644 --- a/source/ubl-settings-manager-misc.c +++ b/source/ubl-settings-manager-misc.c @@ -1,7 +1,7 @@ #include "ubl-settings-manager.h" -void yon_open_browser(GtkWidget *self, char *link){ +void yon_open_browser(GtkWidget *, char *link){ GtkWidget *window = yon_ubl_browser_window_open(link,template_app_information.app_title); if (window) gtk_window_set_icon_name(GTK_WINDOW(window),yon_char_append("com.ublinux.",template_app_information.app_tech_name)); @@ -43,12 +43,12 @@ void on_open_documentation_confirmation(GtkWidget *self, char *link){ * [uri] - ссылка, по которой совершается переход; * [user_data] - указатель на любые другие данные, не используется в стандартном обработчике; */ -void on_link(GtkWidget *self, char* uri, gpointer user_data){ +void on_link(GtkWidget *self, char* uri, gpointer){ gtk_widget_destroy(self); on_open_documentation_confirmation(self,uri); } -void on_about(GtkWidget *self, char *version_application){ +void on_about(GtkWidget *, char *version_application){ GtkBuilder *builder=gtk_builder_new_from_resource(ui_glade_path_about); GtkWidget *window=yon_gtk_builder_get_widget(builder,"AboutWindow"); GtkWidget *title=yon_gtk_builder_get_widget(builder,"headerAboutTopic"); diff --git a/source/ubl-settings-manager-settings-sections.c b/source/ubl-settings-manager-settings-sections.c index 764ec89..3cc301f 100644 --- a/source/ubl-settings-manager-settings-sections.c +++ b/source/ubl-settings-manager-settings-sections.c @@ -22,6 +22,7 @@ typedef struct { // GtkWidget *AcceptButton; } section_struct; +void yon_section_window_add_default(settings_section_window *window); void on_section_remove(GtkWidget *,section_struct *section); void on_section_add(GtkWidget *,settings_section_window *window); void on_section_clear(GtkWidget *,settings_section_window *window); diff --git a/source/ubl-settings-manager-settings.c b/source/ubl-settings-manager-settings.c index 21d9acb..caeab42 100644 --- a/source/ubl-settings-manager-settings.c +++ b/source/ubl-settings-manager-settings.c @@ -31,7 +31,7 @@ void on_settings_accept(GtkWidget *, settings_window *window){ settings_window *yon_settings_window_new(){ settings_window *window = malloc(sizeof(settings_window)); - memset(window,0,sizeof(window)); + memset(window,0,sizeof(settings_window)); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_settings); window->Window = yon_gtk_builder_get_widget(builder,"Window"); window->SizeSlider = yon_gtk_builder_get_widget(builder,"SizeSlider"); @@ -48,7 +48,7 @@ settings_window *yon_settings_window_new(){ g_signal_connect(G_OBJECT(window->SizeSlider),"change-value",G_CALLBACK(on_settings_size_changed),window); int size; - config_str themes = (config_str)g_hash_table_get_keys_as_array(main_config.themes,&size); + config_str themes = (config_str)g_hash_table_get_keys_as_array(main_config.themes,(guint*)&size); qsort(themes,size,sizeof(char*),yon_char_parsed_compare); for (int i=0;iThemeCombo),themes[i],themes[i]); @@ -59,7 +59,6 @@ settings_window *yon_settings_window_new(){ } else { gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->ThemeCombo),GNOME_THEME_LABEL); } - window->icon_size; if (!yon_window_config_get_parameter(settings_section,icon_size_parameter,&window->icon_size,YON_TYPE_INT)){ window->icon_size=32; } diff --git a/source/ubl-settings-manager-theme-gnome.c b/source/ubl-settings-manager-theme-gnome.c index 2a30286..7b2325b 100644 --- a/source/ubl-settings-manager-theme-gnome.c +++ b/source/ubl-settings-manager-theme-gnome.c @@ -6,6 +6,10 @@ typedef struct { app_section *section; } gnome_section; +gnome_section *yon_gnome_section_new(); +void yon_gnome_section_setup_apps(gnome_section *cur_section, const char *target); +void yon_gnome_section_search_show(gnome_section *section, const char *string); + void on_gnome_plug_connected(GtkWidget *,gnome_theme_struct *theme){ gtk_widget_show(theme->SocketBox); gtk_widget_hide(theme->HideBox); @@ -39,8 +43,8 @@ void on_gnome_activate(GtkWidget *,GtkListBoxRow *self, gnome_theme_struct *them } -void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *self, gnome_theme_struct *theme); -void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *self, gnome_theme_struct *theme){ +void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *, gnome_theme_struct *theme); +void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *, gnome_theme_struct *theme){ GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree)); GList *iter; for (iter=list;iter;iter=iter->next){ @@ -53,13 +57,10 @@ void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *self, gnome_theme_str } } -void on_gnome_socket_add(){ - -} gnome_section *yon_gnome_section_new(){ gnome_section *cur_section = malloc(sizeof(gnome_section)); - memset(cur_section,0,sizeof(cur_section)); + memset(cur_section,0,sizeof(gnome_section)); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_gnome_section); cur_section->expander = yon_gtk_builder_get_widget(builder,"MainExpander"); cur_section->AppsList = yon_gtk_builder_get_widget(builder,"AppsList"); @@ -176,7 +177,6 @@ gnome_theme_struct *yon_gnome_theme_new(){ gtk_widget_show(theme->Socket); g_signal_connect(G_OBJECT(theme->SearchEntry),"changed",G_CALLBACK(on_gnome_search),theme); - g_signal_connect(G_OBJECT(theme->SocketBox),"add",G_CALLBACK(on_gnome_socket_add),theme); // gtk_cell_renderer_set_fixed_size(theme->IconCell,main_config.apps_icon_size,main_config.apps_icon_size); return theme; } diff --git a/source/ubl-settings-manager-theme-main.c b/source/ubl-settings-manager-theme-main.c index 5b42271..15d3540 100644 --- a/source/ubl-settings-manager-theme-main.c +++ b/source/ubl-settings-manager-theme-main.c @@ -7,6 +7,9 @@ typedef struct { app_section *section; } main_section; +void yon_main_section_setup_apps(main_section *cur_section, const char *target); +main_section *yon_main_section_new(); +void yon_main_section_get_max_size(main_section *section, int *ret_width, int *ret_height); void on_main_plug_connected(GtkWidget *,main_theme_struct *theme){ gtk_widget_show(theme->SocketBox); @@ -37,7 +40,7 @@ void on_main_selected(GtkWidget* self, main_theme_struct *theme){ } } -void on_main_activate(GtkFlowBox* self, GtkFlowBoxChild* child, main_theme_struct *theme){ +void on_main_activate(GtkFlowBox* , GtkFlowBoxChild* child, main_theme_struct *theme){ theme->Socket = GTK_WIDGET(yon_sockets_init(GTK_BOX(theme->SocketBox))); g_signal_connect(G_OBJECT(theme->Socket),"plug_added",G_CALLBACK(on_main_plug_connected),theme); g_signal_connect(G_OBJECT(theme->Socket),"destroy",G_CALLBACK(on_main_plug_disconnected),theme); @@ -57,9 +60,9 @@ void on_main_activate(GtkFlowBox* self, GtkFlowBoxChild* child, main_theme_struc yon_launch_app_with_arguments(command,command_args); } -void on_main_socket_add(){ +// void on_main_socket_add(){ -} +// } void yon_main_section_setup_apps(main_section *cur_section, const char *target){ if (yon_char_is_empty(target)) return; @@ -104,7 +107,7 @@ void yon_main_section_setup_apps(main_section *cur_section, const char *target){ main_section *yon_main_section_new(){ main_section *cur_section = malloc(sizeof(main_section)); - memset(cur_section,0,sizeof(cur_section)); + memset(cur_section,0,sizeof(main_section)); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_main_section); cur_section->expander = yon_gtk_builder_get_widget(builder,"MainExpander"); cur_section->MainLabel = yon_gtk_builder_get_widget(builder,"MainLabel"); @@ -167,10 +170,10 @@ void yon_main_theme_resize(main_theme_struct *theme){ } } -void yon_main_update(main_theme_struct *theme){ +int yon_main_update(main_theme_struct *theme){ GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree)); GList *iter; - for (iter=list;iter;iter->next){ + for (iter=list;iter;iter=iter->next){ gtk_widget_destroy(GTK_WIDGET(iter->data)); } @@ -181,6 +184,7 @@ void yon_main_update(main_theme_struct *theme){ } yon_main_theme_resize(theme); + return 1; } main_theme_struct *yon_main_theme_new(){ @@ -195,6 +199,5 @@ main_theme_struct *yon_main_theme_new(){ theme->Socket = NULL; theme->list_update_func = (int(*)(struct main_theme_struct*))yon_main_update; - g_signal_connect(G_OBJECT(theme->SocketBox),"add",G_CALLBACK(on_main_socket_add),theme); return theme; } diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index bdc8274..925e3e9 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -518,9 +518,9 @@ char *yon_get_load_socket(){ return NULL; } -void confugure_setings_window(main_window *widgets){ +// void confugure_setings_window(main_window *widgets){ -} +// } void yon_interface_update(main_window *widgets){ if (main_config.sections) { @@ -645,7 +645,7 @@ int main(int argc, char *argv[]){ } } gtk_init(&argc, &argv); - main_window *widgets = yon_main_window_setup(); + yon_main_window_setup(); GtkCssProvider *css=gtk_css_provider_new(); gtk_css_provider_load_from_resource(css,CssPath); diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index 64ea623..0ce7ca7 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -234,5 +234,24 @@ void yon_interface_update(main_window *widgets); void on_settings_open(GtkWidget *, main_window *widgets); void yon_section_window_open(GtkWidget *, settings_window *settings); +void on_reveal_banner(GtkWidget *, main_window *widgets); +void config_init(); +void yon_config_update(); +void on_back_clicked(GtkWidget *, GtkWidget *socket); +void on_plug_connected(GtkSocket *self, main_window *widgets); +main_window *yon_main_window_setup(); +gboolean on_settings_size_changed(GtkRange* , GtkScrollType* , gdouble value, settings_window *window); +settings_window *yon_settings_window_new(); +void on_gnome_plug_connected(GtkWidget *,gnome_theme_struct *theme); +void on_gnome_plug_disconnected(GtkWidget *,gnome_theme_struct *theme); +void yon_gnome_section_setup(gnome_theme_struct *theme,app_section *section); +int yon_gnome_update(gnome_theme_struct *theme); +void on_gnome_search(GtkWidget *, gnome_theme_struct *theme); +void on_main_plug_connected(GtkWidget *,main_theme_struct *theme); +void on_main_plug_disconnected(GtkWidget *,main_theme_struct *theme); +void on_main_activate(GtkFlowBox* , GtkFlowBoxChild* child, main_theme_struct *theme); +void yon_main_section_setup(main_theme_struct *theme, app_section *section); +void yon_main_theme_resize(main_theme_struct *theme); +int yon_main_update(main_theme_struct *theme); #endif \ No newline at end of file diff --git a/ubl-settings-manager.desktop b/ubl-settings-manager.desktop index e0d1b2e..db0d747 100644 --- a/ubl-settings-manager.desktop +++ b/ubl-settings-manager.desktop @@ -1,14 +1,243 @@ [Desktop Entry] +Version=1.0 Encoding=UTF-8 -Name=ubl-settings-manager -Name[ru]=Диспетчер настроек UBLinux -GenericName=ubl-settings-manager -GenericName[ru]=Диспетчер настроек UBLinux -Comment=ubl-settings-manager -Comment[ru]=Графический диспетчер настроек UBLinux +Name=Settings manager for the system +Name[zh_TW]=系統設定管理器 +Name[zh_CN]=系统设置管理器 +Name[te]=సిస్టమ్ సెట్టింగ్స్ మేనేజర్ +Name[uk]=Менеджер налаштувань системи +Name[tr]=Sistem için ayar yöneticisi +Name[ta]=கணினி அமைப்புகளுக்கான மேலாளர் +Name[sv]=Inställningshanterare för systemet +Name[sr@latin]=Upravnik podešavanja sistema +Name[sr]=Управник поставки система +Name[sl]=Upravljalnik nastavitev sistema +Name[sk]=Správca nastavení systému +Name[ru]=Диспетчер настроек +Name[ro]=Manager de setări pentru sistem +Name[pt_BR]=Gerenciador de configurações do sistema +Name[pt]=Gestor de definições do sistema +Name[pl]=Menadżer ustawień systemu +Name[pa]=ਸਿਸਟਮ ਲਈ ਸੈਟਿੰਗ ਮੈਨੇਜਰ +Name[or]=ସିଷ୍ଟମ ପାଇଁ ସେଟିଂସ୍ ମ୍ୟାନେଜର୍ +Name[oc]=Gestionari de configuracions pel sistèma +Name[nn]=Innstillingsbehandlar for systemet +Name[nl]=Instellingenbeheerder voor het systeem +Name[mr]=सिस्टमसाठी सेटिंग्ज व्यवस्थापक +Name[ml]=സിസ്റ്റം സെറ്റിങ്ങുകൾ മാനേജർ +Name[lv]=Sistēmas iestatījumu pārvaldnieks +Name[lt]=Sistemos nustatymų tvarkyklė +Name[ko]=시스템 설정 관리자 +Name[kn]=ಸಿಸ್ಟಮ್ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ +Name[kk]=Жүйенің баптаулар басқарушысы +Name[ka]=სისტემის პარართების მენეჯერი +Name[ja]=システムの設定マネージャー +Name[it]=Gestore delle impostazioni del sistema +Name[id]=Pengelola pengaturan sistem +Name[ia]=Manager de configurationes pro le systema +Name[hu]=Rendszer beállításkezelő +Name[hr]=Upravitelj postavki sustava +Name[hi]=सिस्टम के लिए सेटिंग्स मैनेजर +Name[he]=מנהל ההגדרות של המערכת +Name[gu]=સિસ્ટમ માટે સેટિંગ મેનેજર +Name[gl]=Xestor de configuracións do sistema +Name[fur]=Gestôr des impostazions dal sistem +Name[fr]=Gestionnaire des paramètres du système +Name[fi]=Järjestelmän asetusten hallintaohjelma +Name[eu]=Sistemaren ezarpen kudeatzailea +Name[es]=Administrador de configuración del sistema +Name[eo]=Agordilo mastrumilo por la sistemo +Name[en_GB]=Settings manager for the system +Name[el]=Διαχειριστής ρυθμίσεων για το σύστημα +Name[de]=Einstellungsmanager für das System +Name[da]=Indstillingsadministrator for systemet +Name[cs]=Správce nastavení systému +Name[ca]=Gestor de configuracions del sistema +Name[bn_IN]=সিস্টেমের জন্য সেটিংস ম্যানেজার +Name[bg]=Мениджър на настройките за системата +Name[ast]=Xestor de configuración del sistema +Name[as]=চিষ্টেমৰ বাবে ছেটিঙছ মেনেজাৰ +Name[ar]=مدير إعدادات النظام +Name[af]=Instellingsbestuurder vir die stelsel +GenericName=Settings manager for the system +GenericName[zh_TW]=系統設定管理器 +GenericName[zh_CN]=系统设置管理器 +GenericName[te]=సిస్టమ్ సెట్టింగ్స్ మేనేజర్ +GenericName[uk]=Менеджер налаштувань системи +GenericName[tr]=Sistem için ayar yöneticisi +GenericName[ta]=கணினி அமைப்புகளுக்கான மேலாளர் +GenericName[sv]=Inställningshanterare för systemet +GenericName[sr@latin]=Upravnik podešavanja sistema +GenericName[sr]=Управник поставки система +GenericName[sl]=Upravljalnik nastavitev sistema +GenericName[sk]=Správca nastavení systému +GenericName[ru]=Диспетчер настроек +GenericName[ro]=Manager de setări pentru sistem +GenericName[pt_BR]=Gerenciador de configurações do sistema +GenericName[pt]=Gestor de definições do sistema +GenericName[pl]=Menadżer ustawień systemu +GenericName[pa]=ਸਿਸਟਮ ਲਈ ਸੈਟਿੰਗ ਮੈਨੇਜਰ +GenericName[or]=ସିଷ୍ଟମ ପାଇଁ ସେଟିଂସ୍ ମ୍ୟାନେଜର୍ +GenericName[oc]=Gestionari de configuracions pel sistèma +GenericName[nn]=Innstillingsbehandlar for systemet +GenericName[nl]=Instellingenbeheerder voor het systeem +GenericName[mr]=सिस्टमसाठी सेटिंग्ज व्यवस्थापक +GenericName[ml]=സിസ്റ്റം സെറ്റിങ്ങുകൾ മാനേജർ +GenericName[lv]=Sistēmas iestatījumu pārvaldnieks +GenericName[lt]=Sistemos nustatymų tvarkyklė +GenericName[ko]=시스템 설정 관리자 +GenericName[kn]=ಸಿಸ್ಟಮ್ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ +GenericName[kk]=Жүйенің баптаулар басқарушысы +GenericName[ka]=სისტემის პარართების მენეჯერი +GenericName[ja]=システムの設定マネージャー +GenericName[it]=Gestore delle impostazioni del sistema +GenericName[id]=Pengelola pengaturan sistem +GenericName[ia]=Manager de configurationes pro le systema +GenericName[hu]=Rendszer beállításkezelő +GenericName[hr]=Upravitelj postavki sustava +GenericName[hi]=सिस्टम के लिए सेटिंग्स मैनेजर +GenericName[he]=מנהל ההגדרות של המערכת +GenericName[gu]=સિસ્ટમ માટે સેટિંગ મેનેજર +GenericName[gl]=Xestor de configuracións do sistema +GenericName[fur]=Gestôr des impostazions dal sistem +GenericName[fr]=Gestionnaire des paramètres du système +GenericName[fi]=Järjestelmän asetusten hallintaohjelma +GenericName[eu]=Sistemaren ezarpen kudeatzailea +GenericName[es]=Administrador de configuración del sistema +GenericName[eo]=Agordilo mastrumilo por la sistemo +GenericName[en_GB]=Settings manager for the system +GenericName[el]=Διαχειριστής ρυθμίσεων για το σύστημα +GenericName[de]=Einstellungsmanager für das System +GenericName[da]=Indstillingsadministrator for systemet +GenericName[cs]=Správce nastavení systému +GenericName[ca]=Gestor de configuracions del sistema +GenericName[bn_IN]=সিস্টেমের জন্য সেটিংস ম্যানেজার +GenericName[bg]=Мениджър на настройките за системата +GenericName[ast]=Xestor de configuración del sistema +GenericName[as]=চিষ্টেমৰ বাবে ছেটিঙছ মেনেজাৰ +GenericName[ar]=مدير إعدادات النظام +GenericName[af]=Instellingsbestuurder vir die stelsel +Comment=Graphical settings manager for the system +Comment[zh_TW]=系統的圖形設置管理器 +Comment[zh_CN]=系统的图形设置管理器 +Comment[te]=సిస్టమ్ కోసం గ్రాఫికల్ సెట్టింగ్స్ మేనేజర్ +Comment[uk]=Графічний менеджер налаштувань для системи +Comment[tr]=Sistem için grafiksel ayarlar yöneticisi +Comment[ta]=அமைப்பிற்கான வரைபட அமைப்பமைவு மேலாளர் +Comment[sv]=Grafik inställningshanterare för systemet +Comment[sr@latin]=Grafički upravnik podešavanja za sistem +Comment[sr]=Графички управник подешавања за систем +Comment[sl]=Grafični upravitelj nastavitev za sistem +Comment[sk]=Grafický správca nastavení pre systém +Comment[ru]=Графический диспетчер настроек для системы +Comment[ro]=Manager grafic pentru setările sistemului +Comment[pt_BR]=Gerenciador gráfico de configurações para o sistema +Comment[pt]=Gerenciador gráfico de configurações para o sistema +Comment[pl]=Graficzny menedżer ustawień systemu +Comment[pa]=ਸਿਸਟਮ ਲਈ ਗ੍ਰਾਫਿਕ ਅਨੁਕੂਲਤਾ ਮੇਨੇਜਰ +Comment[or]=ସିଷ୍ଟମ ପାଇଁ ଗ୍ରାଫିକ୍ ସେଟିଂ ମ୍ୟାନେଜର୍ +Comment[oc]=Gestor grafic de configuracions per al sistèma +Comment[nn]=Grafisk innstillingar-vert for systemet +Comment[nl]=Grafische instellingenbeheerder voor het systeem +Comment[mr]=सिस्टिमसाठी ग्राफिकल सेटिंग मॅनेजर +Comment[ml]=സിസ്റ്റത്തിനുള്ള ഗ്രാഫിക്കൽ സജ്ജീകരണ മാനേജർ +Comment[lv]=Grafiskais iestatījumu pārvaldnieks sistēmai +Comment[lt]=Grafinis sistemos nustatymų valdiklis +Comment[ko]=시스템용 그래픽 설정 관리자 +Comment[kn]=ವ್ಯವಸ್ಥೆಗೆ ಗ್ರಾಫಿಕಲ್ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ +Comment[kk]=Жүйеге арналған графикалық баптау менеджері +Comment[ka]=სისტემისთვის გრაფიკული პარამეტრების მენეჯერ +Comment[ja]=システムのグラフィカル設定マネージャー +Comment[it]=Gestore grafico delle impostazioni per il sistema +Comment[id]=Pengelola pengaturan grafis untuk sistem +Comment[ia]=Manager graphic del configurationes pro le systema +Comment[hu]=Grafikus beállításkezelő a rendszerhez +Comment[hr]=Grafički upravitelj postavki za sustav +Comment[hi]=सिस्टम के लिए ग्राफिकल सेटिंग्स मैनेजर +Comment[he]=מנהל הגדרות גרפיות למערכת +Comment[gu]=સિસ્ટમ માટે ગ્રાફિકલ સેટિંગ મેનેજર +Comment[gl]=Xestor gráfico de configuracións para o sistema +Comment[fur]=Gestôr grafic des impostazions par il sistem +Comment[fr]=Gestionnaire graphique des paramètres du système +Comment[fi]=Grafiikkasetusten hallintajärjestelmä +Comment[eu]=Sistemaren konfigurazio kudeatzaile grafikoa +Comment[es]=Administrador gráfico de configuraciones para el sistema +Comment[eo]=Grafika agordilo por la sistemo +Comment[en_GB]=Graphical settings manager for the system +Comment[el]=Γραφικός διαχειριστής ρυθμίσεων για το σύστημα +Comment[de]=Grafischer Einstellungsmanager für das System +Comment[da]=Grafisk indstillingsadministrator for systemet +Comment[cs]=Grafický správce nastavení pro systém +Comment[ca]=Gestor gràfic de configuracions per al sistema +Comment[bn_IN]=সিস্টেমের জন্য গ্রাফিকাল সেটিংস ম্যানেজার +Comment[bg]=Графичен мениджър на настройките за системата +Comment[ast]=Xestor gráfico d’axustes pa’l sistema +Comment[as]=প্ৰণালীটোৰ বাবে গ্ৰাফিকেল ছেটিংছ মেনেজাৰ +Comment[ar]=مدير إعدادات الرسوميات للنظام +Comment[af]=Grafiese instellingsbestuurder vir die stelsel +Keywords=settings;manager;system; +Comment[zh_TW]=設定;管理員;系統; +Comment[zh_CN]=设置;管理器;系统; +Comment[te]=సెట్టింగ్స్;మెనీేజర్;సిస్టమ్; +Comment[uk]=налаштування;диспетчер;система; +Comment[tr]=ayarlar;yönetici;sistem; +Comment[ta]=அமைப்புகள்;மேலாளர்;கணினி; +Comment[sv]=inställningar;hanterare;system; +Comment[sr@latin]=podešavanja;menadžer;sistem; +Comment[sr]=подешавања;менаџер;систем; +Comment[sl]=nastavitve;upravitelj;sistem; +Comment[sk]=nastavenia;správca;systém; +Comment[ru]=настройки;диспетчер;система; +Comment[ro]=setări;manager;sistem; +Comment[pt_BR]=configurações;gerenciador;sistema; +Comment[pt]=configurações;gestor;sistema; +Comment[pl]=ustawienia;menedżer;system; +Comment[pa]=ਸੈਟਿੰਗਾਂ;ਮੈਨੇਜਰ;ਤੰਤਰ; +Comment[or]=ବିନ୍ୟାସ;ବ୍ୟବସ୍ଥାପକ;ପ୍ରଣାଳୀ; +Comment[oc]=configuracions;gerent;sistèma; +Comment[nn]=innstillingar;sjef;system; +Comment[nl]=instellingen;beheerder;systeem; +Comment[mr]=सेटिंग्ज;मॅनेजर;सिस्टीम; +Comment[ml]=ക്രമീകരണങ്ങൾ;മെനേജർ;സിസ്റ്റം; +Comment[lv]=iestatījumi;pārvaldnieks;sistēma; +Comment[lt]=nustatymai;valdytojas;sistema; +Comment[ko]=설정;관리자;시스템; +Comment[kn]=ಸೆಟ್ಟಿಂಗ್ಸ್;ಮ್ಯಾನೇಜರ್;ಸಿಸ್ಟಂ; +Comment[kk]=баптаулар;басқарушы;жүйе; +Comment[ka]=პარამეტრები;მენეჯერი;სისტემა; +Comment[ja]=設定;マネージャー;システム; +Comment[it]=impostazioni;gestore;sistema; +Comment[id]=pengaturan;manajer;sistem; +Comment[ia]=configurationes;manager;systema; +Comment[hu]=beállítások;kezelő;rendszer; +Comment[hr]=postavke;upravitelj;sustav; +Comment[hi]=सेटिंग्स;प्रबंधक;सिस्टम; +Comment[he]=הגדרות;מנהל;מערכת; +Comment[gu]=સેટિંગ્સ;મૅનેજર;સિસ્ટમ; +Comment[gl]=configuracións;xestor;sistema; +Comment[fur]=impostazions;gestôr;sisteme; +Comment[fr]=paramètres;gestionnaire;système; +Comment[fi]=asetukset;hallinta;järjestelmä; +Comment[eu]=ezarpenak;kudeatzailea;sistema; +Comment[es]=configuraciones;gestor;sistema; +Comment[eo]=agordoj;mastrumanto;sistemo; +Comment[en_GB]=settings;manager;system; +Comment[el]=ρυθμίσεις;διαχειριστής;σύστημα; +Comment[de]=einstellungen;manager;system; +Comment[da]=indstillinger;administrator;system; +Comment[cs]=nastavení;správce;systém; +Comment[ca]=configuracions;gestor; sistema; +Comment[bn_IN]=সেটিংস;ম্যানেজার;সিস্টেম; +Comment[bg]=настройки;мениджър;система; +Comment[ast]=configuración;xerente;sistema; +Comment[as]=ছেটিংচ;ম্যানেজাৰ;চিষ্টেম; +Comment[ar]=الإعدادات;المدير;النظام; +Comment[af]=instellings;bestuurder;stelsel; Type=Application Exec=ubl-settings-manager Icon=com.ublinux.ubl-settings-manager Terminal=false +StartupNotify=true +StartupWMClass=ubl-settings-manager X-XfcePluggable=false -Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog; +Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog; \ No newline at end of file -- 2.35.1 From 7fc1530769ac19ec66fd57774d7e9c19041f3e86 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 26 Nov 2025 10:00:17 +0600 Subject: [PATCH 5/7] Conflict error --- com.ublinux.ubl-settings-manager.policy | 125 +----------- ubl-settings-manager.desktop | 243 +----------------------- 2 files changed, 15 insertions(+), 353 deletions(-) diff --git a/com.ublinux.ubl-settings-manager.policy b/com.ublinux.ubl-settings-manager.policy index a010b58..63fd4eb 100644 --- a/com.ublinux.ubl-settings-manager.policy +++ b/com.ublinux.ubl-settings-manager.policy @@ -3,125 +3,15 @@ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> + UBLinux https://ublinux.ru + - Run settings manager as root - 以 root 身份執行設定管理器 - 以 root 身份运行设置管理器 - రూట్‌గా సెట్టింగ్స్ మేనేజర్‌ను నడపండి - Запустіть диспетчер налаштувань від імені користувача root - Ayar yöneticisini root kullanıcısı olarak çalıştırın - ரூட் பயனரின் பெயரில் அமைப்புகள் மேலாளரை இயக்கவும் - Kör inställningshanteraren som root - Pokrenite upravnik postavkama kao root korisnik - Покрените управник подешавањима као корисник root - Zaženite upravitelja nastavitev kot uporabnik root - Spustite správcu nastavení ako používateľ root - Запустить диспетчер настроек от имени пользователя root - Rulați managerul de setări ca utilizator root - Execute o gerenciador de configurações como usuário root - Execute o gestor de definições como utilizador root - Uruchom menedżera ustawień jako użytkownik root - ਰੂਟ ਯੂਜ਼ਰ ਦੇ ਨਾਂ 'ਤੇ ਸੈਟਿੰਗ ਮੈਨੇਜਰ ਚਲਾਓ - ରୁଟ୍ ବ୍ୟବହାରକାରୀ ନାମରେ ସେଟିଂସ୍ ମ୍ୟାନେଜର୍ ଚାଲାନ୍ତୁ - Lance lo gestor de configuracions coma utilizator root - Kjør innstillingssjefen som root-brukar - Voer instellingenbeheerder uit als root-gebruiker - रूट वापरकर्त्याच्या नावाने सेटिंग्ज मॅनेजर चालवा - root ഉപയോക്താവിന്റെ പേരിൽ സെറ്റിംഗ്സ് മാനേജർ പ്രവർത്തിപ്പിക്കുക - Palaidiet iestatījumu pārvaldnieku kā root lietotājs - Paleiskite nustatymų tvarkyklę kaip root naudotoją - 루트 사용자로 설정 관리자 실행 - ರೂಟ್ ಬಳಕೆದಾರರಾಗಿ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ ಅನ್ನು ಚಾಲನೆ ಮಾಡಿ - root пайдаланушы атынан параметрлер менеджерін іске қосыңыз - root მომხმარებლის სახელით პარამეტრების მენეჯერის გაშვება - rootユーザーとして設定マネージャーを実行する - Esegui il gestore delle impostazioni come utente root - Jalankan pengelola pengaturan sebagai pengguna root - Execurre le manager de configurationes como usator root - Futtassa a beállításkezelőt root felhasználóként - Pokrenite upravitelj postavkama kao korisnik root - रूट उपयोगकर्ता के रूप में सेटिंग्स मैनेजर चलाएँ - הפעל את מנהל ההגדרות בשם משתמש root - રૂટ યૂઝર તરીકે સેટિંગ્સ મેનેજર ચલાવો - Execute o xestor de configuracións como usuario root - Eseguì il gestòr di impostazions come utent root - Exécutez le gestionnaire des paramètres en tant qu'utilisateur root - Suorita asetusten hallinta root-käyttäjänä - Exekutatu ezarpen kudeatzailea root erabiltzaile gisa - Ejecuta el administrador de configuraciones como usuario root - Rulu la agordojn-mastrilon kiel root-uzanto - Run settings manager as root - Εκτελέστε τον διαχειριστή ρυθμίσεων ως χρήστης root - Führen Sie den Einstellungsmanager als root-Benutzer aus - Kør indstillingsadministratoren som root-bruger - Spusťte správce nastavení jako uživatel root - Executeu el gestor de configuracions com a usuari root - রুট ব্যবহারকারী হিসেবে সেটিং ম্যানেজার চালান - Стартирайте мениджъра на настройките като потребител root - Ejecute'l xestor de configuración como usuariu root - root ব্যৱহাৰকাৰী হিচাপে ছেটিংছ মেনেজাৰ চলাও - شغّل مدير الإعدادات باسم مستخدم root - Voer instellingsbestuurder uit as root-gebruiker - Authentication is required to run settings manager as root - 以 root 身份執行設定管理器 - 以 root 身份运行设置管理器 - రూట్‌గా సెట్టింగ్స్ మేనేజర్‌ను నడపండి - Запустіть диспетчер налаштувань від імені користувача root - Ayar yöneticisini root kullanıcısı olarak çalıştırın - ரூட் பயனரின் பெயரில் அமைப்புகள் மேலாளரை இயக்கவும் - Kör inställningshanteraren som root - Pokrenite upravnik postavkama kao root korisnik - Покрените управник подешавањима као корисник root - Zaženite upravitelja nastavitev kot uporabnik root - Spustite správcu nastavení ako používateľ root - Запустить диспетчер настроек от имени пользователя root - Rulați managerul de setări ca utilizator root - Execute o gerenciador de configurações como usuário root - Execute o gestor de definições como utilizador root - Uruchom menedżera ustawień jako użytkownik root - ਰੂਟ ਯੂਜ਼ਰ ਦੇ ਨਾਂ 'ਤੇ ਸੈਟਿੰਗ ਮੈਨੇਜਰ ਚਲਾਓ - ରୁଟ୍ ବ୍ୟବହାରକାରୀ ନାମରେ ସେଟିଂସ୍ ମ୍ୟାନେଜର୍ ଚାଲାନ୍ତୁ - Lance lo gestor de configuracions coma utilizator root - Kjør innstillingssjefen som root-brukar - Voer instellingenbeheerder uit als root-gebruiker - रूट वापरकर्त्याच्या नावाने सेटिंग्ज मॅनेजर चालवा - root ഉപയോക്താവിന്റെ പേരിൽ സെറ്റിംഗ്സ് മാനേജർ പ്രവർത്തിപ്പിക്കുക - Palaidiet iestatījumu pārvaldnieku kā root lietotājs - Paleiskite nustatymų tvarkyklę kaip root naudotoją - 루트 사용자로 설정 관리자 실행 - ರೂಟ್ ಬಳಕೆದಾರರಾಗಿ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ ಅನ್ನು ಚಾಲನೆ ಮಾಡಿ - root пайдаланушы атынан параметрлер менеджерін іске қосыңыз - root მომხმარებლის სახელით პარამეტრების მენეჯერის გაშვება - rootユーザーとして設定マネージャーを実行する - Esegui il gestore delle impostazioni come utente root - Jalankan pengelola pengaturan sebagai pengguna root - Execurre le manager de configurationes como usator root - Futtassa a beállításkezelőt root felhasználóként - Pokrenite upravitelj postavkama kao korisnik root - रूट उपयोगकर्ता के रूप में सेटिंग्स मैनेजर चलाएँ - הפעל את מנהל ההגדרות בשם משתמש root - રૂટ યૂઝર તરીકે સેટિંગ્સ મેનેજર ચલાવો - Execute o xestor de configuracións como usuario root - Eseguì il gestòr di impostazions come utent root - Exécutez le gestionnaire des paramètres en tant qu'utilisateur root - Suorita asetusten hallinta root-käyttäjänä - Exekutatu ezarpen kudeatzailea root erabiltzaile gisa - Ejecuta el administrador de configuraciones como usuario root - Rulu la agordojn-mastrilon kiel root-uzanto - Run settings manager as root - Εκτελέστε τον διαχειριστή ρυθμίσεων ως χρήστης root - Führen Sie den Einstellungsmanager als root-Benutzer aus - Kør indstillingsadministratoren som root-bruger - Spusťte správce nastavení jako uživatel root - Executeu el gestor de configuracions com a usuari root - রুট ব্যবহারকারী হিসেবে সেটিং ম্যানেজার চালান - Стартирайте мениджъра на настройките като потребител root - Ejecute'l xestor de configuración como usuariu root - root ব্যৱহাৰকাৰী হিচাপে ছেটিংছ মেনেজাৰ চলাও - شغّل مدير الإعدادات باسم مستخدم root - Voer instellingsbestuurder uit as root-gebruiker + Run ubl-settings-manager as root + Запуск утилиты ubl-settings-manager с правами root + Authentication is required to run ubl-settings-manager + Требуется авторизация для запуска утилиты ubl-settings-manager с правами root auth_admin auth_admin @@ -130,4 +20,5 @@ /usr/bin/ubl-settings-manager true - \ No newline at end of file + + diff --git a/ubl-settings-manager.desktop b/ubl-settings-manager.desktop index db0d747..e0d1b2e 100644 --- a/ubl-settings-manager.desktop +++ b/ubl-settings-manager.desktop @@ -1,243 +1,14 @@ [Desktop Entry] -Version=1.0 Encoding=UTF-8 -Name=Settings manager for the system -Name[zh_TW]=系統設定管理器 -Name[zh_CN]=系统设置管理器 -Name[te]=సిస్టమ్ సెట్టింగ్స్ మేనేజర్ -Name[uk]=Менеджер налаштувань системи -Name[tr]=Sistem için ayar yöneticisi -Name[ta]=கணினி அமைப்புகளுக்கான மேலாளர் -Name[sv]=Inställningshanterare för systemet -Name[sr@latin]=Upravnik podešavanja sistema -Name[sr]=Управник поставки система -Name[sl]=Upravljalnik nastavitev sistema -Name[sk]=Správca nastavení systému -Name[ru]=Диспетчер настроек -Name[ro]=Manager de setări pentru sistem -Name[pt_BR]=Gerenciador de configurações do sistema -Name[pt]=Gestor de definições do sistema -Name[pl]=Menadżer ustawień systemu -Name[pa]=ਸਿਸਟਮ ਲਈ ਸੈਟਿੰਗ ਮੈਨੇਜਰ -Name[or]=ସିଷ୍ଟମ ପାଇଁ ସେଟିଂସ୍ ମ୍ୟାନେଜର୍ -Name[oc]=Gestionari de configuracions pel sistèma -Name[nn]=Innstillingsbehandlar for systemet -Name[nl]=Instellingenbeheerder voor het systeem -Name[mr]=सिस्टमसाठी सेटिंग्ज व्यवस्थापक -Name[ml]=സിസ്റ്റം സെറ്റിങ്ങുകൾ മാനേജർ -Name[lv]=Sistēmas iestatījumu pārvaldnieks -Name[lt]=Sistemos nustatymų tvarkyklė -Name[ko]=시스템 설정 관리자 -Name[kn]=ಸಿಸ್ಟಮ್ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ -Name[kk]=Жүйенің баптаулар басқарушысы -Name[ka]=სისტემის პარართების მენეჯერი -Name[ja]=システムの設定マネージャー -Name[it]=Gestore delle impostazioni del sistema -Name[id]=Pengelola pengaturan sistem -Name[ia]=Manager de configurationes pro le systema -Name[hu]=Rendszer beállításkezelő -Name[hr]=Upravitelj postavki sustava -Name[hi]=सिस्टम के लिए सेटिंग्स मैनेजर -Name[he]=מנהל ההגדרות של המערכת -Name[gu]=સિસ્ટમ માટે સેટિંગ મેનેજર -Name[gl]=Xestor de configuracións do sistema -Name[fur]=Gestôr des impostazions dal sistem -Name[fr]=Gestionnaire des paramètres du système -Name[fi]=Järjestelmän asetusten hallintaohjelma -Name[eu]=Sistemaren ezarpen kudeatzailea -Name[es]=Administrador de configuración del sistema -Name[eo]=Agordilo mastrumilo por la sistemo -Name[en_GB]=Settings manager for the system -Name[el]=Διαχειριστής ρυθμίσεων για το σύστημα -Name[de]=Einstellungsmanager für das System -Name[da]=Indstillingsadministrator for systemet -Name[cs]=Správce nastavení systému -Name[ca]=Gestor de configuracions del sistema -Name[bn_IN]=সিস্টেমের জন্য সেটিংস ম্যানেজার -Name[bg]=Мениджър на настройките за системата -Name[ast]=Xestor de configuración del sistema -Name[as]=চিষ্টেমৰ বাবে ছেটিঙছ মেনেজাৰ -Name[ar]=مدير إعدادات النظام -Name[af]=Instellingsbestuurder vir die stelsel -GenericName=Settings manager for the system -GenericName[zh_TW]=系統設定管理器 -GenericName[zh_CN]=系统设置管理器 -GenericName[te]=సిస్టమ్ సెట్టింగ్స్ మేనేజర్ -GenericName[uk]=Менеджер налаштувань системи -GenericName[tr]=Sistem için ayar yöneticisi -GenericName[ta]=கணினி அமைப்புகளுக்கான மேலாளர் -GenericName[sv]=Inställningshanterare för systemet -GenericName[sr@latin]=Upravnik podešavanja sistema -GenericName[sr]=Управник поставки система -GenericName[sl]=Upravljalnik nastavitev sistema -GenericName[sk]=Správca nastavení systému -GenericName[ru]=Диспетчер настроек -GenericName[ro]=Manager de setări pentru sistem -GenericName[pt_BR]=Gerenciador de configurações do sistema -GenericName[pt]=Gestor de definições do sistema -GenericName[pl]=Menadżer ustawień systemu -GenericName[pa]=ਸਿਸਟਮ ਲਈ ਸੈਟਿੰਗ ਮੈਨੇਜਰ -GenericName[or]=ସିଷ୍ଟମ ପାଇଁ ସେଟିଂସ୍ ମ୍ୟାନେଜର୍ -GenericName[oc]=Gestionari de configuracions pel sistèma -GenericName[nn]=Innstillingsbehandlar for systemet -GenericName[nl]=Instellingenbeheerder voor het systeem -GenericName[mr]=सिस्टमसाठी सेटिंग्ज व्यवस्थापक -GenericName[ml]=സിസ്റ്റം സെറ്റിങ്ങുകൾ മാനേജർ -GenericName[lv]=Sistēmas iestatījumu pārvaldnieks -GenericName[lt]=Sistemos nustatymų tvarkyklė -GenericName[ko]=시스템 설정 관리자 -GenericName[kn]=ಸಿಸ್ಟಮ್ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ -GenericName[kk]=Жүйенің баптаулар басқарушысы -GenericName[ka]=სისტემის პარართების მენეჯერი -GenericName[ja]=システムの設定マネージャー -GenericName[it]=Gestore delle impostazioni del sistema -GenericName[id]=Pengelola pengaturan sistem -GenericName[ia]=Manager de configurationes pro le systema -GenericName[hu]=Rendszer beállításkezelő -GenericName[hr]=Upravitelj postavki sustava -GenericName[hi]=सिस्टम के लिए सेटिंग्स मैनेजर -GenericName[he]=מנהל ההגדרות של המערכת -GenericName[gu]=સિસ્ટમ માટે સેટિંગ મેનેજર -GenericName[gl]=Xestor de configuracións do sistema -GenericName[fur]=Gestôr des impostazions dal sistem -GenericName[fr]=Gestionnaire des paramètres du système -GenericName[fi]=Järjestelmän asetusten hallintaohjelma -GenericName[eu]=Sistemaren ezarpen kudeatzailea -GenericName[es]=Administrador de configuración del sistema -GenericName[eo]=Agordilo mastrumilo por la sistemo -GenericName[en_GB]=Settings manager for the system -GenericName[el]=Διαχειριστής ρυθμίσεων για το σύστημα -GenericName[de]=Einstellungsmanager für das System -GenericName[da]=Indstillingsadministrator for systemet -GenericName[cs]=Správce nastavení systému -GenericName[ca]=Gestor de configuracions del sistema -GenericName[bn_IN]=সিস্টেমের জন্য সেটিংস ম্যানেজার -GenericName[bg]=Мениджър на настройките за системата -GenericName[ast]=Xestor de configuración del sistema -GenericName[as]=চিষ্টেমৰ বাবে ছেটিঙছ মেনেজাৰ -GenericName[ar]=مدير إعدادات النظام -GenericName[af]=Instellingsbestuurder vir die stelsel -Comment=Graphical settings manager for the system -Comment[zh_TW]=系統的圖形設置管理器 -Comment[zh_CN]=系统的图形设置管理器 -Comment[te]=సిస్టమ్ కోసం గ్రాఫికల్ సెట్టింగ్స్ మేనేజర్ -Comment[uk]=Графічний менеджер налаштувань для системи -Comment[tr]=Sistem için grafiksel ayarlar yöneticisi -Comment[ta]=அமைப்பிற்கான வரைபட அமைப்பமைவு மேலாளர் -Comment[sv]=Grafik inställningshanterare för systemet -Comment[sr@latin]=Grafički upravnik podešavanja za sistem -Comment[sr]=Графички управник подешавања за систем -Comment[sl]=Grafični upravitelj nastavitev za sistem -Comment[sk]=Grafický správca nastavení pre systém -Comment[ru]=Графический диспетчер настроек для системы -Comment[ro]=Manager grafic pentru setările sistemului -Comment[pt_BR]=Gerenciador gráfico de configurações para o sistema -Comment[pt]=Gerenciador gráfico de configurações para o sistema -Comment[pl]=Graficzny menedżer ustawień systemu -Comment[pa]=ਸਿਸਟਮ ਲਈ ਗ੍ਰਾਫਿਕ ਅਨੁਕੂਲਤਾ ਮੇਨੇਜਰ -Comment[or]=ସିଷ୍ଟମ ପାଇଁ ଗ୍ରାଫିକ୍ ସେଟିଂ ମ୍ୟାନେଜର୍ -Comment[oc]=Gestor grafic de configuracions per al sistèma -Comment[nn]=Grafisk innstillingar-vert for systemet -Comment[nl]=Grafische instellingenbeheerder voor het systeem -Comment[mr]=सिस्टिमसाठी ग्राफिकल सेटिंग मॅनेजर -Comment[ml]=സിസ്റ്റത്തിനുള്ള ഗ്രാഫിക്കൽ സജ്ജീകരണ മാനേജർ -Comment[lv]=Grafiskais iestatījumu pārvaldnieks sistēmai -Comment[lt]=Grafinis sistemos nustatymų valdiklis -Comment[ko]=시스템용 그래픽 설정 관리자 -Comment[kn]=ವ್ಯವಸ್ಥೆಗೆ ಗ್ರಾಫಿಕಲ್ ಸೆಟ್ಟಿಂಗ್ಸ್ ಮ್ಯಾನೇಜರ್ -Comment[kk]=Жүйеге арналған графикалық баптау менеджері -Comment[ka]=სისტემისთვის გრაფიკული პარამეტრების მენეჯერ -Comment[ja]=システムのグラフィカル設定マネージャー -Comment[it]=Gestore grafico delle impostazioni per il sistema -Comment[id]=Pengelola pengaturan grafis untuk sistem -Comment[ia]=Manager graphic del configurationes pro le systema -Comment[hu]=Grafikus beállításkezelő a rendszerhez -Comment[hr]=Grafički upravitelj postavki za sustav -Comment[hi]=सिस्टम के लिए ग्राफिकल सेटिंग्स मैनेजर -Comment[he]=מנהל הגדרות גרפיות למערכת -Comment[gu]=સિસ્ટમ માટે ગ્રાફિકલ સેટિંગ મેનેજર -Comment[gl]=Xestor gráfico de configuracións para o sistema -Comment[fur]=Gestôr grafic des impostazions par il sistem -Comment[fr]=Gestionnaire graphique des paramètres du système -Comment[fi]=Grafiikkasetusten hallintajärjestelmä -Comment[eu]=Sistemaren konfigurazio kudeatzaile grafikoa -Comment[es]=Administrador gráfico de configuraciones para el sistema -Comment[eo]=Grafika agordilo por la sistemo -Comment[en_GB]=Graphical settings manager for the system -Comment[el]=Γραφικός διαχειριστής ρυθμίσεων για το σύστημα -Comment[de]=Grafischer Einstellungsmanager für das System -Comment[da]=Grafisk indstillingsadministrator for systemet -Comment[cs]=Grafický správce nastavení pro systém -Comment[ca]=Gestor gràfic de configuracions per al sistema -Comment[bn_IN]=সিস্টেমের জন্য গ্রাফিকাল সেটিংস ম্যানেজার -Comment[bg]=Графичен мениджър на настройките за системата -Comment[ast]=Xestor gráfico d’axustes pa’l sistema -Comment[as]=প্ৰণালীটোৰ বাবে গ্ৰাফিকেল ছেটিংছ মেনেজাৰ -Comment[ar]=مدير إعدادات الرسوميات للنظام -Comment[af]=Grafiese instellingsbestuurder vir die stelsel -Keywords=settings;manager;system; -Comment[zh_TW]=設定;管理員;系統; -Comment[zh_CN]=设置;管理器;系统; -Comment[te]=సెట్టింగ్స్;మెనీేజర్;సిస్టమ్; -Comment[uk]=налаштування;диспетчер;система; -Comment[tr]=ayarlar;yönetici;sistem; -Comment[ta]=அமைப்புகள்;மேலாளர்;கணினி; -Comment[sv]=inställningar;hanterare;system; -Comment[sr@latin]=podešavanja;menadžer;sistem; -Comment[sr]=подешавања;менаџер;систем; -Comment[sl]=nastavitve;upravitelj;sistem; -Comment[sk]=nastavenia;správca;systém; -Comment[ru]=настройки;диспетчер;система; -Comment[ro]=setări;manager;sistem; -Comment[pt_BR]=configurações;gerenciador;sistema; -Comment[pt]=configurações;gestor;sistema; -Comment[pl]=ustawienia;menedżer;system; -Comment[pa]=ਸੈਟਿੰਗਾਂ;ਮੈਨੇਜਰ;ਤੰਤਰ; -Comment[or]=ବିନ୍ୟାସ;ବ୍ୟବସ୍ଥାପକ;ପ୍ରଣାଳୀ; -Comment[oc]=configuracions;gerent;sistèma; -Comment[nn]=innstillingar;sjef;system; -Comment[nl]=instellingen;beheerder;systeem; -Comment[mr]=सेटिंग्ज;मॅनेजर;सिस्टीम; -Comment[ml]=ക്രമീകരണങ്ങൾ;മെനേജർ;സിസ്റ്റം; -Comment[lv]=iestatījumi;pārvaldnieks;sistēma; -Comment[lt]=nustatymai;valdytojas;sistema; -Comment[ko]=설정;관리자;시스템; -Comment[kn]=ಸೆಟ್ಟಿಂಗ್ಸ್;ಮ್ಯಾನೇಜರ್;ಸಿಸ್ಟಂ; -Comment[kk]=баптаулар;басқарушы;жүйе; -Comment[ka]=პარამეტრები;მენეჯერი;სისტემა; -Comment[ja]=設定;マネージャー;システム; -Comment[it]=impostazioni;gestore;sistema; -Comment[id]=pengaturan;manajer;sistem; -Comment[ia]=configurationes;manager;systema; -Comment[hu]=beállítások;kezelő;rendszer; -Comment[hr]=postavke;upravitelj;sustav; -Comment[hi]=सेटिंग्स;प्रबंधक;सिस्टम; -Comment[he]=הגדרות;מנהל;מערכת; -Comment[gu]=સેટિંગ્સ;મૅનેજર;સિસ્ટમ; -Comment[gl]=configuracións;xestor;sistema; -Comment[fur]=impostazions;gestôr;sisteme; -Comment[fr]=paramètres;gestionnaire;système; -Comment[fi]=asetukset;hallinta;järjestelmä; -Comment[eu]=ezarpenak;kudeatzailea;sistema; -Comment[es]=configuraciones;gestor;sistema; -Comment[eo]=agordoj;mastrumanto;sistemo; -Comment[en_GB]=settings;manager;system; -Comment[el]=ρυθμίσεις;διαχειριστής;σύστημα; -Comment[de]=einstellungen;manager;system; -Comment[da]=indstillinger;administrator;system; -Comment[cs]=nastavení;správce;systém; -Comment[ca]=configuracions;gestor; sistema; -Comment[bn_IN]=সেটিংস;ম্যানেজার;সিস্টেম; -Comment[bg]=настройки;мениджър;система; -Comment[ast]=configuración;xerente;sistema; -Comment[as]=ছেটিংচ;ম্যানেজাৰ;চিষ্টেম; -Comment[ar]=الإعدادات;المدير;النظام; -Comment[af]=instellings;bestuurder;stelsel; +Name=ubl-settings-manager +Name[ru]=Диспетчер настроек UBLinux +GenericName=ubl-settings-manager +GenericName[ru]=Диспетчер настроек UBLinux +Comment=ubl-settings-manager +Comment[ru]=Графический диспетчер настроек UBLinux Type=Application Exec=ubl-settings-manager Icon=com.ublinux.ubl-settings-manager Terminal=false -StartupNotify=true -StartupWMClass=ubl-settings-manager X-XfcePluggable=false -Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog; \ No newline at end of file +Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog; -- 2.35.1 From ef368e6f941ad0371ff0cc7e88e28e1981a94b1f Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 26 Nov 2025 10:02:04 +0600 Subject: [PATCH 6/7] Makefile return for conflict fix --- Makefile | 80 +++++++++++++++++++++++--------------------------------- 1 file changed, 33 insertions(+), 47 deletions(-) diff --git a/Makefile b/Makefile index 2e62183..a990f29 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ DEPENDS = /bin/cmake PREFIX ?= /usr/local PKGNAME = $(MAKEFILE_DIR) FILE_VER = source/${PKGNAME}.h +PKGIDENT=$(subst /,-,${PREFIX}) default_target: all @@ -21,9 +22,9 @@ all: init build init: @echo "Initialize ..."; \ - if [[ -d ".git" ]]; then \ + if [ -d ".git" ]; then \ LATEST_TAG=$$(git describe --abbrev=0 --tags | sed 's/^v//'); \ - if [[ -z "$${LATEST_TAG}" ]]; \ + if [ -z "$${LATEST_TAG}" ]; \ then \ LATEST_TAG=$$"0.0"; \ echo "$${LATEST_TAG} is empty"; \ @@ -37,7 +38,7 @@ init: depend: @echo "Check depends ..." @for FILE_DEPEND in $(DEPENDS); do \ - if [[ ! -f "$${FILE_DEPEND}" ]]; then \ + if [ ! -f $${FILE_DEPEND} ]; then \ echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \ exit 1; \ fi; \ @@ -47,21 +48,21 @@ depend: debug: @echo "Debug ..." - if [[ ! -d "${CMAKE_BUILD_DIR}" ]]; then \ + if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ echo "Debug: OK" prepare: @echo "Prepare ..."; \ - if [[ ! -d "${CMAKE_BUILD_DIR}" ]]; then \ + if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ echo "Prepare: OK" check: @echo "Check ..."; \ - if [[ -f "${CMAKE_BUILD_DIR}/${PKGNAME}" ]]; then \ + if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \ echo "Check: OK"; \ else \ echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not found !"; \ @@ -76,9 +77,10 @@ build: depend prepare uninstall: @echo "Uninstall ..." - @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ -# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ - PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ + @for FILE_PO in $(wildcard *.po); do \ + LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ + FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ + PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ $(RM) "$${PATH_FILE_MO}"; \ done @for SIZE in 16x16 32x32 48x48 scalable; do \ @@ -90,64 +92,48 @@ uninstall: $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \ done; \ done - @for FILE_ICON in $(wildcard icons/*/*.svg); do \ - SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \ - $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/$${SUB_NAME}/$${FILE_ICON##*/}"; \ - done @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" - @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ - $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy"; \ - else \ -# $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ - $(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ - fi - @if [[ -z "${DESTDIR}" ]]; then \ - [[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" + @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy" + @if [ -z ${DESTDIR} ]; then \ + [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ - [[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ fi @echo "Uninstall: OK" install: check uninstall @echo "Install ..." - @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ - install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ -# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ - PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ - PKGNAME_PO="./locale/${PKGNAME}_$${LANG}.po"; [[ -f "$${PKGNAME_PO}" ]] || PKGNAME_PO= ; \ - msgfmt --verbose --use-fuzzy --output-file "$${PATH_FILE_MO}" - < <(msgcat --use-first --no-wrap $${PKGNAME_PO} ./locale/*_$${LANG}.po); \ + @for FILE_PO in $(wildcard *.po); do \ + LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ + install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \ + FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ + PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ + echo "$${FILE_PO}"; \ + msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \ done @for SIZE in 16 32 48; do \ - install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ - rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ - done - @for FILE_ICON in $(wildcard icons/*/*.svg); do \ - SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \ - install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/$${SUB_NAME}" $${FILE_ICON}; \ + install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ + rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ done + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" + @cp ./com.ublinux.${PKGNAME}.policy ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy + @sed -e 's+/usr/bin+${PREFIX}/bin+' -e 's+.run+${PKGIDENT}.run+g' ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy -i @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" - @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ - install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"; \ - else \ -# install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ - install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ -# sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ - sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ - fi - @if [[ -z "${DESTDIR}" ]]; then \ - ldconfig -n ${DESTDIR}${PREFIX}/lib; \ - [[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + @install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy" + @if [ -z ${DESTDIR} ]; then \ + [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ - [[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ fi @echo "Install: OK" clean: @echo "Clean ..." @$(RM) -rd ${CMAKE_BUILD_DIR} - @if [[ -d "${CMAKE_BUILD_DIR}" ]]; then \ + @if [ -d ${CMAKE_BUILD_DIR} ]; then \ echo "Clean: error, compile directory exist ${CMAKE_BUILD_DIR}"; \ else \ echo "Clean: OK"; \ -- 2.35.1 From ab295f8d8e76bb0948ab7e387aaa61358faa5fb8 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 26 Nov 2025 10:03:16 +0600 Subject: [PATCH 7/7] Makefile update --- Makefile | 89 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index 8a9e47a..2e62183 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,6 @@ DEPENDS = /bin/cmake PREFIX ?= /usr/local PKGNAME = $(MAKEFILE_DIR) FILE_VER = source/${PKGNAME}.h -PKGIDENT = $(subst /,-,$(subst /usr,,${PREFIX})) default_target: all @@ -22,9 +21,9 @@ all: init build init: @echo "Initialize ..."; \ - if [ -d ".git" ]; then \ + if [[ -d ".git" ]]; then \ LATEST_TAG=$$(git describe --abbrev=0 --tags | sed 's/^v//'); \ - if [ -z "$${LATEST_TAG}" ]; \ + if [[ -z "$${LATEST_TAG}" ]]; \ then \ LATEST_TAG=$$"0.0"; \ echo "$${LATEST_TAG} is empty"; \ @@ -38,7 +37,7 @@ init: depend: @echo "Check depends ..." @for FILE_DEPEND in $(DEPENDS); do \ - if [ ! -f $${FILE_DEPEND} ]; then \ + if [[ ! -f "$${FILE_DEPEND}" ]]; then \ echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \ exit 1; \ fi; \ @@ -48,21 +47,21 @@ depend: debug: @echo "Debug ..." - if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ + if [[ ! -d "${CMAKE_BUILD_DIR}" ]]; then \ $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ echo "Debug: OK" prepare: @echo "Prepare ..."; \ - if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ + if [[ ! -d "${CMAKE_BUILD_DIR}" ]]; then \ $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ echo "Prepare: OK" check: @echo "Check ..."; \ - if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \ + if [[ -f "${CMAKE_BUILD_DIR}/${PKGNAME}" ]]; then \ echo "Check: OK"; \ else \ echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not found !"; \ @@ -77,10 +76,9 @@ build: depend prepare uninstall: @echo "Uninstall ..." - @for FILE_PO in $(wildcard *.po); do \ - LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ - FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ - PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ + @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ +# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ + PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ $(RM) "$${PATH_FILE_MO}"; \ done @for SIZE in 16x16 32x32 48x48 scalable; do \ @@ -92,51 +90,64 @@ uninstall: $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \ done; \ done - @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" - @$(RM) "${DESTDIR}${PREFIX}/share/${PKGNAME}" - @$(RM) "${DESTDIR}/etc/xdg/${PKGNAME}/${PKGNAME}.conf" - @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" + @for FILE_ICON in $(wildcard icons/*/*.svg); do \ + SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \ + $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/$${SUB_NAME}/$${FILE_ICON##*/}"; \ + done @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" - @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy" - @if [ -z ${DESTDIR} ]; then \ - [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" + @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ + $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy"; \ + else \ +# $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + $(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + fi + @if [[ -z "${DESTDIR}" ]]; then \ + [[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ - [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + [[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ fi @echo "Uninstall: OK" install: check uninstall @echo "Install ..." - @for FILE_PO in $(wildcard *.po); do \ - LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ - install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \ - FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ - PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ - echo "$${FILE_PO}"; \ - msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \ + @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ + install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ +# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ + PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ + PKGNAME_PO="./locale/${PKGNAME}_$${LANG}.po"; [[ -f "$${PKGNAME_PO}" ]] || PKGNAME_PO= ; \ + msgfmt --verbose --use-fuzzy --output-file "$${PATH_FILE_MO}" - < <(msgcat --use-first --no-wrap $${PKGNAME_PO} ./locale/*_$${LANG}.po); \ done @for SIZE in 16 32 48; do \ - install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ - rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ + install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ + rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ + done + @for FILE_ICON in $(wildcard icons/*/*.svg); do \ + SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \ + install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/$${SUB_NAME}" $${FILE_ICON}; \ done - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "ublinux-logo.svg" - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" - @install -Dm644 -t "${DESTDIR}/etc/xdg/${PKGNAME}/" "${PKGNAME}.conf" @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" - @install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy" - @sed -e '\|annotate key=|s|/usr/bin|${PREFIX}/bin|' -e '/action id=/s/\.run/${PKGIDENT}\.run/' -i ${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy - @if [ -z ${DESTDIR} ]; then \ - [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" + @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ + install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"; \ + else \ +# install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ +# sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ + fi + @if [[ -z "${DESTDIR}" ]]; then \ + ldconfig -n ${DESTDIR}${PREFIX}/lib; \ + [[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ - [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + [[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ fi @echo "Install: OK" clean: @echo "Clean ..." @$(RM) -rd ${CMAKE_BUILD_DIR} - @if [ -d ${CMAKE_BUILD_DIR} ]; then \ + @if [[ -d "${CMAKE_BUILD_DIR}" ]]; then \ echo "Clean: error, compile directory exist ${CMAKE_BUILD_DIR}"; \ else \ echo "Clean: OK"; \ @@ -148,7 +159,7 @@ help: echo "... init"; \ echo "... debug"; \ echo "... prepare"; \ - echo "... build"; \ + echo "... compile"; \ echo "... install"; \ echo "... uninstall"; \ echo "... clean" \ No newline at end of file -- 2.35.1