From 776c6cb98978a872af2f2c709661a57359917a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Thu, 13 Jun 2024 12:03:20 +0200 Subject: [PATCH] [length_notifier] Fix opening settings dialog Fixes #636 --- length_notifier/config_dialog.py | 7 ++++++- length_notifier/length_notifier.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/length_notifier/config_dialog.py b/length_notifier/config_dialog.py index 4bfdd43..5cc3c7d 100644 --- a/length_notifier/config_dialog.py +++ b/length_notifier/config_dialog.py @@ -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, diff --git a/length_notifier/length_notifier.py b/length_notifier/length_notifier.py index 7854dec..d48934e 100644 --- a/length_notifier/length_notifier.py +++ b/length_notifier/length_notifier.py @@ -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)') }