From b1a3dc1326102543002c26c6ce65bbb255db62ad Mon Sep 17 00:00:00 2001 From: loloof64 Date: Tue, 21 Jun 2011 21:25:48 +0000 Subject: Added some little corrections. --- 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: -- cgit v0.9.1