Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-08-04 20:00:01 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-08-04 20:00:01 (GMT)
commitcba8edcbfddf9229a63de1a5561a91dd95d9ba6e (patch)
tree992e2efa89e957b4d2c2e5f797e01fdc627f5e2c
parentd6a2a422b8e2de38eff20888463325f0800b19f8 (diff)
added cancel button, alignment, and padding to web upload dialog
-rwxr-xr-xturtleart.py30
1 files changed, 21 insertions, 9 deletions
diff --git a/turtleart.py b/turtleart.py
index 6b2dcb4..cc0f3c9 100755
--- a/turtleart.py
+++ b/turtleart.py
@@ -477,8 +477,9 @@ class TurtleMain():
self.pop_up = gtk.Window()
self.pop_up.set_default_size(600, 400)
self.pop_up.connect('delete_event', self._stop_uploading)
- table = gtk.Table(1, 8, False)
+ table = gtk.Table(8, 1, False)
self.pop_up.add(table)
+
login_label = gtk.Label(_('You must have an account at \
http://turtleartsite.sugarlabs.org to upload your project.'))
table.attach(login_label, 0, 1, 0, 1)
@@ -486,50 +487,61 @@ http://turtleartsite.sugarlabs.org to upload your project.'))
table.attach(self.login_message, 0, 1, 1, 2)
self.Hbox1 = gtk.HBox()
- table.attach(self.Hbox1, 0, 1, 2, 3)
+ table.attach(self.Hbox1, 0, 1, 2, 3, xpadding=5, ypadding=3)
self.username_entry = gtk.Entry()
username_label = gtk.Label(_('Username:') + ' ')
username_label.set_size_request(150, 25)
+ username_label.set_alignment(1.0, 0.5)
self.username_entry.set_size_request(450, 25)
self.Hbox1.add(username_label)
self.Hbox1.add(self.username_entry)
self.Hbox2 = gtk.HBox()
- table.attach(self.Hbox2, 0, 1, 3, 4)
+ table.attach(self.Hbox2, 0, 1, 3, 4, xpadding=5, ypadding=3)
self.password_entry = gtk.Entry()
password_label = gtk.Label(_('Password:') + ' ')
self.password_entry.set_visibility(False)
password_label.set_size_request(150, 25)
+ password_label.set_alignment(1.0, 0.5)
self.password_entry.set_size_request(450, 25)
self.Hbox2.add(password_label)
self.Hbox2.add(self.password_entry)
self.Hbox3 = gtk.HBox()
- table.attach(self.Hbox3, 0, 1, 4, 5)
+ table.attach(self.Hbox3, 0, 1, 4, 5, xpadding=5, ypadding=3)
self.title_entry = gtk.Entry()
title_label = gtk.Label(_('Title:') + ' ')
title_label.set_size_request(150, 25)
+ title_label.set_alignment(1.0, 0.5)
self.title_entry.set_size_request(450, 25)
self.Hbox3.add(title_label)
self.Hbox3.add(self.title_entry)
self.Hbox4 = gtk.HBox()
- table.attach(self.Hbox4, 0, 1, 5, 6)
+ table.attach(self.Hbox4, 0, 1, 5, 6, xpadding=5, ypadding=3)
self.description_entry = gtk.TextView()
description_label = gtk.Label(_('Description:') + ' ')
description_label.set_size_request(150, 25)
+ description_label.set_alignment(1.0, 0.5)
self.description_entry.set_wrap_mode(gtk.WRAP_WORD)
- self.description_entry.set_size_request(450, 25)
+ self.description_entry.set_size_request(450, 50)
self.Hbox4.add(description_label)
self.Hbox4.add(self.description_entry)
+ self.Hbox5 = gtk.HBox()
+ table.attach(self.Hbox5, 0, 1, 6, 7, xpadding=5, ypadding=3)
self.submit_button = gtk.Button(_('Submit to Web'))
- self.submit_button.set_size_request(600, 25)
+ self.submit_button.set_size_request(300, 25)
self.submit_button.connect('pressed', self._do_remote_logon)
- table.attach(self.submit_button, 0, 1, 6, 7)
+ self.Hbox5.add(self.submit_button)
+ self.cancel_button = gtk.Button(_('Cancel'))
+ self.cancel_button.set_size_request(300, 25)
+ self.cancel_button.connect('pressed', self._stop_uploading)
+ self.Hbox5.add(self.cancel_button)
+
self.pop_up.show_all()
- def _stop_uploading(self, widget, event):
+ def _stop_uploading(self, widget, event=None):
""" Hide the popup when the upload is complte """
self.uploading = False
self.pop_up.hide()