diff options
author | Daniel Francis <francis@sugarlabs.org> | 2012-09-01 01:37:33 (GMT) |
---|---|---|
committer | Daniel Francis <francis@sugarlabs.org> | 2012-09-01 01:37:33 (GMT) |
commit | 2f602d6a7cd20c62ac304031df11e772f7c06d65 (patch) | |
tree | 8abebae74ba9bafb660d2fa6deba23687655e9f2 | |
parent | d539c02f9bcfe8d65478ac58a14b8c2a3509c35a (diff) |
Confirmation Dialog
-rwxr-xr-x | hello-integration.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hello-integration.py b/hello-integration.py index 4f10520..ba77581 100755 --- a/hello-integration.py +++ b/hello-integration.py @@ -186,6 +186,7 @@ class GraphPlotter(gtk.Window): file_filter.set_name(format_name) file_filter.add_mime_type(filter_mime) filechooser.add_filter(file_filter) + filechooser.set_do_overwrite_confirmation(True) filechooser.run() file_path = filechooser.get_filename() filechooser.destroy() @@ -226,6 +227,7 @@ class GraphPlotter(gtk.Window): (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK)) filechooser.add_filter(self.filter) + filechooser.set_do_overwrite_confirmation(True) response = filechooser.run() self.file_path = filechooser.get_filename() filechooser.destroy() @@ -234,6 +236,7 @@ class GraphPlotter(gtk.Window): self.canvas.write_file(self.file_path) self.set_title('%s - %s' % (self.file_path, appname)) + if __name__ == '__main__': logger.debug('Initializing Graph Plotter') import sys |