[Xfce4-commits] [apps/xfce4-panel-profiles] 01/01: Fix PyGTKDeprecationWarning when creating dialogs
noreply at xfce.org
noreply at xfce.org
Sat Jul 27 14:31:12 CEST 2019
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-panel-profiles.
commit 09101fb21258b5308d45f4ed3c896a1fef8c568a
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Jul 27 08:31:05 2019 -0400
Fix PyGTKDeprecationWarning when creating dialogs
---
xfce4-panel-profiles/xfce4-panel-profiles.py | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/xfce4-panel-profiles/xfce4-panel-profiles.py b/xfce4-panel-profiles/xfce4-panel-profiles.py
index 7021dc5..224e9b4 100644
--- a/xfce4-panel-profiles/xfce4-panel-profiles.py
+++ b/xfce4-panel-profiles/xfce4-panel-profiles.py
@@ -93,10 +93,13 @@ class XfcePanelProfiles:
button = _("Save")
else:
button = _("Open")
- dialog = Gtk.FileChooserDialog(title,
- self.window, action,
- (_("Cancel"), Gtk.ResponseType.CANCEL,
- button, Gtk.ResponseType.ACCEPT))
+ dialog = Gtk.FileChooserDialog(title=title,
+ transient_for=self.window,
+ action=action)
+ dialog.add_buttons(
+ _("Cancel"), Gtk.ResponseType.CANCEL,
+ button, Gtk.ResponseType.ACCEPT
+ )
dialog.set_default_response(Gtk.ResponseType.ACCEPT)
if default:
dialog.set_current_name(default)
@@ -301,10 +304,11 @@ class PanelSaveDialog(Gtk.MessageDialog):
Gtk.MessageDialog.__init__(
self, transient_for=parent, modal=True,
message_type=Gtk.MessageType.QUESTION,
- message_format=primary,
- buttons=(
- _("Cancel"), Gtk.ResponseType.CANCEL,
- _("Save Configuration"), Gtk.ResponseType.ACCEPT))
+ text=primary)
+ self.add_buttons(
+ _("Cancel"), Gtk.ResponseType.CANCEL,
+ _("Save Configuration"), Gtk.ResponseType.ACCEPT
+ )
self.set_default_icon_name("document-save-as")
self.set_default_response(Gtk.ResponseType.ACCEPT)
box = self.get_message_area()
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list