Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/InputDialog.py
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 /InputDialog.py
parent209d51371464104569e110c554ddfbf121c06ca1 (diff)
Added some little corrections.
Diffstat (limited to 'InputDialog.py')
-rwxr-xr-xInputDialog.py4
1 files changed, 3 insertions, 1 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() )