]> git.0d.be Git - jack_mixer.git/commitdiff
Fix Gtk deprecation warning for save dialog as well
authorChristopher Arndt <chris@chrisarndt.de>
Tue, 30 Jun 2020 10:36:21 +0000 (12:36 +0200)
committerDaniel Sheeler <dsheeler@pobox.com>
Tue, 30 Jun 2020 12:56:38 +0000 (07:56 -0500)
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
jack_mixer.py

index a7189b403960626ed43a93fa2869fc988f118418..e66d95dfd3ba8079f77360ce9ab40386bc6e510f 100755 (executable)
@@ -315,9 +315,9 @@ class JackMixer(SerializedObject):
 
     def on_save_as_cb(self, *args):
         dlg = Gtk.FileChooserDialog(title='Save', parent=self.window,
-                        action=Gtk.FileChooserAction.SAVE,
-                        buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
-                                 Gtk.STOCK_SAVE, Gtk.ResponseType.OK))
+                        action=Gtk.FileChooserAction.SAVE)
+        dlg.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
+                        Gtk.STOCK_SAVE, Gtk.ResponseType.OK)
         dlg.set_default_response(Gtk.ResponseType.OK)
         if dlg.run() == Gtk.ResponseType.OK:
             self.current_filename = dlg.get_filename()