Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/waxy/progressdialog.py~
diff options
context:
space:
mode:
Diffstat (limited to 'pynxc/waxy/progressdialog.py~')
-rw-r--r--pynxc/waxy/progressdialog.py~28
1 files changed, 28 insertions, 0 deletions
diff --git a/pynxc/waxy/progressdialog.py~ b/pynxc/waxy/progressdialog.py~
new file mode 100644
index 0000000..17f44a5
--- /dev/null
+++ b/pynxc/waxy/progressdialog.py~
@@ -0,0 +1,28 @@
+# progressdialog.py
+
+import wx
+import waxyobject
+
+class ProgressDialog(wx.ProgressDialog, waxyobject.WaxyObject):
+
+ def __init__(self,parent=None,title="Progress", message="Progress",
+ maximum=100,abort=1,modal=1,show_elapsed_time=1,show_remaining_time=1):
+ style = 0
+ if abort:
+ style |= wx.PD_CAN_ABORT
+ if modal:
+ style |= wx.PD_APP_MODAL
+ if elapsed:
+ style |= wx.PD_ELAPSED_TIME
+ if remaining:
+ style |= wx.PD_REMAINING_TIME
+ wx.ProgressDialog.__init__(self, title, message,
+ maximum, parent,style)
+
+ def ShowModal(self):
+ """ Simplified ShowModal(), returning strings 'ok' or 'cancel'. """
+ result = wx.ProgressDialog.ShowModal(self)
+ if result == wx.ID_OK:
+ return 'ok'
+ else:
+ return 'cancel'