Test fix for mirror configuration shows at mirrors list

pull/59/head
parent c61130b415
commit ca602ee22b

@ -311,6 +311,15 @@ void yon_interface_update(main_window *widgets){
config_str mirror_list = yon_config_get_all_by_key(REPOPUBLIC_CACHE_search,&size);
if (size){
for (int i=0;i<size;i++){
if (yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_port)||
yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_cache_dir)||
yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_purge_files_after)||
yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_download_timeout)||
yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_http_proxy)||
yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_user_agent)||
yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_cron)||
yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_ttl_unaccessed_in_days)||
yon_char_check_begins_with(mirror_list[i],REPOPUBLIC_CACHE_ttl_unupdated_in_days)) continue;
char *cur = yon_char_new(mirror_list[i]);
char *key = yon_char_divide_search(cur,"=",-1);
if (yon_char_is_empty(key)) continue;
@ -1662,15 +1671,16 @@ mirror_configure_window *yon_mirror_configure_window_new(){
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);
g_signal_connect(G_OBJECT(window->PortDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->PortSpin);
g_signal_connect(G_OBJECT(window->CacheDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->CacheEntry);
g_signal_connect(G_OBJECT(window->CacheDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->CacheButton);
g_signal_connect(G_OBJECT(window->CacheButton),"clicked",G_CALLBACK(on_file_chooser_open),window->CacheEntry);
g_signal_connect(G_OBJECT(window->InactivityDurationDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->InactivityDurationSpin);
g_signal_connect(G_OBJECT(window->CacheTimeoutDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->CacheTimeoutSpin);
g_signal_connect(G_OBJECT(window->ProxyCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->ProxyEntry);
g_signal_connect(G_OBJECT(window->AgentDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->AgentEntry);
g_signal_connect(G_OBJECT(window->UpdatesDelayDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UpdatesDelaySpin);
g_signal_connect(G_OBJECT(window->UpdatesRequestDelayDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UpdatesRequestDelaySpin);
gtk_widget_show(window->Window);
return window;

@ -72,6 +72,16 @@
#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 REPOPUBLIC_CACHE_port "REPOPUBLIC_CACHE[port]"
#define REPOPUBLIC_CACHE_cache_dir "REPOPUBLIC_CACHE[cache_dir]"
#define REPOPUBLIC_CACHE_purge_files_after "REPOPUBLIC_CACHE[purge_files_after]"
#define REPOPUBLIC_CACHE_download_timeout "REPOPUBLIC_CACHE[download_timeout]"
#define REPOPUBLIC_CACHE_http_proxy "REPOPUBLIC_CACHE[http_proxy]"
#define REPOPUBLIC_CACHE_user_agent "REPOPUBLIC_CACHE[user_agent]"
#define REPOPUBLIC_CACHE_cron "REPOPUBLIC_CACHE[prefetch.cron]"
#define REPOPUBLIC_CACHE_ttl_unaccessed_in_days "REPOPUBLIC_CACHE[prefetch.ttl_unaccessed_in_days]"
#define REPOPUBLIC_CACHE_ttl_unupdated_in_days "REPOPUBLIC_CACHE[prefetch.ttl_unupdated_in_days]"
#define AUTOUPDATE "AUTOUPDATE"
#define AUTOUPDATE_command "ubconfig --source global get [update] AUTOUPDATE"
#define AUTOUPDATE_mode "AUTOUPDATE[mode]"

Loading…
Cancel
Save