(self)
Start editing the widget text
Start editing the widget text
Start editing the widget text
def edit(self):
        """ Start editing the widget text """
        if self._entry:
            return False
        self.remove (self._label)
        self._entry = Gtk.Entry ()
        self._entry.set_text (self._label.get_text ())
        self._entry.show ()
        self.add (self._entry)
        sig = self._entry.connect ("focus-out-event", self._entry_to_label)
        self._entry_handler_id.append(sig)
        sig = self._entry.connect ("activate", self._on_entry_activated)
        self._entry_handler_id.append(sig)
        sig = self._entry.connect ("key-press-event",
                                     self._on_entry_keypress)
        self._entry_handler_id.append(sig)
        sig = self._entry.connect("button-press-event",
                                  self._on_entry_buttonpress)
        self._entry_handler_id.append(sig)
        self._entry.grab_focus ()
def edit ( self ) : if self . _entry : return False self . remove ( self . _label ) self . _entry = Gtk . Entry ( ) self . _entry . set_text ( self . _label . get_text ( ) ) self . _entry . show ( ) self . add ( self . _entry ) sig = self . _entry . connect ( "focus-out-event" , self . _entry_to_label ) self . _entry_handler_id . append ( sig ) sig = self . _entry . connect ( "activate" , self . _on_entry_activated ) self . _entry_handler_id . append ( sig ) sig = self . _entry . connect ( "key-press-event" , self . _on_entry_keypress ) self . _entry_handler_id . append ( sig ) sig = self . _entry . connect ( "button-press-event" , self . _on_entry_buttonpress ) self . _entry_handler_id . append ( sig ) self . _entry . grab_focus ( )