[Uludag-commits] r16223 - trunk/tasma/display-config/src
uludag-commits at pardus.org.tr
uludag-commits at pardus.org.tr
4 Ara 2007 Sal 10:27:47 EET
Author: fatih
Date: Tue Dec 4 10:27:47 2007
New Revision: 16223
Modified:
trunk/tasma/display-config/src/mainview.py
Log:
Do not use sys.exit as it causes tasma to exit also
Modified: trunk/tasma/display-config/src/mainview.py
=================================================================
--- trunk/tasma/display-config/src/mainview.py (original)
+++ trunk/tasma/display-config/src/mainview.py Tue Dec 4 10:27:47 2007
@@ -43,6 +43,10 @@
def __init__(self, parent):
QWidget.__init__(self, parent)
+ if not os.access(xorg_conf, os.R_OK):
+ QLabel(i18n("Unable to read configuration."), self)
+ return
+
modeLabel = QLabel(i18n("Resolution:"), self)
modeList = QComboBox(self)
for mode in modes:
@@ -86,7 +90,7 @@
p.parseFile(xorg_conf)
except IOError:
QMessageBox.critical(self, i18n("Error"), i18n("Unable to read configuration."))
- sys.exit(1)
+ return
screenSec = p.getSections("Screen")[0]
depth = screenSec.get("DefaultDepth", 0, 16)
@@ -109,7 +113,7 @@
p.parseFile(xorg_conf)
except IOError:
QMessageBox.critical(self, i18n("Error"), i18n("Unable to read configuration."))
- sys.exit(1)
+ return
mode = str(self.modeList.currentText())
@@ -140,7 +144,6 @@
open(xorg_conf, "w").write(p.toString())
except IOError:
QMessageBox.critical(self, i18n("Error"), i18n("Unable to save configuration."))
- sys.exit(1)
def slotApply(self):
self.writeConfig()
Uludag-commits mesaj listesiyle ilgili
daha fazla bilgi