diff --git a/gresource.xml b/gresource.xml index f736816..8ddfb99 100644 --- a/gresource.xml +++ b/gresource.xml @@ -7,6 +7,7 @@ ubl-settings-update-mirror-add.glade ubl-settings-update-mirror-path-add.glade ubl-settings-update-mirror-configure.glade + ubl-settings-update-password.glade ubl-settings-update.css diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 4fa7a4d..4c61581 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -37,6 +37,7 @@ set(DEPENDFILES ../ubl-settings-update-mirror-add.glade ../ubl-settings-update-mirror-path-add.glade ../ubl-settings-update-mirror-configure.glade + ../ubl-settings-update-password.glade ../gresource.xml ../ubl-settings-update-banner.png ../ubl-settings-update.css diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index ba0e388..5cc1408 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -4,6 +4,144 @@ config main_config; //functions +void on_save_done(main_window *, config_str output, int size){ + char *final_output = yon_char_parsed_to_string(output,size,""); + if (final_output){ + printf("%s\n",final_output); + free(final_output); + } + yon_char_parsed_free(output,size); + textdomain(template_ui_LocaleName); + switch (main_config.save_config){ + case 0: + yon_ubl_status_box_render(GLOBAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + break; + case 1: + yon_ubl_status_box_render(LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + break; + case 2: + yon_ubl_status_box_render(GLOBAL_LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + break; + } + textdomain(LocaleName); + +} + +void yon_save_interface(main_window *widgets){ + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->AutoUpdateCheck))){ + yon_config_register(AUTOUPDATE,AUTOUPDATE_command,"enable"); + } else { + yon_config_register(AUTOUPDATE,AUTOUPDATE_command,"disable"); + } + int save_mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->UpdateModeCombo)); + switch (save_mode){ + case 0: yon_config_remove_by_key(AUTOUPDATE_mode); + break; + case 1:yon_config_register(AUTOUPDATE_mode,AUTOUPDATE_mode_command,"modsys"); + break; + case 2:yon_config_register(AUTOUPDATE_mode,AUTOUPDATE_mode_command,"modules"); + break; + case 3:yon_config_register(AUTOUPDATE_mode,AUTOUPDATE_mode_command,"system"); + break; + } + + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UpdateIntervalDefaultCheck))){ + 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 = ""; + 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 = yon_char_unite(!yon_char_is_empty(interval)?interval:"",!yon_char_is_empty(interval)?",":"",int_str,"min",NULL); + break; + case 1: interval = yon_char_unite(int_str,"h",NULL); + break; + case 2: interval = yon_char_unite(int_str,"d",NULL); + break; + 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))){ + yon_config_remove_by_key(AUTOUPDATE_repos); + } else { + char *repos = ""; + GtkTreeIter iter; + for_iter(GTK_TREE_MODEL(widgets->UpdateRepoList),&iter){ + char *target; + int status; + gtk_tree_model_get(GTK_TREE_MODEL(widgets->UpdateRepoList),&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; + } + } + yon_config_register(AUTOUPDATE_repos,AUTOUPDATE_repos_command,repos); + } + + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck))){ + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesDisableSystemReposCheck))){ + yon_config_register(REPOSITORY_parameter,REPOSITORY_parameter_command,"only"); + } else { + yon_config_register(REPOSITORY_parameter,REPOSITORY_parameter_command,"enable"); + } + } 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))){ + 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); + } + } + + if (!gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->PublicationCombo))){ + yon_config_remove_by_key(REPOPUBLIC_NET_parameter); + } else { + 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 { + yon_config_register(REPOPUBLIC_CACHE,REPOPUBLIC_CACHE_command,"disable"); + + } + +} + void yon_load_proceed(YON_CONFIG_TYPE type){ yon_config_clean(); if (!yon_char_is_empty(config_get_default_command)) @@ -46,179 +184,225 @@ void yon_interface_update(main_window *widgets){ gtk_list_store_clear(widgets->PublicationList); gtk_list_store_clear(widgets->WebPublicationList); int size; - char *repo_config = config(REPOSITORY_parameter); - if (!yon_char_is_empty(repo_config)){ - if (!strcmp(repo_config,"disable")){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck),0); - } else if (!strcmp(repo_config,"enable")){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck),1); - }else if (!strcmp(repo_config,"only")){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesDisableSystemReposCheck),1); - } - } - - config_str repos = yon_config_get_all_by_key(REPOSITORY_search,&size); GtkTreeIter iter; - for (int i=0;iReposList,&iter); - char *temp = yon_char_replace(parsed[0],",","\n"); - free(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); - - char *publish = config(REPOPUBLIC_NET); - if (publish) { - int cur_size; - config_str parsed = yon_char_parse(publish,&cur_size,","); - if (cur_size){ - if (!strcmp(parsed[0],"disable")||!strcmp(parsed[0],"no")||!strcmp(parsed[0],"none")){ - - } else if (!strcmp(parsed[0],"enable")||!strcmp(parsed[0],"yes")){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->PublicationConnectPublicCheck),1); - } - if (cur_size>1&&!strcmp(parsed[1],"db")){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RecieveDBFromNetCheck),1); - } - if (cur_size>2){ - for (int i=2;iPublicationList,&iter); - gtk_list_store_set(widgets->PublicationList,&iter,1,parsed[i],-1); - } - } - yon_char_parsed_free(parsed,cur_size); - } + char *last_update_time = config(AUTOUPDATE_timestamp); + if (!yon_char_is_empty(last_update_time)){ + int datetime_size; + config_str datetime_parsed = yon_char_parse(last_update_time,&datetime_size," "); + int year, month, day, hour, minute; + int date_parsed_size, time_parsed_size; + config_str date_parsed = yon_char_parse(datetime_parsed[0],&date_parsed_size,"-"); + config_str time_parsed = yon_char_parse(datetime_parsed[1],&time_parsed_size,":"); + year = atoi(date_parsed[0]); + month = atoi(date_parsed[1]); + day = atoi(date_parsed[2]); + hour = atoi(time_parsed[0]); + minute = atoi(time_parsed[1]); + GDateTime *datetime = g_date_time_new_utc(year,month,day,hour,minute,0.0); + char *time_label = g_date_time_format(datetime,main_config.date_format); + gtk_entry_set_text(GTK_ENTRY(widgets->DateEntry),time_label); + g_date_time_unref(datetime); + free(time_label); } - - char *mirror = config(REPOPUBLIC_CACHE); - if (!yon_char_is_empty(mirror)){ - if (!strcmp(mirror,"enable")||!strcmp(mirror,"yes")){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->MirrorPublicCheck),1); - } else if (!strcmp(mirror,"disable")||!strcmp(mirror,"no")||!strcmp(mirror,"none")){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->MirrorPublicCheck),0); + { + char *repo_config = config(REPOSITORY_parameter); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck),0); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesDisableSystemReposCheck),0); + if (!yon_char_is_empty(repo_config)){ + if (!strcmp(repo_config,"disable")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck),0); + } else if (!strcmp(repo_config,"enable")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck),1); + }else if (!strcmp(repo_config,"only")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesDisableSystemReposCheck),1); + } } - } - config_str mirror_list = yon_config_get_all_by_key(REPOPUBLIC_CACHE_search,&size); - if (size){ + config_str repos = yon_config_get_all_by_key(REPOSITORY_search,&size); for (int i=0;iMirrorList,&iter); int cur_size; - config_str parsed = yon_char_parse(cur,&cur_size,","); + config_str parsed = yon_char_parse(current,&cur_size,";"); if (cur_size){ - gtk_list_store_set(widgets->MirrorList,&iter,0,key,2,yon_char_parsed_to_string(parsed,cur_size,"\n"),-1); + gtk_list_store_append(widgets->ReposList,&iter); + 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(repos,size); } - - char *autoupdate_config = config(AUTOUPDATE); - if (!yon_char_is_empty(autoupdate_config)&&!strcmp(autoupdate_config,"enable")){ - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoUpdateCheck),1); - } - - autoupdate_config = config(AUTOUPDATE_mode); - if (!yon_char_is_empty(autoupdate_config)){ - if (!strcmp(autoupdate_config,"modsys")){ - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateModeCombo),1); - } else if (!strcmp(autoupdate_config,"modules")){ - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateModeCombo),2); - } else if (!strcmp(autoupdate_config,"system")){ - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateModeCombo),3); + { + int repos_size; + config_str publish_repos = yon_config_load(get_publication_list_command,&repos_size); + for (int i=0;iPublicationList,&iter); + gtk_list_store_set(widgets->PublicationList,&iter,0,1,1,publish_repos[i],-1); } - } - - char *autoupdate_repos = config(AUTOUPDATE_repos); - if (!yon_char_is_empty(autoupdate_repos)){ - int parsed_size; - GtkTreeIter iter; - config_str parsed = yon_char_parse(autoupdate_repos,&parsed_size,","); - for (int i=0;iUpdateRepoList),&iter); - gtk_list_store_set(widgets->UpdateRepoList,&iter,1,parsed[i],-1); + char *publish = config(REPOPUBLIC_NET_parameter); + if (publish) { + int cur_size; + config_str parsed = yon_char_parse(publish,&cur_size,","); + if (cur_size){ + if (!strcmp(parsed[0],"disable")||!strcmp(parsed[0],"no")||!strcmp(parsed[0],"none")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->PublicationConnectPublicCheck),0); + } else if (!strcmp(parsed[0],"enable")||!strcmp(parsed[0],"yes")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->PublicationConnectPublicCheck),1); + } + if (cur_size>1&&!strcmp(parsed[1],"db")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RecieveDBFromNetCheck),1); + } else { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RecieveDBFromNetCheck),0); + } + if (cur_size>2){ + for (int i=2;iPublicationList,&iter); + gtk_list_store_set(widgets->PublicationList,&iter,1,parsed[i],-1); + } + } + yon_char_parsed_free(parsed,cur_size); + } } - yon_char_parsed_free(parsed,parsed_size); } + { + char *mirror = config(REPOPUBLIC_CACHE); + if (!yon_char_is_empty(mirror)){ + if (!strcmp(mirror,"enable")||!strcmp(mirror,"yes")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->MirrorPublicCheck),1); + } else if (!strcmp(mirror,"disable")||!strcmp(mirror,"no")||!strcmp(mirror,"none")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->MirrorPublicCheck),0); + } + } - autoupdate_config = config(AUTOUPDATE_interval); - if (!yon_char_is_empty(autoupdate_config)){ - if (!strcmp(autoupdate_config,"boot")){ - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),0); - } else { - if (strstr(autoupdate_config,"min")){ - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),1); - } else if (autoupdate_config[strlen(autoupdate_config)-1]=='h'){ - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),2); - } else if (autoupdate_config[strlen(autoupdate_config)-1]=='d'){ - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),3); - } else if (autoupdate_config[strlen(autoupdate_config)-1]=='M'){ - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),4); - } - gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin),atol(autoupdate_config)); + config_str mirror_list = yon_config_get_all_by_key(REPOPUBLIC_CACHE_search,&size); + if (size){ + for (int i=0;iMirrorList,&iter); + int cur_size; + config_str parsed = yon_char_parse(cur,&cur_size,","); + if (cur_size){ + gtk_list_store_set(widgets->MirrorList,&iter,0,key,2,yon_char_parsed_to_string(parsed,cur_size,"\n"),-1); + } + } } } - - config_str web_publish = yon_config_get_all_by_key(REPOPUBLIC_WEB_search,&size); - for (int i=0;iWebPublicationList,&iter); - char *cur = yon_char_new(web_publish[i]); - char *key = yon_char_divide_search(cur,"=",-1); - free(yon_char_divide_search(key,"[",-1)); - key[strlen(key)-1]='\0'; - char *path = NULL; - if (!strstr(key,":")){ - path=key; - key=NULL; + { + char *autoupdate_config = config(AUTOUPDATE); + if (!yon_char_is_empty(autoupdate_config)&&!strcmp(autoupdate_config,"enable")){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoUpdateCheck),1); } else { - path = yon_char_divide_search(key,":",-1); - } - int repos_size; - config_str repos = yon_char_parse(key,&repos_size,","); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->AutoUpdateCheck),0); + } - gtk_list_store_set(widgets->WebPublicationList,&iter,1,path,2,yon_char_parsed_to_string(repos,repos_size,"\n"),-1); - int cur_size; - config_str parsed = yon_char_parse(cur,&cur_size,":"); - if (cur_size){ - if (!strcmp(parsed[0],"enable")||!strcmp(parsed[0],"yes")){ - gtk_list_store_set(widgets->WebPublicationList,&iter,0,1,-1); - } else if (!strcmp(parsed[0],"disable")||!strcmp(parsed[0],"no")||!strcmp(parsed[0],"none")) { - gtk_list_store_set(widgets->WebPublicationList,&iter,0,0,-1); + autoupdate_config = config(AUTOUPDATE_mode); + if (!yon_char_is_empty(autoupdate_config)){ + if (!strcmp(autoupdate_config,"modsys")){ + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateModeCombo),1); + } else if (!strcmp(autoupdate_config,"modules")){ + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateModeCombo),2); + } else if (!strcmp(autoupdate_config,"system")){ + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateModeCombo),3); } - if (cur_size>1&&!strcmp(parsed[1],"listing")){ + } else { + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateModeCombo),0); + } + int repos_size; + config_str overall_repos = yon_config_load(get_publication_list_command,&repos_size); + char *autoupdate_repos = config(AUTOUPDATE_repos); + if (repos_size){ + int parsed_size; + GtkTreeIter iter; + config_str parsed = yon_char_parse(autoupdate_repos,&parsed_size,","); + for (int i=0;iUpdateRepoList),&iter); + gtk_list_store_set(widgets->UpdateRepoList,&iter,1,overall_repos[i],0,!parsed_size||(parsed_size&&yon_char_parsed_check_exist(overall_repos,repos_size,overall_repos[i])>-1)?1:0,-1); } - if (cur_size>2&&!yon_char_is_empty(parsed[2])){ - gtk_list_store_set(widgets->WebPublicationList,&iter,4,parsed[2],-1); + yon_char_parsed_free(parsed,parsed_size); + } + autoupdate_config = config(AUTOUPDATE_interval); + if (!yon_char_is_empty(autoupdate_config)){ + if (!strcmp(autoupdate_config,"boot")){ + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),0); + } else { + if (strstr(autoupdate_config,"min")){ + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),1); + } else if (autoupdate_config[strlen(autoupdate_config)-1]=='h'){ + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),2); + } else if (autoupdate_config[strlen(autoupdate_config)-1]=='d'){ + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),3); + } else if (autoupdate_config[strlen(autoupdate_config)-1]=='M'){ + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UpdateIntervalCombo),4); + } + gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->UpdateIntervalSpin),atol(autoupdate_config)); } - if (cur_size>3&&!yon_char_is_empty(parsed[3])){ - gtk_list_store_set(widgets->WebPublicationList,&iter,5,parsed[3],-1); + } + + char *timestamp = config("AUTOUPDATE[timestamp]"); + if (!yon_char_is_empty(timestamp)){ + gtk_label_set_text(GTK_LABEL(widgets->HeadLabel),timestamp); + } + } + + { + config_str web_publish = yon_config_get_all_by_key(REPOPUBLIC_WEB_search,&size); + for (int i=0;iWebPublicationList,&iter); + char *cur = yon_char_new(web_publish[i]); + char *key = yon_char_divide_search(cur,"=",-1); + free(yon_char_divide_search(key,"[",-1)); + key[strlen(key)-1]='\0'; + char *path = NULL; + if (!strstr(key,":")){ + path=key; + key=NULL; + } else { + path = yon_char_divide_search(key,":",-1); } - if (cur_size>4&&!yon_char_is_empty(parsed[4])){ - if (!strcmp(parsed[4],"sha256")||!strcmp(parsed[4],"sha512")){ - gtk_list_store_set(widgets->WebPublicationList,&iter,7,parsed[5],-1); - gtk_list_store_set(widgets->WebPublicationList,&iter,6,parsed[4],-1); - } else { - gtk_list_store_set(widgets->WebPublicationList,&iter,6,parsed[4],-1); - if (cur_size>5&&!yon_char_is_empty(parsed[5])){ + int repos_size; + config_str repos = yon_char_parse(key,&repos_size,","); + + gtk_list_store_set(widgets->WebPublicationList,&iter,1,path,2,yon_char_parsed_to_string(repos,repos_size,"\n"),-1); + int cur_size; + config_str parsed = yon_char_parse(cur,&cur_size,":"); + if (cur_size){ + if (!strcmp(parsed[0],"enable")||!strcmp(parsed[0],"yes")){ + gtk_list_store_set(widgets->WebPublicationList,&iter,0,1,-1); + } else if (!strcmp(parsed[0],"disable")||!strcmp(parsed[0],"no")||!strcmp(parsed[0],"none")) { + gtk_list_store_set(widgets->WebPublicationList,&iter,0,0,-1); + } + if (cur_size>1&&!strcmp(parsed[1],"listing")){ + gtk_list_store_set(widgets->WebPublicationList,&iter,3,1,-1); + } + if (cur_size>2&&!yon_char_is_empty(parsed[2])){ + gtk_list_store_set(widgets->WebPublicationList,&iter,4,parsed[2],-1); + } + if (cur_size>3&&!yon_char_is_empty(parsed[3])){ + gtk_list_store_set(widgets->WebPublicationList,&iter,5,parsed[3],-1); + } + if (cur_size>4&&!yon_char_is_empty(parsed[4])){ + if (!strcmp(parsed[4],"sha256")||!strcmp(parsed[4],"sha512")){ gtk_list_store_set(widgets->WebPublicationList,&iter,7,parsed[5],-1); + gtk_list_store_set(widgets->WebPublicationList,&iter,6,parsed[4],-1); + } else { + gtk_list_store_set(widgets->WebPublicationList,&iter,6,parsed[4],-1); + if (cur_size>5&&!yon_char_is_empty(parsed[5])){ + gtk_list_store_set(widgets->WebPublicationList,&iter,7,parsed[5],-1); + } } } } @@ -228,6 +412,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] * @@ -245,6 +516,11 @@ void config_init(){ main_config.lock_save_global=0; main_config.lock_save_local=0; main_config.load_mode=1; + main_config.date_format=NULL; + if (!yon_window_config_get_parameter("usage","date_format",&main_config.date_format,YON_TYPE_STRING)){ + main_config.date_format="%d.%m.%Y %H:%M"; + } + } void on_selection_changed(GtkWidget *self, main_window *widgets){ @@ -272,18 +548,15 @@ void on_selection_changed(GtkWidget *self, main_window *widgets){ } } else if (self == widgets->MirrorTree){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MirrorTree)),&model,&iter)){ - gtk_widget_set_sensitive(widgets->MirrorConfigureButton,1); gtk_widget_set_sensitive(widgets->MirrorEditButton,1); gtk_widget_set_sensitive(widgets->MirrorRemoveButton,1); } else { - gtk_widget_set_sensitive(widgets->MirrorConfigureButton,0); gtk_widget_set_sensitive(widgets->MirrorEditButton,0); gtk_widget_set_sensitive(widgets->MirrorRemoveButton,0); } } } - void on_web_publish_path_changed(GtkWidget *, web_publication_add_window *window){ gtk_list_store_clear(window->list); char *path = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry)); @@ -318,6 +591,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; @@ -339,6 +613,17 @@ void on_mirror_add(GtkWidget *,main_window *widgets){ } +void on_password_open(GtkWidget *, web_publication_add_window *window){ + password_window *dialog = yon_password_window_new(); + yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(dialog->PasswordEntry)); + yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(dialog->PasswordHashEntry)); + yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(dialog->RepeatPasswordEntry)); + dictionary *dict = NULL; + yon_dictionary_add_or_create_if_exists_with_data(dict,"window",dialog); + yon_dictionary_add_or_create_if_exists_with_data(dict,"target",window->UserPasswordEntry); + g_signal_connect(G_OBJECT(dialog->AcceptButton),"clicked",G_CALLBACK(on_password_accept),dict); +} + void on_web_publish_remove(GtkWidget *self,main_window *widgets){ dialog_confirmation_data *data = malloc(sizeof(dialog_confirmation_data)); data->action_text=REMOVE_REPO_WARNING_LABEL; @@ -574,7 +859,55 @@ void on_mirror_configure(GtkWidget *,main_window *widgets){ dictionary *dict = NULL; yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets); yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window); - g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_mirror_accept),dict); + g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_mirror_configure_accept),dict); + + char *port_str = config(REPOPUBLIC_CACHE_full("port")); + if (!yon_char_is_empty(port_str)){ + double port = atof(port_str); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->PortDefaultCheck),0); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->PortSpin),port); + } + char *cache = config(REPOPUBLIC_CACHE_full("cache_dir")); + if (!yon_char_is_empty(cache)){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->CacheDefaultCheck),0); + gtk_entry_set_text(GTK_ENTRY(window->CacheEntry),cache); + } + char *inactivity = config(REPOPUBLIC_CACHE_full("purge_files_after")); + if (!yon_char_is_empty(inactivity)){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->InactivityDurationDefaultCheck),0); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->InactivityDurationSpin),atof(inactivity)); + } + char *timeout = config(REPOPUBLIC_CACHE_full("download_timeout")); + if (!yon_char_is_empty(timeout)){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->CacheTimeoutDefaultCheck),0); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->CacheTimeoutSpin),atof(timeout)); + } + char *proxy = config(REPOPUBLIC_CACHE_full("http_proxy")); + if (!yon_char_is_empty(proxy)){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->ProxyCheck),1); + gtk_entry_set_text(GTK_ENTRY(window->ProxyEntry),proxy); + } + char *agent = config(REPOPUBLIC_CACHE_full("user_agent")); + if (!yon_char_is_empty(agent)){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->AgentDefaultCheck),0); + gtk_entry_set_text(GTK_ENTRY(window->AgentEntry),agent); + } + char *cron = config(REPOPUBLIC_CACHE_full("prefetch.cron")); + if (!yon_char_is_empty(cron)){ + gtk_entry_set_text(GTK_ENTRY(window->CronEntry),cron); + } + char *delay = config(REPOPUBLIC_CACHE_full("prefetch.ttl_unaccessed_in_days")); + if (!yon_char_is_empty(delay)){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UpdatesDelayDefaultCheck),0); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->UpdatesDelaySpin),atof(delay)); + } + char *request_delay = config(REPOPUBLIC_CACHE_full("prefetch.ttl_unupdated_in_days")); + if (!yon_char_is_empty(request_delay)){ + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UpdatesRequestDelayDefaultCheck),0); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->UpdatesRequestDelaySpin),atof(request_delay)); + } + + gtk_widget_show(window->Window); } @@ -607,8 +940,41 @@ void on_repo_accept_clicked(GtkWidget *, dictionary *dict){ return; } - char *sign_level_package = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->RepoSignCheckCombo)); - char *sign_level_condiition = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->RepoSignConditionCombo)); + char *sign_level_package = ""; + char *sign_level_condiition = ""; + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NeverRadio))){ + sign_level_package="Never"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->OptionalRadio))){ + sign_level_package="Optional"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->RequiredRadio))){ + sign_level_package="Required"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->TrustedOnlyRadio))){ + sign_level_package="TrustedOnly"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->TrustAllRadio))){ + sign_level_package="TrustAll"; + } + + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PackageNeverRadio))){ + sign_level_condiition="PackageNever"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DatabaseNeverRadio))){ + sign_level_condiition="DatabaseNever"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PackageOptionalRadio))){ + sign_level_condiition="PackageOptional"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DatabaseOptionalRadio))){ + sign_level_condiition="DatabaseOptional"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PackageRequiredRadio))){ + sign_level_condiition="PackageRequired"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DatabaseRequiredRadio))){ + sign_level_condiition="DatabaseRequired"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PackageTrustedOnlyRadio))){ + sign_level_condiition="PackageTrustedOnly"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DatabaseTrustedOnlyRadio))){ + sign_level_condiition="DatabaseTrustedOnly"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PackageTrustAllRadio))){ + sign_level_condiition="PackageTrustAll"; + } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DatabaseTrustAllRadio))){ + sign_level_condiition="DatabaseTrustAll"; + } // int usage_level_default = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsageDefaultCheck)); // int usage_level_enable_update = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsageEnableUpdateCheck)); @@ -633,15 +999,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 = ""; @@ -663,14 +1038,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); } @@ -698,6 +1075,105 @@ void on_mirror_accept(GtkWidget *,dictionary *dict){ gtk_widget_destroy(window->Window); } +void on_mirror_configure_accept(GtkWidget *, dictionary *dict){ + // main_window *widgets = yon_dictionary_get_data(dict->first,main_window*); + mirror_configure_window *window = yon_dictionary_get_data(dict->first->next,mirror_configure_window*); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->PortDefaultCheck))){ + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("port")); + } else { + long port = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->PortSpin)); + yon_config_register(REPOPUBLIC_CACHE_full("port"),REPOPUBLIC_CACHE_full_command("port"),yon_char_from_long(port)); + } + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->CacheDefaultCheck))){ + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("cache_dir")); + } else { + char *cache_path = (char*)gtk_entry_get_text(GTK_ENTRY(window->CacheEntry)); + if (!yon_char_is_empty(cache_path)){ + yon_config_register(REPOPUBLIC_CACHE_full("cache_dir"),REPOPUBLIC_CACHE_full_command("cache_dir"),cache_path); + } else { + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(window->CacheEntry); + return; + } + } + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->InactivityDurationDefaultCheck))){ + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("purge_files_after")); + } else { + long duration_inactivity = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->InactivityDurationSpin)); + char *duration_str = yon_char_from_long(duration_inactivity); + yon_config_register(REPOPUBLIC_CACHE_full("purge_files_after"),REPOPUBLIC_CACHE_full_command("purge_files_after"),duration_str); + } + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->CacheTimeoutDefaultCheck))){ + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("download_timeout")); + } else{ + long duration_inactivity = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->CacheTimeoutSpin)); + char *duration_str = yon_char_from_long(duration_inactivity); + yon_config_register(REPOPUBLIC_CACHE_full("download_timeout"),REPOPUBLIC_CACHE_full_command("download_timeout"),duration_str); + } + if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ProxyCheck))){ + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("http_proxy")); + } else { + char *proxy = (char*)gtk_entry_get_text(GTK_ENTRY(window->ProxyEntry)); + yon_config_register(REPOPUBLIC_CACHE_full("http_proxy"),REPOPUBLIC_CACHE_full_command("http_proxy"),proxy); + } + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->AgentDefaultCheck))){ + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("user_agent")); + } else { + char *agent = (char*)gtk_entry_get_text(GTK_ENTRY(window->AgentEntry)); + yon_config_register(REPOPUBLIC_CACHE_full("user_agent"),REPOPUBLIC_CACHE_full_command("user_agent"),agent); + } + char *expression = (char*)gtk_entry_get_text(GTK_ENTRY(window->CronEntry)); + if (!yon_char_is_empty(expression)){ + yon_config_register(REPOPUBLIC_CACHE_full("prefetch.cron"),REPOPUBLIC_CACHE_full_command("prefetch.cron"),expression); + } else { + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("prefetch.cron")); + } + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UpdatesDelayDefaultCheck))){ + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("prefetch.ttl_unaccessed_in_days")); + } else { + char *agent = yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->UpdatesDelaySpin))); + yon_config_register(REPOPUBLIC_CACHE_full("prefetch.ttl_unaccessed_in_days"),REPOPUBLIC_CACHE_full_command("prefetch.ttl_unaccessed_in_days"),agent); + } + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UpdatesRequestDelayDefaultCheck))){ + yon_config_remove_by_key(REPOPUBLIC_CACHE_full("prefetch.ttl_unupdated_in_days")); + } else { + char *agent = yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->UpdatesRequestDelaySpin))); + yon_config_register(REPOPUBLIC_CACHE_full("prefetch.ttl_unupdated_in_days"),REPOPUBLIC_CACHE_full_command("prefetch.ttl_unupdated_in_days"),agent); + } + + gtk_widget_destroy(window->Window); +} + +void on_password_accept(GtkWidget *,dictionary *dict){ + password_window *window = yon_dictionary_get_data(dict->first,password_window*); + GtkWidget *target = yon_dictionary_get_data(dict->first->next,GtkWidget*); + + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){ + char *hash = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordHashEntry)); + if (yon_char_is_empty(hash)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(window->PasswordHashEntry); + return; + } + gtk_entry_set_text(GTK_ENTRY(target),hash); + } else { + char *password = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry)); + char *password_check = (char*)gtk_entry_get_text(GTK_ENTRY(window->RepeatPasswordEntry)); + if (strcmp(password,password_check)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_MISMATCH_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + yon_ubl_status_highlight_incorrect(window->PasswordEntry); + yon_ubl_status_highlight_incorrect(window->RepeatPasswordEntry); + return; + } + 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); + + } + gtk_widget_destroy(window->Window); + +} + void on_mirror_path_removed(GtkWidget *, GtkWidget *target){ if (GTK_IS_WIDGET(target)){ gtk_widget_destroy(target); @@ -766,6 +1242,25 @@ void on_file_chooser_open(GtkWidget *, GtkEntry *target){ gtk_widget_destroy(dialog); } +password_window *yon_password_window_new(){ + GtkBuilder *builder = gtk_builder_new_from_resource(glade_password_path); + password_window *window = malloc(sizeof(password_window)); + window->Window = yon_gtk_builder_get_widget(builder,"PasswordWindow"); + window->HeadLabel = yon_gtk_builder_get_widget(builder,"userTitleNameLabel"); + window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox"); + window->PasswordEntry = yon_gtk_builder_get_widget(builder,"PasswordEntry"); + window->RepeatPasswordEntry = yon_gtk_builder_get_widget(builder,"RepeatPasswordEntry"); + window->EncryptionCombo = yon_gtk_builder_get_widget(builder,"EncryptionCombo"); + window->NoEncriptionCheck = yon_gtk_builder_get_widget(builder,"NoEncriptionCheck"); + window->PasswordHashEntry = yon_gtk_builder_get_widget(builder,"PasswordHashEntry"); + window->UserCancelButton = yon_gtk_builder_get_widget(builder,"UserCancelButton"); + window->AcceptButton = yon_gtk_builder_get_widget(builder,"UserOkButton"); + g_signal_connect(G_OBJECT(window->UserCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); + g_signal_connect(G_OBJECT(window->NoEncriptionCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->PasswordHashEntry); + gtk_widget_show(window->Window); + return window; +} + repo_add_window *yon_repo_add_window_new(){ GtkBuilder *builder = gtk_builder_new_from_resource(glade_repo_add_path); repo_add_window *window = malloc(sizeof(repo_add_window)); @@ -788,6 +1283,21 @@ repo_add_window *yon_repo_add_window_new(){ window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel"); window->SourceBox = yon_gtk_builder_get_widget(builder,"SourceBox"); window->RepoSourceAddButton = yon_gtk_builder_get_widget(builder,"RepoSourceAddButton"); + window->NeverRadio = yon_gtk_builder_get_widget(builder,"NeverRadio"); + window->OptionalRadio = yon_gtk_builder_get_widget(builder,"OptionalRadio"); + window->RequiredRadio = yon_gtk_builder_get_widget(builder,"RequiredRadio"); + window->TrustedOnlyRadio = yon_gtk_builder_get_widget(builder,"TrustedOnlyRadio"); + window->TrustAllRadio = yon_gtk_builder_get_widget(builder,"TrustAllRadio"); + window->PackageNeverRadio = yon_gtk_builder_get_widget(builder,"PackageNeverRadio"); + window->DatabaseNeverRadio = yon_gtk_builder_get_widget(builder,"DatabaseNeverRadio"); + window->PackageOptionalRadio = yon_gtk_builder_get_widget(builder,"PackageOptionalRadio"); + window->DatabaseOptionalRadio = yon_gtk_builder_get_widget(builder,"DatabaseOptionalRadio"); + window->PackageRequiredRadio = yon_gtk_builder_get_widget(builder,"PackageRequiredRadio"); + window->DatabaseRequiredRadio = yon_gtk_builder_get_widget(builder,"DatabaseRequiredRadio"); + window->PackageTrustedOnlyRadio = yon_gtk_builder_get_widget(builder,"PackageTrustedOnlyRadio"); + window->DatabaseTrustedOnlyRadio = yon_gtk_builder_get_widget(builder,"DatabaseTrustedOnlyRadio"); + window->PackageTrustAllRadio = yon_gtk_builder_get_widget(builder,"PackageTrustAllRadio"); + window->DatabaseTrustAllRadio = yon_gtk_builder_get_widget(builder,"DatabaseTrustAllRadio"); window->name=NULL; g_signal_connect(G_OBJECT(window->RepoSourceButton),"clicked",G_CALLBACK(on_file_chooser_open),window->RepoSourceEntry); @@ -818,14 +1328,20 @@ web_publication_add_window *yon_web_publication_add_window_new(){ window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton"); window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton"); window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel"); + window->PasswordButton = yon_gtk_builder_get_widget(builder,"PasswordButton"); window->list = GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1")); window->SelectionCellRenderer = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"SelectionCellRenderer")); + yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(window->UserPasswordEntry)); window->name=NULL; g_signal_connect(G_OBJECT(window->SelectionCellRenderer),"toggled",G_CALLBACK(on_cell_renderer_toggle_toggled),window->RepositoriesTree); g_signal_connect(G_OBJECT(window->PathButton),"clicked",G_CALLBACK(on_file_chooser_open),window->PathEntry); 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); return window; @@ -840,25 +1356,34 @@ mirror_configure_window *yon_mirror_configure_window_new(){ window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton"); window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel"); window->PortDefaultCheck = yon_gtk_builder_get_widget(builder,"PortDefaultCheck"); - window->PortEntry = yon_gtk_builder_get_widget(builder,"PortEntry"); + window->PortSpin = yon_gtk_builder_get_widget(builder,"PortSpin"); window->CacheDefaultCheck = yon_gtk_builder_get_widget(builder,"CacheDefaultCheck"); window->CacheEntry = yon_gtk_builder_get_widget(builder,"CacheEntry"); window->CacheButton = yon_gtk_builder_get_widget(builder,"CacheButton"); window->InactivityDurationDefaultCheck = yon_gtk_builder_get_widget(builder,"InactivityDurationDefaultCheck"); - window->InactivityDurationEntry = yon_gtk_builder_get_widget(builder,"InactivityDurationEntry"); + window->InactivityDurationSpin = yon_gtk_builder_get_widget(builder,"InactivityDurationSpin"); window->CacheTimeoutDefaultCheck = yon_gtk_builder_get_widget(builder,"CacheTimeoutDefaultCheck"); - window->CacheTimeoutEntry = yon_gtk_builder_get_widget(builder,"CacheTimeoutEntry"); + window->CacheTimeoutSpin = yon_gtk_builder_get_widget(builder,"CacheTimeoutSpin"); window->ProxyCheck = yon_gtk_builder_get_widget(builder,"ProxyCheck"); window->ProxyEntry = yon_gtk_builder_get_widget(builder,"ProxyEntry"); window->AgentDefaultCheck = yon_gtk_builder_get_widget(builder,"AgentDefaultCheck"); window->AgentEntry = yon_gtk_builder_get_widget(builder,"AgentEntry"); window->CronEntry = yon_gtk_builder_get_widget(builder,"CronEntry"); window->UpdatesDelayDefaultCheck = yon_gtk_builder_get_widget(builder,"UpdatesDelayDefaultCheck"); - window->UpdatesDelayEntry = yon_gtk_builder_get_widget(builder,"UpdatesDelayEntry"); + window->UpdatesDelaySpin = yon_gtk_builder_get_widget(builder,"UpdatesDelaySpin"); window->UpdatesRequestDelayDefaultCheck = yon_gtk_builder_get_widget(builder,"UpdatesRequestDelayDefaultCheck"); - window->UpdatesRequestDelayEntry = yon_gtk_builder_get_widget(builder,"UpdatesRequestDelayEntry"); + window->UpdatesRequestDelaySpin = yon_gtk_builder_get_widget(builder,"UpdatesRequestDelaySpin"); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); + g_signal_connect(G_OBJECT(window->PortDefaultCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->PortSpin); + g_signal_connect(G_OBJECT(window->CacheDefaultCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->CacheEntry); + g_signal_connect(G_OBJECT(window->CacheDefaultCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->CacheButton); + g_signal_connect(G_OBJECT(window->InactivityDurationDefaultCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->InactivityDurationSpin); + g_signal_connect(G_OBJECT(window->CacheTimeoutDefaultCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->CacheTimeoutSpin); + g_signal_connect(G_OBJECT(window->ProxyCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->ProxyEntry); + g_signal_connect(G_OBJECT(window->AgentDefaultCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->AgentEntry); + g_signal_connect(G_OBJECT(window->UpdatesDelayDefaultCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UpdatesDelaySpin); + g_signal_connect(G_OBJECT(window->UpdatesRequestDelayDefaultCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UpdatesRequestDelaySpin); gtk_widget_show(window->Window); return window; @@ -899,6 +1424,16 @@ void on_cell_renderer_toggle_toggled(GtkWidget *, gchar* path, GtkWidget *table) } } +void on_column_resize(GtkTreeViewColumn *,GParamSpec *,main_window *widgets){ + GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree)); + int width_configuration = gtk_tree_view_column_get_width(g_list_nth_data(list,0))+gtk_tree_view_column_get_width(g_list_nth_data(list,1))+gtk_tree_view_column_get_width(g_list_nth_data(list,2))+gtk_tree_view_column_get_width(g_list_nth_data(list,3))+gtk_tree_view_column_get_width(g_list_nth_data(list,4)); + // int width_system = gtk_tree_view_column_get_width(g_list_nth_data(list,5))+gtk_tree_view_column_get_width(g_list_nth_data(list,6))+gtk_tree_view_column_get_width(g_list_nth_data(list,7)); + g_list_free(list); + gtk_tree_view_column_set_fixed_width(gtk_tree_view_get_column(GTK_TREE_VIEW(widgets->WebPublicationUpperTree),0),width_configuration); + // gtk_tree_view_column_set_fixed_width(gtk_tree_view_get_column(GTK_TREE_VIEW(widgets->WebPublicationUpperTree),1),width_system); + +} + /**yon_main_window_complete(main_window *widgets) * [EN] * @@ -920,6 +1455,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"); @@ -936,6 +1472,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"); @@ -948,6 +1486,9 @@ 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->DateEntry = yon_gtk_builder_get_widget(builder,"DateEntry"); + widgets->WebPublicationUpperTree = yon_gtk_builder_get_widget(builder,"WebPublicationUpperTree"); 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")); @@ -969,6 +1510,27 @@ void yon_main_window_complete(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->MirrorEditButton),"clicked",G_CALLBACK(on_mirror_edit),widgets); g_signal_connect(G_OBJECT(widgets->WebPublicationEditButton),"clicked",G_CALLBACK(on_web_publish_edit),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); + + + GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree)); + for (unsigned int i=0;iMirrorTree)); @@ -977,8 +1539,10 @@ void yon_main_window_complete(main_window *widgets){ yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->RepositoriesTree)); yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->WebPublicationTree)); } + yon_root_button_setup((template_main_window*)widgets,main_config.launch_arguments,main_config.launch_size); yon_load_proceed(YON_CONFIG_LOCAL); yon_interface_update(widgets); + yon_save_window_set_postsave_function(on_save_done,widgets); } int main(int argc, char *argv[]){ @@ -993,9 +1557,12 @@ int main(int argc, char *argv[]){ yon_ubl_setup_arguments(argc,argv,&unfound,&size,NULL); gtk_init(&argc,&argv); template_main_window *widgets = yon_ubl_window_setup(); + yon_root_button_setup(widgets,argv,argc); yon_main_window_complete((main_window*)widgets); char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL); yon_window_config_load(path); + main_config.launch_arguments=yon_char_parsed_copy(argv,argc); + main_config.launch_size=argc; if (getuid()!=0){ textdomain(template_ui_LocaleName); yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); diff --git a/source/ubl-settings-update.h b/source/ubl-settings-update.h index ee27502..67cd0d8 100644 --- a/source/ubl-settings-update.h +++ b/source/ubl-settings-update.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,7 @@ #define glade_mirror_configure_path "/com/ublinux/ui/ubl-settings-update-mirror-configure.glade" #define glade_mirror_add_path "/com/ublinux/ui/ubl-settings-update-mirror-add.glade" #define glade_mirror_path_add_path "/com/ublinux/ui/ubl-settings-update-mirror-path-add.glade" +#define glade_password_path "/com/ublinux/ui/ubl-settings-update-password.glade" #define banner_path "/com/ublinux/images/ubl-settings-update-banner.png" #define CssPath "/com/ublinux/css/ubl-settings-update.css" #define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL) @@ -42,30 +44,37 @@ #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 "" -#define get_publication_list_command "sed -rn \"s/^\\[(.*)\\]$/\1/p;/^\\[options\\]$/d\" /etc/pacman.conf" +#define get_publication_list_command "sed -rn \"s/^\\[(.*)\\]$/\\1/p;/^\\[options\\]$/d\" /etc/pacman.conf" #define REPOSITORY(target) yon_char_unite("REPOSITORY[",target,"]",NULL) #define REPOSITORY_parameter "REPOSITORY" #define REOSITORY_command(target) yon_char_unite("ubconfig --source global get [update] REPOSITORY[",target,"]",NULL) +#define REPOSITORY_parameter_command yon_char_unite("ubconfig --source global get [update] REPOSITORY",NULL) #define REPOSITORY_search "REPOSITORY[" -#define REPOPUBLIC_NET "REPOPUBLIC_NET" +#define REPOPUBLIC_NET_parameter "REPOPUBLIC_NET" +#define REPOPUBLIC_NET_parameter_command "ubconfig --source global get [update] REPOPUBLIC_NET" #define REPOPUBLIC_WEB "REPOPUBLIC_WEB" #define REPOPUBLIC_WEB_search "REPOPUBLIC_WEB[" #define REPOPUBLIC_WEB_full(target) yon_char_unite("REPOPUBLIC_WEB[",target,"]",NULL) #define REPOPUBLIC_WEB_command(target) yon_char_unite("ubconfig --source global get [update] REPOPUBLIC_WEB[",target,"]",NULL) #define REPOPUBLIC_CACHE "REPOPUBLIC_CACHE" +#define REPOPUBLIC_CACHE_command "ubconfig --source global get [update] REPOPUBLIC_CACHE" #define REPOPUBLIC_CACHE_search "REPOPUBLIC_CACHE[" #define REPOPUBLIC_CACHE_full(target) yon_char_unite("REPOPUBLIC_CACHE[",target,"]",NULL) #define REPOPUBLIC_CACHE_full_command(target) yon_char_unite("ubconfig --source global get [update] REPOPUBLIC_CACHE[",target,"]",NULL) #define AUTOUPDATE "AUTOUPDATE" +#define AUTOUPDATE_command "ubconfig --source global get [update] AUTOUPDATE" #define AUTOUPDATE_mode "AUTOUPDATE[mode]" +#define AUTOUPDATE_mode_command "ubconfig --source global get [update] AUTOUPDATE[mode]" #define AUTOUPDATE_interval "AUTOUPDATE[interval]" #define AUTOUPDATE_repos "AUTOUPDATE[repos]" +#define AUTOUPDATE_repos_command "bconfig --source global get [update] AUTOUPDATE[repos]" #define AUTOUPDATE_timestamp "AUTOUPDATE[timestamp]" typedef char* string; @@ -75,7 +84,10 @@ char *local; typedef struct { template_config_fields - + int save_config; + char *date_format; + config_str launch_arguments; + int launch_size; } config; typedef struct { @@ -87,6 +99,9 @@ typedef struct { GtkWidget *UpdateIntervalCombo; GtkWidget *UpdateRepoListCombo; GtkWidget *UpdateRepoTree; + GtkWidget *BootCheck; + GtkWidget *DateEntry; + GtkCellRenderer *UpdateToggleCell; GtkListStore *UpdateRepoList; GtkWidget *RepositoriesRepoListConfigurationCheck; @@ -103,7 +118,9 @@ typedef struct { GtkWidget *PublicationConnectPublicCheck; GtkWidget *RecieveDBFromNetCheck; GtkWidget *PublicationTree; + GtkCellRenderer *PublicationToggleCell; GtkWidget *PublicationUpdateButton; + GtkWidget *PublicationCombo; GtkListStore *PublicationList; GtkWidget *WebPublicationUpdateButton; @@ -111,6 +128,7 @@ typedef struct { GtkWidget *WebPublicationEditButton; GtkWidget *WebPublicationRemoveButton; GtkWidget *WebPublicationTree; + GtkWidget *WebPublicationUpperTree; GtkListStore *WebPublicationList; GtkWidget *MirrorPublicCheck; @@ -144,6 +162,22 @@ typedef struct { GtkWidget *AcceptButton; GtkWidget *CancelButton; + GtkWidget *NeverRadio; + GtkWidget *OptionalRadio; + GtkWidget *RequiredRadio; + GtkWidget *TrustedOnlyRadio; + GtkWidget *TrustAllRadio; + GtkWidget *PackageNeverRadio; + GtkWidget *DatabaseNeverRadio; + GtkWidget *PackageOptionalRadio; + GtkWidget *DatabaseOptionalRadio; + GtkWidget *PackageRequiredRadio; + GtkWidget *DatabaseRequiredRadio; + GtkWidget *PackageTrustedOnlyRadio; + GtkWidget *DatabaseTrustedOnlyRadio; + GtkWidget *PackageTrustAllRadio; + GtkWidget *DatabaseTrustAllRadio; + char *name; } repo_add_window; @@ -163,6 +197,7 @@ typedef struct { GtkWidget *UserPasswordCheck; GtkWidget *UserPasswordCombo; GtkWidget *UserPasswordEntry; + GtkWidget *PasswordButton; GtkWidget *AcceptButton; GtkWidget *CancelButton; GtkListStore *list; @@ -195,25 +230,39 @@ typedef struct { GtkWidget *CancelButton; GtkWidget *PortDefaultCheck; - GtkWidget *PortEntry; + GtkWidget *PortSpin; GtkWidget *CacheDefaultCheck; GtkWidget *CacheEntry; GtkWidget *CacheButton; GtkWidget *InactivityDurationDefaultCheck; - GtkWidget *InactivityDurationEntry; + GtkWidget *InactivityDurationSpin; GtkWidget *CacheTimeoutDefaultCheck; - GtkWidget *CacheTimeoutEntry; + GtkWidget *CacheTimeoutSpin; GtkWidget *ProxyCheck; GtkWidget *ProxyEntry; GtkWidget *AgentDefaultCheck; GtkWidget *AgentEntry; GtkWidget *CronEntry; GtkWidget *UpdatesDelayDefaultCheck; - GtkWidget *UpdatesDelayEntry; + GtkWidget *UpdatesDelaySpin; GtkWidget *UpdatesRequestDelayDefaultCheck; - GtkWidget *UpdatesRequestDelayEntry; + GtkWidget *UpdatesRequestDelaySpin; } mirror_configure_window; +typedef struct { + GtkWidget *Window; + GtkWidget *HeadLabel; + GtkWidget *StatusBox; + + GtkWidget *PasswordEntry; + GtkWidget *RepeatPasswordEntry; + GtkWidget *EncryptionCombo; + GtkWidget *NoEncriptionCheck; + GtkWidget *PasswordHashEntry; + GtkWidget *UserCancelButton; + GtkWidget *AcceptButton; + +} password_window; typedef struct { GtkWidget *Window; @@ -225,8 +274,26 @@ typedef struct { GtkWidget *AcceptButton; } documentation_confirmation_window; +void on_save_done(main_window *, config_str output, int size); + +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); @@ -238,13 +305,18 @@ void on_repo_remove(GtkWidget *self, main_window *widgets); void on_web_publish_remove_accept(GtkWidget *, main_window *widgets); void on_mirror_remove_accept(GtkWidget *, main_window *widgets); void on_repositories_remove_accept(GtkWidget *, main_window *widgets); +void on_password_accept(); + +void on_password_open(GtkWidget *, web_publication_add_window *window); +password_window *yon_password_window_new(); repo_add_window *yon_repo_add_window_new(); web_publication_add_window *yon_web_publication_add_window_new(); mirror_add_window *yon_mirror_add_window_new(); mirror_configure_window *yon_mirror_configure_window_new(); void on_file_chooser_open(GtkWidget *self, GtkEntry *target); +void on_column_resize(GtkTreeViewColumn *,GParamSpec *,main_window *widgets); void on_web_publish_path_changed(GtkWidget *, web_publication_add_window *window); @@ -271,4 +343,5 @@ void on_mirror_path_edit(GtkWidget*,GtkWidget *target); void on_repo_source_add(GtkWidget *, repo_add_window *window); void on_cell_renderer_toggle_toggled(GtkWidget *self, gchar* path, GtkWidget *table); +void on_mirror_configure_accept(GtkWidget *, dictionary *dict); #endif \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index e4890d0..54ffc46 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -9,4 +9,122 @@ #define REMOVE_REPO_WARNING_LABEL _("Are you sure want to remove repository?") #define NO_SHARED_REPOS_LABEL _("No repositories were chosen to share") + #define PASSWORD_MISMATCH_LABEL _("passwords do not match") + + // #define _LABEL _("Update") + // #define _LABEL _("Repositories") + // #define _LABEL _("Publication") + // #define _LABEL _("WEB-publication") + // #define _LABEL _("Mirror publication") + // #define _LABEL _("Date of last automatic update: ") + // #define _LABEL _("Automatic update") + // #define _LABEL _("First update all modules and then the system") + // #define _LABEL _("Update only modules") + // #define _LABEL _("Update everything in the order of the specified repositories") + // #define _LABEL _("Update mode:") + // #define _LABEL _("Update interval:") + // #define _LABEL _("Boot") + // #define _LABEL _("Minutes") + // #define _LABEL _("Hours") + // #define _LABEL _("Days") + // #define _LABEL _("Months") + // #define _LABEL _("Repositories from which the update will occur") + // #define _LABEL _("Repositories list:") + // #define _LABEL _("Default") + // #define _LABEL _("Choose") + // #define _LABEL _("Chosen") + // #define _LABEL _("Repository") + // #define _LABEL _("Manage repository list") + // #define _LABEL _("Disable system repositories") + // #define _LABEL _("Update") + // #define _LABEL _("Move up") + // #define _LABEL _("Move down") + // #define _LABEL _("Add") + // #define _LABEL _("Edit") + // #define _LABEL _("Remove") + // #define _LABEL _("Enabled") + // #define _LABEL _("Source") + // #define _LABEL _("Signature level") + // #define _LABEL _("Usage level") + // #define _LABEL _("Repository connection configuration") + // #define _LABEL _("Repository connection configuration") + // #define _LABEL _("Connect and publish") + // #define _LABEL _("Recieve DB packages from shared network") + // #define _LABEL _("Repositories for publishing") + // #define _LABEL _("Repositories list:") + // #define _LABEL _("All repositories") + // #define _LABEL _("Choose") + // #define _LABEL _("Accept") + // #define _LABEL _("Repository name") + // #define _LABEL _("Repository connection configuration") + // #define _LABEL _("Authorization parameters") + // #define _LABEL _("Storage") + // #define _LABEL _("Chosen repositories") + // #define _LABEL _("Reviewer") + // #define _LABEL _("Port") + // #define _LABEL _("Name") + // #define _LABEL _("Password/Hash type") + // #define _LABEL _("Password/Password hash") + // #define _LABEL _("Repository connection configuration") + // #define _LABEL _("Publish lazy mirror") + // #define _LABEL _("Type") + // #define _LABEL _("Resource URL") + // #define _LABEL _("Configure") + // #define _LABEL _("Mirror publish configuration") + // #define _LABEL _("Service port:") + // #define _LABEL _("Cache directory:") + // #define _LABEL _("Duration of inactivity (in seconds):") + // #define _LABEL _("Timeout (in seconds) for loading internel cache:") + // #define _LABEL _("Work through proxy:") + // #define _LABEL _("User agent:") + // #define _LABEL _("Standard expression for cron:") + // #define _LABEL _("The number of consecutie days that systems on the network have not been updated:") + // #define _LABEL _("The number of consecutive days wthout an update requested:") + // #define _LABEL _("Add mirror") + // #define _LABEL _("Repository name:") + // #define _LABEL _("Repository type:") + // #define _LABEL _("WEB link") + // #define _LABEL _("Proxy server") + // #define _LABEL _("Mirrors file") + // #define _LABEL _("Source:") + // #define _LABEL _("Configuration") + // #define _LABEL _("Sign level:") + // #define _LABEL _("Enable repository update") + // #define _LABEL _("Enable repository search") + // #define _LABEL _("Enable installation of packages from this repository during --sync operation") + // #define _LABEL _("Allow this repository to be a valid source of packages when running --sysupgrade") + // #define _LABEL _("Add repository for publication") + // #define _LABEL _("Enable publishing of local repository as WEB resource") + // #define _LABEL _("Path to publication directory:") + // #define _LABEL _("Port:") + // #define _LABEL _("Publishing parameters") + // #define _LABEL _("Enable WEB file browser") + // #define _LABEL _("Authorization parameters") + // #define _LABEL _("Set") + // #define _LABEL _("Username:") + // #define _LABEL _("User password:") + // #define _LABEL _("Not encrypted") + // #define _LABEL _("Encrypted with SHA256") + // #define _LABEL _("Encrypted with SHA512") + // #define _LABEL _("System") + // #define _LABEL _("Minutes") + // #define _LABEL _("Hours") + // #define _LABEL _("Days") + // #define _LABEL _("Months") + // #define _LABEL _("Sign level") + // #define _LABEL _("Password input") + // #define _LABEL _("Password:") + // #define _LABEL _("Repeat password:") + // #define _LABEL _("Entryption:") + // #define _LABEL _("Do not encrypt password") + // #define _LABEL _("Password hash:") + + + + + + + + + #endif \ No newline at end of file diff --git a/ubl-settings-update-mirror-add.glade b/ubl-settings-update-mirror-add.glade index bdc2cf4..ade5c7d 100644 --- a/ubl-settings-update-mirror-add.glade +++ b/ubl-settings-update-mirror-add.glade @@ -1,6 +1,6 @@ - + @@ -302,7 +302,7 @@ True False - Add repository + Add mirror diff --git a/ubl-settings-update-mirror-configure.glade b/ubl-settings-update-mirror-configure.glade index 7a710aa..93201c1 100644 --- a/ubl-settings-update-mirror-configure.glade +++ b/ubl-settings-update-mirror-configure.glade @@ -1,6 +1,6 @@ - + @@ -92,6 +92,7 @@ True True False + True True @@ -104,6 +105,7 @@ True + False True adjustment1 @@ -143,6 +145,7 @@ True True False + True True @@ -156,6 +159,7 @@ True + False True @@ -167,6 +171,7 @@ True + False True True image1 @@ -210,6 +215,7 @@ True True False + True True @@ -222,6 +228,7 @@ True + False True adjustment2 @@ -261,6 +268,7 @@ True True False + True True @@ -273,6 +281,7 @@ True + False True adjustment3 @@ -312,6 +321,7 @@ True + False True @@ -350,6 +360,7 @@ True True False + True True @@ -362,6 +373,7 @@ True + False True @@ -435,6 +447,7 @@ True True False + True True @@ -447,6 +460,7 @@ True + False True adjustment4 @@ -486,6 +500,7 @@ True True False + True True @@ -498,6 +513,7 @@ True + False True adjustment5 @@ -531,7 +547,7 @@ True False - Add repository + Mirror publish configuration diff --git a/ubl-settings-update-password.glade b/ubl-settings-update-password.glade new file mode 100644 index 0000000..2230fb4 --- /dev/null +++ b/ubl-settings-update-password.glade @@ -0,0 +1,332 @@ + + + + + + + True + False + com.ublinux.ubl-settings-usergroups.cancel-symbolic + + + True + False + com.ublinux.ubl-settings-usergroups.accept-symbolic + + + False + False + True + 450 + com.ublinux.ubl-settings-usergroups + + + True + False + 5 + vertical + 5 + + + True + False + vertical + + + + + + False + True + 0 + + + + + True + False + 5 + 5 + vertical + 5 + + + True + False + vertical + 5 + + + True + False + 5 + + + True + False + Password: + 0 + + + False + True + 0 + + + + + True + True + False + * + True + com.ublinux.ubl-settings-usergroups.view-symbolic + ******** + password + + + True + True + 1 + + + + + True + True + 1 + + + + + True + False + 5 + + + True + False + Repeat password: + 0 + + + False + True + 0 + + + + + True + True + False + * + True + com.ublinux.ubl-settings-usergroups.view-symbolic + ******** + password + + + True + True + 1 + + + + + True + True + 2 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + False + Encryption: + 0 + + + False + True + 0 + + + + + True + False + 0 + + Default + SHA-512 + SHA-256 + + + + True + True + 1 + + + + + True + True + 2 + + + + + True + False + vertical + 5 + + + True + False + + + False + True + 0 + + + + + Do not encrypt password + True + True + False + True + + + False + True + 1 + + + + + True + False + 5 + + + True + False + Password hash: + 0 + + + False + True + 0 + + + + + True + False + True + False + * + com.ublinux.ubl-settings-usergroups.view-symbolic + + + True + True + 1 + + + + + True + True + 2 + + + + + False + True + 3 + + + + + False + True + 2 + + + + + + + True + False + + + True + False + Password input + + + + + + + + Cancel + True + True + True + image4 + + + + + + Accept + True + True + True + image5 + + + + end + 1 + + + + + + + + + + + + + diff --git a/ubl-settings-update-repo-add.glade b/ubl-settings-update-repo-add.glade index 87b576f..eaa8966 100644 --- a/ubl-settings-update-repo-add.glade +++ b/ubl-settings-update-repo-add.glade @@ -1,6 +1,6 @@ - + @@ -8,6 +8,11 @@ False com.ublinux.libublsettingsui-gtk3.zoom-symbolic + + True + False + com.ublinux.libublsettingsui-gtk3.increase-symbolic + 500 False @@ -34,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 @@ -202,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 @@ -231,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 - - - Default - True - True - False - True - - - False - True - 0 - - + 0.019999999552965164 + in - - 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 + NeverRadio + + + False + True + 0 + + + + + DatabaseNever + True + True + False + For database only + True + True + PackageNeverRadio + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + + + Required + True + True + False + Signatures will be required for all packages and databases + True + True + NeverRadio + + + False + True + 0 + + + + + PackageOptional + True + True + False + For packages only + True + True + PackageNeverRadio + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + 5 + + + TrustedOnly + True + True + False + Signatures will be required for all packages and databases + True + True + NeverRadio + + + False + True + 0 + + + + + DatabaseOptional + True + True + False + For database only + True + True + PackageNeverRadio + + + 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 + NeverRadio + + + False + True + 0 + + + + + PackageRequired + True + True + False + For packages only + True + True + PackageNeverRadio + + + False + True + 1 + + + + + False + True + 4 + + + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + DatabaseRequired + True + True + False + For database only + True + True + PackageNeverRadio + + + False + True + 1 + + + + + False + True + 5 + + + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + PackageTrustedOnly + True + True + False + For packages only + True + True + PackageNeverRadio + + + False + True + 1 + + + + + False + True + 6 + + + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + DatabaseTrustedOnly + True + True + False + For database only + True + True + PackageNeverRadio + + + 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 + PackageNeverRadio + + + 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 + PackageNeverRadio + + + 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 - @@ -509,9 +940,18 @@ - - True - False - com.ublinux.libublsettingsui-gtk3.increase-symbolic + + + + + + + + + + + + + diff --git a/ubl-settings-update-web-publication-add.glade b/ubl-settings-update-web-publication-add.glade index 3c13554..022b9bf 100644 --- a/ubl-settings-update-web-publication-add.glade +++ b/ubl-settings-update-web-publication-add.glade @@ -1,6 +1,6 @@ - + @@ -8,6 +8,11 @@ False com.ublinux.libublsettingsui-gtk3.zoom-symbolic + + True + False + document-edit-symbolic + @@ -307,6 +312,7 @@ True + False True @@ -342,28 +348,48 @@ True + False False 0 Not encrypted - Encrypted with SHA256 - Encrypted with SHA512 + Set False True - 2 + 1 True + False True + False + * True True + 2 + + + + + True + False + True + True + image2 + + + + False + True 3 @@ -409,7 +435,7 @@ True False - Add repository + Add repository for publication 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 0b262c0..bb10805 100644 --- a/ubl-settings-update.glade +++ b/ubl-settings-update.glade @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --> - + @@ -57,7 +57,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - + + + + + + + + @@ -182,18 +189,57 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. vertical 5 - - Automatic update + True - True - False - 0 - True + False + 5 + + + Automatic update + True + True + False + 0 + True + + + False + True + 0 + + + + + Check system updates at system startup + True + True + False + start + True + + + True + True + 1 + + + + + True + False + False + + + False + True + 2 + + False True - 0 + 1 @@ -236,7 +282,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. False True - 1 + 2 @@ -268,6 +314,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True True False + True True @@ -294,7 +341,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. False 0 - Boot Minutes Hours Days @@ -302,14 +348,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - False + True True 2 - False + True True 1 @@ -318,7 +364,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. False True - 2 + 3 @@ -350,7 +396,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True False - Repository list: + Repositories list: False @@ -400,7 +446,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. fixed Chosen - + + + 0 + @@ -411,6 +460,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. end + + 1 + @@ -438,7 +490,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True True - 3 + 4 @@ -540,6 +592,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True True True + Update image1 - - - False - True - 0 - - - - - False - True - 0 - - - - - True - True - in + 5 + 5 + 5 - + True - True - PublicationList - - - + False + vertical + 5 - - True - fixed - Chosen + + True + False + 5 - - - 0 - + + True + False + Repositories list: + + + False + True + 0 + + + + + True + False + 0 + + All repositories + Choose + + + + True + True + 1 + + + False + True + 0 + - - Repository name + + True + False + 3 + 5 - - end + + True + False + vertical + + + True + True + True + Update + image2 + + + + False + True + 0 + + - - 1 - + + False + True + 0 + + + + + True + True + in + + + True + True + PublicationList + + + + + + True + fixed + Chosen + + + + 0 + + + + + + + Repository name + + + end + + + 1 + + + + + + + + + True + True + 1 + + + True + True + 1 + - - True - True - 1 - + + + + True + False + Repositories for publishing + @@ -996,6 +1132,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True True True + Update image3 + + + False + True + 2 + + + diff --git a/ubl-settings-update.pot b/ubl-settings-update.pot index d5ca432..4f187f7 100644 --- a/ubl-settings-update.pot +++ b/ubl-settings-update.pot @@ -17,233 +17,424 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: source/ubl-settings-update-strings.h:1 -msgid "Version:" +#: source/ubl-strings.h:4 +msgid "System update" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "ubl-settings-update version:" +#: source/ubl-strings.h:5 +msgid "System update settings management" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "update settings" +#: source/ubl-strings.h:6 +msgid "Nothing were chosen" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Usage:" +#: source/ubl-strings.h:7 +msgid "Empty important field!" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "[OPTIONS]" +#: source/ubl-strings.h:8 +msgid "Add repository" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Options:" +#: source/ubl-strings.h:9 +msgid "Are you sure want to remove repository?" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Show this help" +#: source/ubl-strings.h:10 +msgid "No repositories were chosen to share" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Show package version" +#: source/ubl-strings.h:12 +msgid "passwords do not match" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock this help menu" +#: source/ubl-strings.h:14 source/ubl-strings.h:39 +msgid "Update" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock configuration saving" +#: source/ubl-strings.h:15 +msgid "Repositories" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock local configration saving" +#: source/ubl-strings.h:16 +msgid "Publication" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock global configration saving" +#: source/ubl-strings.h:17 +msgid "WEB-publication" msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock global configration loading" +#: source/ubl-strings.h:18 +msgid "Mirror publication" msgstr "" -#: source/ubl-settings-update-strings.h:3 -msgid "System update" +#: source/ubl-strings.h:19 +msgid "Date of last automatic update: " msgstr "" -#: source/ubl-settings-update-strings.h:4 -msgid "System update settings management" +#: source/ubl-strings.h:20 +msgid "Automatic update" +msgstr "" + +#: source/ubl-strings.h:21 +msgid "First update all modules and then the system" +msgstr "" + +#: source/ubl-strings.h:22 +msgid "Update only modules" +msgstr "" + +#: source/ubl-strings.h:23 +msgid "Update everything in the order of the specified repositories" +msgstr "" + +#: source/ubl-strings.h:24 +msgid "Update mode:" +msgstr "" + +#: source/ubl-strings.h:25 +msgid "Update interval:" +msgstr "" + +#: source/ubl-strings.h:26 +msgid "Boot" +msgstr "" + +#: source/ubl-strings.h:27 source/ubl-strings.h:110 +msgid "Minutes" msgstr "" -#: source/ubl-settings-update-strings.h:5 -msgid "Check for updates" +#: source/ubl-strings.h:28 source/ubl-strings.h:111 +msgid "Hours" msgstr "" -#: source/ubl-settings-update-strings.h:6 -msgid "About" +#: source/ubl-strings.h:29 source/ubl-strings.h:112 +msgid "Days" msgstr "" -#: source/ubl-settings-update-strings.h:7 -msgid "Documentation" +#: source/ubl-strings.h:30 source/ubl-strings.h:113 +msgid "Months" msgstr "" -#: source/ubl-settings-update-strings.h:8 -msgid "Save to local configuration" +#: source/ubl-strings.h:31 +msgid "Repositories from which the update will occur" msgstr "" -#: source/ubl-settings-update-strings.h:9 -msgid "Save to global configuration" +#: source/ubl-strings.h:32 source/ubl-strings.h:54 +msgid "Repositories list:" msgstr "" -#: source/ubl-settings-update-strings.h:10 -msgid "Save configuration" +#: source/ubl-strings.h:33 +msgid "Default" msgstr "" -#: source/ubl-settings-update-strings.h:11 -#: source/ubl-settings-update-strings.h:36 -msgid "Save" +#: source/ubl-strings.h:34 source/ubl-strings.h:56 +msgid "Choose" msgstr "" -#: source/ubl-settings-update-strings.h:12 -msgid "Load local configuration" +#: source/ubl-strings.h:35 +msgid "Chosen" msgstr "" -#: source/ubl-settings-update-strings.h:13 -msgid "Load global configuration" +#: source/ubl-strings.h:36 +msgid "Repository" msgstr "" -#: source/ubl-settings-update-strings.h:14 -msgid "load" +#: source/ubl-strings.h:37 +msgid "Manage repository list" msgstr "" -#: source/ubl-settings-update-strings.h:15 -msgid "Launch package manager" +#: source/ubl-strings.h:38 +msgid "Disable system repositories" msgstr "" -#: source/ubl-settings-update-strings.h:16 -msgid "Cache clean command: " +#: source/ubl-strings.h:40 +msgid "Move up" msgstr "" -#: source/ubl-settings-update-strings.h:17 -msgid "Update command: " +#: source/ubl-strings.h:41 +msgid "Move down" msgstr "" -#: source/ubl-settings-update-strings.h:18 -msgid "Package manager: " +#: source/ubl-strings.h:42 +msgid "Add" msgstr "" -#: source/ubl-settings-update-strings.h:19 -msgid "URI" +#: source/ubl-strings.h:43 +msgid "Edit" msgstr "" -#: source/ubl-settings-update-strings.h:20 +#: source/ubl-strings.h:44 +msgid "Remove" +msgstr "" + +#: source/ubl-strings.h:45 msgid "Enabled" msgstr "" -#: source/ubl-settings-update-strings.h:21 -msgid "Distribution" +#: source/ubl-strings.h:46 +msgid "Source" msgstr "" -#: source/ubl-settings-update-strings.h:22 -msgid "Activate UBUR" +#: source/ubl-strings.h:47 +msgid "Signature level" msgstr "" -#: source/ubl-settings-update-strings.h:23 -msgid "Activate AUR" +#: source/ubl-strings.h:48 +msgid "Usage level" msgstr "" -#: source/ubl-settings-update-strings.h:24 -msgid "Every 3 hours" +#: source/ubl-strings.h:49 source/ubl-strings.h:50 source/ubl-strings.h:59 +#: source/ubl-strings.h:68 +msgid "Repository connection configuration" msgstr "" -#: source/ubl-settings-update-strings.h:25 -msgid "Every 2 hours" +#: source/ubl-strings.h:51 +msgid "Connect and publish" msgstr "" -#: source/ubl-settings-update-strings.h:26 -msgid "Every 1 hour" +#: source/ubl-strings.h:52 +msgid "Recieve DB packages from shared network" msgstr "" -#: source/ubl-settings-update-strings.h:27 -msgid "Download updates automatically" +#: source/ubl-strings.h:53 +msgid "Repositories for publishing" msgstr "" -#: source/ubl-settings-update-strings.h:28 -msgid "Hide icon of no updates found" +#: source/ubl-strings.h:55 +msgid "All repositories" msgstr "" -#: source/ubl-settings-update-strings.h:29 -msgid "Update checking frequency" +#: source/ubl-strings.h:57 +msgid "Accept" msgstr "" -#: source/ubl-settings-update-strings.h:30 -msgid "Extra" +#: source/ubl-strings.h:58 +msgid "Repository name" msgstr "" -#: source/ubl-settings-update-strings.h:31 -msgid "Repositories" +#: source/ubl-strings.h:60 source/ubl-strings.h:102 +msgid "Authorization parameters" +msgstr "" + +#: source/ubl-strings.h:61 +msgid "Storage" +msgstr "" + +#: source/ubl-strings.h:62 +msgid "Chosen repositories" +msgstr "" + +#: source/ubl-strings.h:63 +msgid "Reviewer" +msgstr "" + +#: source/ubl-strings.h:64 +msgid "Port" +msgstr "" + +#: source/ubl-strings.h:65 +msgid "Name" +msgstr "" + +#: source/ubl-strings.h:66 +msgid "Password/Hash type" +msgstr "" + +#: source/ubl-strings.h:67 +msgid "Password/Password hash" +msgstr "" + +#: source/ubl-strings.h:69 +msgid "Publish lazy mirror" msgstr "" -#: source/ubl-settings-update-strings.h:32 -msgid "General" +#: source/ubl-strings.h:70 +msgid "Type" msgstr "" -#: source/ubl-settings-update-strings.h:33 -msgid "Adress: " +#: source/ubl-strings.h:71 +msgid "Resource URL" msgstr "" -#: source/ubl-settings-update-strings.h:34 -msgid "Distribution: " +#: source/ubl-strings.h:72 +msgid "Configure" msgstr "" -#: source/ubl-settings-update-strings.h:35 -msgid "Cancel" +#: source/ubl-strings.h:73 +msgid "Mirror publish configuration" msgstr "" -#: source/ubl-settings-update-strings.h:37 -msgid "Would you like to read documentation in the Web?" +#: source/ubl-strings.h:74 +msgid "Service port:" msgstr "" -#: source/ubl-settings-update-strings.h:38 +#: source/ubl-strings.h:75 +msgid "Cache directory:" +msgstr "" + +#: source/ubl-strings.h:76 +msgid "Duration of inactivity (in seconds):" +msgstr "" + +#: source/ubl-strings.h:77 +msgid "Timeout (in seconds) for loading internel cache:" +msgstr "" + +#: source/ubl-strings.h:78 +msgid "Work through proxy:" +msgstr "" + +#: source/ubl-strings.h:79 +msgid "User agent:" +msgstr "" + +#: source/ubl-strings.h:80 +msgid "Standard expression for cron:" +msgstr "" + +#: source/ubl-strings.h:81 msgid "" -"You will be redirected to documentation website where documentation is\n" -"translated and supported by community." +"The number of consecutie days that systems on the network have not been " +"updated:" msgstr "" -#: source/ubl-settings-update-strings.h:39 -msgid "Always redirect to online documentation" +#: source/ubl-strings.h:82 +msgid "The number of consecutive days wthout an update requested:" msgstr "" -#: source/ubl-settings-update-strings.h:40 -msgid "Open documentation" +#: source/ubl-strings.h:83 +msgid "Add mirror" msgstr "" -#: source/ubl-settings-update-strings.h:41 -msgid "Project Home Page" +#: source/ubl-strings.h:84 +msgid "Repository name:" msgstr "" -#: source/ubl-settings-update-strings.h:42 -msgid "Nothing were chosen" +#: source/ubl-strings.h:85 +msgid "Repository type:" +msgstr "" + +#: source/ubl-strings.h:86 +msgid "WEB link" +msgstr "" + +#: source/ubl-strings.h:87 +msgid "Proxy server" +msgstr "" + +#: source/ubl-strings.h:88 +msgid "Mirrors file" +msgstr "" + +#: source/ubl-strings.h:89 +msgid "Source:" +msgstr "" + +#: source/ubl-strings.h:90 +msgid "Configuration" +msgstr "" + +#: source/ubl-strings.h:91 +msgid "Sign level:" +msgstr "" + +#: source/ubl-strings.h:92 +msgid "Enable repository update" +msgstr "" + +#: source/ubl-strings.h:93 +msgid "Enable repository search" +msgstr "" + +#: source/ubl-strings.h:94 +msgid "" +"Enable installation of packages from this repository during --sync operation" +msgstr "" + +#: source/ubl-strings.h:95 +msgid "" +"Allow this repository to be a valid source of packages when running --" +"sysupgrade" +msgstr "" + +#: source/ubl-strings.h:96 +msgid "Add repository for publication" +msgstr "" + +#: source/ubl-strings.h:97 +msgid "Enable publishing of local repository as WEB resource" +msgstr "" + +#: source/ubl-strings.h:98 +msgid "Path to publication directory:" +msgstr "" + +#: source/ubl-strings.h:99 +msgid "Port:" +msgstr "" + +#: source/ubl-strings.h:100 +msgid "Publishing parameters" +msgstr "" + +#: source/ubl-strings.h:101 +msgid "Enable WEB file browser" +msgstr "" + +#: source/ubl-strings.h:103 +msgid "Set" +msgstr "" + +#: source/ubl-strings.h:104 +msgid "Username:" +msgstr "" + +#: source/ubl-strings.h:105 +msgid "User password:" +msgstr "" + +#: source/ubl-strings.h:106 +msgid "Not encrypted" +msgstr "" + +#: source/ubl-strings.h:107 +msgid "Encrypted with SHA256" +msgstr "" + +#: source/ubl-strings.h:108 +msgid "Encrypted with SHA512" +msgstr "" + +#: source/ubl-strings.h:109 +msgid "System" +msgstr "" + +#: source/ubl-strings.h:114 +msgid "Sign level" +msgstr "" + +#: source/ubl-strings.h:115 +msgid "Password input" msgstr "" -#: source/ubl-settings-update-strings.h:44 -msgid "Global configuration loading succseeded." +#: source/ubl-strings.h:116 +msgid "Password:" msgstr "" -#: source/ubl-settings-update-strings.h:45 -msgid "Local configuration loading succseeded." +#: source/ubl-strings.h:117 +msgid "Repeat password:" msgstr "" -#: source/ubl-settings-update-strings.h:47 -msgid "Local and global configuration saving succseeded." +#: source/ubl-strings.h:118 +msgid "Entryption:" msgstr "" -#: source/ubl-settings-update-strings.h:48 -msgid "Global configuration saving succseeded." +#: source/ubl-strings.h:119 +msgid "Do not encrypt password" msgstr "" -#: source/ubl-settings-update-strings.h:49 -msgid "Local configuration saving succseeded." +#: source/ubl-strings.h:120 +msgid "Password hash:" msgstr "" diff --git a/ubl-settings-update_ru.po b/ubl-settings-update_ru.po index 655c950..54c62c6 100644 --- a/ubl-settings-update_ru.po +++ b/ubl-settings-update_ru.po @@ -17,236 +17,471 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: source/ubl-settings-update-strings.h:1 -msgid "Version:" -msgstr "Версия:" +#: source/ubl-strings.h:4 +msgid "System update" +msgstr "Обновление системы" -#: source/ubl-settings-update-strings.h:2 -msgid "ubl-settings-update version:" -msgstr "Версия ubl-settings-update: " +#: source/ubl-strings.h:5 +msgid "System update settings management" +msgstr "Настройка параметров обновления системы" -#: source/ubl-settings-update-strings.h:2 -msgid "update settings" -msgstr "Настройки обновлений" +#: source/ubl-strings.h:6 +msgid "Nothing were chosen" +msgstr "Ничего не выбрано" -#: source/ubl-settings-update-strings.h:2 -msgid "Usage:" -msgstr "Использование:" +#: source/ubl-strings.h:7 +msgid "Empty important field!" +msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "[OPTIONS]" -msgstr "[АРГУМЕНТЫ]" +#: source/ubl-strings.h:8 +msgid "Add repository" +msgstr "Добавить репозиторий" -#: source/ubl-settings-update-strings.h:2 -msgid "Options:" -msgstr "Аргументы:" +#: source/ubl-strings.h:9 +msgid "Are you sure want to remove repository?" +msgstr "Вы точно хотите удалить репозиторий?" -#: source/ubl-settings-update-strings.h:2 -msgid "Show this help" -msgstr "Показать параметры справки" +#: source/ubl-strings.h:10 +msgid "No repositories were chosen to share" +msgstr "Репозитории для публикации не были выбраны" -#: source/ubl-settings-update-strings.h:2 -msgid "Show package version" -msgstr "Показать текущую версию" +#: source/ubl-strings.h:12 +msgid "passwords do not match" +msgstr "" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock this help menu" -msgstr "Блокировка вызова справки" +#: source/ubl-strings.h:14 source/ubl-strings.h:39 +msgid "Update" +msgstr "Обновить" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock configuration saving" -msgstr "Блокировка сохранения локальной и глобальной конфигурации" +#: source/ubl-strings.h:15 +msgid "Repositories" +msgstr "Репозитории" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock local configration saving" -msgstr "Блокировка сохранения локальной конфигурации" +#: source/ubl-strings.h:16 +msgid "Publication" +msgstr "Публикация" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock global configration saving" -msgstr "Блокировка сохранения глобальной конфигурации" +#: source/ubl-strings.h:17 +msgid "WEB-publication" +msgstr "WEB-публикация" -#: source/ubl-settings-update-strings.h:2 -msgid "Lock global configration loading" -msgstr "Блокировка загрузки глобальной конфигурации" +#: source/ubl-strings.h:18 +msgid "Mirror publication" +msgstr "Публикация зеркала" -#: source/ubl-settings-update-strings.h:3 -msgid "System update" -msgstr "Обновление системы" +#: source/ubl-strings.h:19 +#, fuzzy +msgid "Date of last automatic update: " +msgstr "Дата последнего автообновления:" -#: source/ubl-settings-update-strings.h:4 -msgid "System update settings management" -msgstr "Настройка параметров обновления системы" +#: source/ubl-strings.h:20 +msgid "Automatic update" +msgstr "Автоматическое обновление" + +#: source/ubl-strings.h:21 +msgid "First update all modules and then the system" +msgstr "Вначале обновлять все модули и после систему" + +#: source/ubl-strings.h:22 +msgid "Update only modules" +msgstr "Обновлять только модули" + +#: source/ubl-strings.h:23 +msgid "Update everything in the order of the specified repositories" +msgstr "Обновлять всё в порядке репозиториев" + +#: source/ubl-strings.h:24 +msgid "Update mode:" +msgstr "Режим обновления:" + +#: source/ubl-strings.h:25 +msgid "Update interval:" +msgstr "Интервал обновлений" + +#: source/ubl-strings.h:26 +msgid "Boot" +msgstr "Запуск" + +#: source/ubl-strings.h:27 source/ubl-strings.h:110 +msgid "Minutes" +msgstr "минут" + +#: source/ubl-strings.h:28 source/ubl-strings.h:111 +msgid "Hours" +msgstr "часов" -#: source/ubl-settings-update-strings.h:5 -msgid "Check for updates" -msgstr "Проверить обновления" +#: source/ubl-strings.h:29 source/ubl-strings.h:112 +msgid "Days" +msgstr "дней" -#: source/ubl-settings-update-strings.h:6 -msgid "About" -msgstr "О программе" +#: source/ubl-strings.h:30 source/ubl-strings.h:113 +msgid "Months" +msgstr "месяцев" -#: source/ubl-settings-update-strings.h:7 -msgid "Documentation" -msgstr "Справка" +#: source/ubl-strings.h:31 +msgid "Repositories from which the update will occur" +msgstr "Репозитории с которых будет происходить обновление" -#: source/ubl-settings-update-strings.h:8 -msgid "Save to local configuration" -msgstr "Сохранить в локальную конфигурацию" +#: source/ubl-strings.h:32 source/ubl-strings.h:54 +msgid "Repositories list:" +msgstr "Список репозиториев:" -#: source/ubl-settings-update-strings.h:9 -msgid "Save to global configuration" -msgstr "Сохранить в глобальную конфигурацию" +#: source/ubl-strings.h:33 +msgid "Default" +msgstr "По умолчанию" -#: source/ubl-settings-update-strings.h:10 -msgid "Save configuration" -msgstr "Сохранить в конфигурацию" +#: source/ubl-strings.h:34 source/ubl-strings.h:56 +msgid "Choose" +msgstr "Выбрать" -#: source/ubl-settings-update-strings.h:11 -#: source/ubl-settings-update-strings.h:36 -msgid "Save" -msgstr "Сохранить" +#: source/ubl-strings.h:35 +msgid "Chosen" +msgstr "Выбран" -#: source/ubl-settings-update-strings.h:12 -msgid "Load local configuration" -msgstr "Загрузить локальную конфигурацию" +#: source/ubl-strings.h:36 +msgid "Repository" +msgstr "Репозитории" -#: source/ubl-settings-update-strings.h:13 -msgid "Load global configuration" -msgstr "Загрузить глобальную конфигурацию" +#: source/ubl-strings.h:37 +msgid "Manage repository list" +msgstr "Управление списка репозиториев" -#: source/ubl-settings-update-strings.h:14 -msgid "load" -msgstr "Загрузить" +#: source/ubl-strings.h:38 +msgid "Disable system repositories" +msgstr "Отключить системные репозитории" -#: source/ubl-settings-update-strings.h:15 -msgid "Launch package manager" -msgstr "Запустить менеджер пакетов" +#: source/ubl-strings.h:40 +msgid "Move up" +msgstr "Переместить выше" -#: source/ubl-settings-update-strings.h:16 -msgid "Cache clean command: " -msgstr "Команда очистки кеша пакетов: " +#: source/ubl-strings.h:41 +msgid "Move down" +msgstr "Переместить ниже" -#: source/ubl-settings-update-strings.h:17 -msgid "Update command: " -msgstr "Команда обновления: " +#: source/ubl-strings.h:42 +msgid "Add" +msgstr "Добавить" -#: source/ubl-settings-update-strings.h:18 -msgid "Package manager: " -msgstr "Менеджер пакетов: " +#: source/ubl-strings.h:43 +msgid "Edit" +msgstr "Изменить" -#: source/ubl-settings-update-strings.h:19 -msgid "URI" -msgstr "URI" +#: source/ubl-strings.h:44 +msgid "Remove" +msgstr "Удалить" -#: source/ubl-settings-update-strings.h:20 +#: source/ubl-strings.h:45 msgid "Enabled" msgstr "Включен" -#: source/ubl-settings-update-strings.h:21 -msgid "Distribution" -msgstr "Дистрибутив" +#: source/ubl-strings.h:46 +msgid "Source" +msgstr "Источник" -#: source/ubl-settings-update-strings.h:22 -msgid "Activate UBUR" -msgstr "Активировать UBUR" +#: source/ubl-strings.h:47 +msgid "Signature level" +msgstr "Уровень подписи" -#: source/ubl-settings-update-strings.h:23 -msgid "Activate AUR" -msgstr "Активировать AUR" +#: source/ubl-strings.h:48 +msgid "Usage level" +msgstr "Уровень использования" -#: source/ubl-settings-update-strings.h:24 -msgid "Every 3 hours" -msgstr "Каждые 3 часа" +#: source/ubl-strings.h:49 source/ubl-strings.h:50 source/ubl-strings.h:59 +#: source/ubl-strings.h:68 +msgid "Repository connection configuration" +msgstr "Настройки подключения репозитория" -#: source/ubl-settings-update-strings.h:25 -msgid "Every 2 hours" -msgstr "Каждые 2 часа" +#: source/ubl-strings.h:51 +msgid "Connect and publish" +msgstr "подключиться и опубликовать" -#: source/ubl-settings-update-strings.h:26 -msgid "Every 1 hour" -msgstr "Каждый час" +#: source/ubl-strings.h:52 +msgid "Recieve DB packages from shared network" +msgstr "Получать БД пакетов из распределённой сети" -#: source/ubl-settings-update-strings.h:27 -msgid "Download updates automatically" -msgstr "Автоматически скачивать обновления" +#: source/ubl-strings.h:53 +msgid "Repositories for publishing" +msgstr "Репозитории для публикации" -#: source/ubl-settings-update-strings.h:28 -msgid "Hide icon of no updates found" -msgstr "Скрыть значок в трее при отсутствии обновлений" +#: source/ubl-strings.h:55 +msgid "All repositories" +msgstr "Все репозитории" -#: source/ubl-settings-update-strings.h:29 -msgid "Update checking frequency" -msgstr "Частота проверки обновлений" +#: source/ubl-strings.h:57 +msgid "Accept" +msgstr "Принять" -#: source/ubl-settings-update-strings.h:30 -msgid "Extra" -msgstr "Дополнительно" +#: source/ubl-strings.h:58 +msgid "Repository name" +msgstr "Имя репозитория" -#: source/ubl-settings-update-strings.h:31 -msgid "Repositories" -msgstr "Репозитории" +#: source/ubl-strings.h:60 source/ubl-strings.h:102 +msgid "Authorization parameters" +msgstr "Параметры авторизации" -#: source/ubl-settings-update-strings.h:32 -msgid "General" -msgstr "Общие настройки" +#: source/ubl-strings.h:61 +msgid "Storage" +msgstr "Хранилище" -#: source/ubl-settings-update-strings.h:33 -msgid "Adress: " -msgstr "Адрес: " +#: source/ubl-strings.h:62 +msgid "Chosen repositories" +msgstr "Выбранные репозитории" -#: source/ubl-settings-update-strings.h:34 -msgid "Distribution: " -msgstr "Дистрибутив: " +#: source/ubl-strings.h:63 +msgid "Reviewer" +msgstr "Обозреватель" -#: source/ubl-settings-update-strings.h:35 -msgid "Cancel" -msgstr "Отмена" +#: source/ubl-strings.h:64 +msgid "Port" +msgstr "Порт" + +#: source/ubl-strings.h:65 +msgid "Name" +msgstr "Имя" + +#: source/ubl-strings.h:66 +msgid "Password/Hash type" +msgstr "Пароль/Тип хэша" + +#: source/ubl-strings.h:67 +msgid "Password/Password hash" +msgstr "Пароль/Хэш пароля" + +#: source/ubl-strings.h:69 +msgid "Publish lazy mirror" +msgstr "Опубликовать ленивое зеркало" + +#: source/ubl-strings.h:70 +msgid "Type" +msgstr "Тип" + +#: source/ubl-strings.h:71 +msgid "Resource URL" +msgstr "Ресурс URL" + +#: source/ubl-strings.h:72 +msgid "Configure" +msgstr "Настроить" -#: source/ubl-settings-update-strings.h:37 -msgid "Would you like to read documentation in the Web?" -msgstr "Вы хотите прочитать справку в Сети?" +#: source/ubl-strings.h:73 +msgid "Mirror publish configuration" +msgstr "Конфигурация публикации ленивого зеркала" -#: source/ubl-settings-update-strings.h:38 +#: source/ubl-strings.h:74 +msgid "Service port:" +msgstr "Порт сервиса:" + +#: source/ubl-strings.h:75 +msgid "Cache directory:" +msgstr "Каталог хэша:" + +#: source/ubl-strings.h:76 +msgid "Duration of inactivity (in seconds):" +msgstr "Продолжительность бездействия (в секундах):" + +#: source/ubl-strings.h:77 +msgid "Timeout (in seconds) for loading internel cache:" +msgstr "Таймаут (в секундах) для загрузки интернет-кэша:" + +#: source/ubl-strings.h:78 +msgid "Work through proxy:" +msgstr "Работать через прокси:" + +#: source/ubl-strings.h:79 +msgid "User agent:" +msgstr "Пользовательский агент:" + +#: source/ubl-strings.h:80 +msgid "Standard expression for cron:" +msgstr "Стандартное выражение cron:" + +#: source/ubl-strings.h:81 msgid "" -"You will be redirected to documentation website where documentation is\n" -"translated and supported by community." +"The number of consecutie days that systems on the network have not been " +"updated:" msgstr "" -"Вы будете перенаправлены на сайт с документацией где страницы помощи\n" -"переводятся и поддерживаются сообществом." +"Количество дней подряд, в течение которых не обновляется системы в сети:" -#: source/ubl-settings-update-strings.h:39 -msgid "Always redirect to online documentation" -msgstr "Всегда перенаправлять" +#: source/ubl-strings.h:82 +msgid "The number of consecutive days wthout an update requested:" +msgstr "" +"Количество дней подряд, в течение которых не было запрошено обновление:" -#: source/ubl-settings-update-strings.h:40 -msgid "Open documentation" -msgstr "Справка" +#: source/ubl-strings.h:83 +msgid "Add mirror" +msgstr "Добавить зеркало" -#: source/ubl-settings-update-strings.h:41 -msgid "Project Home Page" -msgstr "Домашняя страница проекта" +#: source/ubl-strings.h:84 +msgid "Repository name:" +msgstr "Имя репозитория:" -#: source/ubl-settings-update-strings.h:42 -msgid "Nothing were chosen" -msgstr "Ничего не выбрано" +#: source/ubl-strings.h:85 +msgid "Repository type:" +msgstr "Тип репозитория:" + +#: source/ubl-strings.h:86 +msgid "WEB link" +msgstr "Вэб ссылка" -#: source/ubl-settings-update-strings.h:44 -msgid "Global configuration loading succseeded." -msgstr "Успешно загружена глобальная конфигурация" +#: source/ubl-strings.h:87 +msgid "Proxy server" +msgstr "Прокси-сервер" -#: source/ubl-settings-update-strings.h:45 -msgid "Local configuration loading succseeded." -msgstr "Успешно загружена локальная конфигурация" +#: source/ubl-strings.h:88 +msgid "Mirrors file" +msgstr "Файл зеркал" -#: source/ubl-settings-update-strings.h:47 -msgid "Local and global configuration saving succseeded." -msgstr "Успешно записаны локальная и глобальная конфигурация" +#: source/ubl-strings.h:89 +msgid "Source:" +msgstr "Источник:" -#: source/ubl-settings-update-strings.h:48 -msgid "Global configuration saving succseeded." -msgstr "Успешно записана глобальная конфигурация" +#: source/ubl-strings.h:90 +msgid "Configuration" +msgstr "Конфигурация" + +#: source/ubl-strings.h:91 +msgid "Sign level:" +msgstr "Уровень подписи:" + +#: source/ubl-strings.h:92 +msgid "Enable repository update" +msgstr "Включить обновления для этого репозитория" + +#: source/ubl-strings.h:93 +msgid "Enable repository search" +msgstr "Включать поиск этого репозитория" + +#: source/ubl-strings.h:94 +msgid "" +"Enable installation of packages from this repository during --sync operation" +msgstr "" +"Включать установку пакетов из этого репозитория во время операции --sync" + +#: source/ubl-strings.h:95 +msgid "" +"Allow this repository to be a valid source of packages when running --" +"sysupgrade" +msgstr "" +"Позволять этому репозиторию быть действительным источником пакетов при " +"выполнении --sysupgrade" + +#: source/ubl-strings.h:96 +msgid "Add repository for publication" +msgstr "Добавление репозиториев на публикацию" + +#: source/ubl-strings.h:97 +msgid "Enable publishing of local repository as WEB resource" +msgstr "Включить публикацию локального репозитория в виде WEB ресурса" + +#: source/ubl-strings.h:98 +msgid "Path to publication directory:" +msgstr "Путь до каталога побликации:" + +#: source/ubl-strings.h:99 +msgid "Port:" +msgstr "Порт:" + +#: source/ubl-strings.h:100 +msgid "Publishing parameters" +msgstr "Параметры публикации" + +#: source/ubl-strings.h:101 +msgid "Enable WEB file browser" +msgstr "Включить WEB обозреватель файлов" + +#: source/ubl-strings.h:103 +msgid "Set" +msgstr "Задать" + +#: source/ubl-strings.h:104 +msgid "Username:" +msgstr "Имя пользователя:" + +#: source/ubl-strings.h:105 +msgid "User password:" +msgstr "Пароль:" + +#: source/ubl-strings.h:106 +msgid "Not encrypted" +msgstr "Пароль не требуется" + +#: source/ubl-strings.h:107 +msgid "Encrypted with SHA256" +msgstr "" + +#: source/ubl-strings.h:108 +msgid "Encrypted with SHA512" +msgstr "" + +#: source/ubl-strings.h:109 +msgid "System" +msgstr "Система" + +#: source/ubl-strings.h:114 +msgid "Sign level" +msgstr "Уровень подписи:" + +#: source/ubl-strings.h:115 +msgid "Password input" +msgstr "Ввод пароля" + +#: source/ubl-strings.h:116 +msgid "Password:" +msgstr "Пароль:" + +#: source/ubl-strings.h:117 +msgid "Repeat password:" +msgstr "Подтвердите ввод пароля:" + +#: source/ubl-strings.h:118 +msgid "Entryption:" +msgstr "Алгоритм шифрования пароля:" + +#: source/ubl-strings.h:119 +msgid "Do not encrypt password" +msgstr "Пароль не требуется" + +#: source/ubl-strings.h:120 +msgid "Password hash:" +msgstr "Пароль/Хэш пароля" + +msgid "Check system updates at system startup" +msgstr "Проверять обновления при загрузке системы" + +msgid "days" +msgstr "дней" + +msgid "Cancel" +msgstr "Отмена" + +msgid "Signature verification will not be performed" +msgstr "Проверка подписи выполняться не будет" + +msgid "For packages only" +msgstr "Только для пакетов" + +msgid "For database only" +msgstr "Только для базы данных" + +msgid "" +"Signatures will be checked if present, but unsigned databases and " +"packages will also be accepted" +msgstr "" +"Подписи будут проверяться при их наличии, но неподписанные базы данных и " +"пакеты также будут приниматься" + +msgid "Signatures will be required for all packages and databases" +msgstr "Подписи будут необходимы для всех пакетов и баз данных" + +msgid "" +"If the signature is verified for packages and the database, it must be in " +"the keyring and be fully trusted" +msgstr "" +"Если подпись проверяется для пакетов и базы, она должна находиться в " +"связке ключей и быть полностью доверенной" -#: source/ubl-settings-update-strings.h:49 -msgid "Local configuration saving succseeded." -msgstr "Успешно записана локальная конфигурация" +msgid "If the signature is verified only for packets" +msgstr "Если подпись проверяется только для пакетов" +msgid "If the signature is verified only for the database" +msgstr "Если подпись проверяется только для базы данных"