Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ProgressDialog.py
diff options
context:
space:
mode:
Diffstat (limited to 'ProgressDialog.py')
-rw-r--r--ProgressDialog.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/ProgressDialog.py b/ProgressDialog.py
new file mode 100644
index 0000000..6d58ef5
--- /dev/null
+++ b/ProgressDialog.py
@@ -0,0 +1,19 @@
+import gtk
+from gettext import gettext as _
+
+
+class ProgressDialog(gtk.Dialog):
+
+ def __init__(self, parent):
+ gtk.Dialog.__init__(self, _('Downloading...'), parent, \
+ gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, \
+ (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT))
+ self._activity = parent
+ self.connect('response', self._response_cb)
+ self._pb = gtk.ProgressBar()
+ self._pb.set_text(_('Retrieving shared image, please wait...'))
+ self.vbox.add(self._pb)
+ def _response_cb(self, dialog, response_id):
+ if response_id == gtk.RESPONSE_REJECT : self._activity.close()
+ else: pass
+ def set_fraction(self, fraction) : self._pb.set_fraction(fraction)