This commit is contained in:
guinux
2017-07-29 16:35:04 +02:00
parent b64b603e82
commit d661c573f9
36 changed files with 1979 additions and 2527 deletions

View File

@@ -20,32 +20,9 @@
namespace Pamac {
class MirrorsConfig {
string conf_path;
GLib.List<string> _countries ;
public string choosen_generation_method { get; private set; }
public string choosen_country { get; private set; }
public unowned GLib.List<string> countries {
get {
try {
string countries_str;
int status;
Process.spawn_command_line_sync ("pacman-mirrors -l",
out countries_str,
null,
out status);
_countries = new GLib.List<string> ();
if (status == 0) {
foreach (unowned string country in countries_str.split ("\n")) {
_countries.append (country);
}
}
} catch (SpawnError e) {
stdout.printf ("Error: %s\n", e.message);
}
return _countries;
}
}
public MirrorsConfig (string path) {
conf_path = path;