From d4bacf35db4eb6f681d460848fa0d02778882d76 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 20 Apr 2006 13:49:51 -0400 Subject: [PATCH] Some tweaks to the address entry behavior --- browser/browser.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/browser/browser.py b/browser/browser.py index d13bd80b..9889de2d 100755 --- a/browser/browser.py +++ b/browser/browser.py @@ -68,13 +68,21 @@ class AddressEntry(gtk.HBox): image.show() self.entry.show() + self.entry.grab_focus() + + def get_folded(self): + return self.folded + + def set_folded(self, folded): + self.folded = not self.folded + self._update_folded_state() def __button_clicked_cb(self, button): - self.folded = not self.folded - self._update_folded_state() + self.set_folded(not self.get_folded()) def __activate_cb(self, entry): self.callback(entry.get_text()) + self.set_folded(True) class NavigationToolbar(gtk.Toolbar): def __init__(self, embed):