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


Commits:
96c2e353 by wurstsalat at 2024-10-03T18:47:45+02:00
further fixes

- - - - -


5 changed files:

- gajim/gtk/account_side_bar.py
- gajim/gtk/groupchat_voice_requests_button.py
- gajim/gtk/referenced_message.py
- gajim/gtk/sidebar_switcher.py
- gajim/gtk/ssl_error_dialog.py


Changes:

=====================================
gajim/gtk/account_side_bar.py
=====================================
@@ -17,6 +17,7 @@
 from gajim.common.util.status import get_client_status
 
 from gajim.gtk.util import EventHelper
+from gajim.gtk.util import iterate_listbox_children
 
 
 class AccountSideBar(Gtk.ListBox):
@@ -35,10 +36,9 @@ def add_account(self, account: str) -> None:
         self.append(Account(account))
 
     def remove_account(self, account: str) -> None:
-        accounts = cast(list[Account], self.get_children())
-        for row in accounts:
+        for row in cast(list[Account], iterate_listbox_children(self)):
             if row.account == account:
-                row.destroy()
+                self.remove(row)
                 return
 
     @staticmethod
@@ -53,7 +53,7 @@ def activate_account_page(self, account: str) -> None:
         self.select_row(row)
 
     def update_unread_count(self, account: str, count: int) -> None:
-        for row in cast(list[Account], self.get_children()):
+        for row in cast(list[Account], iterate_listbox_children(self)):
             if row.account == account:
                 row.set_unread_count(count)
                 break


=====================================
gajim/gtk/groupchat_voice_requests_button.py
=====================================
@@ -45,8 +45,7 @@ def _update(self) -> None:
         voice_requests = client.get_module('MUC').get_voice_requests(
             self._contact)
         if voice_requests:
-            self.set_no_show_all(False)
-            self.show_all()
+            self.show()
 
     def _on_button_clicked(self, _button: VoiceRequestsButton) -> None:
         assert self._contact is not None
@@ -95,7 +94,7 @@ def _on_button_clicked(self, _button: VoiceRequestsButton) -> 
None:
                 self._on_approve,
                 request,
                 self._contact)
-            request_box.append(approve_button, False, False, 0)
+            request_box.append(approve_button)
 
             if voice_requests.index(request) > 0:
                 menu_box.append(Gtk.Separator())


=====================================
gajim/gtk/referenced_message.py
=====================================
@@ -10,7 +10,6 @@
 import logging
 from urllib.parse import urlparse
 
-from gi.repository import Gdk
 from gi.repository import Gio
 from gi.repository import GLib
 from gi.repository import Gtk


=====================================
gajim/gtk/sidebar_switcher.py
=====================================
@@ -9,7 +9,6 @@
 from gi.repository import Gtk
 
 from gajim.common import app
-from gajim.gtk.util import iterate_children
 
 
 class SideBarSwitcher(Gtk.ListBox):


=====================================
gajim/gtk/ssl_error_dialog.py
=====================================
@@ -27,11 +27,10 @@ def __init__(self,
         self.set_application(app.app)
         self.set_show_menubar(False)
         self.set_resizable(False)
-        self.set_position(Gtk.WindowPosition.CENTER)
         self.set_title(_('SSL Certificate Verification Error'))
 
         self._ui = get_builder('ssl_error_dialog.ui', self)
-        self.add(self._ui.ssl_error_box)
+        self.set_child(self._ui.ssl_error_box)
 
         self.account = account
         self._error = error
@@ -42,9 +41,6 @@ def __init__(self,
 
         self._process_error()
 
-        self._ui.connect_signals(self)
-        self.show_all()
-
     def _process_error(self) -> None:
         self._ui.intro_text.set_text(
             _('There was an error while attempting to verify the SSL '



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/96c2e3531f82b1f37acf9e3c5ec8867abc63e3d4

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/96c2e3531f82b1f37acf9e3c5ec8867abc63e3d4
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- commits@gajim.org
To unsubscribe send an email to commits-le...@gajim.org

Reply via email to