From f0dee29ebd6c731650ed2d992f51a141e702ac8d Mon Sep 17 00:00:00 2001 From: Thomas Neele Date: Mon, 15 Jun 2020 09:52:33 +0200 Subject: [PATCH] Fixed deprecated use of Gtk.Dialog.__init__() in two places --- src/usr/bin/diffuse | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/usr/bin/diffuse b/src/usr/bin/diffuse index 0606a7e..ab91ea1 100755 --- a/src/usr/bin/diffuse +++ b/src/usr/bin/diffuse @@ -6653,7 +6653,9 @@ GObject.signal_new('format-changed', FileDiffViewer, GObject.SignalFlags.RUN_LAS # dialogue used to search for text class SearchDialog(Gtk.Dialog): def __init__(self, parent, pattern=None, history=None): - Gtk.Dialog.__init__(self, _('Find...'), parent, Gtk.DialogFlags.DESTROY_WITH_PARENT, (Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)) + Gtk.Dialog.__init__(self, title=_('Find...'), parent=parent, destroy_with_parent=True) + self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT) + self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT) vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, 0) vbox.set_border_width(10) @@ -6760,7 +6762,9 @@ class FileChooserDialog(Gtk.FileChooserDialog): # dialogue used to search for text class NumericDialog(Gtk.Dialog): def __init__(self, parent, title, text, val, lower, upper, step=1, page=0): - Gtk.Dialog.__init__(self, title, parent, Gtk.DialogFlags.DESTROY_WITH_PARENT, (Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT, Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)) + Gtk.Dialog.__init__(self, title=title, parent=parent, destroy_with_parent=True) + self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT) + self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT) vbox = Gtk.Box.new(Gtk.Orientation.VERTICAL, 0) vbox.set_border_width(10)