Merge branch 'fix_chatstate' into 'master'

[chatstate] fix color converting from gtk floats

See merge request gajim/gajim-plugins!59
This commit is contained in:
Yann Leboulanger committed 2018-01-04 13:44:04 +01:00
commit d3ee607022
2 files changed
+6 -5

No files matched your search

+4 -3
View File
@@ -34,7 +34,7 @@ class ChatstatePlugin(GajimPlugin):
self.description = _('Chat State Notifications in roster.'
'Font color of the contact varies depending on the chat state.\n'
'The plugin does not work if you use custom font color for contacts in roster.\n'
'http://trac.gajim.org/ticket/3628.\nhttp://xmpp.org/extensions/xep-0085.html')
'https://dev.gajim.org/gajim/gajim/issues/3628\nhttp://xmpp.org/extensions/xep-0085.html')
self.config_dialog = None # ChatstatePluginConfigDialog(self)
self.events_handlers = {'chatstate-received':
(ged.GUI2, self.chatstate_received), }
@@ -89,8 +89,9 @@ class ChatstatePlugin(GajimPlugin):
def activate(self):
color = gtkgui_helpers.get_fade_color(app.interface.roster.tree,
False, False)
self.status_color = '#%04x%04x%04x' % (color.red, color.green,
color.blue)
self.status_color = '#%02x%02x%02x' % (int(color.red * 255),
int(color.green * 255),
int(color.blue * 255))
theme = app.config.get('roster_theme')
self.chatstates = {'active': app.config.get('inmsgcolor'),
'composing': app.config.get_per('themes', theme,
+2 -2
View File
@@ -1,10 +1,10 @@
[info]
name: Chatstate in roster
short_name: chatstate
version: 0.5.3
version: 0.5.4
description: Chat State Notifications in roster.
Font color of the contact varies depending on the chat state.
The plugin does not work if you use custom font color for contacts in roster.
authors = Denis Fomin <fominde@gmail.com>
homepage = http://trac-plugins.gajim.org/wiki/ChatstatePlugin
homepage = https://dev.gajim.org/gajim/gajim-plugins/wikis/ChatstatePlugin
min_gajim_version: 0.16.11