diff options
author | Richard Hitt <rbh00@dell.rbh00.pacbell.net> | 2008-01-26 00:30:48 (GMT) |
---|---|---|
committer | Phil Bordelon <phil@thenexusproject.org> | 2008-01-30 00:33:46 (GMT) |
commit | f6239d6794078d2c10ff1c1e58b124a515d75b62 (patch) | |
tree | 7f033f2c2bb5a94cfcb12a3e93643a6e1864b743 | |
parent | b9b83f630eda16ed36ddbb5ce6dee21e667c052f (diff) |
Make highlighting of tabs turn off when they become active.
Signed-off-by: Phil Bordelon <phil@thenexusproject.org>
-rw-r--r-- | purk/widgets.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/purk/widgets.py b/purk/widgets.py index f2476ef..0f53bdd 100644 --- a/purk/widgets.py +++ b/purk/widgets.py @@ -15,11 +15,13 @@ import servers HILIT = 'h' TEXT ='t' EVENT = 'e' +CURRENT = 'c' ACTIVITY_MARKUP = { HILIT: "<span style='italic' foreground='#00F'>%s</span>", TEXT: "<span foreground='#ca0000'>%s</span>", EVENT: "<span foreground='#363'>%s</span>", + CURRENT: "<span foreground='#000000'>%s</span>", } # This holds all tags for all windows ever @@ -643,7 +645,7 @@ class WindowLabel(gtk.EventBox): for escapes in (('&','&'), ('<','<'), ('>','>')): title = title.replace(*escapes) - for a_type in (HILIT, TEXT, EVENT): + for a_type in (HILIT, TEXT, EVENT, CURRENT): if a_type in self.win.activity: title = ACTIVITY_MARKUP[a_type] % title break @@ -651,6 +653,10 @@ class WindowLabel(gtk.EventBox): self.label.set_markup(title) def tab_popup(self, event): + # When a tab is selected, clear the activity and set CURRENT + if event.button == 1: # left click + self.win.activity = None + self.win.activity = CURRENT if event.button == 3: # right click c_data = self.events.data(window=self.win, menu=[]) self.events.trigger("WindowMenu", c_data) |