[length_notifier] Fix opening settings dialog

Fixes #636
This commit is contained in:
Philipp Hörist
2024-06-13 12:03:20 +02:00
parent 092f6e2203
commit 776c6cb989
2 changed files with 7 additions and 2 deletions

View File

@@ -39,6 +39,10 @@ class LengthNotifierConfigDialog(SettingsDialog):
self.plugin = plugin
jids = self.plugin.config['JIDS'] or ''
if isinstance(jids, list):
# Gajim 1.0 stored this as list[str]
jids = ','.join(jids)
settings = [
Setting(SettingKind.SPIN,
_('Message Length'),
@@ -68,7 +72,8 @@ class LengthNotifierConfigDialog(SettingsDialog):
),
]
SettingsDialog.__init__(self, parent,
SettingsDialog.__init__(self,
parent,
_('Length Notifier Configuration'),
Gtk.DialogFlags.MODAL,
settings,

View File

@@ -69,7 +69,7 @@ class LengthNotifierPlugin(GajimPlugin):
'rgb(240, 220, 60)',
'Highlight color for the message input'),
'JIDS': (
[''],
'',
'Enable the plugin for selected XMPP addresses '
'only (comma separated)')
}