Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorloloof64 <laurent.bernabe@gmail.com>2011-06-21 21:25:48 (GMT)
committer loloof64 <laurent.bernabe@gmail.com>2011-06-21 21:25:48 (GMT)
commitb1a3dc1326102543002c26c6ce65bbb255db62ad (patch)
tree3699eab2b0550fb64bd28c60f877ee8a5d833ae1
parent209d51371464104569e110c554ddfbf121c06ca1 (diff)
Added some little corrections.
-rwxr-xr-xInputDialog.py4
-rwxr-xr-xMenuActions.py4
-rwxr-xr-xTheDrawingAreaEventBox.py4
3 files changed, 7 insertions, 5 deletions
diff --git a/InputDialog.py b/InputDialog.py
index 9ce1e89..67a5d0e 100755
--- a/InputDialog.py
+++ b/InputDialog.py
@@ -32,16 +32,18 @@ class InputDialog(gtk.MessageDialog):
'''
- def __init__(self, prompt, parent=None):
+ def __init__(self, prompt, parent=None, text=""):
'''
Constructor(prompt, parent=None)
prompt argument : the text of the dialog
parent : the parent control
+ text : the initial text in the TextEntry
'''
gtk.MessageDialog.__init__(self,
parent, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION,
gtk.BUTTONS_OK_CANCEL, prompt)
self.__entry = gtk.Entry()
+ self.__entry.set_text(text)
self.vbox.pack_start(self.__entry, True, True, 0)
self.connect("delete-event", lambda widget, event : self.__close() )
diff --git a/MenuActions.py b/MenuActions.py
index 815bed1..9ef6ae9 100755
--- a/MenuActions.py
+++ b/MenuActions.py
@@ -46,7 +46,7 @@ class MenuActions(object):
manageDrawingWrite()
Wraps code for menu Drawing->Write
'''
- dialog = InputDialog(_("Line thickness value ?\n(I advice you 5)"))
+ dialog = InputDialog(_("Line thickness value ?"),text="5")
user_value = dialog.run()
if user_value != None :
try:
@@ -69,7 +69,7 @@ class MenuActions(object):
manageDrawingRead()
Wraps code for menu Drawing->Read
'''
- dialog = InputDialog(_("Steps drawing delays (milliseconds) ?\n(I advice you 10)"))
+ dialog = InputDialog(_("Steps drawing delays (milliseconds) ?"),text="10")
user_value = dialog.run()
if user_value != None :
try:
diff --git a/TheDrawingAreaEventBox.py b/TheDrawingAreaEventBox.py
index 630483a..9980674 100755
--- a/TheDrawingAreaEventBox.py
+++ b/TheDrawingAreaEventBox.py
@@ -49,7 +49,7 @@ class TheDrawingAreaEventBox(gtk.EventBox):
self.__drawingArea = gtk.DrawingArea()
self.add(self.__drawingArea)
self.__figures = []
- self.__lineThickness = 1
+ self.__lineThickness = 5
# number of steps (for the figures overall) currently drawn
# only used in reading mode (which is the starting mode)
self.__drawn_steps = -1
@@ -254,7 +254,7 @@ class TheDrawingAreaEventBox(gtk.EventBox):
'''
new_figures_array = []
for current_line in text_file.readlines():
- if current_line != "New" :
+ if current_line != "New\n" :
new_figure = []
for current_point_string in current_line.split(' '):
if current_point_string: