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

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2023-11-13 01:47:34 +0300
committerwurstsalat <mailtrash@posteo.de>2023-11-13 01:48:24 +0300
commit119b70091a3eb1d032610df2e084ca66f5bf5b4b (patch)
tree129fb249febe0bce0ddad383ec0c18e82a054420
parent73ed25d6557bbcf8a88eba2ca9ba786404266d84 (diff)
[length_notifier] 1.4.9
Fix spin setting in config dialog
-rw-r--r--length_notifier/config_dialog.py28
-rw-r--r--length_notifier/plugin-manifest.json4
2 files changed, 6 insertions, 26 deletions
diff --git a/length_notifier/config_dialog.py b/length_notifier/config_dialog.py
index b25e8af..4bfdd43 100644
--- a/length_notifier/config_dialog.py
+++ b/length_notifier/config_dialog.py
@@ -18,11 +18,9 @@ from __future__ import annotations
from typing import Any
from typing import TYPE_CHECKING
-from gi.repository import GObject
from gi.repository import Gtk
from gajim.gtk.settings import SettingsDialog
-from gajim.gtk.settings import SpinSetting
from gajim.gtk.const import Setting
from gajim.gtk.const import SettingKind
from gajim.gtk.const import SettingType
@@ -42,14 +40,14 @@ class LengthNotifierConfigDialog(SettingsDialog):
self.plugin = plugin
jids = self.plugin.config['JIDS'] or ''
settings = [
- Setting('MessageLengthSpinSetting', # type: ignore
+ Setting(SettingKind.SPIN,
_('Message Length'),
SettingType.VALUE,
- self.plugin.config['MESSAGE_WARNING_LENGTH'],
+ str(self.plugin.config['MESSAGE_WARNING_LENGTH']),
callback=self._on_setting,
data='MESSAGE_WARNING_LENGTH',
desc=_('Message length at which the highlight is shown'),
- props={'range_': (1, 1000)},
+ props={'range_': (1, 1000, 1)},
),
Setting(SettingKind.COLOR,
_('Color'),
@@ -74,28 +72,10 @@ class LengthNotifierConfigDialog(SettingsDialog):
_('Length Notifier Configuration'),
Gtk.DialogFlags.MODAL,
settings,
- '',
- extend=[('MessageLengthSpinSetting', # type: ignore
- SizeSpinSetting)])
+ '')
def _on_setting(self, value: Any, data: Any) -> None:
if isinstance(value, str):
value.strip()
self.plugin.config[data] = value
self.plugin.update()
-
-
-class SizeSpinSetting(SpinSetting):
-
- __gproperties__ = {
- 'setting-value': (int,
- 'Size',
- '',
- 1,
- 1000,
- 140,
- GObject.ParamFlags.READWRITE),
- }
-
- def __init__(self, *args: Any, **kwargs: Any) -> None:
- SpinSetting.__init__(self, *args, **kwargs)
diff --git a/length_notifier/plugin-manifest.json b/length_notifier/plugin-manifest.json
index 1ffc083..841a8a3 100644
--- a/length_notifier/plugin-manifest.json
+++ b/length_notifier/plugin-manifest.json
@@ -13,8 +13,8 @@
"win32"
],
"requirements": [
- "gajim>=1.5.0"
+ "gajim>=1.8.2"
],
"short_name": "length_notifier",
- "version": "1.4.8"
+ "version": "1.4.9"
} \ No newline at end of file