Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
d3fee1d9
by Philipp Hörist at 2023-03-14T23:18:33+01:00
7 changed files:
- gajim/gtk/accounts.py
- gajim/gtk/dialogs.py
- gajim/gtk/main_stack.py
- gajim/gtk/pep_config.py
- gajim/gtk/proxies.py
- gajim/gtk/xml_console.py
- gajim/plugins/helpers.py
Changes:
| ... | ... | @@ -267,6 +267,7 @@ def remove_account(self, row: AccountRow) -> None: |
| 267 | 267 | back_row.emit('activate')
|
| 268 | 268 | self._accounts_listbox.remove(row)
|
| 269 | 269 | sub_menu = self._stack.get_child_by_name(f'{row.account}-menu')
|
| 270 | + assert sub_menu is not None
|
|
| 270 | 271 | self._stack.remove(sub_menu)
|
| 271 | 272 | row.destroy()
|
| 272 | 273 | sub_menu.destroy()
|
| ... | ... | @@ -230,6 +230,7 @@ def __init__(self, |
| 230 | 230 | self._checkbutton.set_margin_start(30)
|
| 231 | 231 | self._checkbutton.set_margin_end(30)
|
| 232 | 232 | label = self._checkbutton.get_child()
|
| 233 | + assert isinstance(label, Gtk.Label)
|
|
| 233 | 234 | label.set_line_wrap(True)
|
| 234 | 235 | label.set_max_width_chars(50)
|
| 235 | 236 | label.set_halign(Gtk.Align.START)
|
| ... | ... | @@ -52,6 +52,7 @@ def add_account_page(self, account: str) -> None: |
| 52 | 52 | |
| 53 | 53 | def remove_account_page(self, account: str) -> None:
|
| 54 | 54 | account_page = self.get_child_by_name(account)
|
| 55 | + assert account_page is not None
|
|
| 55 | 56 | account_page.destroy()
|
| 56 | 57 | |
| 57 | 58 | def remove_chats_for_account(self, account: str) -> None:
|
| ... | ... | @@ -117,7 +117,7 @@ def _init_services(self): |
| 117 | 117 | self.treestore.set_sort_column_id(0, Gtk.SortType.ASCENDING)
|
| 118 | 118 | self._ui.services_treeview.set_model(self.treestore)
|
| 119 | 119 | |
| 120 | - col = Gtk.TreeViewColumn(_('Service'))
|
|
| 120 | + col = Gtk.TreeViewColumn(title=_('Service'))
|
|
| 121 | 121 | col.set_sort_column_id(0)
|
| 122 | 122 | self._ui.services_treeview.append_column(col)
|
| 123 | 123 |
| ... | ... | @@ -83,7 +83,7 @@ def _init_list(self) -> None: |
| 83 | 83 | self._ui.settings_grid.set_sensitive(False)
|
| 84 | 84 | model = Gtk.ListStore(str)
|
| 85 | 85 | self._ui.proxies_treeview.set_model(model)
|
| 86 | - col = Gtk.TreeViewColumn('Proxies')
|
|
| 86 | + col = Gtk.TreeViewColumn(title='Proxies')
|
|
| 87 | 87 | self._ui.proxies_treeview.append_column(col)
|
| 88 | 88 | renderer = Gtk.CellRendererText()
|
| 89 | 89 | col.pack_start(renderer, True)
|
| ... | ... | @@ -189,7 +189,9 @@ def _on_row_activated(self, |
| 189 | 189 | _listbox: Gtk.ListBox,
|
| 190 | 190 | row: Gtk.ListBoxRow
|
| 191 | 191 | ) -> None:
|
| 192 | - text = row.get_child().get_text()
|
|
| 192 | + child = row.get_child()
|
|
| 193 | + assert isinstance(child, Gtk.Label)
|
|
| 194 | + text = child.get_text()
|
|
| 193 | 195 | |
| 194 | 196 | # pylint: disable=line-too-long
|
| 195 | 197 | input_text = None
|
| ... | ... | @@ -31,8 +31,8 @@ class GajimPluginActivateException(Exception): |
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | def get_builder(file_name: str, widgets: Optional[list[str]] = None) -> Builder:
|
| 34 | - return Builder(file_name, # pyright: ignore
|
|
| 35 | - widgets,
|
|
| 34 | + return Builder(file_name,
|
|
| 35 | + widgets, # pyright: ignore
|
|
| 36 | 36 | domain=DOMAIN,
|
| 37 | 37 | gettext_=_)
|
| 38 | 38 |