Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2022-10-10 23:55:56 +0300
committerwurstsalat <mailtrash@posteo.de>2022-10-10 23:59:25 +0300
commit46f6ef163ddaa5e57e865375ed7ec4cedb443aac (patch)
tree924d67da1e05dcdb56df159d090b5e69d63ac514
parent59e6de350b04cf07516483dcaba76e6cc9d72005 (diff)
change: Preferences: Reorder "Chat" settings and add a "General" section
-rw-r--r--gajim/data/gui/preferences.ui61
-rw-r--r--gajim/gtk/preferences.py54
2 files changed, 86 insertions, 29 deletions
diff --git a/gajim/data/gui/preferences.ui b/gajim/data/gui/preferences.ui
index d17ea84a4..915e820d7 100644
--- a/gajim/data/gui/preferences.ui
+++ b/gajim/data/gui/preferences.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- n-columns=3 n-rows=3 -->
@@ -116,6 +116,59 @@
<property name="spacing">24</property>
<child>
<!-- n-columns=3 n-rows=3 -->
+ <object class="GtkGrid" id="general">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="row-spacing">12</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label" translatable="yes">General</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="bold"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="chats">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -164,7 +217,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -217,7 +270,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -270,7 +323,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
diff --git a/gajim/gtk/preferences.py b/gajim/gtk/preferences.py
index a4e13a819..cd3e7f1e8 100644
--- a/gajim/gtk/preferences.py
+++ b/gajim/gtk/preferences.py
@@ -86,6 +86,7 @@ class Preferences(Gtk.ApplicationWindow):
prefs: list[tuple[str, Type[PreferenceBox]]] = [
('window_behaviour', WindowBehaviour),
('plugins', Plugins),
+ ('general', General),
('chats', Chats),
('group_chats', GroupChats),
('file_preview', FilePreview),
@@ -259,7 +260,7 @@ class Plugins(PreferenceBox):
PreferenceBox.__init__(self, settings)
-class Chats(PreferenceBox):
+class General(PreferenceBox):
def __init__(self, *args: Any) -> None:
speller_desc = None
@@ -268,6 +269,12 @@ class Chats(PreferenceBox):
settings = [
Setting(SettingKind.SWITCH,
+ _('Show Send Message Button'),
+ SettingType.CONFIG,
+ 'show_send_message_button',
+ callback=self._on_show_send_message_button),
+
+ Setting(SettingKind.SWITCH,
_('Spell Checking'),
SettingType.CONFIG,
'use_speller',
@@ -275,34 +282,10 @@ class Chats(PreferenceBox):
enabled_func=self._speller_available),
Setting(SettingKind.SWITCH,
- _('Message Receipts (✔)'),
- SettingType.CONFIG,
- 'positive_184_ack',
- desc=_('Add a checkmark to received messages')),
-
- # Setting(SettingKind.SWITCH,
- # _('XHTML Formatting'),
- # SettingType.CONFIG,
- # 'show_xhtml',
- # desc=_('Render XHTML styles (colors, etc.) of incoming '
- # 'messages')),
-
- Setting(SettingKind.SWITCH,
- _('Show Send Message Button'),
- SettingType.CONFIG,
- 'show_send_message_button',
- callback=self._on_show_send_message_button),
- Setting(SettingKind.SWITCH,
_('Emoji Shortcodes'),
SettingType.CONFIG,
'enable_emoji_shortcodes',
desc=_('Show suggestions for shortcodes, e.g. :+1:')),
- Setting(SettingKind.SWITCH,
- _('Show Status Changes'),
- SettingType.CONFIG,
- 'print_status_in_chats',
- desc=_('For example: "Julia is now online"')),
-
]
PreferenceBox.__init__(self, settings)
@@ -318,6 +301,27 @@ class Chats(PreferenceBox):
app.settings.set('send_on_ctrl_enter', show_button)
+class Chats(PreferenceBox):
+ def __init__(self, *args: Any) -> None:
+
+ settings = [
+ Setting(SettingKind.SWITCH,
+ _('Message Receipts (✔)'),
+ SettingType.CONFIG,
+ 'positive_184_ack',
+ desc=_('Add a checkmark to received messages')),
+
+ Setting(SettingKind.SWITCH,
+ _('Show Status Changes'),
+ SettingType.CONFIG,
+ 'print_status_in_chats',
+ desc=_('For example: "Julia is now online"')),
+
+ ]
+
+ PreferenceBox.__init__(self, settings)
+
+
class GroupChats(PreferenceBox):
def __init__(self, *args: Any) -> None: