mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Switch to dialog_box
This commit is contained in:
parent
dedb19689c
commit
dc2db730d2
1 changed files with 10 additions and 7 deletions
|
@ -5,8 +5,8 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
|
||||||
from dialog import Dialog
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from slpkg.dialog_box import DialogBox
|
||||||
|
|
||||||
from slpkg.downloader import Wget
|
from slpkg.downloader import Wget
|
||||||
from slpkg.checksum import Md5sum
|
from slpkg.checksum import Md5sum
|
||||||
|
@ -14,7 +14,6 @@ from slpkg.configs import Configs
|
||||||
from slpkg.queries import SBoQueries
|
from slpkg.queries import SBoQueries
|
||||||
from slpkg.utilities import Utilities
|
from slpkg.utilities import Utilities
|
||||||
from slpkg.dependencies import Requires
|
from slpkg.dependencies import Requires
|
||||||
from slpkg.views.version import Version
|
|
||||||
from slpkg.views.views import ViewMessage
|
from slpkg.views.views import ViewMessage
|
||||||
from slpkg.models.models import LogsDependencies
|
from slpkg.models.models import LogsDependencies
|
||||||
from slpkg.models.models import session as Session
|
from slpkg.models.models import session as Session
|
||||||
|
@ -29,9 +28,8 @@ class Slackbuilds:
|
||||||
self.install = install
|
self.install = install
|
||||||
self.session = Session
|
self.session = Session
|
||||||
self.utils = Utilities()
|
self.utils = Utilities()
|
||||||
|
self.dialog = DialogBox()
|
||||||
self.configs = Configs
|
self.configs = Configs
|
||||||
self.d = Dialog(dialog="dialog")
|
|
||||||
self.d.set_background_title(f'{self.configs.prog_name} {Version().version}')
|
|
||||||
self.install_order = []
|
self.install_order = []
|
||||||
self.dependencies = []
|
self.dependencies = []
|
||||||
self.sbos = {}
|
self.sbos = {}
|
||||||
|
@ -79,15 +77,20 @@ class Slackbuilds:
|
||||||
|
|
||||||
def choose_dependencies(self, dependencies):
|
def choose_dependencies(self, dependencies):
|
||||||
""" Choose packages for upgrade. """
|
""" Choose packages for upgrade. """
|
||||||
|
height = 10
|
||||||
|
width = 70
|
||||||
|
list_height = 0
|
||||||
choices = []
|
choices = []
|
||||||
|
title = ' Uncheck dependencies if you want to remove '
|
||||||
|
|
||||||
for package in dependencies:
|
for package in dependencies:
|
||||||
repo_ver = SBoQueries(package).version()
|
repo_ver = SBoQueries(package).version()
|
||||||
choices += [(package, repo_ver, True)]
|
choices += [(package, repo_ver, True)]
|
||||||
|
|
||||||
code, tags = self.d.checklist(f'There are {len(choices)} dependencies:',
|
text = f'There are {len(choices)} dependencies:'
|
||||||
title=' Uncheck dependencies if you want to remove ',
|
|
||||||
height=10, width=70, list_height=0, choices=choices)
|
code, tags = self.dialog.checklist(text, title, height, width, list_height, choices)
|
||||||
|
|
||||||
os.system('clear')
|
os.system('clear')
|
||||||
return tags
|
return tags
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue