Delete profiles from data directory
This commit is contained in:
parent
092554e3d7
commit
4d129ac943
1 changed files with 3 additions and 1 deletions
4
menus.py
4
menus.py
|
@ -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"])
|
||||||
|
|
Loading…
Reference in a new issue