Delete profiles from data directory

This commit is contained in:
Kiooeht 2011-11-30 15:45:50 -08:00
parent 092554e3d7
commit 4d129ac943

View file

@ -7,6 +7,8 @@ from dataobjs import pesterQuirk, PesterProfile
from memos import TimeSlider, TimeInput from memos import TimeSlider, TimeInput
from version import _pcVersion from version import _pcVersion
_datadir = ostools.getDataDir()
class PesterQuirkItem(QtGui.QTreeWidgetItem): class PesterQuirkItem(QtGui.QTreeWidgetItem):
def __init__(self, quirk): def __init__(self, quirk):
parent = None parent = None
@ -890,7 +892,7 @@ class PesterChooseProfile(QtGui.QDialog):
ret = msgbox.exec_() ret = msgbox.exec_()
if ret == QtGui.QMessageBox.Ok: if ret == QtGui.QMessageBox.Ok:
try: try:
remove("profiles/%s.js" % (handle)) remove(_datadir+"profiles/%s.js" % (handle))
except OSError: except OSError:
problem = QtGui.QMessageBox() problem = QtGui.QMessageBox()
problem.setStyleSheet(self.theme["main/defaultwindow/style"]) problem.setStyleSheet(self.theme["main/defaultwindow/style"])