Skip to content

Commit f2dff02

Browse files
committed
parent attribute is depreacted in Gtk.Dialog - use transient_for
1 parent bb311d0 commit f2dff02

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@
2828
- s-c-p doesn't react on ALREADY_ENABLED exception from firewalld
2929
- removed deprecated Gtk objects
3030
- another deprecated issues - GLib
31+
- parent attribute in Gtk.Dialog is deprecated - use transient_for

authconn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def _ask_retry_server_error (self, message):
308308
except IndexError:
309309
msg = _("CUPS server error")
310310

311-
d = Gtk.MessageDialog (parent=self._parent,
311+
d = Gtk.MessageDialog (transient_for=self._parent,
312312
modal=True, destroy_with_parent=True,
313313
message_type=Gtk.MessageType.ERROR,
314314
buttons=Gtk.ButtonsType.NONE,
@@ -449,7 +449,7 @@ def _perform_authentication (self):
449449
def _show_not_authorized_dialog (self):
450450
if self._lock:
451451
Gdk.threads_enter ()
452-
d = Gtk.MessageDialog (parent=self._parent,
452+
d = Gtk.MessageDialog (transient_for=self._parent,
453453
modal=True, destroy_with_parent=True,
454454
message_type=Gtk.MessageType.ERROR,
455455
buttons=Gtk.ButtonsType.CLOSE)

pysmb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def perform_authentication (self):
8383
self.auth_called = False
8484

8585
if self.dialog_shown:
86-
d = Gtk.MessageDialog (parent=self.parent,
86+
d = Gtk.MessageDialog (transient_for=self.parent,
8787
modal=True, destroy_with_parent=True,
8888
message_type=Gtk.MessageType.ERROR,
8989
buttons=Gtk.ButtonsType.CLOSE)

0 commit comments

Comments
 (0)