Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/InputDialog.py
diff options
context:
space:
mode:
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() )