Add message filtering by priority and subject, with CRITICAL always visible
- Implement MessagesProxyModel for client-side filtering - Add priority filter buttons (LOW 0-3, NORMAL 4-8, HIGH 9, CRITICAL 10 always shown) - Add subject filter menu with checkable actions for message titles - Add Remove Filters button to reset all filters - Restore priority 10 persistent notification setting in options - Fix settings dialog errors and update UI layouts - Ensure CRITICAL priority messages cannot be filtered out but can toggle persistent pop-ups
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Form implementation generated from reading ui file 'gotify_tray/gui/designs\widget_main.ui'
|
||||
# Form implementation generated from reading ui file 'gotify_tray/gui/designs/widget_main.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.5.0
|
||||
# Created by: PyQt6 UI code generator 6.9.1
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
@@ -47,6 +47,43 @@ class Ui_MainWindow(object):
|
||||
self.pb_delete_all.setObjectName("pb_delete_all")
|
||||
self.horizontalLayout.addWidget(self.pb_delete_all)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
self.filtersLayout = QtWidgets.QHBoxLayout()
|
||||
self.filtersLayout.setObjectName("filtersLayout")
|
||||
self.label_priority = QtWidgets.QLabel(parent=self.verticalLayoutWidget)
|
||||
self.label_priority.setObjectName("label_priority")
|
||||
self.filtersLayout.addWidget(self.label_priority)
|
||||
self.pb_low = QtWidgets.QPushButton(parent=self.verticalLayoutWidget)
|
||||
self.pb_low.setCheckable(True)
|
||||
self.pb_low.setChecked(True)
|
||||
self.pb_low.setObjectName("pb_low")
|
||||
self.filtersLayout.addWidget(self.pb_low)
|
||||
self.pb_normal = QtWidgets.QPushButton(parent=self.verticalLayoutWidget)
|
||||
self.pb_normal.setCheckable(True)
|
||||
self.pb_normal.setChecked(True)
|
||||
self.pb_normal.setObjectName("pb_normal")
|
||||
self.filtersLayout.addWidget(self.pb_normal)
|
||||
self.pb_high = QtWidgets.QPushButton(parent=self.verticalLayoutWidget)
|
||||
self.pb_high.setCheckable(True)
|
||||
self.pb_high.setChecked(True)
|
||||
self.pb_high.setObjectName("pb_high")
|
||||
self.filtersLayout.addWidget(self.pb_high)
|
||||
self.pb_critical = QtWidgets.QPushButton(parent=self.verticalLayoutWidget)
|
||||
self.pb_critical.setCheckable(True)
|
||||
self.pb_critical.setChecked(True)
|
||||
self.pb_critical.setObjectName("pb_critical")
|
||||
self.filtersLayout.addWidget(self.pb_critical)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.filtersLayout.addItem(spacerItem2)
|
||||
self.label_subject = QtWidgets.QLabel(parent=self.verticalLayoutWidget)
|
||||
self.label_subject.setObjectName("label_subject")
|
||||
self.filtersLayout.addWidget(self.label_subject)
|
||||
self.pb_subject = QtWidgets.QPushButton(parent=self.verticalLayoutWidget)
|
||||
self.pb_subject.setObjectName("pb_subject")
|
||||
self.filtersLayout.addWidget(self.pb_subject)
|
||||
self.pb_remove_filters = QtWidgets.QPushButton(parent=self.verticalLayoutWidget)
|
||||
self.pb_remove_filters.setObjectName("pb_remove_filters")
|
||||
self.filtersLayout.addWidget(self.pb_remove_filters)
|
||||
self.verticalLayout_2.addLayout(self.filtersLayout)
|
||||
self.listView_messages = QtWidgets.QListView(parent=self.verticalLayoutWidget)
|
||||
self.listView_messages.setAutoScroll(True)
|
||||
self.listView_messages.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
@@ -66,6 +103,14 @@ class Ui_MainWindow(object):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Form"))
|
||||
self.label_application.setText(_translate("MainWindow", "Application"))
|
||||
self.label_priority.setText(_translate("MainWindow", "Priority:"))
|
||||
self.pb_low.setText(_translate("MainWindow", "LOW"))
|
||||
self.pb_normal.setText(_translate("MainWindow", "NORMAL"))
|
||||
self.pb_high.setText(_translate("MainWindow", "HIGH"))
|
||||
self.pb_critical.setText(_translate("MainWindow", "CRITICAL"))
|
||||
self.label_subject.setText(_translate("MainWindow", "Subject:"))
|
||||
self.pb_subject.setText(_translate("MainWindow", "Subject"))
|
||||
self.pb_remove_filters.setText(_translate("MainWindow", "Remove Filters"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -88,10 +88,107 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListView" name="listView_messages">
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="filtersLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_priority">
|
||||
<property name="text">
|
||||
<string>Priority:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_low">
|
||||
<property name="text">
|
||||
<string>LOW</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_normal">
|
||||
<property name="text">
|
||||
<string>NORMAL</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_high">
|
||||
<property name="text">
|
||||
<string>HIGH</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_critical">
|
||||
<property name="text">
|
||||
<string>CRITICAL</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<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>
|
||||
<widget class="QLabel" name="label_subject">
|
||||
<property name="text">
|
||||
<string>Subject:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_subject">
|
||||
<property name="text">
|
||||
<string>Subject</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_remove_filters">
|
||||
<property name="text">
|
||||
<string>Remove Filters</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListView" name="listView_messages">
|
||||
<property name="autoScroll">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Form implementation generated from reading ui file 'gotify_tray/gui/designs\widget_message.ui'
|
||||
# Form implementation generated from reading ui file 'gotify_tray/gui/designs/widget_message.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.5.0
|
||||
# Created by: PyQt6 UI code generator 6.9.1
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Form implementation generated from reading ui file 'gotify_tray/gui/designs\widget_server.ui'
|
||||
# Form implementation generated from reading ui file 'gotify_tray/gui/designs/widget_server.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.5.0
|
||||
# Created by: PyQt6 UI code generator 6.9.1
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Form implementation generated from reading ui file 'gotify_tray/gui/designs/widget_settings.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.4.2
|
||||
# Created by: PyQt6 UI code generator 6.9.1
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
@@ -17,11 +17,7 @@ class Ui_Dialog(object):
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(
|
||||
QtWidgets.QDialogButtonBox.StandardButton.Apply
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Cancel
|
||||
| QtWidgets.QDialogButtonBox.StandardButton.Ok
|
||||
)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Apply|QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.gridLayout.addWidget(self.buttonBox, 1, 4, 1, 1)
|
||||
self.tabWidget = QtWidgets.QTabWidget(parent=Dialog)
|
||||
@@ -34,9 +30,7 @@ class Ui_Dialog(object):
|
||||
self.groupBox_notifications.setObjectName("groupBox_notifications")
|
||||
self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_notifications)
|
||||
self.gridLayout_4.setObjectName("gridLayout_4")
|
||||
self.label_notification_duration = QtWidgets.QLabel(
|
||||
parent=self.groupBox_notifications
|
||||
)
|
||||
self.label_notification_duration = QtWidgets.QLabel(parent=self.groupBox_notifications)
|
||||
self.label_notification_duration.setObjectName("label_notification_duration")
|
||||
self.gridLayout_4.addWidget(self.label_notification_duration, 1, 0, 1, 1)
|
||||
self.spin_duration = QtWidgets.QSpinBox(parent=self.groupBox_notifications)
|
||||
@@ -45,24 +39,13 @@ class Ui_Dialog(object):
|
||||
self.spin_duration.setSingleStep(100)
|
||||
self.spin_duration.setObjectName("spin_duration")
|
||||
self.gridLayout_4.addWidget(self.spin_duration, 1, 1, 1, 1)
|
||||
self.cb_notification_click = QtWidgets.QCheckBox(
|
||||
parent=self.groupBox_notifications
|
||||
)
|
||||
self.cb_notification_click = QtWidgets.QCheckBox(parent=self.groupBox_notifications)
|
||||
self.cb_notification_click.setObjectName("cb_notification_click")
|
||||
self.gridLayout_4.addWidget(self.cb_notification_click, 3, 0, 1, 3)
|
||||
self.label_notification_duration_ms = QtWidgets.QLabel(
|
||||
parent=self.groupBox_notifications
|
||||
)
|
||||
self.label_notification_duration_ms.setObjectName(
|
||||
"label_notification_duration_ms"
|
||||
)
|
||||
self.label_notification_duration_ms = QtWidgets.QLabel(parent=self.groupBox_notifications)
|
||||
self.label_notification_duration_ms.setObjectName("label_notification_duration_ms")
|
||||
self.gridLayout_4.addWidget(self.label_notification_duration_ms, 1, 2, 1, 1)
|
||||
spacerItem = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.gridLayout_4.addItem(spacerItem, 0, 2, 1, 1)
|
||||
self.cb_notify = QtWidgets.QCheckBox(parent=self.groupBox_notifications)
|
||||
self.cb_notify.setObjectName("cb_notify")
|
||||
@@ -73,26 +56,15 @@ class Ui_Dialog(object):
|
||||
self.spin_priority.setProperty("value", 5)
|
||||
self.spin_priority.setObjectName("spin_priority")
|
||||
self.gridLayout_4.addWidget(self.spin_priority, 0, 1, 1, 1)
|
||||
self.label_notification_priority = QtWidgets.QLabel(
|
||||
parent=self.groupBox_notifications
|
||||
)
|
||||
self.label_notification_priority = QtWidgets.QLabel(parent=self.groupBox_notifications)
|
||||
self.label_notification_priority.setObjectName("label_notification_priority")
|
||||
self.gridLayout_4.addWidget(self.label_notification_priority, 0, 0, 1, 1)
|
||||
self.cb_tray_icon_unread = QtWidgets.QCheckBox(
|
||||
parent=self.groupBox_notifications
|
||||
)
|
||||
self.cb_tray_icon_unread = QtWidgets.QCheckBox(parent=self.groupBox_notifications)
|
||||
self.cb_tray_icon_unread.setObjectName("cb_tray_icon_unread")
|
||||
self.gridLayout_4.addWidget(self.cb_tray_icon_unread, 4, 0, 1, 3)
|
||||
self.cb_priority10_persistent = QtWidgets.QCheckBox(
|
||||
parent=self.groupBox_notifications
|
||||
)
|
||||
self.cb_priority10_persistent = QtWidgets.QCheckBox(parent=self.groupBox_notifications)
|
||||
self.cb_priority10_persistent.setObjectName("cb_priority10_persistent")
|
||||
self.gridLayout_4.addWidget(self.cb_priority10_persistent, 5, 0, 1, 3)
|
||||
self.cb_sound_only_priority10 = QtWidgets.QCheckBox(
|
||||
parent=self.groupBox_notifications
|
||||
)
|
||||
self.cb_sound_only_priority10.setObjectName("cb_sound_only_priority10")
|
||||
self.gridLayout_4.addWidget(self.cb_sound_only_priority10, 6, 0, 1, 3)
|
||||
self.verticalLayout_4.addWidget(self.groupBox_notifications)
|
||||
self.groupBox_2 = QtWidgets.QGroupBox(parent=self.tab_general)
|
||||
self.groupBox_2.setObjectName("groupBox_2")
|
||||
@@ -115,25 +87,13 @@ class Ui_Dialog(object):
|
||||
self.groupBox_server_info.setObjectName("groupBox_server_info")
|
||||
self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_server_info)
|
||||
self.gridLayout_3.setObjectName("gridLayout_3")
|
||||
self.pb_change_server_info = QtWidgets.QPushButton(
|
||||
parent=self.groupBox_server_info
|
||||
)
|
||||
self.pb_change_server_info = QtWidgets.QPushButton(parent=self.groupBox_server_info)
|
||||
self.pb_change_server_info.setObjectName("pb_change_server_info")
|
||||
self.gridLayout_3.addWidget(self.pb_change_server_info, 0, 0, 1, 1)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.gridLayout_3.addItem(spacerItem1, 0, 1, 1, 1)
|
||||
self.verticalLayout_4.addWidget(self.groupBox_server_info)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.verticalLayout_4.addItem(spacerItem2)
|
||||
self.tabWidget.addTab(self.tab_general, "")
|
||||
self.tab_fonts = QtWidgets.QWidget()
|
||||
@@ -154,29 +114,18 @@ class Ui_Dialog(object):
|
||||
self.layout_fonts_message.setObjectName("layout_fonts_message")
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.pb_font_message_title = QtWidgets.QPushButton(
|
||||
parent=self.groupBox_fonts_message
|
||||
)
|
||||
self.pb_font_message_title = QtWidgets.QPushButton(parent=self.groupBox_fonts_message)
|
||||
self.pb_font_message_title.setObjectName("pb_font_message_title")
|
||||
self.horizontalLayout.addWidget(self.pb_font_message_title)
|
||||
self.pb_font_message_date = QtWidgets.QPushButton(
|
||||
parent=self.groupBox_fonts_message
|
||||
)
|
||||
self.pb_font_message_date = QtWidgets.QPushButton(parent=self.groupBox_fonts_message)
|
||||
self.pb_font_message_date.setObjectName("pb_font_message_date")
|
||||
self.horizontalLayout.addWidget(self.pb_font_message_date)
|
||||
self.pb_font_message_content = QtWidgets.QPushButton(
|
||||
parent=self.groupBox_fonts_message
|
||||
)
|
||||
self.pb_font_message_content = QtWidgets.QPushButton(parent=self.groupBox_fonts_message)
|
||||
self.pb_font_message_content.setObjectName("pb_font_message_content")
|
||||
self.horizontalLayout.addWidget(self.pb_font_message_content)
|
||||
self.layout_fonts_message.addLayout(self.horizontalLayout)
|
||||
self.verticalLayout_5.addWidget(self.groupBox_fonts_message)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.verticalLayout_5.addItem(spacerItem3)
|
||||
self.tabWidget.addTab(self.tab_fonts, "")
|
||||
self.tab_advanced = QtWidgets.QWidget()
|
||||
@@ -222,12 +171,7 @@ class Ui_Dialog(object):
|
||||
self.spin_popup_h.setMaximum(10000)
|
||||
self.spin_popup_h.setObjectName("spin_popup_h")
|
||||
self.horizontalLayout_4.addWidget(self.spin_popup_h)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_4.addItem(spacerItem4)
|
||||
self.gridLayout_2.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
|
||||
self.verticalLayout.addWidget(self.groupbox_image_popup)
|
||||
@@ -249,12 +193,7 @@ class Ui_Dialog(object):
|
||||
self.label_watchdog_interval_s = QtWidgets.QLabel(parent=self.groupbox_watchdog)
|
||||
self.label_watchdog_interval_s.setObjectName("label_watchdog_interval_s")
|
||||
self.horizontalLayout_3.addWidget(self.label_watchdog_interval_s)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_3.addItem(spacerItem5)
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout_3)
|
||||
self.verticalLayout.addWidget(self.groupbox_watchdog)
|
||||
@@ -271,12 +210,7 @@ class Ui_Dialog(object):
|
||||
self.label_cache = QtWidgets.QLabel(parent=self.groupBox_cache)
|
||||
self.label_cache.setObjectName("label_cache")
|
||||
self.horizontalLayout_6.addWidget(self.label_cache)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(
|
||||
40,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_6.addItem(spacerItem6)
|
||||
self.verticalLayout.addWidget(self.groupBox_cache)
|
||||
self.groupBox_logging = QtWidgets.QGroupBox(parent=self.tab_advanced)
|
||||
@@ -286,12 +220,7 @@ class Ui_Dialog(object):
|
||||
self.combo_logging = QtWidgets.QComboBox(parent=self.groupBox_logging)
|
||||
self.combo_logging.setObjectName("combo_logging")
|
||||
self.gridLayout_6.addWidget(self.combo_logging, 0, 1, 1, 1)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(
|
||||
190,
|
||||
20,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(190, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.gridLayout_6.addItem(spacerItem7, 0, 3, 1, 1)
|
||||
self.pb_open_log = QtWidgets.QPushButton(parent=self.groupBox_logging)
|
||||
self.pb_open_log.setMaximumSize(QtCore.QSize(30, 16777215))
|
||||
@@ -301,12 +230,7 @@ class Ui_Dialog(object):
|
||||
self.label_logging.setObjectName("label_logging")
|
||||
self.gridLayout_6.addWidget(self.label_logging, 0, 0, 1, 1)
|
||||
self.verticalLayout.addWidget(self.groupBox_logging)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(
|
||||
20,
|
||||
40,
|
||||
QtWidgets.QSizePolicy.Policy.Minimum,
|
||||
QtWidgets.QSizePolicy.Policy.Expanding,
|
||||
)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem8)
|
||||
self.tabWidget.addTab(self.tab_advanced, "")
|
||||
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 5)
|
||||
@@ -329,17 +253,15 @@ class Ui_Dialog(object):
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
self.tabWidget.setCurrentIndex(0)
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
Dialog.setTabOrder(self.tabWidget, self.spin_priority)
|
||||
Dialog.setTabOrder(self.spin_priority, self.spin_duration)
|
||||
Dialog.setTabOrder(self.spin_duration, self.cb_notify)
|
||||
Dialog.setTabOrder(self.cb_notify, self.cb_notification_click)
|
||||
Dialog.setTabOrder(self.cb_notification_click, self.cb_tray_icon_unread)
|
||||
Dialog.setTabOrder(self.cb_tray_icon_unread, self.cb_priority10_persistent)
|
||||
Dialog.setTabOrder(self.cb_priority10_persistent, self.cb_sound_only_priority10)
|
||||
Dialog.setTabOrder(self.cb_sound_only_priority10, self.cb_priority_colors)
|
||||
Dialog.setTabOrder(self.cb_tray_icon_unread, self.cb_priority_colors)
|
||||
Dialog.setTabOrder(self.cb_priority_colors, self.cb_image_urls)
|
||||
Dialog.setTabOrder(self.cb_image_urls, self.cb_locale)
|
||||
Dialog.setTabOrder(self.cb_locale, self.cb_sort_applications)
|
||||
@@ -365,88 +287,41 @@ class Ui_Dialog(object):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
self.groupBox_notifications.setTitle(_translate("Dialog", "Notifications"))
|
||||
self.label_notification_duration.setText(
|
||||
_translate("Dialog", "Notification duration:")
|
||||
)
|
||||
self.cb_notification_click.setText(
|
||||
_translate(
|
||||
"Dialog", "Clicking the notification pop-up opens the main window"
|
||||
)
|
||||
)
|
||||
self.label_notification_duration.setText(_translate("Dialog", "Notification duration:"))
|
||||
self.cb_notification_click.setText(_translate("Dialog", "Clicking the notification pop-up opens the main window"))
|
||||
self.label_notification_duration_ms.setText(_translate("Dialog", "ms"))
|
||||
self.cb_notify.setText(
|
||||
_translate(
|
||||
"Dialog", "Show a notification for missed messages after reconnecting"
|
||||
)
|
||||
)
|
||||
self.label_notification_priority.setText(
|
||||
_translate("Dialog", "Minimum priority to show notifications:")
|
||||
)
|
||||
self.cb_tray_icon_unread.setText(
|
||||
_translate(
|
||||
"Dialog",
|
||||
"Change the tray icon color when there are unread notifications",
|
||||
)
|
||||
)
|
||||
self.cb_priority10_persistent.setText(
|
||||
_translate(
|
||||
"Dialog",
|
||||
"Make priority 10 notifications persistent (stay until clicked)",
|
||||
)
|
||||
)
|
||||
self.cb_sound_only_priority10.setText(
|
||||
_translate(
|
||||
"Dialog",
|
||||
"Play notification sound only for priority 10 messages",
|
||||
)
|
||||
)
|
||||
self.cb_notify.setText(_translate("Dialog", "Show a notification for missed messages after reconnecting"))
|
||||
self.label_notification_priority.setText(_translate("Dialog", "Minimum priority to show notifications:"))
|
||||
self.cb_tray_icon_unread.setText(_translate("Dialog", "Change the tray icon color when there are unread notifications"))
|
||||
self.cb_priority10_persistent.setText(_translate("Dialog", "Show persistent notifications for priority 10 messages"))
|
||||
self.groupBox_2.setTitle(_translate("Dialog", "Interface"))
|
||||
self.cb_priority_colors.setToolTip(
|
||||
_translate("Dialog", "4..7 -> medium\n8..10 -> high")
|
||||
)
|
||||
self.cb_priority_colors.setText(
|
||||
_translate("Dialog", "Show message priority colors")
|
||||
)
|
||||
self.cb_priority_colors.setToolTip(_translate("Dialog", "4..7 -> medium\n"
|
||||
"8..10 -> high"))
|
||||
self.cb_priority_colors.setText(_translate("Dialog", "Show message priority colors"))
|
||||
self.cb_image_urls.setText(_translate("Dialog", "Show image urls as images"))
|
||||
self.cb_locale.setText(
|
||||
_translate("Dialog", "Display date in the system locale format")
|
||||
)
|
||||
self.cb_sort_applications.setText(
|
||||
_translate(
|
||||
"Dialog", "Sort the application list alphabetically (requires restart)"
|
||||
)
|
||||
)
|
||||
self.groupBox_server_info.setTitle(
|
||||
_translate("Dialog", "Server info - kadu customized")
|
||||
)
|
||||
self.cb_locale.setText(_translate("Dialog", "Display date in the system locale format"))
|
||||
self.cb_sort_applications.setText(_translate("Dialog", "Sort the application list alphabetically (requires restart)"))
|
||||
self.groupBox_server_info.setTitle(_translate("Dialog", "Server info"))
|
||||
self.pb_change_server_info.setText(_translate("Dialog", "Change server info"))
|
||||
self.tabWidget.setTabText(
|
||||
self.tabWidget.indexOf(self.tab_general), _translate("Dialog", "General")
|
||||
)
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_general), _translate("Dialog", "General"))
|
||||
self.pb_reset_fonts.setText(_translate("Dialog", "Reset all fonts"))
|
||||
self.groupBox_fonts_message.setTitle(_translate("Dialog", "Message"))
|
||||
self.pb_font_message_title.setText(_translate("Dialog", "Title"))
|
||||
self.pb_font_message_date.setText(_translate("Dialog", "Date"))
|
||||
self.pb_font_message_content.setText(_translate("Dialog", "Message"))
|
||||
self.tabWidget.setTabText(
|
||||
self.tabWidget.indexOf(self.tab_fonts), _translate("Dialog", "Fonts")
|
||||
)
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_fonts), _translate("Dialog", "Fonts"))
|
||||
self.groupBox.setTitle(_translate("Dialog", "Settings"))
|
||||
self.pb_reset.setText(_translate("Dialog", "Reset"))
|
||||
self.pb_import.setText(_translate("Dialog", "Import"))
|
||||
self.pb_export.setText(_translate("Dialog", "Export"))
|
||||
self.groupbox_image_popup.setTitle(
|
||||
_translate("Dialog", "Image pop-up for URLs")
|
||||
)
|
||||
self.groupbox_image_popup.setTitle(_translate("Dialog", "Image pop-up for URLs"))
|
||||
self.label.setToolTip(_translate("Dialog", "Maximum pop-up width"))
|
||||
self.label.setText(_translate("Dialog", "Width"))
|
||||
self.spin_popup_w.setToolTip(_translate("Dialog", "Maximum pop-up width"))
|
||||
self.label_2.setToolTip(_translate("Dialog", "Maximum pop-up height"))
|
||||
self.label_2.setText(_translate("Dialog", "Height"))
|
||||
self.spin_popup_h.setToolTip(_translate("Dialog", "Maximum pop-up height"))
|
||||
self.groupbox_watchdog.setTitle(
|
||||
_translate("Dialog", "Server watchdog thread (requires restart)")
|
||||
)
|
||||
self.groupbox_watchdog.setTitle(_translate("Dialog", "Server watchdog thread (requires restart)"))
|
||||
self.label_watchdog_interval.setText(_translate("Dialog", "Interval:"))
|
||||
self.label_watchdog_interval_s.setText(_translate("Dialog", "s"))
|
||||
self.groupBox_cache.setTitle(_translate("Dialog", "Cache"))
|
||||
@@ -457,14 +332,11 @@ class Ui_Dialog(object):
|
||||
self.pb_open_log.setToolTip(_translate("Dialog", "Open logfile"))
|
||||
self.pb_open_log.setText(_translate("Dialog", "..."))
|
||||
self.label_logging.setText(_translate("Dialog", "Level"))
|
||||
self.tabWidget.setTabText(
|
||||
self.tabWidget.indexOf(self.tab_advanced), _translate("Dialog", "Advanced")
|
||||
)
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_advanced), _translate("Dialog", "Advanced"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
Dialog = QtWidgets.QDialog()
|
||||
ui = Ui_Dialog()
|
||||
|
||||
@@ -114,13 +114,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="cb_tray_icon_unread">
|
||||
<property name="text">
|
||||
<string>Change the tray icon color when there are unread notifications</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="cb_tray_icon_unread">
|
||||
<property name="text">
|
||||
<string>Change the tray icon color when there are unread notifications</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="cb_priority10_persistent">
|
||||
<property name="text">
|
||||
<string>Show persistent notifications for priority 10 messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user