Skip to content

Commit

Permalink
Add basic fix for issue #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ismail-s committed Apr 15, 2014
1 parent 27d86f0 commit b3805f5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ishyChat/Client/Views/TkinterView.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,19 @@ def addClient(self, new_name):
we can colour their name in the colour we've assigned to them."""
if new_name in self.db:
return

# A little hack to get around 'black' not being
# a standard named tkinter/tk colour.
if 'black' in new_name.lower():
self.addClient('gray')
colour = self.db['gray']
self.textbox.tag_delete('client_' + 'gray')
self.textbox.tag_config('client_' + new_name,
foreground = colour)
del self.db['gray']
self.db[new_name] = colour
return

self.db[new_name] = ''

flat_name = new_name.lower()
Expand Down

0 comments on commit b3805f5

Please sign in to comment.