Verified Kaydet (Commit) 1e0418dc authored tarafından Erdem Ersoy's avatar Erdem Ersoy

Fix "Update All" menu item function

üst 529144dd
...@@ -70,10 +70,8 @@ class UpdateAllWindow(object): ...@@ -70,10 +70,8 @@ class UpdateAllWindow(object):
self.FlatpakTransaction.set_no_deploy(False) self.FlatpakTransaction.set_no_deploy(False)
self.FlatpakTransaction.set_no_pull(False) self.FlatpakTransaction.set_no_pull(False)
for ref_to_update in self.RefsToUpdate: for ref_to_update in self.RefsToUpdate:
self.FlatpakTransaction.add_update( ref_str = ref_to_update.format_ref()
ref_to_update, self.FlatpakTransaction.add_update(ref_str, None, None)
None,
None)
self.TreeModel = tree_model self.TreeModel = tree_model
self.HeaderBarShowButton = show_button self.HeaderBarShowButton = show_button
...@@ -200,7 +198,8 @@ class UpdateAllWindow(object): ...@@ -200,7 +198,8 @@ class UpdateAllWindow(object):
for updated_ref in self.RefsToUpdate: for updated_ref in self.RefsToUpdate:
if updated_ref.get_name() == operation_ref_real_name and \ if updated_ref.get_name() == operation_ref_real_name and \
updated_ref.get_arch() == operation_ref_arch and \ updated_ref.get_arch() == operation_ref_arch and \
updated_ref.get_branch() == operation_ref_branch: updated_ref.get_branch() == operation_ref_branch and \
updated_ref.get_kind() == Flatpak.RefKind.APP:
updated_ref_real_name = updated_ref.get_name() updated_ref_real_name = updated_ref.get_name()
updated_ref_arch = updated_ref.get_arch() updated_ref_arch = updated_ref.get_arch()
updated_ref_branch = updated_ref.get_branch() updated_ref_branch = updated_ref.get_branch()
...@@ -216,19 +215,26 @@ class UpdateAllWindow(object): ...@@ -216,19 +215,26 @@ class UpdateAllWindow(object):
tree_iter = self.TreeModel.get_model().get_iter_first() tree_iter = self.TreeModel.get_model().get_iter_first()
while tree_iter: while tree_iter:
GLib.idle_add(self.TreeModel.set_row, real_name = self.TreeModel.get_value(tree_iter, 0)
tree_iter, [updated_ref_real_name, arch = self.TreeModel.get_value(tree_iter, 1)
updated_ref_arch, branch = self.TreeModel.get_value(tree_iter, 2)
updated_ref_branch, if real_name == updated_ref_real_name and \
updated_ref_remote, arch == updated_ref_arch and \
installed_size_mib_str, branch == updated_ref_branch:
download_size_mib_str, GLib.idle_add(self.TreeModel.set_row,
name], tree_iter, [updated_ref_real_name,
priority=GLib.PRIORITY_DEFAULT) updated_ref_arch,
time.sleep(0.2) updated_ref_branch,
updated_ref_remote,
self.TreeModel.refilter() installed_size_mib_str,
time.sleep(0.3) download_size_mib_str,
name],
priority=GLib.PRIORITY_DEFAULT)
time.sleep(0.2)
self.TreeModel.refilter()
time.sleep(0.3)
tree_iter = self.TreeModel.iter_next(tree_iter)
def update_all_progress_callback_error(self, transaction, operation, error, details): def update_all_progress_callback_error(self, transaction, operation, error, details):
ref_to_update_all = Flatpak.Ref.parse(operation.get_ref()) ref_to_update_all = Flatpak.Ref.parse(operation.get_ref())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment