another fix

This commit is contained in:
guinux 2013-10-23 16:42:52 +02:00
parent 1047cc97e5
commit 18b0395f1f

View File

@ -163,13 +163,21 @@ def get_state_list(state):
global states_dict global states_dict
if state == _('To install'): if state == _('To install'):
liststore = Gtk.ListStore(object) liststore = Gtk.ListStore(object)
for pkg in transaction.to_add: for name in transaction.to_add:
liststore.append([pkg]) pkg = transaction.get_localpkg(name)
if pkg:
liststore.append([pkg])
else:
pkg = transaction.get_syncpkg(name)
if pkg:
liststore.append([pkg])
return liststore return liststore
elif state == _('To remove'): elif state == _('To remove'):
liststore = Gtk.ListStore(object) liststore = Gtk.ListStore(object)
for pkg in transaction.to_remove: for name in transaction.to_remove:
liststore.append([pkg]) pkg = transaction.get_localpkg(name)
if pkg:
liststore.append([pkg])
return liststore return liststore
elif state in states_dict.keys(): elif state in states_dict.keys():
return states_dict[state] return states_dict[state]