Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pyqclicuser.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyqclicuser.py')
-rw-r--r--pyqclicuser.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/pyqclicuser.py b/pyqclicuser.py
index 7a1f8fd..2c1986f 100644
--- a/pyqclicuser.py
+++ b/pyqclicuser.py
@@ -55,7 +55,7 @@ class PyQClicUser:
except IOError, (errno, strerror):
#show error if not xml file or doesnt load.
self.show_error_dlg(
- "Error loading quiz file(%s): %s" % (errno, strerror))
+ "Error loading quiz file[%s]: %s" % (errno, strerror))
return success
# Heavy duty xml file parser. Stores false or true for all loaded objects, though currently unused in program
@@ -102,7 +102,7 @@ class PyQClicUser:
the actual category that we saved."""
#Make sure it's not a blank string
if (item_node.firstChild):
- self.title_category.set_text(_("Subject: ") + item_node.firstChild.nodeValue)
+ self.title_category.set_text(item_node.firstChild.nodeValue)
else:
print "Tag wasnt loaded, probably empy"
category_loaded = True
@@ -275,13 +275,13 @@ class PyQClicUser:
#create <questions></questions>
questions_element = xml_document.createElement(PyQClicCommon._xml_tags[QUESTIONS_TAG])
#Setup iteration
- Iterate = 0
+ self.Iterate = 0
#Set questions here, no point in saving values before hand, in fact, come to think of it, we dont really even
#need to save this, as it is quite clear we have questions going up in number starting at 1. But for
#clarity of XML document we do it that way.
question = 1
# while there are coordinates in the self.coordinates list, iterate through and save stuff
- while Iterate < len(self.coordinates):
+ while self.Iterate < len(self.coordinates):
#Create <question></question>
question_element = xml_document.createElement(PyQClicCommon._xml_tags[QUESTION_TAG])
#create <question>question<question> and turn to string (XML requires it)
@@ -392,8 +392,8 @@ class PyQClicUser:
self.cr.show_text(self.string)
height=50
- while self.iterate < len(self.Entries):
- if self.iterate==0:
+ while self.Iterate < len(self.Entries):
+ if self.Iterate==0:
#Draw the results page
self.cr.set_source_rgb(0.7, 0.2, 0.0)
#draw outer rectangle
@@ -409,8 +409,8 @@ class PyQClicUser:
self.cr.set_source_rgb(0,0,0)
self.cr.show_text(self.answer_string)
else:
- print str(self.Entries[self.iterate])+_(" is wrong!")
- self.iterate=self.iterate+1
+ print str(self.Entries[self.Iterate])+_(" is wrong!")
+ self.iterate=self.Iterate+1
height=height+30
#needed function to get the active text from the combo box, as gtk doesnt have that built in. found on the web
@@ -532,6 +532,7 @@ class PyQClicUser:
self.vbox2.remove(label)
for label2 in self.label2_list:
self.vbox2.remove(label2)
+ _=self.lang.gettext
self.entry_list=[]
self.Entries=[]
self.coordinates=[]
@@ -598,6 +599,7 @@ class PyQClicUser:
"""Install the language, map _() (which we marked our
strings to translate with) to self.lang.gettext() which will
translate them."""
+ global _
_ = self.lang.gettext
@@ -731,6 +733,8 @@ class PyQClicUser:
self.question_list=[]
#define empty labels2 list
self.label2_list=[]
+ self.Iterate=[]
+ self.Entries=[]
#define color values for question circle
self.colorred=0
@@ -768,7 +772,7 @@ class PyQClicUser:
#Add an author label
self.author_label=gtk.Label(_("Author"))
self.vbox2.pack_start(self.author_label,False,False,0)
- #Add a Category label
+ #Add a Category label
self.title_category=gtk.Label(_("Category"))
self.vbox2.pack_start(self.title_category,False,False,0)