mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-16 19:02:32 +12:00
Purging types from welcome
This commit is contained in:
parent
e9fcb967f5
commit
bc8b3027e2
|
@ -25,7 +25,7 @@ class cmbOutlineTypeChoser(QComboBox):
|
|||
|
||||
def updateItems(self):
|
||||
self.clear()
|
||||
types = welcome.defaultTextType()
|
||||
types = []
|
||||
|
||||
for t in types:
|
||||
self.addItem(QIcon.fromTheme(t[2]), t[1], t[0])
|
||||
|
|
|
@ -193,15 +193,6 @@ class welcome(QWidget, Ui_welcome):
|
|||
], "Non-fiction")
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def defaultTextType(cls):
|
||||
return [
|
||||
("t2t", qApp.translate("Welcome", "Txt2Tags"), "text-x-generic"),
|
||||
("html", qApp.translate("Welcome", "Rich Text (html)"), "text-html"),
|
||||
("txt", qApp.translate("Welcome", "Plain Text"), "text-x-generic"),
|
||||
("md", qApp.translate("Welcome", "Multi-Markdown"), "text-x-generic"),
|
||||
]
|
||||
|
||||
def changeTemplate(self, item, column):
|
||||
template = [i for i in self.templates() if i[0] == item.text(0)]
|
||||
self.btnCreate.setText(self.btnCreateText)
|
||||
|
@ -343,11 +334,6 @@ class welcome(QWidget, Ui_welcome):
|
|||
sub = QTreeWidgetItem(item, [f[:-4]])
|
||||
sub.setData(0, Qt.UserRole, f)
|
||||
|
||||
# Populates default text type
|
||||
self.cmbDefaultType.clear()
|
||||
for t in self.defaultTextType():
|
||||
self.cmbDefaultType.addItem(QIcon.fromTheme(t[2]), t[1], t[0])
|
||||
|
||||
self.tree.expandAll()
|
||||
|
||||
def loadDefaultDatas(self):
|
||||
|
@ -403,8 +389,7 @@ class welcome(QWidget, Ui_welcome):
|
|||
self.mw.mdlWorld = worldModel(self.mw)
|
||||
|
||||
root = self.mw.mdlOutline.rootItem
|
||||
_type = self.cmbDefaultType.currentData()
|
||||
settings.defaultTextType = _type
|
||||
_type = "md"
|
||||
|
||||
def addElement(parent, datas):
|
||||
if len(datas) == 2 and datas[1][1] == None or \
|
||||
|
|
|
@ -78,15 +78,6 @@ class Ui_welcome(object):
|
|||
self.btnAddWC.setObjectName("btnAddWC")
|
||||
self.horizontalLayout_2.addWidget(self.btnAddWC)
|
||||
self.templateLayout.addLayout(self.horizontalLayout_2)
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.lblTotal_2 = QtWidgets.QLabel(self.frame_2)
|
||||
self.lblTotal_2.setObjectName("lblTotal_2")
|
||||
self.horizontalLayout_3.addWidget(self.lblTotal_2)
|
||||
self.cmbDefaultType = QtWidgets.QComboBox(self.frame_2)
|
||||
self.cmbDefaultType.setObjectName("cmbDefaultType")
|
||||
self.horizontalLayout_3.addWidget(self.cmbDefaultType)
|
||||
self.templateLayout.addLayout(self.horizontalLayout_3)
|
||||
self.horizontalLayout_23.addLayout(self.templateLayout)
|
||||
self.verticalLayout_32.addLayout(self.horizontalLayout_23)
|
||||
self.line_4 = QtWidgets.QFrame(self.frame_2)
|
||||
|
@ -133,7 +124,6 @@ class Ui_welcome(object):
|
|||
self.tree.setSortingEnabled(__sortingEnabled)
|
||||
self.btnAddLevel.setText(_translate("welcome", "Add level"))
|
||||
self.btnAddWC.setText(_translate("welcome", "Add wordcount"))
|
||||
self.lblTotal_2.setText(_translate("welcome", "Default text type:"))
|
||||
self.chkLoadLastProject.setText(_translate("welcome", "Next time, automatically open last project"))
|
||||
self.btnOpen.setText(_translate("welcome", "Open..."))
|
||||
self.btnRecent.setText(_translate("welcome", "Recent"))
|
||||
|
|
|
@ -190,20 +190,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="lblTotal_2">
|
||||
<property name="text">
|
||||
<string>Default text type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cmbDefaultType"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
Loading…
Reference in a new issue