This commit is contained in:
scachemaille
2016-08-24 15:28:38 +02:00
parent ec7dd3a3a9
commit 8df96bed80
3 changed files with 13 additions and 5 deletions

View File

@@ -321,7 +321,10 @@ namespace Pamac {
void on_mirrors_country_comboboxtext_changed () {
var new_mirrors_conf = new HashTable<string,Variant> (str_hash, str_equal);
new_mirrors_conf.insert ("OnlyCountry", new Variant.string (mirrors_country_comboboxtext.get_active_text ()));
var mirror_country = mirrors_country_comboboxtext.get_active_text ();
if(mirror_country == dgettext (null, "Worldwide"))
mirror_country = "ALL";
new_mirrors_conf.insert ("OnlyCountry", new Variant.string (mirror_country) );
transaction.start_write_mirrors_config (new_mirrors_conf);
}
@@ -337,10 +340,15 @@ namespace Pamac {
void on_write_mirrors_config_finished (string choosen_country, string choosen_generation_method) {
int index = 0;
string choosen_country_ = dgettext (null, "Worldwide");
if( choosen_country != "ALL")
choosen_country_ = choosen_country;
mirrors_country_comboboxtext.model.foreach ((model, path, iter) => {
GLib.Value country;
model.get_value (iter, 0, out country);
if ((string) country == choosen_country) {
if ((string) country == choosen_country_) {
return true;
}
index += 1;