Merge branch 'master' of github.com:manjaro/pamac
This commit is contained in:
commit
ce20a39e6c
@ -1,4 +1,3 @@
|
||||
../src/common.vala
|
||||
../src/daemon.vala
|
||||
../src/transaction.vala
|
||||
../src/installer.vala
|
||||
|
10
po/pamac.pot
10
po/pamac.pot
@ -21,16 +21,6 @@ msgstr ""
|
||||
msgid "Authentication is required"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/common.vala
|
||||
#, c-format
|
||||
msgid "%.0f KiB"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/common.vala
|
||||
#, c-format
|
||||
msgid "%.2f MiB"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon.vala
|
||||
msgid "Failed to initialize alpm library"
|
||||
msgstr ""
|
||||
|
@ -40,9 +40,11 @@ binaries: pamac-refresh pamac-daemon pamac-tray pamac-updater pamac-manager
|
||||
clean:
|
||||
rm -f *.c pamac-refresh pamac-daemon pamac-tray pamac-updater pamac-manager pamac-install
|
||||
|
||||
pamac-refresh: refresh.vala
|
||||
pamac-refresh: pamac_config.vala refresh.vala
|
||||
valac -o pamac-refresh \
|
||||
-X -w \
|
||||
--pkg=gio-2.0 \
|
||||
pamac_config.vala \
|
||||
refresh.vala
|
||||
|
||||
pamac-tray: ../vapi/libalpm.vapi ../util/alpm-util.c common.vala alpm_config.vala pamac_config.vala tray.vala
|
||||
|
@ -37,11 +37,6 @@ namespace Pamac {
|
||||
}
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
MANAGER,
|
||||
UPDATER
|
||||
}
|
||||
|
||||
public struct ErrorInfos {
|
||||
public string message;
|
||||
public string[] details;
|
||||
@ -51,14 +46,3 @@ namespace Pamac {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string format_size (uint64 size) {
|
||||
float KiB_size = size / 1024;
|
||||
if (KiB_size < 1000) {
|
||||
string size_string = dgettext ("pamac", "%.0f KiB").printf (KiB_size);
|
||||
return size_string;
|
||||
} else {
|
||||
string size_string = dgettext ("pamac", "%.2f MiB").printf (KiB_size / 1024);
|
||||
return size_string;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* pamac-vala
|
||||
*
|
||||
* Copyright (C) 2014 Guillaume Benoit <guillaume@manjaro.org>
|
||||
* Copyright (C) 2014-2015 Guillaume Benoit <guillaume@manjaro.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -68,7 +68,7 @@ bool check_pamac_running () {
|
||||
}
|
||||
|
||||
void on_refresh_finished () {
|
||||
if (check_pamac_running () == false) {
|
||||
if (!check_pamac_running ()) {
|
||||
try {
|
||||
pamac_daemon.quit ();
|
||||
} catch (IOError e) {
|
||||
@ -79,16 +79,20 @@ void on_refresh_finished () {
|
||||
}
|
||||
|
||||
int main () {
|
||||
if (check_pamac_running () == false) {
|
||||
try {
|
||||
pamac_daemon = Bus.get_proxy_sync (BusType.SYSTEM, "org.manjaro.pamac",
|
||||
"/org/manjaro/pamac");
|
||||
pamac_daemon.refresh_finished.connect (on_refresh_finished);
|
||||
pamac_daemon.start_refresh (0);
|
||||
loop = new MainLoop ();
|
||||
loop.run ();
|
||||
} catch (IOError e) {
|
||||
stderr.printf ("IOError: %s\n", e.message);
|
||||
var pamac_config = new Pamac.Config ("/etc/pamac.conf");
|
||||
// if refresh period is 0, just exit
|
||||
if (pamac_config.refresh_period != 0) {
|
||||
if (!check_pamac_running ()) {
|
||||
try {
|
||||
pamac_daemon = Bus.get_proxy_sync (BusType.SYSTEM, "org.manjaro.pamac",
|
||||
"/org/manjaro/pamac");
|
||||
pamac_daemon.refresh_finished.connect (on_refresh_finished);
|
||||
pamac_daemon.start_refresh (0);
|
||||
loop = new MainLoop ();
|
||||
loop.run ();
|
||||
} catch (IOError e) {
|
||||
stderr.printf ("IOError: %s\n", e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -89,6 +89,11 @@ namespace Pamac {
|
||||
BUILD = (1 << 2)
|
||||
}
|
||||
|
||||
public enum Mode {
|
||||
MANAGER,
|
||||
UPDATER
|
||||
}
|
||||
|
||||
public class Transaction: Object {
|
||||
public Daemon daemon;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user