mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-04 21:12:34 +12:00
Bug and style fixes.
- Made small changes to better fit the style of the project. - Fixed a bug that would result in a crash when details were applied with the bulk info manager. - Improved the Bulk Manager UI by adding the list-add and list-remove icons, to better fit it to Manuskript's style. Also added tooltips.
This commit is contained in:
parent
9b372eac73
commit
863e8df483
|
@ -459,7 +459,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
self.setPersoBulkMode(False)
|
self.setPersoBulkMode(False)
|
||||||
self.tabPersos.setEnabled(True)
|
self.tabPersos.setEnabled(True)
|
||||||
|
|
||||||
def refreshBulkAffectedCharacters(self): #Characters affected by a potential bulk-info modification
|
def refreshBulkAffectedCharacters(self): # Characters affected by a potential bulk-info modification
|
||||||
self.bulkAffectedCharacters = []
|
self.bulkAffectedCharacters = []
|
||||||
for character in self.lstCharacters.currentCharacters():
|
for character in self.lstCharacters.currentCharacters():
|
||||||
self.bulkAffectedCharacters.append(character.name())
|
self.bulkAffectedCharacters.append(character.name())
|
||||||
|
|
|
@ -230,7 +230,7 @@ class characterModel(QAbstractItemModel, searchableModel):
|
||||||
))
|
))
|
||||||
self.endInsertRows()
|
self.endInsertRows()
|
||||||
|
|
||||||
mainWindow().updatePersoInfoView()
|
mainWindow().updatePersoInfoView(mainWindow().tblPersoInfos)
|
||||||
|
|
||||||
def removeCharacterInfo(self, ID):
|
def removeCharacterInfo(self, ID):
|
||||||
c = self.getCharacterByID(ID)
|
c = self.getCharacterByID(ID)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'manuskript\ui\bulkInfoManager.ui'
|
# Form implementation generated from reading ui file 'manuskript\manuskript\ui\bulkInfoManager.ui'
|
||||||
#
|
#
|
||||||
# Created by: PyQt5 UI code generator 5.15.4
|
# Created by: PyQt5 UI code generator 5.15.4
|
||||||
#
|
#
|
||||||
|
@ -15,7 +15,7 @@ class Ui_BulkInfoManager(object):
|
||||||
def setupUi(self, BulkInfoManager):
|
def setupUi(self, BulkInfoManager):
|
||||||
BulkInfoManager.setObjectName("BulkInfoManager")
|
BulkInfoManager.setObjectName("BulkInfoManager")
|
||||||
BulkInfoManager.setWindowModality(QtCore.Qt.WindowModal)
|
BulkInfoManager.setWindowModality(QtCore.Qt.WindowModal)
|
||||||
BulkInfoManager.resize(548, 556)
|
BulkInfoManager.resize(644, 556)
|
||||||
self.verticalLayout = QtWidgets.QVBoxLayout(BulkInfoManager)
|
self.verticalLayout = QtWidgets.QVBoxLayout(BulkInfoManager)
|
||||||
self.verticalLayout.setObjectName("verticalLayout")
|
self.verticalLayout.setObjectName("verticalLayout")
|
||||||
self.lblStaticMessage = QtWidgets.QLabel(BulkInfoManager)
|
self.lblStaticMessage = QtWidgets.QLabel(BulkInfoManager)
|
||||||
|
@ -38,15 +38,27 @@ class Ui_BulkInfoManager(object):
|
||||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||||
self.btnPersoBulkAddInfo = QtWidgets.QPushButton(BulkInfoManager)
|
self.btnPersoBulkAddInfo = QtWidgets.QPushButton(BulkInfoManager)
|
||||||
|
self.btnPersoBulkAddInfo.setText("")
|
||||||
|
icon = QtGui.QIcon.fromTheme("list-add")
|
||||||
|
self.btnPersoBulkAddInfo.setIcon(icon)
|
||||||
self.btnPersoBulkAddInfo.setObjectName("btnPersoBulkAddInfo")
|
self.btnPersoBulkAddInfo.setObjectName("btnPersoBulkAddInfo")
|
||||||
self.horizontalLayout.addWidget(self.btnPersoBulkAddInfo)
|
self.horizontalLayout.addWidget(self.btnPersoBulkAddInfo)
|
||||||
self.btnPersoBulkRmInfo = QtWidgets.QPushButton(BulkInfoManager)
|
self.btnPersoBulkRmInfo = QtWidgets.QPushButton(BulkInfoManager)
|
||||||
|
self.btnPersoBulkRmInfo.setText("")
|
||||||
|
icon = QtGui.QIcon.fromTheme("list-remove")
|
||||||
|
self.btnPersoBulkRmInfo.setIcon(icon)
|
||||||
self.btnPersoBulkRmInfo.setObjectName("btnPersoBulkRmInfo")
|
self.btnPersoBulkRmInfo.setObjectName("btnPersoBulkRmInfo")
|
||||||
self.horizontalLayout.addWidget(self.btnPersoBulkRmInfo)
|
self.horizontalLayout.addWidget(self.btnPersoBulkRmInfo)
|
||||||
|
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||||
|
self.horizontalLayout.addItem(spacerItem)
|
||||||
self.btnPersoBulkApply = QtWidgets.QPushButton(BulkInfoManager)
|
self.btnPersoBulkApply = QtWidgets.QPushButton(BulkInfoManager)
|
||||||
self.btnPersoBulkApply.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedKingdom))
|
self.btnPersoBulkApply.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedKingdom))
|
||||||
self.btnPersoBulkApply.setObjectName("btnPersoBulkApply")
|
self.btnPersoBulkApply.setObjectName("btnPersoBulkApply")
|
||||||
self.horizontalLayout.addWidget(self.btnPersoBulkApply)
|
self.horizontalLayout.addWidget(self.btnPersoBulkApply)
|
||||||
|
self.horizontalLayout.setStretch(0, 1)
|
||||||
|
self.horizontalLayout.setStretch(1, 1)
|
||||||
|
self.horizontalLayout.setStretch(2, 5)
|
||||||
|
self.horizontalLayout.setStretch(3, 1)
|
||||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||||
|
|
||||||
self.retranslateUi(BulkInfoManager)
|
self.retranslateUi(BulkInfoManager)
|
||||||
|
@ -57,8 +69,9 @@ class Ui_BulkInfoManager(object):
|
||||||
BulkInfoManager.setWindowTitle(_translate("BulkInfoManager", "Form"))
|
BulkInfoManager.setWindowTitle(_translate("BulkInfoManager", "Form"))
|
||||||
self.lblStaticMessage.setText(_translate("BulkInfoManager", "Affected Characters:"))
|
self.lblStaticMessage.setText(_translate("BulkInfoManager", "Affected Characters:"))
|
||||||
self.lblCharactersDynamic.setText(_translate("BulkInfoManager", "NONE"))
|
self.lblCharactersDynamic.setText(_translate("BulkInfoManager", "NONE"))
|
||||||
self.btnPersoBulkAddInfo.setText(_translate("BulkInfoManager", "Add Entry"))
|
self.btnPersoBulkAddInfo.setToolTip(_translate("BulkInfoManager", "Add entry to the list."))
|
||||||
self.btnPersoBulkRmInfo.setText(_translate("BulkInfoManager", "Remove Entry"))
|
self.btnPersoBulkRmInfo.setToolTip(_translate("BulkInfoManager", "Remove entry from the list."))
|
||||||
|
self.btnPersoBulkApply.setToolTip(_translate("BulkInfoManager", "Adds all items to the selected characters."))
|
||||||
self.btnPersoBulkApply.setText(_translate("BulkInfoManager", "Apply Changes"))
|
self.btnPersoBulkApply.setText(_translate("BulkInfoManager", "Apply Changes"))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>548</width>
|
<width>644</width>
|
||||||
<height>556</height>
|
<height>556</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -60,23 +60,53 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,5,1">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="btnPersoBulkAddInfo">
|
<widget class="QPushButton" name="btnPersoBulkAddInfo">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Add entry to the list.</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add Entry</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="list-add">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="btnPersoBulkRmInfo">
|
<widget class="QPushButton" name="btnPersoBulkRmInfo">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Remove entry from the list.</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Remove Entry</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="list-remove">
|
||||||
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="btnPersoBulkApply">
|
<widget class="QPushButton" name="btnPersoBulkApply">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Adds all items to the selected characters.</string>
|
||||||
|
</property>
|
||||||
<property name="locale">
|
<property name="locale">
|
||||||
<locale language="English" country="UnitedKingdom"/>
|
<locale language="English" country="UnitedKingdom"/>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue