From 6c2d6bbea6c180bf4d45c7e53ce538925df84701 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sat, 3 Jul 2010 18:22:59 +0100 Subject: [PATCH] Clear window urgency hint when a window gains focus. Closes LP #600280 --- terminatorlib/window.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/terminatorlib/window.py b/terminatorlib/window.py index 6e69b06d..42c51b2f 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -98,6 +98,8 @@ class Window(Container, gtk.Window): self.connect('delete_event', self.on_delete_event) self.connect('destroy', self.on_destroy_event) self.connect('window-state-event', self.on_window_state_changed) + self.connect('focus-out-event', self.on_focus_out) + self.connect('focus-in-event', self.on_focus_in) # Attempt to grab a global hotkey for hiding the window. # If we fail, we'll never hide the window, iconifying instead. @@ -182,6 +184,16 @@ class Window(Container, gtk.Window): self.set_urgency_hint(False) return(False) + def on_focus_out(self, window, event): + """Focus has left the window""" + # FIXME: Cause the terminal titlebars to update here + pass + + def on_focus_in(self, window, event): + """Focus has entered the window""" + self.set_urgency_hint(False) + # FIXME: Cause the terminal titlebars to update here + def is_child_notebook(self): """Returns True if this Window's child is a Notebook""" maker = Factory()