diff options
author | mathieui <mathieui@mathieui.net> | 2011-09-12 10:56:02 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-09-12 10:56:02 +0200 |
commit | 7a312992921debb1d904a0f2b7083272113e253e (patch) | |
tree | 2b06d711f99575b6d533bb1c6551f6057d3e7717 | |
parent | d24b3c42958f50c3979b37ab7666379d78b3fad1 (diff) | |
download | poezio-7a312992921debb1d904a0f2b7083272113e253e.tar.gz poezio-7a312992921debb1d904a0f2b7083272113e253e.tar.bz2 poezio-7a312992921debb1d904a0f2b7083272113e253e.tar.xz poezio-7a312992921debb1d904a0f2b7083272113e253e.zip |
Add a color state for disconnected rooms (Fixes #2166)
-rw-r--r-- | data/themes/dark | 3 | ||||
-rw-r--r-- | data/themes/poezio | 1 | ||||
-rw-r--r-- | src/room.py | 1 | ||||
-rw-r--r-- | src/tabs.py | 6 | ||||
-rw-r--r-- | src/theme.py | 1 |
5 files changed, 11 insertions, 1 deletions
diff --git a/data/themes/dark b/data/themes/dark index db1b2021..77093577 100644 --- a/data/themes/dark +++ b/data/themes/dark @@ -34,6 +34,7 @@ COLOR_TAB_CURRENT = 7 COLOR_TAB_NEW_MESSAGE = 10 COLOR_TAB_HIGHLIGHT = 8 COLOR_TAB_PRIVATE = 9 +COLOR_TAB_DISCONNECTED = 30 # Nickname colors LIST_COLOR_NICKNAMES = [ @@ -77,4 +78,4 @@ COLOR_CURLYBRACKETED_WORD = 4 # words between {} COLOR_ACCOLADE_WORD = 6 # words between [] -COLOR_BRACKETED_WORD = 3
\ No newline at end of file +COLOR_BRACKETED_WORD = 3 diff --git a/data/themes/poezio b/data/themes/poezio index b49403ab..b5bb6a66 100644 --- a/data/themes/poezio +++ b/data/themes/poezio @@ -37,6 +37,7 @@ COLOR_TAB_CURRENT = 56 COLOR_TAB_NEW_MESSAGE = 49 COLOR_TAB_HIGHLIGHT = 21 COLOR_TAB_PRIVATE = 28 +COLOR_TAB_DISCONNECTED = 30 # Nickname colors LIST_COLOR_NICKNAMES = [ diff --git a/src/room.py b/src/room.py index be376b54..58b96adb 100644 --- a/src/room.py +++ b/src/room.py @@ -35,6 +35,7 @@ class Room(TextBuffer): we can know if we can join it, send messages to it, etc """ self.users = [] + self.color_state = theme.COLOR_TAB_DISCONNECTED self.joined = False def get_single_line_topic(self): diff --git a/src/tabs.py b/src/tabs.py index 0d1c5751..77b1610d 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -868,6 +868,8 @@ class MucTab(ChatTab): if from_nick == room.own_nick: # we are banned room.disconnect() self.core.disable_private_tabs(room.name) + self.tab_win.refresh() + self.core.doupdate() if by: kick_msg = _('\x191%(spec)s \x193You\x195 have been banned by \x194%(by)s') % {'spec': theme.CHAR_KICK, 'by':by} else: @@ -892,6 +894,8 @@ class MucTab(ChatTab): if from_nick == room.own_nick: # we are kicked room.disconnect() self.core.disable_private_tabs(room.name) + self.tab_win.refresh() + self.core.doupdate() if by: kick_msg = _('\x191%(spec)s \x193You\x195 have been kicked by \x193%(by)s') % {'spec': theme.CHAR_KICK, 'by':by} else: @@ -917,6 +921,8 @@ class MucTab(ChatTab): # We are now out of the room. Happens with some buggy (? not sure) servers room.disconnect() self.core.disable_private_tabs(from_room) + self.tab_win.refresh() + self.core.doupdate() hide_exit_join = config.get('hide_exit_join', -1) if config.get('hide_exit_join', -1) >= -1 else -1 if hide_exit_join == -1 or user.has_talked_since(hide_exit_join): if not jid.full: diff --git a/src/theme.py b/src/theme.py index 244d6006..2502e5c6 100644 --- a/src/theme.py +++ b/src/theme.py @@ -58,6 +58,7 @@ COLOR_TAB_CURRENT = 56 COLOR_TAB_NEW_MESSAGE = 49 COLOR_TAB_HIGHLIGHT = 21 COLOR_TAB_PRIVATE = 28 +COLOR_TAB_DISCONNECTED = 30 # Nickname colors LIST_COLOR_NICKNAMES = [ |