Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
931f6f2c by wurstsalat at 2022-01-11T16:49:29+01:00
GroupChatInviter: Typing

- - - - -
c47fdfd5 by wurstsalat at 2022-01-11T16:52:51+01:00
GroupchatState: Typing

- - - - -
8a92bddf by wurstsalat at 2022-01-11T16:56:29+01:00
GroupChatSettings: Typing

- - - - -


3 changed files:

- gajim/gtk/groupchat_inviter.py
- gajim/gtk/groupchat_settings.py
- gajim/gtk/groupchat_state.py


Changes:

=====================================
gajim/gtk/groupchat_inviter.py
=====================================
@@ -294,12 +294,14 @@ def _remove_new_contact_row(self) -> None:
             return
 
         for row in self._new_contact_rows.values():
-            self._ui.contacts_listbox.remove(row)
+            if row is not None:
+                self._ui.contacts_listbox.remove(row)
         self._new_contact_row_visible = False
 
     def _update_new_contact_rows(self, search_text: str) -> None:
         for row in self._new_contact_rows.values():
-            row.update_jid(search_text)
+            if row is not None:
+                row.update_jid(search_text)
 
     def _select_new_match(self,
                           _entry: Gtk.SearchEntry,
@@ -367,7 +369,7 @@ def _sort_func(row1: ContactRow,
         return locale.strcoll(name1.lower(), name2.lower())
 
     def _reset(self) -> None:
-        def _remove(row):
+        def _remove(row: Gtk.ListBoxRow) -> None:
             self.remove(row)
             row.destroy()
         self._ui.contacts_listbox.foreach(_remove)


=====================================
gajim/gtk/groupchat_settings.py
=====================================
@@ -24,7 +24,7 @@
 
 
 class GroupChatSettings(SettingsBox):
-    def __init__(self, account, jid):
+    def __init__(self, account: str, jid: str) -> None:
         SettingsBox.__init__(self, account, jid)
 
         self.get_style_context().add_class('settings-border')
@@ -38,7 +38,7 @@ def __init__(self, account, jid):
             'all': _('All Chat States')
         }
 
-        settings = [
+        settings: list[Setting] = [
             Setting(SettingKind.SWITCH,
                     _('Show Join/Leave'),
                     SettingType.GROUP_CHAT,


=====================================
gajim/gtk/groupchat_state.py
=====================================
@@ -57,8 +57,8 @@ def set_not_joined(self):
     def set_fetching(self):
         self._ui.groupchat_state.set_visible_child_name('fetching')
 
-    def _on_join_clicked(self, _button):
+    def _on_join_clicked(self, _button: Gtk.Button) -> None:
         self.emit('join-clicked')
 
-    def _on_abort_clicked(self, _button):
+    def _on_abort_clicked(self, _button: Gtk.Button) -> None:
         self.emit('abort-clicked')



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/618d62d1af438a11674b9361cf022e11787c6b93...8a92bddfbd793add4f96ad15fb9e8287c71fcca2

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/618d62d1af438a11674b9361cf022e11787c6b93...8a92bddfbd793add4f96ad15fb9e8287c71fcca2
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to