From 557d63ca19d227ee902d5bc6080d5a3790664837 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 28 Oct 2024 15:13:25 +0600 Subject: [PATCH] Fixes --- source/ubl-settings-update.c | 186 ++- source/ubl-settings-update.h | 22 +- source/ubl-strings.h | 8 + ubl-settings-update-repo-add.glade | 1098 ++++++++++++----- ubl-settings-update-web-publication-add.glade | 5 +- ubl-settings-update.css | 43 +- ubl-settings-update.glade | 9 +- ubl-settings-update.pot | 68 + ubl-settings-update_ru.po | 34 +- 9 files changed, 1102 insertions(+), 371 deletions(-) diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 1802420..b628a9f 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -24,24 +24,23 @@ void yon_save_interface(main_window *widgets){ yon_config_remove_by_key(AUTOUPDATE_interval); } else { char *int_str = yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin))); - char *interval = NULL; + char *interval = ""; + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->BootCheck))) interval = "boot"; switch(gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo))){ - case 0: interval = "boost"; + case 0: interval = yon_char_unite(!yon_char_is_empty(interval)?interval:"",!yon_char_is_empty(interval)?",":"",int_str,"min"); break; - case 1: interval = yon_char_append(int_str,"min"); + case 1: interval = yon_char_unite(int_str,"h",NULL); break; - case 2: interval = yon_char_append(int_str,"h"); + case 2: interval = yon_char_unite(int_str,"d",NULL); break; - case 3: interval = yon_char_append(int_str,"d"); - break; - case 4: interval = yon_char_append(int_str,"M"); + case 3: interval = yon_char_unite(int_str,"M",NULL); break; } yon_config_register(AUTOUPDATE,AUTOUPDATE_command,interval); } - if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateRepoListCombo))){ + if (!gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateRepoListCombo))){ yon_config_remove_by_key(AUTOUPDATE_repos); } else { char *repos = ""; @@ -68,15 +67,47 @@ void yon_save_interface(main_window *widgets){ } else { yon_config_register(REPOSITORY_parameter,REPOSITORY_parameter_command,"disable"); } + char *repo_net = ""; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->PublicationConnectPublicCheck))){ + repo_net = NULL; + repo_net = "enable"; + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RecieveDBFromNetCheck))){ + if (!repo_net) repo_net = ",db"; + else repo_net = yon_char_unite(repo_net,",","db",NULL); + }else { + repo_net = yon_char_unite(repo_net,",",NULL); + } + } else { + repo_net = "disable"; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RecieveDBFromNetCheck))){ - yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,"db"); + if (!repo_net) repo_net = ",db"; + else repo_net = yon_char_unite(repo_net,",","db",NULL); } else { - yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,"enable"); + repo_net = yon_char_unite(repo_net,",",NULL); } + } + + if (!gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->PublicationCombo))){ + yon_config_remove_by_key(REPOPUBLIC_NET_parameter); } else { - yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,"disable"); + char *repos = ""; + GtkTreeIter iter; + for_iter(GTK_TREE_MODEL(widgets->PublicationList),&iter){ + char *target; + int status; + gtk_tree_model_get(GTK_TREE_MODEL(widgets->PublicationList),&iter,0,&status,1,&target,-1); + if (status){ + char *temp = yon_char_unite(repos,!yon_char_is_empty(repos)?",":"",target,NULL); + if (!yon_char_is_empty(repos)) free(repos); + repos = temp; + } + } + if (!yon_char_is_empty(repos)){ + repo_net = yon_char_unite(repo_net,",",repos,NULL); + } } + yon_config_register(REPOPUBLIC_NET_parameter,REPOPUBLIC_NET_parameter_command,repo_net); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->MirrorPublicCheck))){ yon_config_register(REPOPUBLIC_CACHE,REPOPUBLIC_CACHE_command,"enable"); } else { @@ -153,15 +184,13 @@ void yon_interface_update(main_window *widgets){ config_str parsed = yon_char_parse(current,&cur_size,";"); if (cur_size){ gtk_list_store_append(widgets->ReposList,&iter); - char *temp = yon_char_replace(parsed[0],",","\n"); - free(parsed[0]); + char *temp = strstr(parsed[0],",")?yon_char_replace(parsed[0],",","\n"):parsed[0]; parsed[0] = temp; gtk_list_store_set(widgets->ReposList,&iter,0,cur_size>3&&!strcmp(parsed[3],"")?1:0,1,key,2,parsed[0],3,cur_size>1?parsed[1]:"",4,cur_size>2?parsed[2]:"",-1); } free(key); free(current); - yon_char_parsed_free(parsed,cur_size); } yon_char_parsed_free(repos,size); } @@ -339,6 +368,93 @@ void yon_interface_update(main_window *widgets){ // standard functions +char *on_save_repos(main_window *widgets){ + GtkTreeIter iter; + int size=0; + config_str queue = NULL; + for_iter(GTK_TREE_MODEL(widgets->ReposList),&iter){ + char *target; + gtk_tree_model_get(GTK_TREE_MODEL(widgets->ReposList),&iter,1,&target,-1); + yon_char_parsed_add_or_create_if_exists(queue,&size,REPOSITORY(target)); + } + int param_size; + config_str parameters = yon_config_get_save_parameters_by_list(¶m_size,queue,size); + return yon_char_parsed_to_string(parameters,param_size," "); +} + +void on_web_user_check(GtkToggleButton *self, web_publication_add_window *window){ + int status = gtk_toggle_button_get_active(self); + int status2 = gtk_combo_box_get_active(GTK_COMBO_BOX(window->UserPasswordCombo)); + gtk_widget_set_sensitive(window->UsernameEntry,status); + gtk_widget_set_sensitive(window->UserPasswordCombo,status); + gtk_widget_set_sensitive(window->PasswordButton,status&&status2); + gtk_widget_set_sensitive(window->UserPasswordEntry,(status&&status2)); +} + +void on_config_save(GtkWidget *, main_window *widgets){ + main_config.save_config=2; + yon_save_interface(widgets); + template_saving_window *window = yon_save_proceed(NULL,YON_CONFIG_BOTH,yon_config_get_custom_command("global"),NULL); + if (window){}; +} + +void on_config_global_save(GtkWidget *, main_window *widgets){ + main_config.save_config=0; + yon_save_interface(widgets); + template_saving_window *window = yon_save_proceed("global",YON_CONFIG_GLOBAL,yon_config_get_custom_command("global"),NULL); + if (window){}; +} + +void on_config_local_save(GtkWidget *, main_window *widgets){ + main_config.save_config=1; + yon_save_interface(widgets); + template_saving_window *window = yon_save_proceed("system",YON_CONFIG_LOCAL,yon_config_get_custom_command("system"),NULL); + if (window){}; +} + +void on_config_custom_save(GtkWidget *, main_window *widgets){ + main_config.save_config=1; + yon_save_interface(widgets); + template_saving_window *window = yon_save_proceed(NULL,YON_CONFIG_CUSTOM,yon_config_get_custom_command("system"),NULL); + if (window){}; +} + + +void on_config_local_load(GtkWidget *, main_window *widgets){ + yon_load_proceed(YON_CONFIG_LOCAL); + textdomain(template_ui_LocaleName); + yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + textdomain(LocaleName); + main_config.load_mode=1; + yon_interface_update(widgets); +} + +void on_config_global_load(GtkWidget *, main_window *widgets){ + yon_load_proceed(YON_CONFIG_GLOBAL); + textdomain(template_ui_LocaleName); + yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + textdomain(LocaleName); + main_config.load_mode=0; + yon_interface_update(widgets); +} + +void on_config_custom_load(GtkWidget *,main_window *widgets){ + yon_load_proceed(YON_CONFIG_CUSTOM); + textdomain(template_ui_LocaleName); + yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + textdomain(LocaleName); + main_config.load_mode=3; + yon_interface_update(widgets); +} + +void on_toggle_cell_toggled(GtkWidget *,char *path, GtkListStore *target){ + GtkTreeIter iter; + int status; + gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(target),&iter,path); + gtk_tree_model_get(GTK_TREE_MODEL(target),&iter,0,&status,-1); + gtk_list_store_set(GTK_LIST_STORE(target),&iter,0,!status,-1); +} + /**config_init() * [EN] * @@ -426,6 +542,7 @@ void on_web_publish_add(GtkWidget *,main_window *widgets){ void on_repo_add(GtkWidget *, main_window *widgets){ gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MirrorTree))); repo_add_window *window = yon_repo_add_window_new(); + g_signal_connect(G_OBJECT(window->RepoSourceCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),window->RepoSourceButton); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),ADD_REPO_LABEL,icon_path,"add_repo_window"); dictionary *dict = NULL; @@ -800,15 +917,24 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){ web_publication_add_window *window = yon_dictionary_get_data(dict->first->next,web_publication_add_window*); int enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnablePublishCheck)); - // char *path = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry)); int port_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PortCheck)); char *port = (char*)gtk_entry_get_text(GTK_ENTRY(window->PortEntry)); int enable_browser = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->EnableWebFileBrowserCheck)); int username_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsernameCheck)); char *username = (char*)gtk_entry_get_text(GTK_ENTRY(window->UsernameEntry)); - char *user_password = (char*)gtk_entry_get_text(GTK_ENTRY(window->UserPasswordEntry)); - char *encryption = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->UserPasswordCombo)); + char *user_password = yon_char_new((char*)gtk_entry_get_text(GTK_ENTRY(window->UserPasswordEntry))); + char *encryption = user_password[5]=='|'?yon_char_divide(user_password,6):NULL; + if (username_check&&yon_char_is_empty(username)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(window->UsernameEntry); + return; + } + if (username_check&>k_combo_box_get_active(GTK_COMBO_BOX(window->UserPasswordCombo))&&yon_char_is_empty(user_password)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(window->UserPasswordEntry); + return; + } char *name = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry)); char *full_name = ""; @@ -830,14 +956,16 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){ } if (overall==disabled) { yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),NO_SHARED_REPOS_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(window->PathEntry); return; } char *final_name = yon_char_is_empty(full_name)||!disabled ? name : yon_char_unite(name,":",full_name,NULL); char *final = yon_char_unite(enabled?"enable":"disable",":",enable_browser?"listing":"",":",port_enabled?port:"",":",username_check?username:"",":",username_check?yon_char_is_empty(encryption)? user_password:encryption:"",":",username_check?!yon_char_is_empty(encryption)?user_password:"":"",NULL); if (!yon_char_is_empty(window->name)&&strcmp(final_name,window->name)){ yon_config_remove_by_key(REPOPUBLIC_WEB_command(window->name)); + } else { + yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final); } - yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final); yon_interface_update(widgets); gtk_widget_destroy(window->Window); } @@ -955,8 +1083,8 @@ void on_password_accept(GtkWidget *,dictionary *dict){ yon_ubl_status_highlight_incorrect(window->RepeatPasswordEntry); return; } - char *encryption = (char*)gtk_entry_get_text(GTK_ENTRY(window->EncryptionCombo)); - char *final_text = yon_char_unite(encryption,password,NULL); + char *encryption = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->EncryptionCombo)); + char *final_text = yon_char_unite(encryption,"|",password,NULL); gtk_entry_set_text(GTK_ENTRY(target),final_text); } @@ -1114,6 +1242,7 @@ web_publication_add_window *yon_web_publication_add_window_new(){ g_signal_connect(G_OBJECT(window->PathEntry),"changed",G_CALLBACK(on_web_publish_path_changed),window); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->PasswordButton),"clicked",G_CALLBACK(on_password_open),window); + g_signal_connect(G_OBJECT(window->UsernameCheck),"toggled",G_CALLBACK(on_web_user_check),window); g_signal_connect(G_OBJECT(window->UserPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box_inversed),window->PasswordButton); g_signal_connect(G_OBJECT(window->UserPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box_inversed),window->UserPasswordEntry); gtk_widget_show(window->Window); @@ -1219,6 +1348,7 @@ void yon_main_window_complete(main_window *widgets){ widgets->UpdateModeCombo = yon_gtk_builder_get_widget(builder,"UpdateModeCombo"); widgets->UpdateIntervalDefaultCheck = yon_gtk_builder_get_widget(builder,"UpdateIntervalDefaultCheck"); widgets->UpdateIntervalSpin = yon_gtk_builder_get_widget(builder,"UpdateIntervalSpin"); + widgets->UpdateToggleCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"UpdateToggleCell")); widgets->UpdateIntervalCombo = yon_gtk_builder_get_widget(builder,"UpdateIntervalCombo"); widgets->UpdateRepoListCombo = yon_gtk_builder_get_widget(builder,"UpdateRepoListCombo"); widgets->UpdateRepoTree = yon_gtk_builder_get_widget(builder,"UpdateRepoTree"); @@ -1235,6 +1365,8 @@ void yon_main_window_complete(main_window *widgets){ widgets->RecieveDBFromNetCheck = yon_gtk_builder_get_widget(builder,"RecieveDBFromNetCheck"); widgets->PublicationTree = yon_gtk_builder_get_widget(builder,"PublicationTree"); widgets->PublicationUpdateButton = yon_gtk_builder_get_widget(builder,"PublicationUpdateButton"); + widgets->PublicationToggleCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PublicationToggleCell")); + widgets->PublicationCombo = yon_gtk_builder_get_widget(builder,"PublicationCombo"); widgets->WebPublicationUpdateButton = yon_gtk_builder_get_widget(builder,"WebPublicationUpdateButton"); widgets->WebPublicationAddButton = yon_gtk_builder_get_widget(builder,"WebPublicationAddButton"); widgets->WebPublicationEditButton = yon_gtk_builder_get_widget(builder,"WebPublicationEditButton"); @@ -1247,6 +1379,7 @@ void yon_main_window_complete(main_window *widgets){ widgets->MirrorEditButton = yon_gtk_builder_get_widget(builder,"MirrorEditButton"); widgets->MirrorRemoveButton = yon_gtk_builder_get_widget(builder,"MirrorRemoveButton"); widgets->MirrorConfigureButton = yon_gtk_builder_get_widget(builder,"MirrorConfigureButton"); + widgets->BootCheck = yon_gtk_builder_get_widget(builder,"BootCheck"); widgets->UpdateRepoList = GTK_LIST_STORE(gtk_builder_get_object(builder,"UpdateRepoList")); widgets->ReposList = GTK_LIST_STORE(gtk_builder_get_object(builder,"ReposList")); widgets->PublicationList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PublicationList")); @@ -1270,6 +1403,19 @@ void yon_main_window_complete(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->RepositoriesEditButton),"clicked",G_CALLBACK(on_repo_edit),widgets); g_signal_connect(G_OBJECT(widgets->MirrorConfigureButton),"clicked",G_CALLBACK(on_mirror_configure),widgets); + + g_signal_connect(G_OBJECT(widgets->SaveMenuItem),"activate",G_CALLBACK(on_config_save),widgets); + g_signal_connect(G_OBJECT(widgets->SaveGlobalMenuItem),"activate",G_CALLBACK(on_config_global_save),widgets); + g_signal_connect(G_OBJECT(widgets->SaveLocalMenuItem),"activate",G_CALLBACK(on_config_local_save),widgets); + g_signal_connect(G_OBJECT(widgets->SaveCustomMenuItem),"activate",G_CALLBACK(on_config_custom_save),widgets); + + g_signal_connect(G_OBJECT(widgets->LoadGlobalMenuItem),"activate",G_CALLBACK(on_config_global_load),widgets); + g_signal_connect(G_OBJECT(widgets->LoadLocalMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets); + g_signal_connect(G_OBJECT(widgets->LoadCustomMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets); + + g_signal_connect(G_OBJECT(widgets->UpdateToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets->UpdateRepoList); + g_signal_connect(G_OBJECT(widgets->PublicationToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets->PublicationList); + } { yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->MirrorTree)); diff --git a/source/ubl-settings-update.h b/source/ubl-settings-update.h index 4500bec..aa5dce5 100644 --- a/source/ubl-settings-update.h +++ b/source/ubl-settings-update.h @@ -43,6 +43,7 @@ #define config_get_local_command "ubconfig --source system get update REPOPUBLIC_NET REPOPUBLIC_WEB REPOSITORY[*] REPOPUBLIC_WEB REPOPUBLIC_WEB[*] REPOPUBLIC_CACHE REPOPUBLIC_CACHE[*] AUTOUPDATE AUTOUPDATE[mode] AUTOUPDATE[interval] AUTOUPDATE[repos] AUTOUPDATE[timestamp]" #define config_get_global_command "ubconfig --source global get update REPOPUBLIC_NET REPOPUBLIC_WEB REPOSITORY[*] REPOPUBLIC_WEB REPOPUBLIC_WEB[*] REPOPUBLIC_CACHE REPOPUBLIC_CACHE[*] AUTOUPDATE AUTOUPDATE[mode] AUTOUPDATE[interval] AUTOUPDATE[repos] AUTOUPDATE[timestamp]" #define config_get_default_command "ubconfig --source global get update AUTOUPDATE[repos]" +#define config_get_command_no_repos(config,target) yon_char_unite("ubconfig --source ",config," get update ",target,NULL) #define config_get_global_only_parameters "" #define config_get_local_only_parameters "" @@ -82,7 +83,7 @@ char *local; typedef struct { template_config_fields - + int save_config; } config; typedef struct { @@ -94,6 +95,8 @@ typedef struct { GtkWidget *UpdateIntervalCombo; GtkWidget *UpdateRepoListCombo; GtkWidget *UpdateRepoTree; + GtkWidget *BootCheck; + GtkCellRenderer *UpdateToggleCell; GtkListStore *UpdateRepoList; GtkWidget *RepositoriesRepoListConfigurationCheck; @@ -110,7 +113,9 @@ typedef struct { GtkWidget *PublicationConnectPublicCheck; GtkWidget *RecieveDBFromNetCheck; GtkWidget *PublicationTree; + GtkCellRenderer *PublicationToggleCell; GtkWidget *PublicationUpdateButton; + GtkWidget *PublicationCombo; GtkListStore *PublicationList; GtkWidget *WebPublicationUpdateButton; @@ -248,8 +253,23 @@ typedef struct { } documentation_confirmation_window; void yon_save_interface(main_window *widgets); +void on_config_save(GtkWidget *self, main_window *widgets); +void on_config_global_save(GtkWidget *self, main_window *widgets); +void on_config_local_save(GtkWidget *self, main_window *widgets); +void on_config_custom_save(GtkWidget *self, main_window *widgets); + void yon_load_proceed(YON_CONFIG_TYPE type); +void on_config_local_load(GtkWidget *, main_window *widgets); +void on_config_global_load(GtkWidget *, main_window *widgets); +void on_config_custom_load(GtkWidget *,main_window *widgets); + +void on_toggle_cell_toggled(GtkWidget *,char *path, GtkListStore *target); + +char *on_save_repos(main_window *widgets); + +void on_web_user_check(GtkToggleButton *self, web_publication_add_window *window); + void config_init(); void yon_main_window_complete(main_window *widgets); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 0afc557..fc37a26 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -107,5 +107,13 @@ // #define _LABEL _("Encrypted with SHA256") // #define _LABEL _("Encrypted with SHA512") // #define _LABEL _("System") + + + + + + + + #endif \ No newline at end of file diff --git a/ubl-settings-update-repo-add.glade b/ubl-settings-update-repo-add.glade index dd67bdf..a1e724b 100644 --- a/ubl-settings-update-repo-add.glade +++ b/ubl-settings-update-repo-add.glade @@ -39,166 +39,50 @@ - + True - False - 5 - 5 - 5 - 5 - vertical - 5 - - - Enabled - True - True - False - True - - - False - True - 0 - - - - - True - False - 3 - 5 - - - True - False - Repository name: - - - False - True - 0 - - - - - True - True - 100 - - - True - True - 1 - - - - - False - True - 1 - - + True + never + in - + True False - 0 - in - + True False - 5 - 5 - 5 - 5 + 5 + 5 + 5 + 5 + vertical + 5 + + + Enabled + True + True + False + True + + + False + True + 0 + + True False - vertical + 3 5 - + True False - 3 - 5 - - - True - False - Source: - - - False - True - 0 - - - - - True - False - 0 - - file:// - ftp:// - http:// - https:// - Configuration - - - - False - True - 1 - - - - - True - True - - - True - True - 2 - - - - - True - True - True - image1 - - - - False - True - 3 - - - - - True - True - True - image2 - - - - False - True - 4 - - + Repository name: False @@ -207,27 +91,55 @@ - + True True - 100 + 100 + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + 0 + in + + + True + False + 5 + 5 + 5 + 5 - + True False + vertical + 5 True False + 3 5 - + True False - vertical - - - + Source: False @@ -236,220 +148,734 @@ - + True False - vertical - 5 - - - + 0 + + file:// + ftp:// + http:// + https:// + Configuration + - True + False True 1 + + + True + True + + + True + True + 2 + + + + + True + True + True + image1 + + + + False + True + 3 + + + + + True + True + True + image2 + + + + False + True + 4 + + + + False + True + 0 + + + + + True + True + 100 + + + True + False + + + True + False + 5 + + + True + False + vertical + + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + + + + True + True + 1 + + + + + + + + + False + True + 1 + - - False - True - 1 - + + + + + False + True + 2 + - - - - - - - - False - True - 2 - - - - - True - False - 3 - 5 - - - True - False - Sign level: - - - False - True - 0 - - - - - True - False - 0 - - Never (Signature verification will not be performed) - Optional - Required - TrustedOnly - TrustAll - - - - True - True - 1 - - - - - True - False - 0 - - PackageNever - DatabaseNever - PackageOptional - DatabaseOptional - PackageRequired - DatabaseRequired - Package TrustedOnly - Database TrustedOnly - Package TrustAll - Database TrustAll - - - - True - True - 2 - - - - - False - True - 4 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - + True False - vertical - 5 + 0.019999999552965164 + in - - Default + True - True - False - True - - - False - True - 0 - - - - - Enable repository update - True - True - False - True + False + 5 + 5 + 5 + + + True + False + vertical + 5 + + + True + False + 5 + + + Never + True + True + False + Signature verification will not be performed + True + True + + + False + True + 0 + + + + + PackageNever + True + True + False + For packages only + True + True + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + Optional + True + True + False + Signatures will be checked if present, but unsigned databases and packages will also be accepted + True + True + radiobutton1 + + + False + True + 0 + + + + + DatabaseNever + True + True + False + For database only + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + + + Required + True + True + False + Signatures will be required for all packages and databases + True + True + radiobutton1 + + + False + True + 0 + + + + + PackageOptional + True + True + False + For packages only + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + 5 + + + TrustedOnly + True + True + False + Signatures will be required for all packages and databases + True + True + radiobutton1 + + + False + True + 0 + + + + + DatabaseOptional + True + True + False + For database only + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + 5 + + + TrustAll + True + True + False + If the signature is verified for packages and the database, it must be in the keyring and be fully trusted + True + True + radiobutton1 + + + False + True + 0 + + + + + PackageRequired + True + True + False + For packages only + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 4 + + + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + DatabaseRequired + True + True + False + For database only + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 5 + + + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + PackageTrustedOnly + True + True + False + For packages only + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 6 + + + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + DatabaseTrustedOnly + True + True + False + For database only + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 7 + + + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + PackageTrustAll + True + True + False + If the signature is verified only for packets + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 8 + + + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + DatabaseTrustAll + True + True + False + If the signature is verified only for the database + True + True + radiobutton6 + + + False + True + 1 + + + + + False + True + 9 + + + + - - False - True - 1 - - - - Enable repository search + + True - True - False - True + False + Sign level - - False - True - 2 - + + + False + True + 3 + + + + + True + False + 0.019999999552965164 + in - - Enable installation of packages from this repository during --sync operation + True - True - False - True + False + 5 + 5 + 5 + + + True + False + vertical + 5 + + + Default + True + True + False + True + + + False + True + 0 + + + + + Enable repository update + True + True + False + True + + + False + True + 1 + + + + + Enable repository search + True + True + False + True + + + False + True + 2 + + + + + Enable installation of packages from this repository during --sync operation + True + True + False + True + + + False + True + 3 + + + + + Allow this repository to be a valid source of packages when running --sysupgrade + True + True + False + True + + + False + True + 4 + + + + - - False - True - 3 - - - - Allow this repository to be a valid source of packages when running --sysupgrade + + True - True - False - True + False + Usage level - - False - True - 4 - + + True + True + 5 + - - - True - False - Usage level - - - - True - True - 5 - @@ -514,4 +940,18 @@ + + + + + + + + + + + + + + diff --git a/ubl-settings-update-web-publication-add.glade b/ubl-settings-update-web-publication-add.glade index 1ef866c..022b9bf 100644 --- a/ubl-settings-update-web-publication-add.glade +++ b/ubl-settings-update-web-publication-add.glade @@ -312,6 +312,7 @@ True + False True @@ -347,12 +348,12 @@ True + False False 0 Not encrypted - Encrypted with SHA256 - Encrypted with SHA512 + Set diff --git a/ubl-settings-update.css b/ubl-settings-update.css index 5526ff1..789618c 100644 --- a/ubl-settings-update.css +++ b/ubl-settings-update.css @@ -32,7 +32,7 @@ background:transparent; } .menuitembottom{ margin-top:0px; - margin-bottom:4px; + margin-bottom:3px; border-color:inherit; border-left-width:inherit; border-right-width:inherit; @@ -44,7 +44,7 @@ background:transparent; border-left-width:inherit; border-right-width:inherit; } - + .menuitemtop{ margin-bottom:0px; border-color:inherit; @@ -52,35 +52,35 @@ background:transparent; border-left-width:inherit; border-right-width:inherit; } - .menuitemtop>*{ - margin:2px 2px 0 2px; + .menuitemtop >*{ + margin:6px 2px 0 2px; padding: 3px 10px 3px 5px; border:transparent; } - .menuitemmiddle>*{ + .menuitemmiddle >*{ margin:0 2px 0 2px; padding: 3px 10px 3px 5px; border:transparent; } - .menuitembottom>*{ + .menuitembottom >*{ margin:0 2px 2px 2px; padding: 3px 10px 3px 5px; } .menuitemtop:hover { - background:@theme_base_color; + background:@theme_bg_color; border-color:inherit; border-top-width:inherit; border-left-width:inherit; border-right-width:inherit; } .menuitemmiddle:hover { - background:@theme_base_color; + background:@theme_bg_color; border-color:inherit; border-left-width:inherit; border-right-width:inherit; } .menuitembottom:hover { - background:@theme_base_color; + background:@theme_bg_color; border-color:inherit; border-bottom-width:0px; border-left-width:inherit; @@ -88,23 +88,20 @@ background:transparent; } .menuitemtop:hover>* { - margin:2px 2px 0 2px; + margin:6px 2px 0 2px; padding: 3px 10px 3px 5px; - /* padding: 5px 0 3px 5px; */ background:@theme_selected_bg_color; border-radius:2px; } .menuitemmiddle:hover>* { - margin:0 2px 0px 2px; + margin:0 2px 0 2px; padding: 3px 10px 3px 5px; - /* padding: 3px 0px 3px 5px; */ background:@theme_selected_bg_color; border-radius:2px; } .menuitembottom:hover>* { margin:0 2px 2px 2px; padding: 3px 10px 3px 5px; - /* padding: 3px 0px 5px 5px; */ background:@theme_selected_bg_color; border-radius:2px; } @@ -114,4 +111,22 @@ background:transparent; .boxInfoMessOK{ background-color: #f3f0ac; +} +.errorBox { + border-width: 2px; + border-color: #ea9999; + border-style:solid; +} + +.chosenOutline{ + transition: 0ms; + border-width: 1px; + border-color: #f3f0ac; + border-style:solid; +} + +.debugborders *{ + border-width: 2px; + border-color: #000000; + border-style: solid; } \ No newline at end of file diff --git a/ubl-settings-update.glade b/ubl-settings-update.glade index 0ac7f86..2d708f7 100644 --- a/ubl-settings-update.glade +++ b/ubl-settings-update.glade @@ -385,7 +385,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - + Check system updates at system startup True True @@ -478,6 +478,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True True False + True True @@ -609,7 +610,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. fixed Chosen - + 0 @@ -1105,7 +1106,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - + True False 0 @@ -1181,7 +1182,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. fixed Chosen - + 0 diff --git a/ubl-settings-update.pot b/ubl-settings-update.pot index 8b4f675..73246af 100644 --- a/ubl-settings-update.pot +++ b/ubl-settings-update.pot @@ -402,3 +402,71 @@ msgstr "" #: source/ubl-strings.h:106 msgid "System" msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "System" +msgstr "" diff --git a/ubl-settings-update_ru.po b/ubl-settings-update_ru.po index 2d5996e..feb7cca 100644 --- a/ubl-settings-update_ru.po +++ b/ubl-settings-update_ru.po @@ -404,4 +404,36 @@ msgid "System" msgstr "Система" msgid "Cancel" -msgstr "Отмена" \ No newline at end of file +msgstr "Отмена" + +#: source/ubl-strings.h:106 +msgid "Signature verification will not be performed" +msgstr "Проверка подписи выполняться не будет" + +#: source/ubl-strings.h:106 +msgid "For packages only" +msgstr "Только для пакетов" + +#: source/ubl-strings.h:106 +msgid "For database only" +msgstr "Только для базы данных" + +#: source/ubl-strings.h:106 +msgid "Signatures will be checked if present, but unsigned databases and packages will also be accepted" +msgstr "Подписи будут проверяться при их наличии, но неподписанные базы данных и пакеты также будут приниматься" + +#: source/ubl-strings.h:106 +msgid "Signatures will be required for all packages and databases" +msgstr "Подписи будут необходимы для всех nпакетов и баз данных" + +#: source/ubl-strings.h:106 +msgid "If the signature is verified for packages and the database, it must be in the keyring and be fully trusted" +msgstr "Если подпись проверяется для пакетов и базы, она должна находиться в связке ключей и быть полностью доверенной" + +#: source/ubl-strings.h:106 +msgid "If the signature is verified only for packets" +msgstr "Если подпись проверяется только для пакетов" + +#: source/ubl-strings.h:106 +msgid "If the signature is verified only for the database" +msgstr "Если подпись проверяется только для базы данных" \ No newline at end of file