def deleteThemeBtnClicked(self, pressed):
msg = QtWidgets.QMessageBox()
msg.setIcon(QtWidgets.QMessageBox.Warning)
msg.setText("Would you like to delete theme <b>"+self.themeCmb.currentText()+"</b> ?")
msg.setWindowTitle("Delete Theme Confirmation")
msg.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
retval = msg.exec_()
if retval == QtWidgets.QMessageBox.Yes:
themepath = os.path.join(os.getenv("HOME"),".local/share/plasma/desktoptheme/")
themepath = os.path.join(themepath, str(self.themeCmb.currentText()) )
if os.path.isdir(themepath):
shutil.rmtree(themepath)
self.updateThemeCmb("")
评论列表
文章目录