v4.0.0-beta
This commit is contained in:
parent
f7be6e1e88
commit
b59e68459b
@ -18,7 +18,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Compile with: valac --pkg=libalpm --vapidir=../vapi --Xcc=-I../util ../util/alpm-util.c pactree.vala -o pactree
|
||||
// Compile with: valac --pkg=libalpm --vapidir=../vapi pactree.vala
|
||||
|
||||
using Alpm;
|
||||
|
||||
@ -37,10 +37,10 @@ string leaf2_color;
|
||||
string color_off;
|
||||
|
||||
/* globals */
|
||||
unowned Handle? handle;
|
||||
Handle handle;
|
||||
unowned DB localdb;
|
||||
Alpm.List<string?> walked = null;
|
||||
Alpm.List<string?> provisions = null;
|
||||
Alpm.List<string> walked;
|
||||
Alpm.List<string> provisions;
|
||||
|
||||
/* options */
|
||||
bool color;
|
||||
@ -127,7 +127,7 @@ static int parse_options(ref unowned string[] args) {
|
||||
|
||||
static void local_init() {
|
||||
Alpm.Errno error;
|
||||
handle = Handle.new ("/", dbpath, out error);
|
||||
handle = new Handle ("/", dbpath, out error);
|
||||
assert (error == 0);
|
||||
localdb = handle.localdb;
|
||||
assert (localdb != null);
|
||||
@ -187,11 +187,11 @@ static void walk_reverse_deps(Package pkg, int depth) {
|
||||
if((max_depth >= 0) && (depth > max_depth)) return;
|
||||
|
||||
walked.add(pkg.name);
|
||||
Alpm.List<string?> *required_by = pkg.compute_requiredby();
|
||||
Alpm.List<string> required_by = pkg.compute_requiredby();
|
||||
|
||||
int i = 0;
|
||||
while (i < required_by->length) {
|
||||
string? pkgname = required_by->nth_data(i);
|
||||
unowned Alpm.List<string> list = required_by;
|
||||
while (list != null) {
|
||||
unowned string pkgname = list.data;
|
||||
if (walked.find_str(pkgname) != null) {
|
||||
/* if we've already seen this package, don't print in "unique" output
|
||||
* and don't recurse */
|
||||
@ -202,9 +202,9 @@ static void walk_reverse_deps(Package pkg, int depth) {
|
||||
print(pkg.name, pkgname, null, depth);
|
||||
walk_reverse_deps(localdb.get_pkg(pkgname), depth + 1);
|
||||
}
|
||||
i++;
|
||||
list.next ();
|
||||
}
|
||||
Alpm.List.free_all(required_by);
|
||||
required_by.free_inner(GLib.free);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -216,8 +216,10 @@ static void walk_deps(Package pkg, int depth)
|
||||
|
||||
walked.add(pkg.name);
|
||||
|
||||
foreach (unowned Depend depend in pkg.depends) {
|
||||
string depname = depend.name;
|
||||
unowned Alpm.List<unowned Depend> depends = pkg.depends;
|
||||
while (depends != null) {
|
||||
unowned Alpm.Depend depend = depends.data;
|
||||
unowned string depname = depend.name;
|
||||
unowned Package? provider = find_satisfier (localdb.pkgcache, depname);
|
||||
|
||||
if (provider != null) {
|
||||
@ -237,6 +239,7 @@ static void walk_deps(Package pkg, int depth)
|
||||
/* unresolvable package */
|
||||
print(pkg.name, null, depname, depth);
|
||||
}
|
||||
depends.next ();
|
||||
}
|
||||
}
|
||||
|
||||
|
248
po/pamac.pot
248
po/pamac.pot
@ -21,7 +21,7 @@ msgstr ""
|
||||
msgid "Authentication is required"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon.vala ../src/transaction.vala
|
||||
#: ../src/daemon.vala
|
||||
msgid "Failed to initialize alpm library"
|
||||
msgstr ""
|
||||
|
||||
@ -29,6 +29,26 @@ msgstr ""
|
||||
msgid "Failed to synchronize any databases"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon.vala
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon.vala
|
||||
msgid "Explicitly installed"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon.vala
|
||||
msgid "Installed as a dependency for another package"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon.vala
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon.vala
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/daemon.vala
|
||||
msgid "Failed to init transaction"
|
||||
msgstr ""
|
||||
@ -120,7 +140,7 @@ msgstr ""
|
||||
msgid "Transaction Summary"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala ../src/manager_window.vala
|
||||
#: ../src/transaction.vala
|
||||
msgid "To remove"
|
||||
msgstr ""
|
||||
|
||||
@ -132,7 +152,7 @@ msgstr ""
|
||||
msgid "To build"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala ../src/manager_window.vala
|
||||
#: ../src/transaction.vala
|
||||
msgid "To install"
|
||||
msgstr ""
|
||||
|
||||
@ -153,11 +173,7 @@ msgid "Building packages"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Running pre-transaction hooks"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Running post-transaction hooks"
|
||||
msgid "Transaction cancelled"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
@ -181,38 +197,30 @@ msgstr ""
|
||||
msgid "Installing %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Reinstalling %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Removing %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Upgrading %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Reinstalling %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Downgrading %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Removing %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Checking integrity"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Checking keyring"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Downloading required keys"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Loading packages files"
|
||||
msgstr ""
|
||||
@ -247,6 +255,11 @@ msgstr ""
|
||||
msgid "Downloading"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Downloading %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Checking available disk space"
|
||||
msgstr ""
|
||||
@ -261,6 +274,14 @@ msgstr ""
|
||||
msgid "Database file for %s does not exist"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Checking keyring"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Downloading required keys"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "%s installed as %s.pacnew"
|
||||
@ -272,13 +293,11 @@ msgid "%s installed as %s.pacsave"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Refreshing %s"
|
||||
msgid "Running pre-transaction hooks"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
#, c-format
|
||||
msgid "Downloading %s"
|
||||
msgid "Running post-transaction hooks"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
@ -294,7 +313,8 @@ msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Warning"
|
||||
#, c-format
|
||||
msgid "Refreshing %s"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
@ -302,7 +322,7 @@ msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
msgid "Transaction cancelled"
|
||||
msgid "Warning"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/transaction.vala
|
||||
@ -369,8 +389,11 @@ msgid "Mark as explicitly installed"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "local"
|
||||
msgstr ""
|
||||
#, c-format
|
||||
msgid "%u pending operation"
|
||||
msgid_plural "%u pending operations"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Installed"
|
||||
@ -381,11 +404,48 @@ msgid "Orphans"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Licenses"
|
||||
msgid "Foreign"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Unknown"
|
||||
msgid "Pending"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Licenses"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala ../resources/manager_window.ui
|
||||
#: ../resources/updater_window.ui
|
||||
msgid "Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala ../resources/manager_window.ui
|
||||
msgid "Groups"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Packager"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Build Date"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Install Date"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Install Reason"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Signatures"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Backup files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
@ -416,62 +476,6 @@ msgstr ""
|
||||
msgid "Conflicts With"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Make Dependencies"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Check Dependencies"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala ../resources/manager_window.ui
|
||||
msgid "Repository"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala ../resources/manager_window.ui
|
||||
msgid "Groups"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Packager"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Build Date"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Install Date"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Explicitly installed"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Installed as a dependency for another package"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Install Reason"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Signatures"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Backup files"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Package Base"
|
||||
msgstr ""
|
||||
@ -488,7 +492,7 @@ msgstr ""
|
||||
msgid "Last Modified"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala ../resources/manager_window.ui
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Votes"
|
||||
msgstr ""
|
||||
|
||||
@ -496,6 +500,11 @@ msgstr ""
|
||||
msgid "Out of Date"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala ../resources/manager_window.ui
|
||||
#: ../resources/updater_window.ui
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
#, c-format
|
||||
msgid ""
|
||||
@ -507,17 +516,13 @@ msgid_plural ""
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: ../src/manager_window.vala
|
||||
msgid "Uninstalled"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala ../resources/manager_window.ui
|
||||
msgid "Install Local Packages"
|
||||
msgstr ""
|
||||
|
||||
#: ../src/manager_window.vala ../resources/progress_dialog.ui
|
||||
#: ../resources/transaction_sum_dialog.ui ../resources/choose_dep_dialog.ui
|
||||
#: ../resources/choose_ignorepkgs_dialog.ui
|
||||
#: ../resources/manager_window.ui ../resources/choose_ignorepkgs_dialog.ui
|
||||
msgid "_Cancel"
|
||||
msgstr ""
|
||||
|
||||
@ -571,10 +576,8 @@ msgstr ""
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/progress_dialog.ui ../resources/history_dialog.ui
|
||||
#: ../resources/transaction_info_dialog.ui ../resources/updater_window.ui
|
||||
#: ../resources/preferences_dialog.ui
|
||||
msgid "_Close"
|
||||
#: ../resources/progress_dialog.ui
|
||||
msgid "_Hide"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/progress_dialog.ui ../resources/transaction_info_dialog.ui
|
||||
@ -586,6 +589,11 @@ msgstr ""
|
||||
msgid "Pamac History"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/history_dialog.ui ../resources/transaction_info_dialog.ui
|
||||
#: ../resources/updater_window.ui ../resources/preferences_dialog.ui
|
||||
msgid "_Close"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/choose_dep_dialog.ui
|
||||
msgid "Choose Optional Dependencies"
|
||||
msgstr ""
|
||||
@ -606,14 +614,6 @@ msgstr ""
|
||||
msgid "Refresh databases"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
msgid "Apply changes"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
msgid "Cancel all planned changes"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
msgid "Search in AUR"
|
||||
msgstr ""
|
||||
@ -622,7 +622,7 @@ msgstr ""
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
#: ../resources/manager_window.ui ../resources/updater_window.ui
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
|
||||
@ -630,25 +630,29 @@ msgstr ""
|
||||
msgid "Repositories"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
#: ../resources/manager_window.ui ../resources/updater_window.ui
|
||||
msgid "Version"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
#: ../resources/manager_window.ui ../resources/updater_window.ui
|
||||
msgid "Size"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
msgid "Popularity"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui ../resources/updater_window.ui
|
||||
#: ../resources/preferences_dialog.ui
|
||||
msgid "AUR"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui ../resources/updater_window.ui
|
||||
msgid "_Apply"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
msgid "Description"
|
||||
msgid "Browse"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/manager_window.ui
|
||||
@ -663,10 +667,6 @@ msgstr ""
|
||||
msgid "_Refresh"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/updater_window.ui
|
||||
msgid "_Apply"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/preferences_dialog.ui
|
||||
msgid "Preferences"
|
||||
msgstr ""
|
||||
@ -689,6 +689,10 @@ msgstr ""
|
||||
msgid "Check for updates"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/preferences_dialog.ui
|
||||
msgid "6"
|
||||
msgstr ""
|
||||
|
||||
#: ../resources/preferences_dialog.ui
|
||||
msgid "Hide tray icon when no update available"
|
||||
msgstr ""
|
||||
|
@ -3,6 +3,7 @@ MANAGER_RESOURCES_FILES = manager_window.ui \
|
||||
choose_dep_dialog.ui \
|
||||
history_dialog.ui \
|
||||
package-available.png \
|
||||
package-available-locked.png \
|
||||
package-install.png \
|
||||
package-installed-locked.png \
|
||||
package-installed-updated.png \
|
||||
|
@ -1,13 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.19.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<template class="PamacChooseDependenciesDialog" parent="GtkDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Choose Optional Dependencies</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon_name">system-software-install</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="urgency_hint">True</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="can_focus">False</property>
|
||||
@ -23,25 +26,28 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="valid_button">
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@ -49,6 +55,7 @@
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -59,6 +66,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -112,6 +120,7 @@
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -10,6 +10,7 @@
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon_name">system-software-install</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="urgency_hint">True</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="can_focus">False</property>
|
||||
|
@ -1,13 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.19.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<template class="PamacChooseProviderDialog" parent="GtkDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Choose a Provider</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon_name">system-software-install</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="urgency_hint">True</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox2">
|
||||
<property name="can_focus">False</property>
|
||||
@ -20,14 +23,16 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="valid_button">
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@ -35,6 +40,7 @@
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -52,6 +58,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -62,12 +69,14 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -1,9 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<template class="PamacHistoryDialog" parent="GtkDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Pamac History</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="default_height">500</property>
|
||||
<property name="icon_name">system-software-install</property>
|
||||
@ -20,14 +23,16 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="close_button">
|
||||
<property name="label" translatable="yes">_Close</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@ -35,6 +40,7 @@
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -58,6 +64,7 @@
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
File diff suppressed because it is too large
Load Diff
BIN
resources/package-available-locked.png
Normal file
BIN
resources/package-available-locked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 411 B |
@ -5,6 +5,7 @@
|
||||
<file preprocess="xml-stripblanks">history_dialog.ui</file>
|
||||
<file preprocess="xml-stripblanks">choose_dep_dialog.ui</file>
|
||||
<file preprocess="to-pixdata">package-available.png</file>
|
||||
<file preprocess="to-pixdata">package-available-locked.png</file>
|
||||
<file preprocess="to-pixdata">package-install.png</file>
|
||||
<file preprocess="to-pixdata">package-installed-locked.png</file>
|
||||
<file preprocess="to-pixdata">package-installed-updated.png</file>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.19.0 -->
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.14"/>
|
||||
<object class="GtkAdjustment" id="adjustment">
|
||||
@ -9,19 +9,13 @@
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkListStore" id="ignorepkgs_liststore">
|
||||
<columns>
|
||||
<!-- column-name name -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
</object>
|
||||
<template class="PamacPreferencesDialog" parent="GtkDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon_name">system-software-install</property>
|
||||
<property name="type_hint">normal</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox">
|
||||
<property name="can_focus">False</property>
|
||||
@ -54,13 +48,28 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook1">
|
||||
<object class="GtkStackSwitcher" id="stackswitcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="general_config_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
@ -168,6 +177,7 @@
|
||||
<object class="GtkSwitch" id="check_updates_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Check for updates</property>
|
||||
<property name="halign">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -192,6 +202,7 @@
|
||||
<object class="GtkLabel" id="refresh_period_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_start">24</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
@ -208,6 +219,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">How often to check for updates, value in hours</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="text" translatable="yes">6</property>
|
||||
<property name="caps_lock_warning">False</property>
|
||||
<property name="input_purpose">number</property>
|
||||
<property name="adjustment">adjustment</property>
|
||||
@ -234,8 +246,10 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="margin_left">22</property>
|
||||
<property name="margin_start">22</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -255,6 +269,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_left">26</property>
|
||||
<property name="margin_start">26</property>
|
||||
<property name="label" translatable="yes">Ignore upgrades for:</property>
|
||||
<property name="xalign">0</property>
|
||||
@ -269,6 +284,7 @@
|
||||
<object class="GtkBox" id="box10">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="margin_start">12</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
@ -284,12 +300,11 @@
|
||||
<object class="GtkTreeView" id="ignorepkgs_treeview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="model">ignorepkgs_liststore</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="search_column">0</property>
|
||||
<property name="show_expanders">False</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
<object class="GtkTreeSelection" id="treeview-selection"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||
@ -368,21 +383,17 @@
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="tab_label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">General</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_fill">False</property>
|
||||
<property name="name">general</property>
|
||||
<property name="title" translatable="yes">General</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mirrors_config_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
@ -483,20 +494,11 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">official_repositories</property>
|
||||
<property name="title" translatable="yes">Official Repositories</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="tab_label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Official Repositories</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="aur_config_box">
|
||||
<property name="visible">True</property>
|
||||
@ -568,6 +570,8 @@ All AUR users should be familiar with the build process.</property>
|
||||
<object class="GtkLabel" id="enable_aur_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="hexpand">True</property>
|
||||
@ -586,6 +590,8 @@ All AUR users should be familiar with the build process.</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Allow Pamac to search and install packages from AUR</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
</object>
|
||||
@ -608,8 +614,10 @@ All AUR users should be familiar with the build process.</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_start">24</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -624,8 +632,10 @@ All AUR users should be familiar with the build process.</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_start">24</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -640,8 +650,10 @@ All AUR users should be familiar with the build process.</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_start">24</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -652,25 +664,16 @@ All AUR users should be familiar with the build process.</property>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">aur</property>
|
||||
<property name="title" translatable="yes">AUR</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="tab_label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">AUR</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.19.0 -->
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<template class="PamacProgressDialog" parent="GtkDialog">
|
||||
@ -7,11 +7,9 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Progress</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon_name">system-software-install</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="deletable">False</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
@ -39,7 +37,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="close_button">
|
||||
<property name="label" translatable="yes">_Close</property>
|
||||
<property name="label" translatable="yes">_Hide</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
|
@ -1,11 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<template class="PamacTransactionInfoDialog" parent="GtkDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="default_width">300</property>
|
||||
<property name="icon_name">system-software-install</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="urgency_hint">True</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox4">
|
||||
<property name="can_focus">False</property>
|
||||
@ -21,11 +26,13 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@ -33,6 +40,7 @@
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -43,6 +51,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -83,6 +92,7 @@
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -1,11 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<template class="PamacTransactionSumDialog" parent="GtkDialog">
|
||||
<property name="title" translatable="yes">Transaction Summary</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="title" translatable="yes">Transaction Summary</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="icon_name">system-software-install</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox6">
|
||||
<property name="can_focus">False</property>
|
||||
@ -21,12 +24,13 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -34,11 +38,13 @@
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@ -46,6 +52,7 @@
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -56,6 +63,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -65,7 +73,7 @@
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="min_content_width">330</property>
|
||||
<property name="min_content_width">450</property>
|
||||
<property name="min_content_height">250</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview">
|
||||
@ -75,7 +83,6 @@
|
||||
<property name="vexpand">True</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="enable_search">False</property>
|
||||
<property name="search_column">0</property>
|
||||
<property name="show_expanders">False</property>
|
||||
<child internal-child="selection">
|
||||
@ -87,12 +94,11 @@
|
||||
<object class="GtkTreeViewColumn" id="_action">
|
||||
<property name="sizing">autosize</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext5">
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1">
|
||||
<property name="yalign">0</property>
|
||||
<property name="weight">600</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
<attribute name="markup">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
@ -101,19 +107,38 @@
|
||||
<object class="GtkTreeViewColumn" id="_packages">
|
||||
<property name="sizing">autosize</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext6"/>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext2"/>
|
||||
<attributes>
|
||||
<attribute name="text">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="_version">
|
||||
<property name="sizing">autosize</property>
|
||||
<property name="title" translatable="yes">column</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext3"/>
|
||||
<attributes>
|
||||
<attribute name="text">2</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext4"/>
|
||||
<attributes>
|
||||
<attribute name="text">3</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -124,6 +149,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.19.0 -->
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<template class="PamacUpdaterWindow" parent="GtkApplicationWindow">
|
||||
@ -7,9 +7,9 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Update Manager</property>
|
||||
<property name="window_position">center</property>
|
||||
<property name="default_width">500</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="icon_name">system-software-update</property>
|
||||
<property name="gravity">center</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
@ -30,25 +30,35 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<object class="GtkStackSwitcher" id="stackswitcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="repos_scrolledwindow">
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">400</property>
|
||||
<property name="width_request">600</property>
|
||||
<property name="height_request">450</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="repos_updates_treeview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="search_column">0</property>
|
||||
<property name="search_column">1</property>
|
||||
<property name="show_expanders">False</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection">
|
||||
<property name="mode">none</property>
|
||||
@ -56,6 +66,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
|
||||
<property name="resizable">True</property>
|
||||
<property name="sizing">fixed</property>
|
||||
<property name="fixed_width">40</property>
|
||||
<property name="min_width">20</property>
|
||||
<property name="title" translatable="yes">State</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererToggle" id="repos_select_update">
|
||||
<signal name="toggled" handler="on_repos_select_update_toggled" swapped="no"/>
|
||||
@ -68,6 +83,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||
<property name="resizable">True</property>
|
||||
<property name="sizing">fixed</property>
|
||||
<property name="fixed_width">200</property>
|
||||
<property name="min_width">20</property>
|
||||
<property name="title" translatable="yes">Name</property>
|
||||
<property name="expand">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="repos_update_name"/>
|
||||
@ -78,45 +98,77 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn6">
|
||||
<property name="resizable">True</property>
|
||||
<property name="sizing">fixed</property>
|
||||
<property name="fixed_width">150</property>
|
||||
<property name="min_width">20</property>
|
||||
<property name="title" translatable="yes">Version</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="repos_update_download_size"/>
|
||||
<object class="GtkCellRendererText" id="repos_new_update_version"/>
|
||||
<attributes>
|
||||
<attribute name="text">2</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="repos_old_update_version"/>
|
||||
<attributes>
|
||||
<attribute name="text">3</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn10">
|
||||
<property name="resizable">True</property>
|
||||
<property name="fixed_width">90</property>
|
||||
<property name="min_width">20</property>
|
||||
<property name="title" translatable="yes">Repository</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="repos_update_repo"/>
|
||||
<attributes>
|
||||
<attribute name="text">4</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
|
||||
<property name="resizable">True</property>
|
||||
<property name="sizing">fixed</property>
|
||||
<property name="fixed_width">90</property>
|
||||
<property name="min_width">20</property>
|
||||
<property name="title" translatable="yes">Size</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="repos_update_size"/>
|
||||
<attributes>
|
||||
<attribute name="text">5</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Repositories</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_fill">False</property>
|
||||
<property name="name">repos</property>
|
||||
<property name="title" translatable="yes">Repositories</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="aur_scrolledwindow">
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">400</property>
|
||||
<property name="width_request">600</property>
|
||||
<property name="height_request">450</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="aur_updates_treeview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="search_column">0</property>
|
||||
<property name="search_column">1</property>
|
||||
<property name="show_expanders">False</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection2">
|
||||
<property name="mode">none</property>
|
||||
@ -124,6 +176,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn4">
|
||||
<property name="resizable">True</property>
|
||||
<property name="sizing">fixed</property>
|
||||
<property name="fixed_width">40</property>
|
||||
<property name="min_width">20</property>
|
||||
<property name="title" translatable="yes">State</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererToggle" id="aur_select_update">
|
||||
<signal name="toggled" handler="on_aur_select_update_toggled" swapped="no"/>
|
||||
@ -136,6 +193,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn5">
|
||||
<property name="resizable">True</property>
|
||||
<property name="sizing">fixed</property>
|
||||
<property name="fixed_width">200</property>
|
||||
<property name="min_width">20</property>
|
||||
<property name="title" translatable="yes">Name</property>
|
||||
<property name="expand">True</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="aur_update_name"/>
|
||||
@ -145,29 +207,35 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn8">
|
||||
<property name="resizable">True</property>
|
||||
<property name="sizing">fixed</property>
|
||||
<property name="fixed_width">150</property>
|
||||
<property name="min_width">20</property>
|
||||
<property name="title" translatable="yes">Version</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="aur_update_version"/>
|
||||
<attributes>
|
||||
<attribute name="text">2</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">aur</property>
|
||||
<property name="title" translatable="yes">AUR</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">AUR</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -178,7 +246,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -277,7 +345,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
63
src/Makefile
63
src/Makefile
@ -1,30 +1,30 @@
|
||||
|
||||
ALPM_VALA_FLAGS = --pkg=libalpm \
|
||||
--pkg=gio-2.0 \
|
||||
--vapidir=../vapi \
|
||||
-X -D_FILE_OFFSET_BITS=64
|
||||
|
||||
COMMON_VALA_FLAGS = -X -w \
|
||||
--pkg=libalpm \
|
||||
--pkg=gio-2.0 \
|
||||
--pkg=posix \
|
||||
--vapidir=./ \
|
||||
--vapidir=../vapi \
|
||||
-X -I../util \
|
||||
-X -D_FILE_OFFSET_BITS=64 \
|
||||
-X -DGETTEXT_PACKAGE="pamac" \
|
||||
--target-glib=2.38
|
||||
|
||||
TRANSACTION_VALA_FLAGS = --pkg=json-glib-1.0 \
|
||||
--pkg=libsoup-2.4 \
|
||||
--pkg=gtk+-3.0 \
|
||||
TRANSACTION_VALA_FLAGS = --pkg=gtk+-3.0 \
|
||||
--pkg=gdk-3.0 \
|
||||
--pkg=vte-2.91 \
|
||||
-X -lm
|
||||
|
||||
COMMON_SOURCES = ../util/alpm-util.c \
|
||||
common.vala \
|
||||
pamac_config.vala \
|
||||
alpm_config.vala \
|
||||
PAMAC_LIB_FLAGS = -X -I. \
|
||||
-X -L. \
|
||||
-X -lpamac \
|
||||
--vapidir=./ \
|
||||
--pkg=pamac \
|
||||
|
||||
TRANSACTION_SOURCES = transaction.vala \
|
||||
alpm_utils.vala \
|
||||
aur.vala \
|
||||
COMMON_SOURCES = common.vala \
|
||||
pamac_config.vala
|
||||
|
||||
TRANSACTION_SOURCES = package.vala \
|
||||
transaction.vala \
|
||||
choose_provider_dialog.vala \
|
||||
transaction_sum_dialog.vala \
|
||||
transaction_info_dialog.vala \
|
||||
@ -42,7 +42,7 @@ UPDATER_GRESOURCE_FILE = ../resources/pamac.updater.gresource.xml
|
||||
|
||||
INSTALLER_GRESOURCE_FILE = ../resources/pamac.installer.gresource.xml
|
||||
|
||||
binaries: pamac-refresh pamac-daemon pamac-tray libpamac.so pamac-updater pamac-manager pamac-install
|
||||
binaries: pamac-refresh pamac-daemon pamac-tray pamac-updater pamac-manager pamac-install
|
||||
|
||||
clean:
|
||||
rm -f *.c pamac.h pamac.vapi libpamac.so pamac-refresh pamac-daemon pamac-tray pamac-updater pamac-manager pamac-install
|
||||
@ -55,7 +55,7 @@ pamac-refresh: pamac_config.vala refresh.vala
|
||||
pamac_config.vala \
|
||||
refresh.vala
|
||||
|
||||
pamac-tray: ../vapi/libalpm.vapi $(COMMON_SOURCES) tray.vala
|
||||
pamac-tray: $(COMMON_SOURCES) alpm_config.vala tray.vala
|
||||
valac -o pamac-tray \
|
||||
$(COMMON_VALA_FLAGS) \
|
||||
--pkg=gtk+-3.0 \
|
||||
@ -63,20 +63,23 @@ pamac-tray: ../vapi/libalpm.vapi $(COMMON_SOURCES) tray.vala
|
||||
$(COMMON_SOURCES) \
|
||||
tray.vala
|
||||
|
||||
pamac-daemon: ../vapi/libalpm.vapi ../vapi/polkit-gobject-1.vapi ../vapi/libcurl.vapi $(COMMON_SOURCES) aur.vala mirrors_config.vala daemon.vala
|
||||
pamac-daemon: ../vapi/libalpm.vapi ../vapi/polkit-gobject-1.vapi ../vapi/libcurl.vapi alpm_config.vala $(COMMON_SOURCES) package.vala aur.vala mirrors_config.vala daemon.vala
|
||||
valac -o pamac-daemon \
|
||||
$(COMMON_VALA_FLAGS) \
|
||||
$(ALPM_VALA_FLAGS) \
|
||||
--pkg=polkit-gobject-1 \
|
||||
--pkg=libcurl \
|
||||
--pkg=json-glib-1.0 \
|
||||
--pkg=libsoup-2.4 \
|
||||
--thread \
|
||||
alpm_config.vala \
|
||||
$(COMMON_SOURCES) \
|
||||
package.vala \
|
||||
aur.vala \
|
||||
mirrors_config.vala \
|
||||
daemon.vala
|
||||
|
||||
libpamac.so: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PREFERENCES_SOURCES) ../resources/transaction_resources.c
|
||||
libpamac.so: $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PREFERENCES_SOURCES) ../resources/transaction_resources.c
|
||||
valac -o libpamac.so \
|
||||
-X -fPIC \
|
||||
-X --shared \
|
||||
@ -91,33 +94,24 @@ libpamac.so: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PRE
|
||||
$(TRANSACTION_SOURCES) \
|
||||
$(PREFERENCES_SOURCES)
|
||||
|
||||
pamac-manager: libpamac.so choose_dep_dialog.vala history_dialog.vala transaction_info_dialog.vala ../resources/manager_resources.c ../util/alpm-util.c packages_model.vala aur_model.vala manager_window.vala manager.vala
|
||||
pamac-manager: libpamac.so choose_dep_dialog.vala history_dialog.vala transaction_info_dialog.vala ../resources/manager_resources.c manager_window.vala manager.vala
|
||||
valac -o pamac-manager \
|
||||
$(COMMON_VALA_FLAGS) \
|
||||
-X -I. \
|
||||
-X -L. \
|
||||
-X -lpamac \
|
||||
--pkg=pamac \
|
||||
$(PAMAC_LIB_FLAGS) \
|
||||
--pkg=json-glib-1.0 \
|
||||
--pkg=gtk+-3.0 \
|
||||
--pkg=gdk-3.0 \
|
||||
--gresources=$(MANAGER_GRESOURCE_FILE) \
|
||||
../resources/manager_resources.c \
|
||||
../util/alpm-util.c \
|
||||
choose_dep_dialog.vala \
|
||||
history_dialog.vala \
|
||||
packages_model.vala \
|
||||
aur_model.vala \
|
||||
manager_window.vala \
|
||||
manager.vala
|
||||
|
||||
pamac-updater: libpamac.so ../resources/updater_resources.c updater_window.vala updater.vala
|
||||
valac -o pamac-updater \
|
||||
$(COMMON_VALA_FLAGS) \
|
||||
-X -I. \
|
||||
-X -L. \
|
||||
-X -lpamac \
|
||||
--pkg=pamac \
|
||||
$(PAMAC_LIB_FLAGS) \
|
||||
--pkg=json-glib-1.0 \
|
||||
--pkg=gtk+-3.0 \
|
||||
--pkg=gdk-3.0 \
|
||||
@ -129,10 +123,7 @@ pamac-updater: libpamac.so ../resources/updater_resources.c updater_window.vala
|
||||
pamac-install: libpamac.so installer.vala
|
||||
valac -o pamac-install \
|
||||
$(COMMON_VALA_FLAGS) \
|
||||
-X -I. \
|
||||
-X -L. \
|
||||
-X -lpamac \
|
||||
--pkg=pamac \
|
||||
$(PAMAC_LIB_FLAGS) \
|
||||
--pkg=json-glib-1.0 \
|
||||
--pkg=gtk+-3.0 \
|
||||
installer.vala
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* pamac-vala
|
||||
* alpm_config
|
||||
*
|
||||
* Copyright (C) 2014-2016 Guillaume Benoit <guillaume@manjaro.org>
|
||||
*
|
||||
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
[Compact]
|
||||
public class AlpmRepo {
|
||||
class AlpmRepo {
|
||||
public string name;
|
||||
public Alpm.Signature.Level siglevel;
|
||||
public Alpm.Signature.Level siglevel_mask;
|
||||
@ -42,68 +42,55 @@ public class AlpmRepo {
|
||||
|
||||
}
|
||||
|
||||
[Compact]
|
||||
public class AlpmConfig {
|
||||
public string conf_path;
|
||||
public string? rootdir;
|
||||
public string? dbpath;
|
||||
public string? logfile;
|
||||
public string? gpgdir;
|
||||
public string? arch;
|
||||
public double deltaratio;
|
||||
public int usesyslog;
|
||||
public int checkspace;
|
||||
public Alpm.List<string?>? cachedirs;
|
||||
public Alpm.List<string?>? hookdirs;
|
||||
public Alpm.List<string?>? ignoregroups;
|
||||
public Alpm.List<string?>? ignorepkgs;
|
||||
public Alpm.List<string?>? noextracts;
|
||||
public Alpm.List<string?>? noupgrades;
|
||||
public GLib.List<string>? holdpkgs;
|
||||
public GLib.List<string>? syncfirsts;
|
||||
public Alpm.Signature.Level siglevel;
|
||||
public Alpm.Signature.Level localfilesiglevel;
|
||||
public Alpm.Signature.Level remotefilesiglevel;
|
||||
public Alpm.Signature.Level siglevel_mask;
|
||||
public Alpm.Signature.Level localfilesiglevel_mask;
|
||||
public Alpm.Signature.Level remotefilesiglevel_mask;
|
||||
public GLib.List<AlpmRepo> repo_order;
|
||||
public Alpm.Handle? handle;
|
||||
class AlpmConfig {
|
||||
string conf_path;
|
||||
string? rootdir;
|
||||
string? dbpath;
|
||||
string? logfile;
|
||||
string? gpgdir;
|
||||
string? arch;
|
||||
double deltaratio;
|
||||
int usesyslog;
|
||||
int checkspace;
|
||||
GLib.List<string> cachedirs;
|
||||
GLib.List<string> hookdirs;
|
||||
GLib.List<string> ignoregroups;
|
||||
GLib.List<string> ignorepkgs;
|
||||
GLib.List<string> noextracts;
|
||||
GLib.List<string> noupgrades;
|
||||
GLib.List<string> holdpkgs;
|
||||
GLib.List<string> syncfirsts;
|
||||
Alpm.Signature.Level siglevel;
|
||||
Alpm.Signature.Level localfilesiglevel;
|
||||
Alpm.Signature.Level remotefilesiglevel;
|
||||
Alpm.Signature.Level siglevel_mask;
|
||||
Alpm.Signature.Level localfilesiglevel_mask;
|
||||
Alpm.Signature.Level remotefilesiglevel_mask;
|
||||
GLib.List<AlpmRepo> repo_order;
|
||||
|
||||
public AlpmConfig (string path) {
|
||||
conf_path = path;
|
||||
reload ();
|
||||
}
|
||||
|
||||
public unowned GLib.List<string> get_holdpkgs () {
|
||||
return holdpkgs;
|
||||
}
|
||||
|
||||
public unowned GLib.List<string> get_syncfirsts () {
|
||||
return syncfirsts;
|
||||
}
|
||||
|
||||
public void reload () {
|
||||
// set default options
|
||||
cachedirs = new GLib.List<string> ();
|
||||
hookdirs = new GLib.List<string> ();
|
||||
ignoregroups = new GLib.List<string> ();
|
||||
ignorepkgs = new GLib.List<string> ();
|
||||
noextracts = new GLib.List<string> ();
|
||||
noupgrades = new GLib.List<string> ();
|
||||
holdpkgs = new GLib.List<string> ();
|
||||
syncfirsts = new GLib.List<string> ();
|
||||
// free internal data of alpm lists
|
||||
if (cachedirs != null) {
|
||||
cachedirs.free_data ();
|
||||
cachedirs = new Alpm.List<string> ();
|
||||
}
|
||||
if (hookdirs != null) {
|
||||
hookdirs.free_data ();
|
||||
hookdirs = new Alpm.List<string?> ();
|
||||
}
|
||||
if (ignoregroups != null) {
|
||||
ignoregroups.free_data ();
|
||||
ignoregroups = new Alpm.List<string> ();
|
||||
}
|
||||
if (ignorepkgs != null) {
|
||||
ignorepkgs.free_data ();
|
||||
ignorepkgs = new Alpm.List<string> ();
|
||||
}
|
||||
if (noextracts != null) {
|
||||
noextracts.free_data ();
|
||||
noextracts = new Alpm.List<string> ();
|
||||
}
|
||||
if (noupgrades != null) {
|
||||
noupgrades.free_data ();
|
||||
noupgrades = new Alpm.List<string> ();
|
||||
}
|
||||
usesyslog = 0;
|
||||
checkspace = 0;
|
||||
deltaratio = 0.7;
|
||||
@ -131,11 +118,11 @@ public class AlpmConfig {
|
||||
logfile = "/var/log/pacman.log";
|
||||
}
|
||||
}
|
||||
if (cachedirs.length == 0) {
|
||||
cachedirs.add ("/var/cache/pacman/pkg/");
|
||||
if (cachedirs.length () == 0) {
|
||||
cachedirs.append ("/var/cache/pacman/pkg/");
|
||||
}
|
||||
if (hookdirs.length == 0) {
|
||||
hookdirs.add ("/etc/pacman.d/hooks/");
|
||||
if (hookdirs.length () == 0) {
|
||||
hookdirs.append ("/etc/pacman.d/hooks/");
|
||||
}
|
||||
if (gpgdir == null) {
|
||||
// gpgdir it is not relative to rootdir, even if
|
||||
@ -147,12 +134,12 @@ public class AlpmConfig {
|
||||
}
|
||||
}
|
||||
|
||||
public void set_handle () {
|
||||
public Alpm.Handle? get_handle () {
|
||||
Alpm.Errno error;
|
||||
handle = Alpm.Handle.new (rootdir, dbpath, out error);
|
||||
Alpm.Handle? handle = new Alpm.Handle (rootdir, dbpath, out error);
|
||||
if (handle == null) {
|
||||
stderr.printf ("Failed to initialize alpm library" + " (%s)\n".printf(Alpm.strerror (error)));
|
||||
return;
|
||||
stderr.printf ("Failed to initialize alpm library" + " (%s)\n".printf (Alpm.strerror (error)));
|
||||
return null;
|
||||
}
|
||||
// define options
|
||||
handle.logfile = logfile;
|
||||
@ -166,15 +153,24 @@ public class AlpmConfig {
|
||||
remotefilesiglevel = merge_siglevel (siglevel, remotefilesiglevel, remotefilesiglevel_mask);
|
||||
handle.localfilesiglevel = localfilesiglevel;
|
||||
handle.remotefilesiglevel = remotefilesiglevel;
|
||||
handle.cachedirs = cachedirs;
|
||||
// add hook directories 1-by-1 to avoid overwriting the system directory
|
||||
foreach (unowned string cachedir in cachedirs) {
|
||||
handle.add_cachedir (cachedir);
|
||||
}
|
||||
foreach (unowned string hookdir in hookdirs) {
|
||||
handle.add_hookdir (hookdir);
|
||||
}
|
||||
handle.ignoregroups = ignoregroups;
|
||||
handle.ignorepkgs = ignorepkgs;
|
||||
handle.noextracts = noextracts;
|
||||
handle.noupgrades = noupgrades;
|
||||
foreach (unowned string ignoregroup in ignoregroups) {
|
||||
handle.add_ignoregroup (ignoregroup);
|
||||
}
|
||||
foreach (unowned string ignorepkg in ignorepkgs) {
|
||||
handle.add_ignorepkg (ignorepkg);
|
||||
}
|
||||
foreach (unowned string noextract in noextracts) {
|
||||
handle.add_noextract (noextract);
|
||||
}
|
||||
foreach (unowned string noupgrade in noupgrades) {
|
||||
handle.add_noupgrade (noupgrade);
|
||||
}
|
||||
// register dbs
|
||||
foreach (unowned AlpmRepo repo in repo_order) {
|
||||
repo.siglevel = merge_siglevel (siglevel, repo.siglevel, repo.siglevel_mask);
|
||||
@ -188,9 +184,10 @@ public class AlpmConfig {
|
||||
db.usage = repo.usage;
|
||||
}
|
||||
}
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void parse_file (string path, string? section = null) {
|
||||
void parse_file (string path, string? section = null) {
|
||||
string? current_section = section;
|
||||
var file = GLib.File.new_for_path (path);
|
||||
if (file.query_exists ()) {
|
||||
@ -236,11 +233,11 @@ public class AlpmConfig {
|
||||
dbpath = val;
|
||||
} else if (key == "CacheDir") {
|
||||
foreach (unowned string dir in val.split (" ")) {
|
||||
cachedirs.add (dir);
|
||||
cachedirs.append (dir);
|
||||
}
|
||||
} else if (key == "HookDir") {
|
||||
foreach (unowned string dir in val.split (" ")) {
|
||||
hookdirs.add (dir);
|
||||
hookdirs.append (dir);
|
||||
}
|
||||
} else if (key == "LogFile") {
|
||||
logfile = val;
|
||||
@ -276,19 +273,19 @@ public class AlpmConfig {
|
||||
}
|
||||
} else if (key == "IgnoreGroup") {
|
||||
foreach (unowned string name in val.split (" ")) {
|
||||
ignoregroups.add (name);
|
||||
ignoregroups.append (name);
|
||||
}
|
||||
} else if (key == "IgnorePkg") {
|
||||
foreach (unowned string name in val.split (" ")) {
|
||||
ignorepkgs.add (name);
|
||||
ignorepkgs.append (name);
|
||||
}
|
||||
} else if (key == "Noextract") {
|
||||
foreach (unowned string name in val.split (" ")) {
|
||||
noextracts.add (name);
|
||||
noextracts.append (name);
|
||||
}
|
||||
} else if (key == "NoUpgrade") {
|
||||
foreach (unowned string name in val.split (" ")) {
|
||||
noupgrades.add (name);
|
||||
noupgrades.append (name);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -364,6 +361,7 @@ public class AlpmConfig {
|
||||
// writing a short string to the stream
|
||||
dos.put_string (new_line);
|
||||
}
|
||||
reload ();
|
||||
} catch (GLib.Error e) {
|
||||
GLib.stderr.printf("%s\n", e.message);
|
||||
}
|
||||
@ -372,7 +370,7 @@ public class AlpmConfig {
|
||||
}
|
||||
}
|
||||
|
||||
public Alpm.DB.Usage define_usage (string conf_string) {
|
||||
Alpm.DB.Usage define_usage (string conf_string) {
|
||||
Alpm.DB.Usage usage = 0;
|
||||
foreach (unowned string directive in conf_string.split(" ")) {
|
||||
if (directive == "Sync") {
|
||||
@ -390,7 +388,7 @@ public class AlpmConfig {
|
||||
return usage;
|
||||
}
|
||||
|
||||
public void process_siglevel (string conf_string, ref Alpm.Signature.Level siglevel, ref Alpm.Signature.Level siglevel_mask) {
|
||||
void process_siglevel (string conf_string, ref Alpm.Signature.Level siglevel, ref Alpm.Signature.Level siglevel_mask) {
|
||||
foreach (unowned string directive in conf_string.split(" ")) {
|
||||
bool affect_package = false;
|
||||
bool affect_database = false;
|
||||
@ -458,7 +456,7 @@ public class AlpmConfig {
|
||||
siglevel &= ~Alpm.Signature.Level.USE_DEFAULT;
|
||||
}
|
||||
|
||||
public Alpm.Signature.Level merge_siglevel(Alpm.Signature.Level sigbase, Alpm.Signature.Level sigover, Alpm.Signature.Level sigmask) {
|
||||
Alpm.Signature.Level merge_siglevel(Alpm.Signature.Level sigbase, Alpm.Signature.Level sigover, Alpm.Signature.Level sigmask) {
|
||||
return (sigmask != 0) ? (sigover & sigmask) | (sigbase & ~sigmask) : sigover;
|
||||
}
|
||||
}
|
||||
|
131
src/aur.vala
131
src/aur.vala
@ -25,107 +25,66 @@ namespace AUR {
|
||||
const string rpc_multiinfo = "&type=info";
|
||||
const string rpc_multiinfo_arg = "&arg[]=";
|
||||
|
||||
public Json.Array search (string[] needles) {
|
||||
var prev_inter = new Json.Array ();
|
||||
string uri = rpc_url + rpc_search + Uri.escape_string (needles[0]);
|
||||
Json.Array rpc_query (string uri) {
|
||||
var results = new Json.Array ();
|
||||
var session = new Soup.Session ();
|
||||
// set a 15 seconds timeout because it is also the dbus daemon timeout
|
||||
session.timeout = 15;
|
||||
var message = new Soup.Message ("GET", uri);
|
||||
var parser = new Json.Parser ();
|
||||
session.send_message (message);
|
||||
try {
|
||||
parser.load_from_data ((string) message.response_body.flatten ().data, -1);
|
||||
} catch (Error e) {
|
||||
print (e.message);
|
||||
critical (e.message);
|
||||
}
|
||||
unowned Json.Node? root = parser.get_root ();
|
||||
if (root != null) {
|
||||
if (root.get_object ().get_string_member ("type") == "error") {
|
||||
stderr.printf ("Failed to search %s from AUR\n", needles[0]);
|
||||
} else {
|
||||
prev_inter = root.get_object ().get_array_member ("results");
|
||||
}
|
||||
}
|
||||
int needles_length = needles.length;
|
||||
if (needles_length == 1) {
|
||||
return prev_inter;
|
||||
}
|
||||
int i = 1;
|
||||
var inter = new Json.Array ();
|
||||
var found = new Json.Array ();
|
||||
while (i < needles_length) {
|
||||
inter = new Json.Array ();
|
||||
uri = rpc_url + rpc_search + Uri.escape_string (needles[i]);
|
||||
message = new Soup.Message ("GET", uri);
|
||||
session.send_message (message);
|
||||
try {
|
||||
parser.load_from_data ((string) message.response_body.flatten ().data, -1);
|
||||
} catch (Error e) {
|
||||
print (e.message);
|
||||
}
|
||||
root = parser.get_root ();
|
||||
if (root != null) {
|
||||
if (root.get_object ().get_string_member ("type") == "error") {
|
||||
stderr.printf ("Failed to search %s from AUR\n", needles[i]);
|
||||
} else {
|
||||
found = root.get_object ().get_array_member ("results");
|
||||
uint j = 0;
|
||||
uint k;
|
||||
uint found_length = found.get_length ();
|
||||
while (j < found_length) {
|
||||
unowned Json.Node found_node = found.get_element (j);
|
||||
k = 0;
|
||||
uint prev_inter_length = prev_inter.get_length ();
|
||||
while (k < prev_inter_length) {
|
||||
unowned Json.Node prev_inter_node = prev_inter.get_element (k);
|
||||
if (strcmp (found_node.get_object ().get_string_member ("Name"),
|
||||
prev_inter_node.get_object ().get_string_member ("Name")) == 0) {
|
||||
inter.add_element (prev_inter_node);
|
||||
prev_inter.remove_element (k);
|
||||
break;
|
||||
}
|
||||
k++;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i != (needles_length -1)) {
|
||||
prev_inter = inter;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return inter;
|
||||
}
|
||||
|
||||
public Json.Array multiinfo (string[] pkgnames) {
|
||||
Json.Array results = new Json.Array ();
|
||||
if (pkgnames.length == 0) {
|
||||
return results;
|
||||
}
|
||||
var builder = new StringBuilder ();
|
||||
builder.append (rpc_url);
|
||||
builder.append (rpc_multiinfo);
|
||||
foreach (string pkgname in pkgnames) {
|
||||
builder.append (rpc_multiinfo_arg);
|
||||
builder.append (Uri.escape_string (pkgname));
|
||||
}
|
||||
var session = new Soup.Session ();
|
||||
var message = new Soup.Message ("GET", builder.str);
|
||||
session.send_message (message);
|
||||
var parser = new Json.Parser ();
|
||||
try {
|
||||
parser.load_from_data ((string) message.response_body.flatten ().data, -1);
|
||||
} catch (Error e) {
|
||||
print (e.message);
|
||||
}
|
||||
unowned Json.Node? root = parser.get_root ();
|
||||
if (root != null) {
|
||||
if (root.get_object ().get_string_member ("type") == "error") {
|
||||
stderr.printf ("Failed to multiinfo %s from AUR\n", builder.str);
|
||||
critical ("Failed to query %s from AUR", uri);
|
||||
} else {
|
||||
results = root.get_object ().get_array_member ("results");
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public async Json.Array search (string[] needles) {
|
||||
if (needles.length == 0) {
|
||||
return new Json.Array ();
|
||||
} else if (needles.length == 1) {
|
||||
return rpc_query (rpc_url + rpc_search + Uri.escape_string (needles[0]));
|
||||
} else {
|
||||
var inter = new Json.Array ();
|
||||
var prev_inter = new Json.Array ();
|
||||
foreach (unowned string needle in needles) {
|
||||
inter = new Json.Array ();
|
||||
var found = rpc_query (rpc_url + rpc_search + Uri.escape_string (needle));
|
||||
prev_inter.foreach_element ((prev_inter_array, prev_inter_index, prev_inter_node) => {
|
||||
found.foreach_element ((found_array, found_index, found_node) => {
|
||||
if (strcmp (prev_inter_node.get_object ().get_string_member ("Name"),
|
||||
found_node.get_object ().get_string_member ("Name")) == 0) {
|
||||
inter.add_element (prev_inter_node);
|
||||
}
|
||||
});
|
||||
});
|
||||
prev_inter = (owned) inter;
|
||||
}
|
||||
return inter;
|
||||
}
|
||||
}
|
||||
|
||||
public async Json.Array multiinfo (string[] pkgnames) {
|
||||
if (pkgnames.length == 0) {
|
||||
return new Json.Array ();
|
||||
}
|
||||
var builder = new StringBuilder ();
|
||||
builder.append (rpc_url);
|
||||
builder.append (rpc_multiinfo);
|
||||
foreach (unowned string pkgname in pkgnames) {
|
||||
builder.append (rpc_multiinfo_arg);
|
||||
builder.append (Uri.escape_string (pkgname));
|
||||
}
|
||||
return rpc_query (builder.str);
|
||||
}
|
||||
}
|
||||
|
@ -32,17 +32,17 @@ namespace Pamac {
|
||||
public ChooseDependenciesDialog (Gtk.ApplicationWindow? window) {
|
||||
Object (transient_for: window, use_header_bar: 0);
|
||||
|
||||
deps_list = new Gtk.ListStore (3, typeof (bool), typeof (string), typeof (string));
|
||||
deps_list = new Gtk.ListStore (2, typeof (bool), typeof (string));
|
||||
treeview.set_model (deps_list);
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
void on_renderertoggle_toggled (string path) {
|
||||
Gtk.TreeIter iter;
|
||||
GLib.Value selected;
|
||||
bool selected;
|
||||
if (deps_list.get_iter_from_string (out iter, path)) {;
|
||||
deps_list.get_value (iter, 0, out selected);
|
||||
deps_list.set_value (iter, 0, !((bool) selected));
|
||||
deps_list.get (iter, 0, out selected);
|
||||
deps_list.set (iter, 0, !selected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,17 +18,26 @@
|
||||
*/
|
||||
|
||||
namespace Pamac {
|
||||
public struct PackageInfos {
|
||||
public struct UpdateInfos {
|
||||
public string name;
|
||||
public string version;
|
||||
public string db_name;
|
||||
public string old_version;
|
||||
public string new_version;
|
||||
public string repo;
|
||||
public uint64 download_size;
|
||||
}
|
||||
|
||||
public struct TransactionSummary {
|
||||
public UpdateInfos[] to_install;
|
||||
public UpdateInfos[] to_upgrade;
|
||||
public UpdateInfos[] to_downgrade;
|
||||
public UpdateInfos[] to_reinstall;
|
||||
public UpdateInfos[] to_remove;
|
||||
}
|
||||
|
||||
public struct Updates {
|
||||
public bool is_syncfirst;
|
||||
public PackageInfos[] repos_updates;
|
||||
public PackageInfos[] aur_updates;
|
||||
public UpdateInfos[] repos_updates;
|
||||
public UpdateInfos[] aur_updates;
|
||||
}
|
||||
|
||||
public struct ErrorInfos {
|
||||
|
1092
src/daemon.vala
1092
src/daemon.vala
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -18,13 +18,32 @@
|
||||
*/
|
||||
|
||||
namespace Pamac {
|
||||
[Compact]
|
||||
public class MirrorsConfig {
|
||||
public string conf_path;
|
||||
public string mirrorlists_dir;
|
||||
public string choosen_generation_method;
|
||||
public string choosen_country;
|
||||
public GLib.List<string> countrys;
|
||||
class MirrorsConfig {
|
||||
string conf_path;
|
||||
GLib.List<string> _countrys ;
|
||||
|
||||
|
||||
public string mirrorlists_dir { get; private set; }
|
||||
public string choosen_generation_method { get; private set; }
|
||||
public string choosen_country { get; private set; }
|
||||
public unowned GLib.List<string> countrys {
|
||||
get {
|
||||
try {
|
||||
var directory = GLib.File.new_for_path (mirrorlists_dir);
|
||||
var enumerator = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0);
|
||||
FileInfo file_info;
|
||||
_countrys = new GLib.List<string> ();
|
||||
while ((file_info = enumerator.next_file ()) != null) {
|
||||
_countrys.append(file_info.get_name ());
|
||||
}
|
||||
_countrys.sort (strcmp);
|
||||
} catch (Error e) {
|
||||
stderr.printf ("%s\n", e.message);
|
||||
}
|
||||
return _countrys;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public MirrorsConfig (string path) {
|
||||
conf_path = path;
|
||||
@ -39,22 +58,7 @@ namespace Pamac {
|
||||
parse_file (conf_path);
|
||||
}
|
||||
|
||||
public void get_countrys () {
|
||||
try {
|
||||
var directory = GLib.File.new_for_path (mirrorlists_dir);
|
||||
var enumerator = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0);
|
||||
FileInfo file_info;
|
||||
countrys = new GLib.List<string> ();
|
||||
while ((file_info = enumerator.next_file ()) != null) {
|
||||
countrys.append(file_info.get_name ());
|
||||
}
|
||||
countrys.sort (strcmp);
|
||||
} catch (Error e) {
|
||||
stderr.printf ("%s\n", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
public void parse_file (string path) {
|
||||
void parse_file (string path) {
|
||||
var file = GLib.File.new_for_path (path);
|
||||
if (file.query_exists ()) {
|
||||
try {
|
||||
|
82
src/package.vala
Normal file
82
src/package.vala
Normal file
@ -0,0 +1,82 @@
|
||||
/*
|
||||
* pamac-vala
|
||||
*
|
||||
* Copyright (C) 2014-2016 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a get of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace Pamac {
|
||||
public struct AlpmPackage {
|
||||
public string name;
|
||||
public string version;
|
||||
public string desc;
|
||||
public string repo;
|
||||
public uint64 size;
|
||||
public uint origin;
|
||||
}
|
||||
|
||||
public struct AlpmPackageDetails {
|
||||
public string name;
|
||||
public string version;
|
||||
public string desc;
|
||||
public string repo;
|
||||
public string url;
|
||||
public string packager;
|
||||
public string builddate;
|
||||
public string installdate;
|
||||
public string reason;
|
||||
public string has_signature;
|
||||
public string[] licenses;
|
||||
public string[] depends;
|
||||
public string[] optdepends;
|
||||
public string[] requiredby;
|
||||
public string[] optionalfor;
|
||||
public string[] provides;
|
||||
public string[] replaces;
|
||||
public string[] conflicts;
|
||||
public string[] groups;
|
||||
public string[] backups;
|
||||
public string[] files;
|
||||
}
|
||||
|
||||
public struct AURPackage {
|
||||
public string name;
|
||||
public string version;
|
||||
public string desc;
|
||||
public double popularity;
|
||||
}
|
||||
|
||||
public struct AURPackageDetails {
|
||||
public string name;
|
||||
public string version;
|
||||
public string desc;
|
||||
public double popularity;
|
||||
public string packagebase;
|
||||
public string url;
|
||||
public string maintainer;
|
||||
public int64 firstsubmitted;
|
||||
public int64 lastmodified;
|
||||
public int64 outofdate;
|
||||
public int64 numvotes;
|
||||
public string[] licenses;
|
||||
public string[] depends;
|
||||
public string[] makedepends;
|
||||
public string[] checkdepends;
|
||||
public string[] optdepends;
|
||||
public string[] provides;
|
||||
public string[] replaces;
|
||||
public string[] conflicts;
|
||||
}
|
||||
}
|
@ -18,43 +18,48 @@
|
||||
*/
|
||||
|
||||
namespace Pamac {
|
||||
[Compact]
|
||||
public class Config {
|
||||
public string conf_path;
|
||||
public bool recurse;
|
||||
public uint64 refresh_period;
|
||||
public bool no_update_hide_icon;
|
||||
public bool enable_aur;
|
||||
public bool search_aur;
|
||||
public bool check_aur_updates;
|
||||
public bool no_confirm_build;
|
||||
public HashTable<string,string> environment_variables;
|
||||
class Config {
|
||||
string conf_path;
|
||||
HashTable<string,string> _environment_variables;
|
||||
|
||||
public bool recurse { get; private set; }
|
||||
public uint64 refresh_period { get; private set; }
|
||||
public bool no_update_hide_icon { get; private set; }
|
||||
public bool enable_aur { get; private set; }
|
||||
public bool search_aur { get; private set; }
|
||||
public bool check_aur_updates { get; private set; }
|
||||
public bool no_confirm_build { get; private set; }
|
||||
public unowned HashTable<string,string> environment_variables {
|
||||
get {
|
||||
return _environment_variables;
|
||||
}
|
||||
}
|
||||
|
||||
public Config (string path) {
|
||||
conf_path = path;
|
||||
//get environment variables
|
||||
environment_variables = new HashTable<string,string> (str_hash, str_equal);
|
||||
_environment_variables = new HashTable<string,string> (str_hash, str_equal);
|
||||
var utsname = Posix.utsname();
|
||||
environment_variables.insert ("HTTP_USER_AGENT", "pamac (%s %s)".printf (utsname.sysname, utsname.machine));
|
||||
_environment_variables.insert ("HTTP_USER_AGENT", "pamac (%s %s)".printf (utsname.sysname, utsname.machine));
|
||||
unowned string? variable = Environment.get_variable ("http_proxy");
|
||||
if (variable != null) {
|
||||
environment_variables.insert ("http_proxy", variable);
|
||||
_environment_variables.insert ("http_proxy", variable);
|
||||
}
|
||||
variable = Environment.get_variable ("https_proxy");
|
||||
if (variable != null) {
|
||||
environment_variables.insert ("https_proxy", variable);
|
||||
_environment_variables.insert ("https_proxy", variable);
|
||||
}
|
||||
variable = Environment.get_variable ("ftp_proxy");
|
||||
if (variable != null) {
|
||||
environment_variables.insert ("ftp_proxy", variable);
|
||||
_environment_variables.insert ("ftp_proxy", variable);
|
||||
}
|
||||
variable = Environment.get_variable ("socks_proxy");
|
||||
if (variable != null) {
|
||||
environment_variables.insert ("socks_proxy", variable);
|
||||
_environment_variables.insert ("socks_proxy", variable);
|
||||
}
|
||||
variable = Environment.get_variable ("no_proxy");
|
||||
if (variable != null) {
|
||||
environment_variables.insert ("no_proxy", variable);
|
||||
_environment_variables.insert ("no_proxy", variable);
|
||||
}
|
||||
// set default option
|
||||
refresh_period = 6;
|
||||
@ -72,7 +77,7 @@ namespace Pamac {
|
||||
parse_file (conf_path);
|
||||
}
|
||||
|
||||
public void parse_file (string path) {
|
||||
void parse_file (string path) {
|
||||
var file = GLib.File.new_for_path (path);
|
||||
if (file.query_exists ()) {
|
||||
try {
|
||||
|
@ -37,8 +37,6 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.Box ignorepkgs_box;
|
||||
[GtkChild]
|
||||
Gtk.ListStore ignorepkgs_liststore;
|
||||
[GtkChild]
|
||||
Gtk.TreeView ignorepkgs_treeview;
|
||||
[GtkChild]
|
||||
Gtk.Box mirrors_config_box;
|
||||
@ -59,6 +57,7 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.CheckButton no_confirm_build_checkbutton;
|
||||
|
||||
Gtk.ListStore ignorepkgs_liststore;
|
||||
Transaction transaction;
|
||||
uint64 previous_refresh_period;
|
||||
|
||||
@ -67,9 +66,9 @@ namespace Pamac {
|
||||
|
||||
this.transaction = transaction;
|
||||
refresh_period_label.set_markup (dgettext (null, "How often to check for updates, value in hours") +":");
|
||||
remove_unrequired_deps_button.active = transaction.pamac_config.recurse;
|
||||
check_space_button.active = (transaction.alpm_utils.get_checkspace () == 1);
|
||||
if (transaction.pamac_config.refresh_period == 0) {
|
||||
remove_unrequired_deps_button.active = transaction.recurse;
|
||||
check_space_button.active = transaction.get_checkspace ();
|
||||
if (transaction.refresh_period == 0) {
|
||||
check_updates_button.active = false;
|
||||
refresh_period_label.sensitive = false;
|
||||
// set default value
|
||||
@ -80,15 +79,16 @@ namespace Pamac {
|
||||
ignorepkgs_box.sensitive = false;
|
||||
} else {
|
||||
check_updates_button.active = true;
|
||||
refresh_period_spin_button.value = transaction.pamac_config.refresh_period;
|
||||
previous_refresh_period = transaction.pamac_config.refresh_period;
|
||||
refresh_period_spin_button.value = transaction.refresh_period;
|
||||
previous_refresh_period = transaction.refresh_period;
|
||||
}
|
||||
no_update_hide_icon_checkbutton.active = transaction.pamac_config.no_update_hide_icon;
|
||||
no_update_hide_icon_checkbutton.active = transaction.no_update_hide_icon;
|
||||
|
||||
// populate ignorepkgs_liststore
|
||||
Gtk.TreeIter iter;
|
||||
foreach (unowned string ignorepkg in transaction.alpm_utils.get_ignorepkgs ()) {
|
||||
ignorepkgs_liststore.insert_with_values (out iter, -1, 0, ignorepkg);
|
||||
ignorepkgs_liststore = new Gtk.ListStore (1, typeof (string));
|
||||
ignorepkgs_treeview.set_model (ignorepkgs_liststore);
|
||||
foreach (unowned string ignorepkg in transaction.get_ignorepkgs ()) {
|
||||
ignorepkgs_liststore.insert_with_values (null, -1, 0, ignorepkg);
|
||||
}
|
||||
remove_unrequired_deps_button.state_set.connect (on_remove_unrequired_deps_button_state_set);
|
||||
check_space_button.state_set.connect (on_check_space_button_state_set);
|
||||
@ -98,15 +98,14 @@ namespace Pamac {
|
||||
no_update_hide_icon_checkbutton.toggled.connect (on_no_update_hide_icon_checkbutton_toggled);
|
||||
transaction.write_pamac_config_finished.connect (on_write_pamac_config_finished);
|
||||
|
||||
unowned Alpm.Package? pkg = Alpm.find_satisfier (transaction.alpm_utils.get_installed_pkgs (), "pacman-mirrorlist");
|
||||
if (pkg == null) {
|
||||
AlpmPackage pkg = transaction.find_installed_satisfier ("pacman-mirrorlist");
|
||||
if (pkg.name == "") {
|
||||
mirrors_config_box.visible = false;
|
||||
} else {
|
||||
var mirrors_config = new MirrorsConfig ("/etc/pacman-mirrors.conf");
|
||||
mirrors_country_comboboxtext.append_text (dgettext (null, "Worldwide"));
|
||||
mirrors_country_comboboxtext.active = 0;
|
||||
int index = 1;
|
||||
mirrors_config.get_countrys ();
|
||||
foreach (unowned string country in mirrors_config.countrys) {
|
||||
mirrors_country_comboboxtext.append_text (country);
|
||||
if (country == mirrors_config.choosen_country) {
|
||||
@ -126,17 +125,17 @@ namespace Pamac {
|
||||
transaction.write_mirrors_config_finished.connect (on_write_mirrors_config_finished);
|
||||
}
|
||||
|
||||
pkg = Alpm.find_satisfier (transaction.alpm_utils.get_installed_pkgs (), "yaourt");
|
||||
if (pkg == null) {
|
||||
pkg = transaction.find_installed_satisfier ("yaourt");
|
||||
if (pkg.name == "") {
|
||||
aur_config_box.visible = false;
|
||||
} else {
|
||||
enable_aur_button.active = transaction.pamac_config.enable_aur;
|
||||
search_aur_checkbutton.active = transaction.pamac_config.search_aur;
|
||||
search_aur_checkbutton.sensitive = transaction.pamac_config.enable_aur;
|
||||
check_aur_updates_checkbutton.active = transaction.pamac_config.check_aur_updates;
|
||||
check_aur_updates_checkbutton.sensitive = transaction.pamac_config.enable_aur;
|
||||
no_confirm_build_checkbutton.active = transaction.pamac_config.no_confirm_build;
|
||||
no_confirm_build_checkbutton.sensitive = transaction.pamac_config.enable_aur;
|
||||
enable_aur_button.active = transaction.enable_aur;
|
||||
search_aur_checkbutton.active = transaction.search_aur;
|
||||
search_aur_checkbutton.sensitive = transaction.enable_aur;
|
||||
check_aur_updates_checkbutton.active = transaction.check_aur_updates;
|
||||
check_aur_updates_checkbutton.sensitive = transaction.enable_aur;
|
||||
no_confirm_build_checkbutton.active = transaction.no_confirm_build;
|
||||
no_confirm_build_checkbutton.sensitive = transaction.enable_aur;
|
||||
enable_aur_button.state_set.connect (on_enable_aur_button_state_set);
|
||||
search_aur_checkbutton.toggled.connect (on_search_aur_checkbutton_toggled);
|
||||
check_aur_updates_checkbutton.toggled.connect (on_check_aur_updates_checkbutton_toggled);
|
||||
@ -248,40 +247,45 @@ namespace Pamac {
|
||||
[GtkCallback]
|
||||
void on_add_ignorepkgs_button_clicked () {
|
||||
var choose_ignorepkgs_dialog = new ChooseIgnorepkgsDialog (this);
|
||||
foreach (var pkg in transaction.alpm_utils.get_installed_pkgs ()) {
|
||||
Gtk.TreeIter iter;
|
||||
if (transaction.alpm_utils.get_ignorepkgs ().find_str (pkg.name) == null) {
|
||||
choose_ignorepkgs_dialog.pkgs_list.insert_with_values (out iter, -1, 0, false, 1, pkg.name);
|
||||
} else {
|
||||
choose_ignorepkgs_dialog.pkgs_list.insert_with_values (out iter, -1, 0, true, 1, pkg.name);
|
||||
}
|
||||
this.get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.WATCH));
|
||||
while (Gtk.events_pending ()) {
|
||||
Gtk.main_iteration ();
|
||||
}
|
||||
if (choose_ignorepkgs_dialog.run () == Gtk.ResponseType.OK) {
|
||||
var ignorepkg_string = new StringBuilder ();
|
||||
choose_ignorepkgs_dialog.pkgs_list.foreach ((model, path, iter) => {
|
||||
GLib.Value val;
|
||||
// get value at column 0 to know if it is selected
|
||||
choose_ignorepkgs_dialog.pkgs_list.get_value (iter, 0, out val);
|
||||
if ((bool) val) {
|
||||
// get value at column 1 to get the pkg name
|
||||
choose_ignorepkgs_dialog.pkgs_list.get_value (iter, 1, out val);
|
||||
if (ignorepkg_string.len != 0) {
|
||||
ignorepkg_string.append (" ");
|
||||
}
|
||||
ignorepkg_string.append ((string) val);
|
||||
transaction.get_installed_pkgs.begin ((obj, res) => {
|
||||
var pkgs = transaction.get_installed_pkgs.end (res);
|
||||
foreach (unowned AlpmPackage pkg in pkgs) {
|
||||
if (pkg.name in transaction.get_ignorepkgs ()) {
|
||||
choose_ignorepkgs_dialog.pkgs_list.insert_with_values (null, -1, 0, true, 1, pkg.name);
|
||||
} else {
|
||||
choose_ignorepkgs_dialog.pkgs_list.insert_with_values (null, -1, 0, false, 1, pkg.name);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (ignorepkg_string.len != 0) {
|
||||
}
|
||||
this.get_window ().set_cursor (null);
|
||||
if (choose_ignorepkgs_dialog.run () == Gtk.ResponseType.OK) {
|
||||
var ignorepkg_string = new StringBuilder ();
|
||||
choose_ignorepkgs_dialog.pkgs_list.foreach ((model, path, iter) => {
|
||||
GLib.Value val;
|
||||
// get value at column 0 to know if it is selected
|
||||
model.get_value (iter, 0, out val);
|
||||
if ((bool) val) {
|
||||
// get value at column 1 to get the pkg name
|
||||
model.get_value (iter, 1, out val);
|
||||
if (ignorepkg_string.len != 0) {
|
||||
ignorepkg_string.append (" ");
|
||||
}
|
||||
ignorepkg_string.append ((string) val);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
var new_alpm_conf = new HashTable<string,Variant> (str_hash, str_equal);
|
||||
new_alpm_conf.insert ("IgnorePkg", new Variant.string (ignorepkg_string.str));
|
||||
transaction.start_write_alpm_config (new_alpm_conf);
|
||||
}
|
||||
}
|
||||
choose_ignorepkgs_dialog.destroy ();
|
||||
while (Gtk.events_pending ()) {
|
||||
Gtk.main_iteration ();
|
||||
}
|
||||
choose_ignorepkgs_dialog.destroy ();
|
||||
while (Gtk.events_pending ()) {
|
||||
Gtk.main_iteration ();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
@ -293,7 +297,7 @@ namespace Pamac {
|
||||
var ignorepkg_string = new StringBuilder ();
|
||||
ignorepkgs_liststore.foreach ((model, path, iter) => {
|
||||
GLib.Value name;
|
||||
ignorepkgs_liststore.get_value (iter, 0, out name);
|
||||
model.get_value (iter, 0, out name);
|
||||
if (ignorepkg_string.len != 0) {
|
||||
ignorepkg_string.append (" ");
|
||||
}
|
||||
@ -303,16 +307,15 @@ namespace Pamac {
|
||||
var new_alpm_conf = new HashTable<string,Variant> (str_hash, str_equal);
|
||||
new_alpm_conf.insert ("IgnorePkg", new Variant.string (ignorepkg_string.str));
|
||||
transaction.start_write_alpm_config (new_alpm_conf);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void on_write_alpm_config_finished (bool checkspace) {
|
||||
check_space_button.state = checkspace;
|
||||
// re-populate ignorepkgs_liststore
|
||||
Gtk.TreeIter iter;
|
||||
ignorepkgs_liststore.clear ();
|
||||
foreach (unowned string ignorepkg in transaction.alpm_utils.get_ignorepkgs ()) {
|
||||
ignorepkgs_liststore.insert_with_values (out iter, -1, 0, ignorepkg);
|
||||
foreach (unowned string ignorepkg in transaction.get_ignorepkgs ()) {
|
||||
ignorepkgs_liststore.insert_with_values (null, -1, 0, ignorepkg);
|
||||
}
|
||||
}
|
||||
|
||||
|
1167
src/transaction.vala
1167
src/transaction.vala
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@ namespace Pamac {
|
||||
public TransactionSumDialog (Gtk.ApplicationWindow? window) {
|
||||
Object (transient_for: window, use_header_bar: 0);
|
||||
|
||||
sum_list = new Gtk.ListStore (2, typeof (string), typeof (string));
|
||||
sum_list = new Gtk.ListStore (4, typeof (string), typeof (string), typeof (string), typeof (string));
|
||||
treeview.set_model (sum_list);
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ const string noupdate_info = _("Your system is up-to-date");
|
||||
namespace Pamac {
|
||||
[DBus (name = "org.manjaro.pamac")]
|
||||
interface Daemon : Object {
|
||||
public abstract string get_lockfile () throws IOError;
|
||||
public abstract void start_refresh (bool force) throws IOError;
|
||||
public abstract void start_get_updates (bool check_aur_updates) throws IOError;
|
||||
[DBus (no_reply = true)]
|
||||
@ -320,10 +321,14 @@ namespace Pamac {
|
||||
|
||||
Notify.init (_("Update Manager"));
|
||||
|
||||
var alpm_config = new AlpmConfig ("/etc/pacman.conf");
|
||||
alpm_config.set_handle ();
|
||||
lockfile = GLib.File.new_for_path (alpm_config.handle.lockfile);
|
||||
start_daemon ();
|
||||
try {
|
||||
lockfile = GLib.File.new_for_path (daemon.get_lockfile ());
|
||||
} catch (IOError e) {
|
||||
stderr.printf ("IOError: %s\n", e.message);
|
||||
//try standard lock file
|
||||
lockfile = GLib.File.new_for_path ("var/lib/pacman/db.lck");
|
||||
}
|
||||
Timeout.add (200, check_pacman_running);
|
||||
start_refresh ();
|
||||
launch_refresh_timeout (pamac_config.refresh_period);
|
||||
|
@ -25,7 +25,7 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.Label top_label;
|
||||
[GtkChild]
|
||||
Gtk.Notebook notebook;
|
||||
Gtk.StackSwitcher stackswitcher;
|
||||
[GtkChild]
|
||||
Gtk.ScrolledWindow repos_scrolledwindow;
|
||||
[GtkChild]
|
||||
@ -51,10 +51,10 @@ namespace Pamac {
|
||||
public UpdaterWindow (Gtk.Application application) {
|
||||
Object (application: application);
|
||||
|
||||
bottom_label.set_visible (false);
|
||||
apply_button.set_sensitive (false);
|
||||
notebook.set_show_tabs (false);
|
||||
aur_scrolledwindow.set_visible (false);
|
||||
bottom_label.visible = false;
|
||||
apply_button.sensitive = false;
|
||||
stackswitcher.visible = false;
|
||||
aur_scrolledwindow.visible = false;
|
||||
|
||||
Timeout.add (100, populate_window);
|
||||
}
|
||||
@ -62,9 +62,9 @@ namespace Pamac {
|
||||
bool populate_window () {
|
||||
this.get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.WATCH));
|
||||
|
||||
repos_updates_list = new Gtk.ListStore (3, typeof (bool), typeof (string), typeof (string));
|
||||
repos_updates_list = new Gtk.ListStore (6, typeof (bool), typeof (string), typeof (string), typeof (string),typeof (string), typeof (string));
|
||||
repos_updates_treeview.set_model (repos_updates_list);
|
||||
aur_updates_list = new Gtk.ListStore (2, typeof (bool), typeof (string));
|
||||
aur_updates_list = new Gtk.ListStore (3, typeof (bool), typeof (string), typeof (string));
|
||||
aur_updates_treeview.set_model (aur_updates_list);
|
||||
|
||||
transaction = new Transaction (this as Gtk.ApplicationWindow);
|
||||
@ -80,31 +80,29 @@ namespace Pamac {
|
||||
void set_apply_button_sensitive () {
|
||||
bool sensitive = false;
|
||||
repos_updates_list.foreach ((model, path, iter) => {
|
||||
GLib.Value selected;
|
||||
repos_updates_list.get_value (iter, 0, out selected);
|
||||
sensitive = (bool) selected;
|
||||
bool selected;
|
||||
repos_updates_list.get (iter, 0, out selected);
|
||||
sensitive = selected;
|
||||
return sensitive;
|
||||
});
|
||||
if (!sensitive) {
|
||||
aur_updates_list.foreach ((model, path, iter) => {
|
||||
GLib.Value selected;
|
||||
aur_updates_list.get_value (iter, 0, out selected);
|
||||
sensitive = (bool) selected;
|
||||
bool selected;
|
||||
aur_updates_list.get (iter, 0, out selected);
|
||||
sensitive = selected;
|
||||
return sensitive;
|
||||
});
|
||||
}
|
||||
apply_button.set_sensitive (sensitive);
|
||||
apply_button.sensitive = sensitive;
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
void on_repos_select_update_toggled (string path) {
|
||||
Gtk.TreePath treepath = new Gtk.TreePath.from_string (path);
|
||||
Gtk.TreeIter iter;
|
||||
GLib.Value name_string;
|
||||
string pkgname;
|
||||
repos_updates_list.get_iter (out iter, treepath);
|
||||
repos_updates_list.get_value (iter, 1, out name_string);
|
||||
// string has the form "pkgname pkgversion"
|
||||
string pkgname = name_string.get_string ().split (" ", 2)[0];
|
||||
repos_updates_list.get (iter, 1, out pkgname);
|
||||
if (repos_select_update.active) {
|
||||
repos_updates_list.set (iter, 0, false);
|
||||
transaction.temporary_ignorepkgs.add (pkgname);
|
||||
@ -119,11 +117,9 @@ namespace Pamac {
|
||||
void on_aur_select_update_toggled (string path) {
|
||||
Gtk.TreePath treepath = new Gtk.TreePath.from_string (path);
|
||||
Gtk.TreeIter iter;
|
||||
GLib.Value name_string;
|
||||
string pkgname;
|
||||
aur_updates_list.get_iter (out iter, treepath);
|
||||
aur_updates_list.get_value (iter, 1, out name_string);
|
||||
// string has the form "pkgname pkgversion"
|
||||
string pkgname = name_string.get_string ().split (" ", 2)[0];
|
||||
aur_updates_list.get (iter, 1, out pkgname);
|
||||
if (aur_select_update.active) {
|
||||
aur_updates_list.set (iter, 0, false);
|
||||
transaction.temporary_ignorepkgs.add (pkgname);
|
||||
@ -166,34 +162,32 @@ namespace Pamac {
|
||||
void on_get_updates_finished (Updates updates) {
|
||||
top_label.set_markup ("");
|
||||
repos_updates_list.clear ();
|
||||
notebook.set_show_tabs (false);
|
||||
repos_scrolledwindow.set_visible (true);
|
||||
stackswitcher.visible = false;
|
||||
repos_scrolledwindow.visible = true;
|
||||
aur_updates_list.clear ();
|
||||
aur_scrolledwindow.set_visible (false);
|
||||
bottom_label.set_visible (false);
|
||||
Gtk.TreeIter iter;
|
||||
aur_scrolledwindow.visible = false;
|
||||
bottom_label.visible = false;
|
||||
uint64 dsize = 0;
|
||||
uint repos_updates_nb = 0;
|
||||
uint aur_updates_nb = 0;
|
||||
foreach (unowned PackageInfos infos in updates.repos_updates) {
|
||||
string name = infos.name + " " + infos.version;
|
||||
foreach (unowned UpdateInfos infos in updates.repos_updates) {
|
||||
string size = infos.download_size != 0 ? format_size (infos.download_size) : "";
|
||||
dsize += infos.download_size;
|
||||
repos_updates_nb++;
|
||||
if (infos.name in transaction.temporary_ignorepkgs) {
|
||||
repos_updates_list.insert_with_values (out iter, -1, 0, false, 1, name, 2, size);
|
||||
} else {
|
||||
repos_updates_list.insert_with_values (out iter, -1, 0, true, 1, name, 2, size);
|
||||
}
|
||||
repos_updates_list.insert_with_values (null, -1,
|
||||
0, !transaction.temporary_ignorepkgs.contains (infos.name),
|
||||
1, infos.name,
|
||||
2, infos.new_version,
|
||||
3, "(%s)".printf (infos.old_version),
|
||||
4, infos.repo,
|
||||
5, size);
|
||||
}
|
||||
foreach (unowned PackageInfos infos in updates.aur_updates) {
|
||||
string name = infos.name + " " + infos.version;
|
||||
foreach (unowned UpdateInfos infos in updates.aur_updates) {
|
||||
aur_updates_nb++;
|
||||
if (infos.name in transaction.temporary_ignorepkgs) {
|
||||
aur_updates_list.insert_with_values (out iter, -1, 0, false, 1, name);
|
||||
} else {
|
||||
aur_updates_list.insert_with_values (out iter, -1, 0, true, 1, name);
|
||||
}
|
||||
aur_updates_list.insert_with_values (null, -1,
|
||||
0, !transaction.temporary_ignorepkgs.contains (infos.name),
|
||||
1, infos.name,
|
||||
2, "%s\t (%s)".printf (infos.new_version, infos.old_version));
|
||||
}
|
||||
uint updates_nb = repos_updates_nb + aur_updates_nb;
|
||||
if (updates_nb == 0) {
|
||||
@ -204,16 +198,16 @@ namespace Pamac {
|
||||
set_apply_button_sensitive ();
|
||||
if (dsize != 0) {
|
||||
bottom_label.set_markup("<b>%s: %s</b>".printf (dgettext (null, "Total download size"), format_size(dsize)));
|
||||
bottom_label.set_visible (true);
|
||||
bottom_label.visible = true;
|
||||
} else {
|
||||
bottom_label.set_visible (false);
|
||||
bottom_label.visible = false;
|
||||
}
|
||||
if (aur_updates_nb != 0) {
|
||||
aur_scrolledwindow.set_visible (true);
|
||||
aur_scrolledwindow.visible = true;
|
||||
if (repos_updates_nb == 0) {
|
||||
repos_scrolledwindow.set_visible (false);
|
||||
repos_scrolledwindow.visible = false;
|
||||
}
|
||||
notebook.set_show_tabs (true);
|
||||
stackswitcher.visible = true;
|
||||
}
|
||||
this.get_window ().set_cursor (null);
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
/*
|
||||
* libalpm-vala
|
||||
* Vala bindings for libalpm
|
||||
*
|
||||
* Copyright (C) 2014-2015 Guillaume Benoit <guillaume@manjaro.org>
|
||||
* Copyright (C) 2014-2016 Guillaume Benoit <guillaume@manjaro.org>
|
||||
* Copyright (c) 2011 Rémy Oudompheng <remy@archlinux.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -45,7 +44,11 @@ namespace Alpm {
|
||||
|
||||
public int pkg_vercmp(string a, string b);
|
||||
|
||||
public unowned Alpm.List<unowned Package?> find_group_pkgs(Alpm.List<DB> dbs, string name);
|
||||
/** Find group members across a list of databases.
|
||||
* If a member exists in several databases, only the first database is used.
|
||||
* IgnorePkg is also handled.
|
||||
*/
|
||||
public Alpm.List<unowned Package?> find_group_pkgs(Alpm.List<DB> dbs, string name);
|
||||
|
||||
/** Returns the string corresponding to an error number. */
|
||||
public unowned string strerror(Errno err);
|
||||
@ -57,7 +60,7 @@ namespace Alpm {
|
||||
[Compact]
|
||||
public class Handle {
|
||||
[CCode (cname = "alpm_initialize")]
|
||||
public static Handle? @new(string root, string dbpath, out Alpm.Errno error);
|
||||
public Handle (string root, string dbpath, out Alpm.Errno error);
|
||||
|
||||
public unowned string root {
|
||||
[CCode (cname = "alpm_option_get_root")] get;
|
||||
@ -69,7 +72,7 @@ namespace Alpm {
|
||||
[CCode (cname = "alpm_option_get_arch")] get;
|
||||
[CCode (cname = "alpm_option_set_arch")] set;
|
||||
}
|
||||
public unowned Alpm.List<unowned string?> cachedirs {
|
||||
public unowned Alpm.List<unowned string> cachedirs {
|
||||
[CCode (cname = "alpm_option_get_cachedirs")] get;
|
||||
[CCode (cname = "alpm_option_set_cachedirs")] set;
|
||||
}
|
||||
@ -78,7 +81,7 @@ namespace Alpm {
|
||||
[CCode (cname = "alpm_option_remove_cachedir")]
|
||||
public int remove_cachedir(string cachedir);
|
||||
|
||||
public unowned Alpm.List<unowned string?> hookdirs {
|
||||
public unowned Alpm.List<unowned string> hookdirs {
|
||||
[CCode (cname = "alpm_option_get_hookdirs")] get;
|
||||
[CCode (cname = "alpm_option_set_hookdirs")] set;
|
||||
}
|
||||
@ -103,7 +106,7 @@ namespace Alpm {
|
||||
/** Sets whether to use syslog (0 is FALSE, TRUE otherwise). */
|
||||
[CCode (cname = "alpm_option_set_usesyslog")] set;
|
||||
}
|
||||
public unowned Alpm.List<unowned string?> noupgrades {
|
||||
public unowned Alpm.List<unowned string> noupgrades {
|
||||
[CCode (cname = "alpm_option_get_noupgrades")] get;
|
||||
[CCode (cname = "alpm_option_set_noupgrades")] set;
|
||||
}
|
||||
@ -112,7 +115,7 @@ namespace Alpm {
|
||||
[CCode (cname = "alpm_option_remove_noupgrade")]
|
||||
public int remove_noupgrade(string path);
|
||||
|
||||
public unowned Alpm.List<unowned string?> noextracts {
|
||||
public unowned Alpm.List<unowned string> noextracts {
|
||||
[CCode (cname = "alpm_option_get_noextracts")] get;
|
||||
[CCode (cname = "alpm_option_set_noextracts")] set;
|
||||
}
|
||||
@ -123,7 +126,7 @@ namespace Alpm {
|
||||
[CCode (cname = "alpm_option_match_noextract")]
|
||||
public int match_noextract(string path);
|
||||
|
||||
public unowned Alpm.List<unowned string?> ignorepkgs {
|
||||
public unowned Alpm.List<unowned string> ignorepkgs {
|
||||
[CCode (cname = "alpm_option_get_ignorepkgs")] get;
|
||||
[CCode (cname = "alpm_option_set_ignorepkgs")] set;
|
||||
}
|
||||
@ -132,7 +135,7 @@ namespace Alpm {
|
||||
[CCode (cname = "alpm_option_remove_ignorepkg")]
|
||||
public int remove_ignorepkg(string pkg);
|
||||
|
||||
public unowned Alpm.List<unowned string?> ignoregroups {
|
||||
public unowned Alpm.List<unowned string> ignoregroups {
|
||||
[CCode (cname = "alpm_option_get_ignoregroups")] get;
|
||||
[CCode (cname = "alpm_option_set_ignoregroups")] set;
|
||||
}
|
||||
@ -141,7 +144,7 @@ namespace Alpm {
|
||||
[CCode (cname = "alpm_option_remove_ignorepkg")]
|
||||
public int remove_ignoregroup(string grp);
|
||||
|
||||
public unowned Alpm.List<unowned Depend?> assumeinstalled {
|
||||
public unowned Alpm.List<unowned Depend> assumeinstalled {
|
||||
[CCode (cname = "alpm_option_get_assumeinstalled")] get;
|
||||
[CCode (cname = "alpm_option_set_assumeinstalled")] set;
|
||||
}
|
||||
@ -178,10 +181,10 @@ namespace Alpm {
|
||||
[CCode (cname = "alpm_option_set_remote_file_siglevel")] set;
|
||||
}
|
||||
|
||||
public unowned DB? localdb {
|
||||
public unowned DB localdb {
|
||||
[CCode (cname = "alpm_get_localdb")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned DB?> syncdbs {
|
||||
public unowned Alpm.List<unowned DB> syncdbs {
|
||||
[CCode (cname = "alpm_get_syncdbs")] get;
|
||||
}
|
||||
|
||||
@ -218,14 +221,14 @@ namespace Alpm {
|
||||
public int unlock();
|
||||
|
||||
[CCode (cname = "alpm_register_syncdb")]
|
||||
public unowned DB? register_syncdb(string treename, Signature.Level level);
|
||||
public unowned DB register_syncdb(string treename, Signature.Level level);
|
||||
[CCode (cname = "alpm_unregister_all_syncdbs")]
|
||||
public int unregister_all_syncdbs();
|
||||
|
||||
// the return package can be freed except if it is added to a transaction,
|
||||
// it will be freed upon Handle.trans_release() invocation.
|
||||
[CCode (cname = "alpm_pkg_load_file")]
|
||||
public Package? load_file(string filename, int full, Signature.Level level);
|
||||
[CCode (cname = "alpm_pkg_load")]
|
||||
public int load_tarball(string filename, int full, Signature.Level level, out Package pkg);
|
||||
|
||||
/** Test if a package should be ignored.
|
||||
* Checks if the package is ignored via IgnorePkg, or if the package is
|
||||
@ -252,11 +255,11 @@ namespace Alpm {
|
||||
|
||||
/** Returns a list of packages added by the transaction.*/
|
||||
[CCode (cname = "alpm_trans_get_add")]
|
||||
public unowned Alpm.List<unowned Package?> trans_to_add();
|
||||
public unowned Alpm.List<unowned Package> trans_to_add();
|
||||
|
||||
/** Returns the list of packages removed by the transaction.*/
|
||||
[CCode (cname = "alpm_trans_get_remove")]
|
||||
public unowned Alpm.List<unowned Package?> trans_to_remove();
|
||||
public unowned Alpm.List<unowned Package> trans_to_remove();
|
||||
|
||||
/** Initialize the transaction.
|
||||
* @param flags flags of the transaction (like nodeps, etc)
|
||||
@ -333,16 +336,16 @@ namespace Alpm {
|
||||
[CCode (cname = "alpm_db_get_siglevel")] get;
|
||||
}
|
||||
|
||||
public unowned Alpm.List<unowned string?> servers {
|
||||
public unowned Alpm.List<unowned string> servers {
|
||||
[CCode (cname = "alpm_db_get_servers")] get;
|
||||
[CCode (cname = "alpm_db_set_servers")] set;
|
||||
}
|
||||
|
||||
public unowned Alpm.List<unowned Package?> pkgcache {
|
||||
public unowned Alpm.List<unowned Package> pkgcache {
|
||||
[CCode (cname = "alpm_db_get_pkgcache")] get;
|
||||
}
|
||||
|
||||
public unowned Alpm.List<unowned Group?> groupcache {
|
||||
public unowned Alpm.List<unowned Group> groupcache {
|
||||
[CCode (cname = "alpm_db_get_groupcache")] get;
|
||||
}
|
||||
|
||||
@ -368,7 +371,7 @@ namespace Alpm {
|
||||
|
||||
public unowned Package? get_pkg(string name);
|
||||
public unowned Group? get_group(string name);
|
||||
public Alpm.List<unowned Package?> search(Alpm.List<string> needles);
|
||||
public Alpm.List<unowned Package> search(Alpm.List<string> needles);
|
||||
|
||||
public int check_pgp_signature(out SigList siglist);
|
||||
}
|
||||
@ -440,37 +443,37 @@ namespace Alpm {
|
||||
*/
|
||||
[CCode (cname = "alpm_pkg_set_reason")] set;
|
||||
}
|
||||
public unowned Alpm.List<unowned string?> licenses {
|
||||
public unowned Alpm.List<unowned string> licenses {
|
||||
[CCode (cname = "alpm_pkg_get_licenses")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned string?> groups {
|
||||
public unowned Alpm.List<unowned string> groups {
|
||||
[CCode (cname = "alpm_pkg_get_groups")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned Depend?> depends {
|
||||
public unowned Alpm.List<unowned Depend> depends {
|
||||
[CCode (cname = "alpm_pkg_get_depends")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned Depend?> optdepends {
|
||||
public unowned Alpm.List<unowned Depend> optdepends {
|
||||
[CCode (cname = "alpm_pkg_get_optdepends")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned Depend?> conflicts {
|
||||
public unowned Alpm.List<unowned Depend> conflicts {
|
||||
[CCode (cname = "alpm_pkg_get_conflicts")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned Depend?> provides {
|
||||
public unowned Alpm.List<unowned Depend> provides {
|
||||
[CCode (cname = "alpm_pkg_get_provides")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned string?> deltas {
|
||||
public unowned Alpm.List<unowned string> deltas {
|
||||
[CCode (cname = "alpm_pkg_get_deltas")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned Depend?> replaces {
|
||||
public unowned Alpm.List<unowned Depend> replaces {
|
||||
[CCode (cname = "alpm_pkg_get_replaces")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned File?> files {
|
||||
[CCode (cname = "alpm_pkg_get_files_list")] get;
|
||||
public unowned FileList files {
|
||||
[CCode (cname = "alpm_pkg_get_files")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned string?> unused_deltas {
|
||||
public unowned Alpm.List<unowned string> unused_deltas {
|
||||
[CCode (cname = "alpm_pkg_unused_deltas")] get;
|
||||
}
|
||||
public unowned Alpm.List<unowned Backup?> backups {
|
||||
public unowned Alpm.List<unowned Backup> backups {
|
||||
[CCode (cname = "alpm_pkg_get_backup")] get;
|
||||
}
|
||||
public unowned DB? db {
|
||||
@ -528,8 +531,8 @@ namespace Alpm {
|
||||
public int checkmd5sum();
|
||||
public int has_scriptlet();
|
||||
|
||||
public Alpm.List<string?> compute_requiredby();
|
||||
public Alpm.List<string?> compute_optionalfor();
|
||||
public Alpm.List<string> compute_requiredby();
|
||||
public Alpm.List<string> compute_optionalfor();
|
||||
|
||||
[CCode (cname = "alpm_sync_newversion")]
|
||||
public unowned Package? sync_newversion(Alpm.List<DB> dbs);
|
||||
@ -613,13 +616,15 @@ namespace Alpm {
|
||||
|
||||
/** Package group */
|
||||
[CCode (cname = "alpm_group_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Group {
|
||||
public string name;
|
||||
public unowned Alpm.List<unowned Package?> packages;
|
||||
public unowned Alpm.List<unowned Package> packages;
|
||||
}
|
||||
|
||||
/** Package upgrade delta */
|
||||
[CCode (cname = "alpm_delta_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Delta {
|
||||
/** filename of the delta patch */
|
||||
public string delta;
|
||||
@ -637,6 +642,7 @@ namespace Alpm {
|
||||
|
||||
/** File in a package */
|
||||
[CCode (cname = "alpm_file_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class File {
|
||||
public string name;
|
||||
public uint64 size;
|
||||
@ -645,10 +651,15 @@ namespace Alpm {
|
||||
|
||||
/** Package filelist container */
|
||||
[CCode (cname = "alpm_filelist_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class FileList {
|
||||
// Usage:
|
||||
// Alpm.File* files = filelist.files;
|
||||
// for (size_t i = 0; i < filelist.count; i++, files++) {
|
||||
// stdout.printf("%s\n", files->name);
|
||||
// }
|
||||
public size_t count;
|
||||
[CCode (array_length_cname = "count", array_length_type = "size_t")]
|
||||
public unowned Alpm.File[] files;
|
||||
public Alpm.File* files;
|
||||
/** Determines whether a package filelist contains a given path.
|
||||
* The provided path should be relative to the install root with no leading
|
||||
* slashes, e.g. "etc/localtime". When searching for directories, the path must
|
||||
@ -662,6 +673,7 @@ namespace Alpm {
|
||||
|
||||
/** Local package or package file backup entry */
|
||||
[CCode (cname = "alpm_backup_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Backup {
|
||||
public string name;
|
||||
public string hash;
|
||||
@ -669,6 +681,7 @@ namespace Alpm {
|
||||
|
||||
namespace Signature {
|
||||
[CCode (cname = "alpm_pgpkey_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class PGPKey {
|
||||
public void *data;
|
||||
public string fingerprint;
|
||||
@ -687,6 +700,7 @@ namespace Alpm {
|
||||
* signature.
|
||||
*/
|
||||
[CCode (cname = "alpm_sigresult_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Result {
|
||||
public PGPKey key;
|
||||
public Status status;
|
||||
@ -865,12 +879,14 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_any_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Any {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_package_operation_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class PackageOperation {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -883,6 +899,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_optdep_removal_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class OptDepRemoval {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -893,6 +910,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_delta_patch_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class DeltaPatch {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -901,6 +919,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_scriptlet_info_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class ScriptletInfo {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -909,6 +928,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_database_missing_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class DatabaseMissing {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -917,6 +937,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_pkgdownload_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class PkgDownload {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -925,6 +946,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_pacnew_created_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class PacnewCreated {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -939,6 +961,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_pacsave_created_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class PacsaveCreated {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -949,6 +972,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_hook_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Hook {
|
||||
/** Type of event.*/
|
||||
public Type type;
|
||||
@ -957,6 +981,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_event_hook_run_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class HookRun {
|
||||
/** Type of event.*/
|
||||
public Type type;
|
||||
@ -975,6 +1000,7 @@ namespace Alpm {
|
||||
* typecast the pointer to the right structure, or use the union field, in order
|
||||
* to access event-specific data. */
|
||||
[CCode (cname = "alpm_event_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Data {
|
||||
/** Type of event. */
|
||||
public Type type;
|
||||
@ -1054,6 +1080,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_question_any_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Any {
|
||||
/** Type of question. */
|
||||
public Type type;
|
||||
@ -1062,6 +1089,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_question_install_ignorepkg_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class InstallIgnorePkg {
|
||||
/** Type of question. */
|
||||
public Type type;
|
||||
@ -1072,6 +1100,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_question_replace_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Replace {
|
||||
/** Type of question. */
|
||||
public Type type;
|
||||
@ -1086,6 +1115,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_question_conflict_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Conflict {
|
||||
/** Type of question. */
|
||||
public Type type;
|
||||
@ -1096,6 +1126,7 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_question_corrupted_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Corrupted {
|
||||
/** Type of question. */
|
||||
public Type type;
|
||||
@ -1108,28 +1139,31 @@ namespace Alpm {
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_question_remove_pkgs_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class RemovePkgs {
|
||||
/** Type of question. */
|
||||
public Type type;
|
||||
/** Answer: whether or not to skip packages. */
|
||||
public int skip;
|
||||
/** List of alpm_pkg_t* with unresolved dependencies. */
|
||||
public unowned Alpm.List<unowned Package?> packages;
|
||||
public unowned Alpm.List<unowned Package> packages;
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_question_select_provider_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class SelectProvider {
|
||||
/** Type of question. */
|
||||
public Type type;
|
||||
/** Answer: which provider to use (index from providers). */
|
||||
public int use_index;
|
||||
/** List of alpm_pkg_t* as possible providers. */
|
||||
public unowned Alpm.List<unowned Package?> providers;
|
||||
public unowned Alpm.List<unowned Package> providers;
|
||||
/** What providers provide for. */
|
||||
public unowned Depend depend;
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_question_import_key_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class ImportKey {
|
||||
/** Type of question. */
|
||||
public Type type;
|
||||
@ -1144,6 +1178,7 @@ namespace Alpm {
|
||||
* typecast the pointer to the right structure, or use the union field, in order
|
||||
* to access question-specific data. */
|
||||
[CCode (cname = "alpm_question_t", has_type_id = false)]
|
||||
[Compact]
|
||||
public class Data {
|
||||
public Type type;
|
||||
// Any any;
|
||||
@ -1179,12 +1214,12 @@ namespace Alpm {
|
||||
[CCode (cname = "remove_pkgs.skip")]
|
||||
public int remove_pkgs_skip;
|
||||
[CCode (cname = "remove_pkgs.packages")]
|
||||
public unowned Alpm.List<unowned Package?> remove_pkgs_packages;
|
||||
public unowned Alpm.List<unowned Package> remove_pkgs_packages;
|
||||
// SelectProvider select_provider;
|
||||
[CCode (cname = "select_provider.use_index")]
|
||||
public int select_provider_use_index;
|
||||
[CCode (cname = "select_provider.providers")]
|
||||
public unowned Alpm.List<unowned Package?> select_provider_providers;
|
||||
public unowned Alpm.List<unowned Package> select_provider_providers;
|
||||
[CCode (cname = "select_provider.depend")]
|
||||
public unowned Depend select_provider_depend;
|
||||
// ImportKey import_key;
|
||||
@ -1348,24 +1383,25 @@ namespace Alpm {
|
||||
GPGME
|
||||
}
|
||||
|
||||
[CCode (cname = "alpm_list_t", cprefix = "alpm_list_", cheader_filename = "alpm_list.h,alpm-util.h",
|
||||
[CCode (cname = "alpm_list_t", cprefix = "alpm_list_", cheader_filename = "alpm_list.h",
|
||||
dup_function = "alpm_list_copy", free_function = "alpm_list_free")]
|
||||
[Compact]
|
||||
public class List<G> {
|
||||
|
||||
public List ();
|
||||
|
||||
/* comparator */
|
||||
[CCode (cname = "alpm_list_fn_cmp", has_target = false)]
|
||||
public delegate int CompareFunc<G>(G a, G b);
|
||||
/* deallocator */
|
||||
[CCode (cname = "alpm_list_fn_free", has_target = false)]
|
||||
public delegate void FreeFunc<G>(G a);
|
||||
|
||||
/* properties */
|
||||
public size_t length {
|
||||
[CCode (cname = "alpm_list_count")] get;
|
||||
}
|
||||
public unowned G? data {
|
||||
[CCode (cname = "alpm_list_get_data")] get;
|
||||
}
|
||||
|
||||
/* field */
|
||||
public G data;
|
||||
|
||||
/* item mutators */
|
||||
[ReturnsModifiedPointer ()]
|
||||
@ -1374,42 +1410,32 @@ namespace Alpm {
|
||||
[ReturnsModifiedPointer ()]
|
||||
public void join(owned List<G> list);
|
||||
|
||||
[CCode (cname = "alpm_list_msort", has_target = false)]
|
||||
[ReturnsModifiedPointer ()]
|
||||
public void sort(CompareFunc fn);
|
||||
public void sort(size_t n, CompareFunc fn);
|
||||
|
||||
[ReturnsModifiedPointer ()]
|
||||
public void remove(G data, CompareFunc fn, out G removed_data );
|
||||
|
||||
/* free the internal data of this */
|
||||
public void free_data();
|
||||
public void free_inner(FreeFunc fn);
|
||||
|
||||
public List<unowned G> copy();
|
||||
public List<G> copy_data();
|
||||
|
||||
[ReturnsModifiedPointer ()]
|
||||
public void reverse ();
|
||||
|
||||
/* item accessors */
|
||||
public unowned List<G>? first();
|
||||
public unowned List<G>? last();
|
||||
public unowned List<G>? nth(size_t index);
|
||||
public unowned List<G>? next();
|
||||
public unowned List<G>? previous();
|
||||
public unowned List<G> nth(size_t index);
|
||||
[ReturnsModifiedPointer ()]
|
||||
public void next();
|
||||
|
||||
/* misc */
|
||||
public unowned G? find(G needle, CompareFunc fn);
|
||||
public unowned G find(G needle, CompareFunc fn);
|
||||
public unowned string? find_str(string needle);
|
||||
|
||||
/** @return a list containing all items in `this` not present in `list` */
|
||||
public List<unowned G>? diff(List<G>? list, CompareFunc fn);
|
||||
|
||||
/* iterator */
|
||||
public Iterator<G> iterator();
|
||||
|
||||
[CCode (cname = "alpm_list_iterator_t", cprefix = "alpm_list_iterator_")]
|
||||
public struct Iterator<G> {
|
||||
public unowned G? next_value();
|
||||
}
|
||||
public List<unowned G> diff(List<G> list, CompareFunc fn);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user