hot fixes

This commit is contained in:
guinux
2013-02-02 14:02:18 +01:00
parent 1909911197
commit c57bf16d37
9 changed files with 29 additions and 21 deletions

View File

@@ -105,9 +105,9 @@ def check_conflicts():
installed_pkg_name.append(installed_pkg.name)
for target in to_check:
for name in target.replaces:
if common.format_pkg_name(name) in installed_pkg_name:
if not common.format_pkg_name(name) in to_remove:
to_remove.append(common.format_pkg_name(name))
if name in installed_pkg_name:
if not name in to_remove:
to_remove.append(name)
if warning:
warning = warning+'\n'
warning = warning+name+' will be replaced by '+target.name
@@ -120,16 +120,16 @@ def check_conflicts():
if warning:
warning = warning+'\n'
warning = warning+name+' conflicts with '+target.name+'\nNone of them will be installed'
if common.format_pkg_name(name) in installed_pkg_name:
if not common.format_pkg_name(name) in to_remove:
to_remove.append(common.format_pkg_name(name))
if name in installed_pkg_name:
if not name in to_remove:
to_remove.append(name)
if warning:
warning = warning+'\n'
warning = warning+name+' conflicts with '+target.name
for installed_pkg in handle.get_localdb().pkgcache:
for name in installed_pkg.conflicts:
if common.format_pkg_name(name) == target.name:
if not common.format_pkg_name(name) in to_remove:
if name == target.name:
if not name in to_remove:
to_remove.append(installed_pkg.name)
if warning:
warning = warning+'\n'
@@ -137,12 +137,12 @@ def check_conflicts():
for repo in handle.get_syncdbs():
for pkg in repo.pkgcache:
for name in pkg.replaces:
if common.format_pkg_name(name) in installed_pkg_name:
if not common.format_pkg_name(name) in to_remove:
to_remove.append(common.format_pkg_name(name))
if name in installed_pkg_name:
if not name in to_remove:
to_remove.append(name)
if warning:
warning = warning+'\n'
warning = warning+common.format_pkg_name(name)+' will be replaced by '+pkg.name
warning = warning+name+' will be replaced by '+pkg.name
if not pkg.name in to_add:
to_add.append(pkg.name)
if warning:

View File

@@ -5,6 +5,8 @@ from gi.repository import Gtk
from pamac import transaction, updater, manager
already_manager = False
class Tray:
def __init__(self, icon, info):
self.icon = icon
@@ -32,7 +34,13 @@ class Tray:
updater.main()
def execute_manager(self, widget, event, data = None):
manager.main()
global already_manager
if already_manager:
manager.MainWindow.show_all()
print('show')
else:
manager.main()
already_manager = True
def quit_tray(self, widget, data = None):
Gtk.main_quit()