roster_tweak. always show correct global status message in the quich-change status field.
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Roster Tweaks
|
name: Roster Tweaks
|
||||||
short_name: roster_tweaks
|
short_name: roster_tweaks
|
||||||
version: 0.5
|
version: 0.6
|
||||||
description: Allows user to tweak roster window appearance (eg. make it compact).
|
description: Allows user to tweak roster window appearance (eg. make it compact).
|
||||||
Based on ticket #3340:
|
Based on ticket #3340:
|
||||||
http://trac.gajim.org/ticket/3340.
|
http://trac.gajim.org/ticket/3340
|
||||||
Added ability to quickly change the status message to all connected accounts.
|
Added ability to quickly change the status message to all connected accounts.
|
||||||
|
Based on ticket #5085:
|
||||||
|
http://trac.gajim.org/ticket/5085.
|
||||||
authors = Denis Fomin <fominde@gmail.com>
|
authors = Denis Fomin <fominde@gmail.com>
|
||||||
homepage = http://trac-plugins.gajim.org/wiki
|
homepage = http://trac-plugins.gajim.org/wiki
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ import gtk
|
|||||||
import pango
|
import pango
|
||||||
import gobject
|
import gobject
|
||||||
|
|
||||||
from common import gajim
|
from common import gajim, ged, helpers, pep
|
||||||
from plugins import GajimPlugin
|
from plugins import GajimPlugin
|
||||||
from plugins.helpers import log_calls
|
from plugins.helpers import log_calls
|
||||||
from plugins.gui import GajimPluginConfigDialog
|
from plugins.gui import GajimPluginConfigDialog
|
||||||
from dialogs import ChangeActivityDialog, ChangeMoodDialog
|
from dialogs import ChangeActivityDialog, ChangeMoodDialog
|
||||||
from common import pep
|
|
||||||
import gtkgui_helpers
|
import gtkgui_helpers
|
||||||
|
|
||||||
|
|
||||||
@@ -21,15 +20,24 @@ class RosterTweaksPlugin(GajimPlugin):
|
|||||||
'(eg. make it compact).\nBased on ticket #3340:\n'
|
'(eg. make it compact).\nBased on ticket #3340:\n'
|
||||||
'http://trac.gajim.org/ticket/3340.\n'
|
'http://trac.gajim.org/ticket/3340.\n'
|
||||||
'Added ability to quickly change the status message '
|
'Added ability to quickly change the status message '
|
||||||
'to all connected accounts.')
|
'to all connected accounts.\n'
|
||||||
|
'Based on ticket #5085:\n'
|
||||||
|
'http://trac.gajim.org/ticket/5085.')
|
||||||
self.config_dialog = RosterTweaksPluginConfigDialog(self)
|
self.config_dialog = RosterTweaksPluginConfigDialog(self)
|
||||||
|
|
||||||
self.config_default_values = {'hide_status_combo': (False, ''),
|
self.config_default_values = {'hide_status_combo': (False, ''),
|
||||||
'use_ctr_m': (False, ''),
|
'use_ctr_m': (False, ''),
|
||||||
'menu_visible': (True, ''),
|
'menu_visible': (True, ''),
|
||||||
'quick_status': (False, '')}
|
'quick_status': (False, '')}
|
||||||
|
self.events_handlers = {'our-show': (ged.GUI2, self.our_show)}
|
||||||
self.roster = gajim.interface.roster
|
self.roster = gajim.interface.roster
|
||||||
|
|
||||||
|
def our_show(self, obj):
|
||||||
|
if self.active:
|
||||||
|
if helpers.get_global_show() != gajim.SHOW_LIST[0]:
|
||||||
|
self.status_widget.set_text(helpers.get_global_status())
|
||||||
|
else:
|
||||||
|
self.status_widget.set_text('')
|
||||||
|
|
||||||
@log_calls('RosterTweaksPlugin')
|
@log_calls('RosterTweaksPlugin')
|
||||||
def activate(self):
|
def activate(self):
|
||||||
self.pep_dict = {}
|
self.pep_dict = {}
|
||||||
@@ -192,6 +200,7 @@ class RosterTweaksPluginConfigDialog(GajimPluginConfigDialog):
|
|||||||
self.plugin.status_widget.set_property('visible', button.get_active())
|
self.plugin.status_widget.set_property('visible', button.get_active())
|
||||||
self.plugin.mood_button.set_property('visible', button.get_active())
|
self.plugin.mood_button.set_property('visible', button.get_active())
|
||||||
self.plugin.activity_button.set_property('visible', button.get_active())
|
self.plugin.activity_button.set_property('visible', button.get_active())
|
||||||
|
self.plugin.status_widget.set_text(helpers.get_global_status())
|
||||||
|
|
||||||
def on_use_ctr_m_toggled(self, button):
|
def on_use_ctr_m_toggled(self, button):
|
||||||
is_ctr_m_enabled = button.get_active()
|
is_ctr_m_enabled = button.get_active()
|
||||||
|
|||||||
Reference in New Issue
Block a user