Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webtoolbar.py
diff options
context:
space:
mode:
Diffstat (limited to 'webtoolbar.py')
-rwxr-xr-xwebtoolbar.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/webtoolbar.py b/webtoolbar.py
index f3f8ccb..cb40ddf 100755
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -52,6 +52,8 @@ class WebEntry(AddressEntry):
self.connect('focus-in-event', self.__focus_in_event_cb)
self.connect('populate-popup', self.__populate_popup_cb)
self.connect('key-press-event', self.__key_press_event_cb)
+ self.connect('enter-notify-event', self.__enter_notify_event_cb)
+ self.connect('leave-notify-event', self.__leave_notify_event_cb)
self._focus_out_hid = self.connect(
'focus-out-event', self.__focus_out_event_cb)
self._change_hid = self.connect('changed', self.__changed_cb)
@@ -144,6 +146,14 @@ class WebEntry(AddressEntry):
self._set_text(self._title)
self._search_popdown()
+ def __enter_notify_event_cb(self, entry, event):
+ if not entry.props.has_focus:
+ self._set_text(self._address)
+
+ def __leave_notify_event_cb(self, entry, event):
+ if not entry.props.has_focus:
+ self._set_text(self._title)
+
def __view_button_press_event_cb(self, view, event):
model = view.get_model()