Philipp Hörist pushed to branch gtk4 at gajim / gajim


Commits:
43ea4b15 by Philipp Hörist at 2024-11-01T20:42:55+01:00
cq: Fix types

- - - - -


2 changed files:

- gajim/gtk/groupchat_manage.py
- gajim/gtk/groupchat_outcasts.py


Changes:

=====================================
gajim/gtk/groupchat_manage.py
=====================================
@@ -24,9 +24,9 @@
 from gajim.gtk.builder import get_builder
 from gajim.gtk.dialogs import ErrorDialog
 from gajim.gtk.filechoosers import AvatarFileChooserButton
-from gajim.gtk.groupchat_details import GroupchatDetails
 from gajim.gtk.util import get_app_window
 from gajim.gtk.util import SignalManager
+from gajim.gtk.widgets import GajimAppWindow
 
 log = logging.getLogger('gajim.gtk.groupchat_manage')
 
@@ -318,7 +318,7 @@ def _on_destroy_confirmed(self, _button: Gtk.Button) -> 
None:
         self._client.get_module('MUC').destroy(
             self._contact.jid, reason, alternate_jid)
 
-        window = cast(GroupchatDetails, get_app_window('GroupchatDetails'))
+        window = cast(GajimAppWindow, get_app_window('GroupchatDetails'))
         window.close()
 
     def _on_destroy_cancelled(self, _button: Gtk.Button) -> None:


=====================================
gajim/gtk/groupchat_outcasts.py
=====================================
@@ -110,11 +110,17 @@ def _on_add(self, _button: Gtk.Button) -> None:
         self._update_apply_button_state()
 
     def _on_remove(self, _button: Gtk.Button) -> None:
-        _model, paths = self._treeview.get_selection().get_selected_rows()
+        selection = self._treeview.get_selection()
+        assert selection is not None
+        rows = selection.get_selected_rows()
+        if rows is None:
+            return
+
+        _model, paths = rows
 
         references: list[Gtk.TreeRowReference] = []
         for path in paths:
-            references.append(Gtk.TreeRowReference.new(self._store, path))
+            references.append(Gtk.TreeRowReference(self._store, path))
 
         for ref in references:
             path = ref.get_path()



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/43ea4b15c0fec435563efe842c97587b8e7c66d4

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/43ea4b15c0fec435563efe842c97587b8e7c66d4
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]

Reply via email to