[pygobject] [gtk-demo] printing.py: set print and error dialog transient parent
- From: Dieter Verfaillie <dieterv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] [gtk-demo] printing.py: set print and error dialog transient parent
- Date: Wed, 24 Aug 2011 17:05:49 +0000 (UTC)
commit d92846a5446b0dd2e69c813f56224a1966ab1a33
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Tue Aug 23 11:30:41 2011 +0200
[gtk-demo] printing.py: set print and error dialog transient parent
demos/gtk-demo/demos/printing.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/demos/gtk-demo/demos/printing.py b/demos/gtk-demo/demos/printing.py
index 1e0a9fc..196aedb 100644
--- a/demos/gtk-demo/demos/printing.py
+++ b/demos/gtk-demo/demos/printing.py
@@ -68,13 +68,13 @@ class PrintingApp:
settings.set(Gtk.PRINT_SETTINGS_OUTPUT_URI, uri)
self.operation.set_print_settings(settings)
- def run(self):
- result = self.operation.run(Gtk.PrintOperationAction.PRINT_DIALOG, None)
+ def run(self, parent=None):
+ result = self.operation.run(Gtk.PrintOperationAction.PRINT_DIALOG, parent)
if result == Gtk.PrintOperationResult.ERROR:
message = self.operation.get_error()
- dialog = Gtk.MessageDialog(None,
+ dialog = Gtk.MessageDialog(parent,
0,
Gtk.MessageType.ERROR,
Gtk.ButtonsType.CLOSE,
@@ -172,7 +172,7 @@ class PrintingApp:
def main(demoapp=None):
app = PrintingApp()
- GLib.idle_add(app.run)
+ GLib.idle_add(app.run, demoapp)
Gtk.main()
if __name__ == '__main__':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]