Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gnome_plugins/uploader_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'gnome_plugins/uploader_plugin.py')
-rw-r--r--gnome_plugins/uploader_plugin.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/gnome_plugins/uploader_plugin.py b/gnome_plugins/uploader_plugin.py
index 06224fa..b156f71 100644
--- a/gnome_plugins/uploader_plugin.py
+++ b/gnome_plugins/uploader_plugin.py
@@ -32,7 +32,7 @@ except ImportError, e:
_UPLOAD_AVAILABLE = False
import os
-import gtk
+from util.gtkcompat import Gtk
from plugin import Plugin
from util.menubuilder import MenuBuilder
@@ -60,7 +60,7 @@ class Uploader_plugin(Plugin):
self.tw = turtleart_window
def get_menu(self):
- menu = gtk.Menu()
+ menu = Gtk.Menu()
MenuBuilder.make_menu_item(menu, _('Upload to Web'),
self.do_upload_to_web)
upload_menu = MenuBuilder.make_sub_menu(menu, _('Upload'))
@@ -74,32 +74,32 @@ class Uploader_plugin(Plugin):
return
self.uploading = False
- self.pop_up = gtk.Window()
+ 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(8, 1, False)
+ table = Gtk.Table(8, 1, False)
self.pop_up.add(table)
- login_label = gtk.Label(_('You must have an account at \
+ login_label = Gtk.Label(label=_('You must have an account at \
http://turtleartsite.sugarlabs.org to upload your project.'))
table.attach(login_label, 0, 1, 0, 1)
- self.login_message = gtk.Label('')
+ self.login_message = Gtk.Label(label='')
table.attach(self.login_message, 0, 1, 1, 2)
- self.Hbox1 = gtk.HBox()
+ self.Hbox1 = Gtk.HBox()
table.attach(self.Hbox1, 0, 1, 2, 3, xpadding=5, ypadding=3)
- self.username_entry = gtk.Entry()
- username_label = gtk.Label(_('Username:') + ' ')
+ self.username_entry = Gtk.Entry()
+ username_label = Gtk.Label(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()
+ self.Hbox2 = Gtk.HBox()
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 = Gtk.Entry()
+ password_label = Gtk.Label(label=_('Password:') + ' ')
self.password_entry.set_visibility(False)
password_label.set_size_request(150, 25)
password_label.set_alignment(1.0, 0.5)
@@ -107,34 +107,34 @@ http://turtleartsite.sugarlabs.org to upload your project.'))
self.Hbox2.add(password_label)
self.Hbox2.add(self.password_entry)
- self.Hbox3 = gtk.HBox()
+ self.Hbox3 = Gtk.HBox()
table.attach(self.Hbox3, 0, 1, 4, 5, xpadding=5, ypadding=3)
- self.title_entry = gtk.Entry()
- title_label = gtk.Label(_('Title:') + ' ')
+ self.title_entry = Gtk.Entry()
+ title_label = Gtk.Label(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()
+ self.Hbox4 = Gtk.HBox()
table.attach(self.Hbox4, 0, 1, 5, 6, xpadding=5, ypadding=3)
- self.description_entry = gtk.TextView()
- description_label = gtk.Label(_('Description:') + ' ')
+ self.description_entry = Gtk.TextView()
+ description_label = Gtk.Label(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_wrap_mode(Gtk.WrapMode.WORD)
self.description_entry.set_size_request(450, 50)
self.Hbox4.add(description_label)
self.Hbox4.add(self.description_entry)
- self.Hbox5 = gtk.HBox()
+ 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 = Gtk.Button(_('Submit to Web'))
self.submit_button.set_size_request(300, 25)
self.submit_button.connect('pressed', self._do_remote_logon)
self.Hbox5.add(self.submit_button)
- self.cancel_button = gtk.Button(_('Cancel'))
+ 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)
@@ -204,6 +204,6 @@ if __name__ == "__main__":
if u.enabled():
print "Uploader is enabled... trying to upload"
u.do_upload_to_web()
- gtk.main()
+ Gtk.main()
else:
print "Uploader is not enabled... exiting"