mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Added dialog to config
This commit is contained in:
parent
a68321b270
commit
9428461a65
3 changed files with 17 additions and 6 deletions
|
@ -18,10 +18,14 @@ class DialogBox:
|
|||
self.d = Dialog(dialog="dialog")
|
||||
self.d.set_background_title(f'{self.configs.prog_name} {Version().version}')
|
||||
|
||||
def checklist(self, text, title, height, width, list_height, choices):
|
||||
def checklist(self, text, title, height, width, list_height, choices, packages):
|
||||
""" Choose packages for upgrade. """
|
||||
|
||||
code, tags = self.d.checklist(text, title=title, height=height, width=width,
|
||||
list_height=list_height, choices=choices)
|
||||
if self.configs.dialog:
|
||||
code, tags = self.d.checklist(text, title=title, height=height, width=width,
|
||||
list_height=list_height, choices=choices)
|
||||
else:
|
||||
code = False
|
||||
tags = packages
|
||||
|
||||
return code, tags
|
||||
|
|
|
@ -89,9 +89,13 @@ class Slackbuilds:
|
|||
|
||||
text = f'There are {len(choices)} dependencies:'
|
||||
|
||||
code, tags = self.dialog.checklist(text, title, height, width, list_height, choices)
|
||||
code, tags = self.dialog.checklist(text, title, height, width, list_height, choices, dependencies)
|
||||
|
||||
os.system('clear')
|
||||
if not code:
|
||||
return dependencies
|
||||
|
||||
if tags:
|
||||
os.system('clear')
|
||||
return tags
|
||||
|
||||
def creating_main_for_build(self):
|
||||
|
|
|
@ -64,7 +64,10 @@ class Upgrade:
|
|||
|
||||
text = f'There are {len(choices)} packages for upgrade:'
|
||||
|
||||
code, tags = self.dialog.checklist(text, title, height, width, list_height, choices)
|
||||
code, tags = self.dialog.checklist(text, title, height, width, list_height, choices, packages)
|
||||
|
||||
if not code:
|
||||
return packages
|
||||
|
||||
os.system('clear')
|
||||
if code == 'ok':
|
||||
|
|
Loading…
Reference in a new issue