summaryrefslogtreecommitdiff
path: root/src/frontend/gui/sisyphus-gui.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-09-17 20:56:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-09-17 20:56:22 +0100
commit76065a9f0fd1038c8bf92621fe393b98e12ceb9f (patch)
tree43a199b850fdef5e3906f320fa9833befef03632 /src/frontend/gui/sisyphus-gui.py
parentce62002d054f20032cc7356e1f718b1a3bd65936 (diff)
sisyphus-gui : don't execute(install/remove) anything if no package is selected, and warn user about it
Diffstat (limited to 'src/frontend/gui/sisyphus-gui.py')
-rwxr-xr-xsrc/frontend/gui/sisyphus-gui.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py
index b13b11b..49a153c 100755
--- a/src/frontend/gui/sisyphus-gui.py
+++ b/src/frontend/gui/sisyphus-gui.py
@@ -75,12 +75,13 @@ class Sisyphus(QtWidgets.QMainWindow):
def packageInstall(self):
indexes = self.database.selectionModel().selectedRows(1)
if len(indexes) == 0:
- print('Please select at least one package!!!')
- Sisyphus.PKGLIST = []
- for index in sorted(indexes):
- Sisyphus.PKGLIST.append(index.data())
- self.showProgressBar()
- self.installThread.start()
+ self.input.setText("Please select at least one package!!!")
+ else:
+ Sisyphus.PKGLIST = []
+ for index in sorted(indexes):
+ Sisyphus.PKGLIST.append(index.data())
+ self.showProgressBar()
+ self.installThread.start()
def finishedInstall(self):
self.hideProgressBar()
@@ -88,12 +89,13 @@ class Sisyphus(QtWidgets.QMainWindow):
def packageUninstall(self):
indexes = self.database.selectionModel().selectedRows(1)
if len(indexes) == 0:
- print('Please select at least one package!!!')
- Sisyphus.PKGLIST = []
- for index in sorted(indexes):
- Sisyphus.PKGLIST.append(index.data())
- self.showProgressBar()
- self.uninstallThread.start()
+ self.input.setText("Please select at least one package!!!")
+ else:
+ Sisyphus.PKGLIST = []
+ for index in sorted(indexes):
+ Sisyphus.PKGLIST.append(index.data())
+ self.showProgressBar()
+ self.uninstallThread.start()
def finishedUninstall(self):
self.hideProgressBar()