Manage parent keyword argument in common.warning call
The keyword is used by the DBLogin when test version failed and no GtkApplication is yet available.
This commit is contained in:
1 parent
e3c0213f4f
commit
fc1424f83b
1 file changed
+4
-3
@@ -490,7 +490,7 @@ class UniqueDialog(object):
|
||||
if self.running:
|
||||
return
|
||||
|
||||
parent = kwargs.get('parent')
|
||||
parent = kwargs.pop('parent', None)
|
||||
if not parent:
|
||||
parent = get_toplevel_window()
|
||||
dialog = self.build_dialog(parent, *args, **kwargs)
|
||||
@@ -526,8 +526,9 @@ message = MessageDialog()
|
||||
|
||||
class WarningDialog(MessageDialog):
|
||||
|
||||
def __call__(self, message, title, buttons=gtk.BUTTONS_OK):
|
||||
return super().__call__(title, gtk.MESSAGE_WARNING, buttons, message)
|
||||
def __call__(self, message, title, buttons=gtk.BUTTONS_OK, **kwargs):
|
||||
return super().__call__(
|
||||
title, gtk.MESSAGE_WARNING, buttons, message, **kwargs)
|
||||
|
||||
|
||||
warning = WarningDialog()
|
||||
|
||||
Reference in new issue
Block a user