Skip to content

Commit

Permalink
fix[close #246] Opening modal of default programs works only the firs…
Browse files Browse the repository at this point in the history
…t time
  • Loading branch information
mirkobrombin committed Dec 26, 2023
1 parent b510e6a commit 4957f65
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions vanilla_first_setup/defaults/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ def __build_ui(self):
selection_dialogs = []
_index = 0

def present_customize(widget, dialog, apps_list, item):
def present_customize(_, dialog, apps_list, item):
for app in item["applications"]:
try:
apps_list.remove(app["apps_action_row"])
except KeyError:
pass
# use flatpak as default if no package manager is selected
package_manager = "flatpak"

if app.get("apps_action_row", None) is not None:
apps_list.remove(app["apps_action_row"])
else:
try:
if self.__window.builder.get_temp_finals("packages")["vars"][
"flatpak"
Expand All @@ -70,8 +71,8 @@ def present_customize(widget, dialog, apps_list, item):
else:
continue
except TypeError:
# use flatpak as default
package_manager = "flatpak"
pass

try:
if app[package_manager]:
_apps_action_row = Adw.ActionRow(
Expand Down

0 comments on commit 4957f65

Please sign in to comment.