Commit d0b7a043 authored by guinux's avatar guinux

Merge branch 'master' into development

parents acd3a93e d1db8e59
......@@ -48,14 +48,6 @@ namespace Pamac {
trans_cancellable = false;
waiting = false;
overwrite_files = {};
if (Posix.geteuid () != 0) {
// Use tty polkit authentication agent
try {
pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE);
} catch (Error e) {
stdout.printf ("%s: %s\n", dgettext (null, "Error"), e.message);
}
}
// watch CTRl + C
Unix.signal_add (Posix.Signal.INT, trans_cancel);
}
......@@ -473,6 +465,14 @@ namespace Pamac {
transaction.stop_building.connect (() => {
trans_cancellable = false;
});
if (Posix.geteuid () != 0) {
// Use tty polkit authentication agent
try {
pkttyagent = new Subprocess.newv ({"pkttyagent"}, SubprocessFlags.NONE);
} catch (Error e) {
stdout.printf ("%s: %s\n", dgettext (null, "Error"), e.message);
}
}
}
bool trans_cancel () {
......@@ -2051,22 +2051,6 @@ namespace Pamac {
}
public static int main (string[] args) {
if (Posix.geteuid () != 0) {
// set dbus environment variable to allow launch in tty
try {
var process = new Subprocess.newv ({"dbus-launch"}, SubprocessFlags.STDOUT_PIPE | SubprocessFlags.STDERR_SILENCE);
var dis = new DataInputStream (process.get_stdout_pipe ());
string? line;
while ((line = dis.read_line ()) != null) {
string[] splitted = line.split ("=", 2);
unowned string key = splitted[0];
unowned string? val = splitted[1];
Environment.set_variable (key, val, true);
}
} catch (Error e) {
stderr.printf (e.message);
}
}
// i18n
Intl.textdomain ("pamac");
Intl.setlocale (LocaleCategory.ALL, "");
......
......@@ -571,9 +571,9 @@ namespace Pamac {
}
result.join (syncpkgs.diff (result, (Alpm.List.CompareFunc) alpm_pkg_compare_name));
// search in appstream
if (search_string.length >= 3) {
string[]? search_terms = As.utils_search_tokenize (search_string);
if (search_terms != null) {
Alpm.List<unowned Alpm.Package> appstream_result = null;
string[] search_terms = As.utils_search_tokenize (search_string);
app_store.get_apps ().foreach ((app) => {
uint match_score = app.search_matches_all (search_terms);
if (match_score > 0) {
......
......@@ -2162,12 +2162,11 @@ namespace Pamac {
deselect_item.visible = true;
}
}
if (temporary_ignorepkgs.contains (pkgname)) {
upgrade_item.visible = true;
}
if (origin == 1) {
if (temporary_ignorepkgs.contains (pkgname)) {
upgrade_item.visible = true;
} else {
install_item.visible = true;
}
install_item.visible = true;
}
if (filters_stack.visible_child_name != "updates" && origin == 0) { // installed
remove_item.visible = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment