diff options
Diffstat (limited to 'sugar/graphics/entry.py')
-rw-r--r-- | sugar/graphics/entry.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sugar/graphics/entry.py b/sugar/graphics/entry.py index 02e601e..def08c9 100644 --- a/sugar/graphics/entry.py +++ b/sugar/graphics/entry.py @@ -39,7 +39,7 @@ class Entry(hippo.CanvasBox, hippo.CanvasItem): 'button-activated': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([int])) } - def __init__(self): + def __init__(self, text=''): hippo.CanvasBox.__init__(self, orientation=hippo.ORIENTATION_HORIZONTAL) self.props.yalign = hippo.ALIGNMENT_CENTER @@ -51,6 +51,7 @@ class Entry(hippo.CanvasBox, hippo.CanvasItem): self._entry = self.create_entry() self._entry.props.has_frame = False + self._entry.props.text = text self._update_colors(focused=False) self._entry.modify_text(gtk.STATE_SELECTED, color.BLACK.get_gdk_color()) |