diff --git a/gui/manager.glade b/gui/manager.glade index 5c17e55..6e36cd1 100644 --- a/gui/manager.glade +++ b/gui/manager.glade @@ -63,6 +63,8 @@ search_list False False + False + False browse @@ -114,7 +116,7 @@ False False False - 0 + False browse @@ -161,6 +163,8 @@ state_list False False + False + False browse @@ -208,6 +212,8 @@ repos_list False False + False + False browse @@ -364,7 +370,7 @@ False True False - 0 + False @@ -620,13 +626,10 @@ False - 5 - 5 + 3 True center-on-parent - 350 - 250 /usr/share/pamac/icons/22x22/status/package-info.png dialog True @@ -637,7 +640,7 @@ True False vertical - 4 + 3 True @@ -653,7 +656,7 @@ True - True + False True True in @@ -723,9 +726,6 @@ True False - 7 - 7 - 9 7 True end @@ -734,7 +734,9 @@ gtk-cancel True True - True + True + True + False True @@ -749,7 +751,7 @@ gtk-ok True True - True + False True diff --git a/pamac-install b/pamac-install index e07b9b3..db0df04 100755 --- a/pamac-install +++ b/pamac-install @@ -53,6 +53,7 @@ bus.add_signal_receiver(error, dbus_interface = "org.manjaro.pamac", signal_name loop = GObject.MainLoop() +transaction.get_handle() transaction.update_db() do_syncfirst, updates = transaction.get_updates() diff --git a/pamac-tray b/pamac-tray index d9ac06c..d9cfc86 100755 --- a/pamac-tray +++ b/pamac-tray @@ -3,7 +3,7 @@ from gi.repository import Gtk, GObject from subprocess import Popen -from pamac import common, transaction +from pamac import transaction import dbus import threading diff --git a/pamac/main.py b/pamac/main.py index 0c754fd..69fa73b 100644 --- a/pamac/main.py +++ b/pamac/main.py @@ -285,12 +285,12 @@ def refresh_packages_list(): if transaction.localpkgs.__contains__(name): packages_list.append([name, True, False, True, installed_icon, common.format_size(transaction.localpkgs[name].isize), transaction.localpkgs[name].isize]) elif name in transaction_dict.keys(): - packages_list.append([name, False, True, True, to_install_icon, common.format_size(transaction.syncpkgs[name].size), transaction.syncpkgs[name].size]) + packages_list.append([name, False, True, True, to_install_icon, common.format_size(transaction.syncpkgs[name].isize), transaction.syncpkgs[name].isize]) else: - packages_list.append([name, False, True, False, uninstalled_icon, common.format_size(transaction.syncpkgs[name].size), transaction.syncpkgs[name].size]) + packages_list.append([name, False, True, False, uninstalled_icon, common.format_size(transaction.syncpkgs[name].isize), transaction.syncpkgs[name].isize]) elif transaction_type is "remove": if not transaction.localpkgs.__contains__(name): - packages_list.append([name, False, False, False, uninstalled_icon, common.format_size(transaction.syncpkgs[name].size), transaction.syncpkgs[name].size]) + packages_list.append([name, False, False, False, uninstalled_icon, common.format_size(transaction.syncpkgs[name].isize), transaction.syncpkgs[name].isize]) elif name in transaction_dict.keys(): packages_list.append([name, True, True, False, to_remove_icon, common.format_size(transaction.localpkgs[name].isize), transaction.localpkgs[name].isize]) else: @@ -298,7 +298,7 @@ def refresh_packages_list(): elif transaction.localpkgs.__contains__(name): packages_list.append([name, True, True, True, installed_icon, common.format_size(transaction.localpkgs[name].isize), transaction.localpkgs[name].isize]) else: - packages_list.append([name, False, True, False, uninstalled_icon, common.format_size(transaction.syncpkgs[name].size), transaction.syncpkgs[name].size]) + packages_list.append([name, False, True, False, uninstalled_icon, common.format_size(transaction.syncpkgs[name].isize), transaction.syncpkgs[name].isize]) def set_packages_list(): if current_filter[0] == 'search': @@ -349,16 +349,15 @@ def set_desc(pkg, style): package_desc.append(['Conflicts With:', ' '.join(pkg.conflicts)]) package_desc.append(['Replaces:', ' '.join(pkg.replaces)]) if style == 'sync': - package_desc.append(['Download Size:', common.format_size(pkg.size)]) - if style == 'file': package_desc.append(['Compressed Size:', common.format_size(pkg.size)]) - package_desc.append(['Installed Size:', common.format_size(pkg.isize)]) + package_desc.append(['Download Size:', common.format_size(pkg.download_size)]) + if style == 'local': + package_desc.append(['Installed Size:', common.format_size(pkg.isize)]) package_desc.append(['Packager:', pkg.packager]) package_desc.append(['Architecture:', pkg.arch]) - package_desc.append(['Build Date:', strftime("%a %d %b %Y %X %Z", localtime(pkg.builddate))]) - + #package_desc.append(['Build Date:', strftime("%a %d %b %Y %X %Z", localtime(pkg.builddate))]) if style == 'local': - package_desc.append(['Install Date:', strftime("%a %d %b %Y %X %Z", localtime(pkg.installdate))]) + #package_desc.append(['Install Date:', strftime("%a %d %b %Y %X %Z", localtime(pkg.installdate))]) if pkg.reason == pyalpm.PKG_REASON_EXPLICIT: reason = 'Explicitly installed' elif pkg.reason == pyalpm.PKG_REASON_DEPEND: @@ -366,18 +365,17 @@ def set_desc(pkg, style): else: reason = 'N/A' package_desc.append(['Install Reason:', reason]) - if style != 'sync': - package_desc.append(['Install Script:', 'Yes' if pkg.has_scriptlet else 'No']) if style == 'sync': - package_desc.append(['MD5 Sum:', pkg.md5sum]) - package_desc.append(['SHA256 Sum:', pkg.sha256sum]) + #package_desc.append(['Install Script:', 'Yes' if pkg.has_scriptlet else 'No']) + #package_desc.append(['MD5 Sum:', pkg.md5sum]) + #package_desc.append(['SHA256 Sum:', pkg.sha256sum]) package_desc.append(['Signatures:', 'Yes' if pkg.base64_sig else 'No']) - if style == 'local': if len(pkg.backup) == 0: package_desc.append(['Backup files:', '']) else: - package_desc.append(['Backup files:', '\n'.join(["%s %s" % (md5, file) for (file, md5) in pkg.backup])]) + #package_desc.append(['Backup files:', '\n'.join(["%s %s" % (md5, file) for (file, md5) in pkg.backup])]) + package_desc.append(['Backup files:', '\n'.join(["%s" % (file) for (file, md5) in pkg.backup])]) def set_transaction_sum(): transaction_sum.clear() @@ -437,10 +435,9 @@ def handle_error(error): transaction.to_remove = [] transaction_dict.clear() transaction_type = None + transaction.get_handle() transaction.update_db() - get_repos() - get_groups() - set_packages_list() + refresh_packages_list() if mode == 'updater': have_updates() @@ -463,12 +460,11 @@ def handle_reply(reply): transaction.to_add = [] transaction.to_remove = [] transaction_dict.clear() + transaction.get_handle() transaction.update_db() - get_repos() - get_groups() if (transaction_type == "install") or (transaction_type == "remove"): transaction_type = None - set_packages_list() + refresh_packages_list() else: transaction_type = None if have_updates(): @@ -1009,6 +1005,9 @@ def main(_mode): mode = _mode interface.connect_signals(Handler()) do_refresh() + transaction.get_handle() + get_groups() + get_repos() if mode == 'manager': ManagerWindow.show_all() if mode == 'updater': diff --git a/pamac/transaction.py b/pamac/transaction.py index e13ed39..4f396b2 100644 --- a/pamac/transaction.py +++ b/pamac/transaction.py @@ -33,7 +33,7 @@ def get_handle(): print('get handle') def update_db(): - get_handle() + #get_handle() global syncpkgs global localpkgs syncpkgs = OrderedDict()