many fixes

This commit is contained in:
guinux
2013-03-18 11:07:58 +01:00
parent 73e1e8d6c0
commit 8a5abb4b47
8 changed files with 200 additions and 88 deletions

View File

@@ -180,11 +180,11 @@ class PamacDBusService(dbus.service.Object):
pass
def CheckUpdates(self):
updates = False
updates = 0
for pkg in config.handle.get_localdb().pkgcache:
candidate = pyalpm.sync_newversion(pkg, config.handle.get_syncdbs())
if candidate:
updates = True
updates += 1
self.EmitAvailableUpdates(updates)
@dbus.service.method('org.manjaro.pamac', '', 's', async_callbacks=('success', 'nosuccess'))
@@ -205,6 +205,8 @@ class PamacDBusService(dbus.service.Object):
self.CheckUpdates()
if self.error:
self.EmitTransactionError(self.error)
else:
self.EmitTransactionDone('')
self.task = Process(target=refresh)
self.task.start()
success('')