forked from cromer/pamac-classic
add some missed aur disable flags
This commit is contained in:
parent
082f63603a
commit
748acf65fd
@ -26,10 +26,13 @@ namespace Pamac {
|
|||||||
public bool recurse { get; private set; }
|
public bool recurse { get; private set; }
|
||||||
public uint64 refresh_period { get; private set; }
|
public uint64 refresh_period { get; private set; }
|
||||||
public bool no_update_hide_icon { get; private set; }
|
public bool no_update_hide_icon { get; private set; }
|
||||||
|
#if DISABLE_AUR
|
||||||
|
#else
|
||||||
public bool enable_aur { get; private set; }
|
public bool enable_aur { get; private set; }
|
||||||
public bool search_aur { get; private set; }
|
public bool search_aur { get; private set; }
|
||||||
public string aur_build_dir { get; private set; }
|
public string aur_build_dir { get; private set; }
|
||||||
public bool check_aur_updates { get; private set; }
|
public bool check_aur_updates { get; private set; }
|
||||||
|
#endif
|
||||||
public uint64 keep_num_pkgs { get; private set; }
|
public uint64 keep_num_pkgs { get; private set; }
|
||||||
public bool rm_only_uninstalled { get; private set; }
|
public bool rm_only_uninstalled { get; private set; }
|
||||||
public unowned HashTable<string,string> environment_variables {
|
public unowned HashTable<string,string> environment_variables {
|
||||||
@ -73,10 +76,13 @@ namespace Pamac {
|
|||||||
// set default options
|
// set default options
|
||||||
recurse = false;
|
recurse = false;
|
||||||
no_update_hide_icon = false;
|
no_update_hide_icon = false;
|
||||||
|
#if DISABLE_AUR
|
||||||
|
#else
|
||||||
enable_aur = false;
|
enable_aur = false;
|
||||||
search_aur = false;
|
search_aur = false;
|
||||||
aur_build_dir = "/tmp";
|
aur_build_dir = "/tmp";
|
||||||
check_aur_updates = false;
|
check_aur_updates = false;
|
||||||
|
#endif
|
||||||
keep_num_pkgs = 3;
|
keep_num_pkgs = 3;
|
||||||
rm_only_uninstalled = false;
|
rm_only_uninstalled = false;
|
||||||
parse_file (conf_path);
|
parse_file (conf_path);
|
||||||
@ -112,6 +118,8 @@ namespace Pamac {
|
|||||||
}
|
}
|
||||||
} else if (key == "NoUpdateHideIcon") {
|
} else if (key == "NoUpdateHideIcon") {
|
||||||
no_update_hide_icon = true;
|
no_update_hide_icon = true;
|
||||||
|
#if DISABLE_AUR
|
||||||
|
#else
|
||||||
} else if (key == "EnableAUR") {
|
} else if (key == "EnableAUR") {
|
||||||
enable_aur = true;
|
enable_aur = true;
|
||||||
} else if (key == "SearchInAURByDefault") {
|
} else if (key == "SearchInAURByDefault") {
|
||||||
@ -122,6 +130,7 @@ namespace Pamac {
|
|||||||
}
|
}
|
||||||
} else if (key == "CheckAURUpdates") {
|
} else if (key == "CheckAURUpdates") {
|
||||||
check_aur_updates = true;
|
check_aur_updates = true;
|
||||||
|
#endif
|
||||||
} else if (key == "KeepNumPackages") {
|
} else if (key == "KeepNumPackages") {
|
||||||
if (splitted.length == 2) {
|
if (splitted.length == 2) {
|
||||||
unowned string val = splitted[1]._strip ();
|
unowned string val = splitted[1]._strip ();
|
||||||
@ -184,6 +193,8 @@ namespace Pamac {
|
|||||||
} else {
|
} else {
|
||||||
data.append (line + "\n");
|
data.append (line + "\n");
|
||||||
}
|
}
|
||||||
|
#if DISABLE_AUR
|
||||||
|
#else
|
||||||
} else if (line.contains ("EnableAUR")) {
|
} else if (line.contains ("EnableAUR")) {
|
||||||
if (new_conf.lookup_extended ("EnableAUR", null, out variant)) {
|
if (new_conf.lookup_extended ("EnableAUR", null, out variant)) {
|
||||||
if (variant.get_boolean ()) {
|
if (variant.get_boolean ()) {
|
||||||
@ -224,6 +235,7 @@ namespace Pamac {
|
|||||||
} else {
|
} else {
|
||||||
data.append (line + "\n");
|
data.append (line + "\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else if (line.contains ("KeepNumPackages")) {
|
} else if (line.contains ("KeepNumPackages")) {
|
||||||
if (new_conf.lookup_extended ("KeepNumPackages", null, out variant)) {
|
if (new_conf.lookup_extended ("KeepNumPackages", null, out variant)) {
|
||||||
data.append ("KeepNumPackages = %llu\n".printf (variant.get_uint64 ()));
|
data.append ("KeepNumPackages = %llu\n".printf (variant.get_uint64 ()));
|
||||||
@ -275,6 +287,8 @@ namespace Pamac {
|
|||||||
} else {
|
} else {
|
||||||
data.append ("#NoUpdateHideIcon\n");
|
data.append ("#NoUpdateHideIcon\n");
|
||||||
}
|
}
|
||||||
|
#if DISABLE_AUR
|
||||||
|
#else
|
||||||
} else if (key == "EnableAUR") {
|
} else if (key == "EnableAUR") {
|
||||||
if (val.get_boolean ()) {
|
if (val.get_boolean ()) {
|
||||||
data.append ("EnableAUR\n");
|
data.append ("EnableAUR\n");
|
||||||
@ -295,6 +309,7 @@ namespace Pamac {
|
|||||||
} else {
|
} else {
|
||||||
data.append ("#CheckAURUpdates\n");
|
data.append ("#CheckAURUpdates\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else if (key == "KeepNumPackages") {
|
} else if (key == "KeepNumPackages") {
|
||||||
data.append ("KeepNumPackages = %llu\n".printf (val.get_uint64 ()));
|
data.append ("KeepNumPackages = %llu\n".printf (val.get_uint64 ()));
|
||||||
} else if (key == "OnlyRmUninstalled") {
|
} else if (key == "OnlyRmUninstalled") {
|
||||||
|
Loading…
Reference in New Issue
Block a user