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


Commits:
0bd9adbf by Philipp Hörist at 2024-10-03T00:25:22+02:00
refactor: Fix some dialogs

- - - - -


1 changed file:

- gajim/gtk/dialogs.py


Changes:

=====================================
gajim/gtk/dialogs.py
=====================================
@@ -225,7 +225,7 @@ def __init__(self,
         label.set_wrap_mode(Pango.WrapMode.WORD)
         label.set_margin_start(10)
 
-        self.get_content_area().add(self._checkbutton)
+        self.get_content_area().append(self._checkbutton)
 
     def _on_response(self,
                      _dialog: Gtk.MessageDialog,
@@ -303,7 +303,7 @@ def __init__(self,
             self._entry.set_text(input_str)
             self._entry.select_region(0, -1)  # select all
 
-        self.get_content_area().add(self._entry)
+        self.get_content_area().append(self._entry)
 
     def _on_response(self,
                      _dialog: Gtk.MessageDialog,
@@ -320,21 +320,19 @@ def __init__(self) -> None:
         Gtk.ApplicationWindow.__init__(
             self,
             application=app.app,
-            window_position=Gtk.WindowPosition.CENTER,
             show_menubar=False,
-            type_hint=Gdk.WindowTypeHint.DIALOG,
             modal=True,
             transient_for=app.window,
             title=_('Quit Gajim')
         )
 
         self._ui = get_builder('quit_dialog.ui', self)
-        self._ui.connect_signals(self)
-        self.add(self._ui.box)
 
-        self.connect('key-press-event', self._on_key_press)
+        self.set_child(self._ui.box)
 
-        self.show_all()
+        # self.connect('key-press-event', self._on_key_press)
+
+        self.show()
 
     def _on_key_press(self, _widget: QuitDialog, event: Any) -> None:
         if event.keyval == Gdk.KEY_Escape:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/0bd9adbfbf94abe7f5e1e190793cf99bd328bccd

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