Skip to content

Commit

Permalink
feat:[#296] Disable advanced button if there are no advanced options
Browse files Browse the repository at this point in the history
  • Loading branch information
muhdsalm authored and taukakao committed Jun 19, 2024
1 parent 8287220 commit ea85e2c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions vanilla_first_setup/defaults/welcome.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import time
from gi.repository import Gtk, GLib, Adw
from vanilla_first_setup.utils.recipe import RecipeLoader

from vanilla_first_setup.utils.run_async import RunAsync

Expand Down Expand Up @@ -66,12 +67,24 @@ class VanillaDefaultWelcome(Adw.Bin):
"സ്വാഗതം",
]

def validate_advanced(self):
recipeLoader = RecipeLoader()
for i in recipeLoader.raw["steps"].items():
try:
if i[1]["is-advanced"] == True:
return
except:
pass

self.btn_advanced.set_sensitive(False)

def __init__(self, window, distro_info, key, step, **kwargs):
super().__init__(**kwargs)
self.__window = window
self.__distro_info = distro_info
self.__key = key
self.__step = step
self.validate_advanced()

# animation start
self.__start_welcome_animation()
Expand Down

0 comments on commit ea85e2c

Please sign in to comment.