Philipp Hörist pushed to branch gtk4 at gajim / gajim
Commits:
64ce514d by Philipp Hörist at 2024-11-01T21:49:46+01:00
cq: Fix types
- - - - -
593e0f8f by Philipp Hörist at 2024-11-01T21:51:44+01:00
refactor: Remove obsolete property
- - - - -
3 changed files:
- gajim/gtk/start_chat.py
- gajim/gtk/util.py
- gajim/gtk/widgets.py
Changes:
=====================================
gajim/gtk/start_chat.py
=====================================
@@ -903,7 +903,6 @@ class ContactListItem(GObject.Object):
__gtype_name__ = 'ContactListItem'
account = GObject.Property(type=str)
- account_label = GObject.Property(type=str)
account_visible = GObject.Property(type=bool, default=False)
jid = GObject.Property(type=str)
name = GObject.Property(type=str)
@@ -964,7 +963,6 @@ def __init__(
super().__init__(
account=account,
- account_label=account_label,
account_visible=account_visible,
jid=jid,
name=name,
@@ -1018,7 +1016,7 @@ def bind(self, obj: GlobalListItem) -> None:
('status_visible', self._status_label, 'visible'),
('avatar_paintable', self._avatar, 'paintable'),
('idle', self._idle_badge, 'idle'),
- ('account', self._account_badge, 'account_label'),
+ ('account', self._account_badge, 'account'),
('account_visible', self._account_badge, 'visible'),
('groups', self._group_badge_box, 'groups'),
('menu', self._menu, 'menu-model'),
=====================================
gajim/gtk/util.py
=====================================
@@ -609,7 +609,7 @@ def __init__(self) -> None:
self._groups: list[str] = []
@GObject.Property(type=object)
- def groups(self) -> list[str]:
+ def groups(self) -> list[str]: # pyright: ignore
return self._groups
@groups.setter
@@ -644,7 +644,7 @@ def __init__(self, idle: datetime.datetime | None = None)
-> None:
self.add_css_class('small-label')
@GObject.Property(type=object)
- def idle(self) -> str:
+ def idle(self) -> str: # pyright: ignore
return self.get_text()
@idle.setter
@@ -665,7 +665,8 @@ class AccountBadge(Gtk.Label):
__gtype_name__ = 'AccountBadge'
def __init__(
- self, account: str | None = None,
+ self,
+ account: str | None = None,
bind_setting: bool = False
) -> None:
Gtk.Label.__init__(self)
@@ -687,11 +688,11 @@ def do_unroot(self) -> None:
app.check_finalize(self)
@GObject.Property(type=str)
- def account_label(self) -> str:
+ def account(self) -> str: # pyright: ignore
return self.get_text()
- @account_label.setter
- def account_label(self, value: str | None) -> None:
+ @account.setter
+ def account(self, value: str) -> None:
self.set_account(value)
def set_account(self, account: str) -> None:
=====================================
gajim/gtk/widgets.py
=====================================
@@ -13,7 +13,7 @@
from gajim.common import app
-from gajim.gtk.builder import Builder
+from gajim.gtk.builder import GajimBuilder
from gajim.gtk.util import SignalManager
log = logging.getLogger('gajim.gtk.widgets')
@@ -49,7 +49,7 @@ def __init__(
log.debug('Load Window: %s', name)
- self._ui = cast(Builder, None)
+ self._ui = cast(GajimBuilder, None)
self.window.add_css_class('gajim-app-window')
@@ -117,7 +117,7 @@ def __on_close_request(self, _widget:
Gtk.ApplicationWindow) -> bool:
app.check_finalize(self.window)
app.check_finalize(self)
- del self.window.wrapper
+ del self.window.wrapper # pyright: ignore
del self._ui
del self.__default_controller
del self.window
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/bea340582f222367639b505e8f34790bb51297d4...593e0f8fad92b908f73e7f1111a4a83773622ef6
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/bea340582f222367639b505e8f34790bb51297d4...593e0f8fad92b908f73e7f1111a4a83773622ef6
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]