changeset 66b7c28317c1 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=66b7c28317c1 description: move change tooltip text for audio and video buttons from init to _update_toolbar.
diffstat:
src/chat_control.py | 36 ++++++++++++++++-------------------- 1 files changed, 16 insertions(+), 20 deletions(-)
diffs (53 lines):
diff -r f3ba2501017a -r 66b7c28317c1 src/chat_control.py --- a/src/chat_control.py Thu Jul 19 19:43:00 2012 +0400 +++ b/src/chat_control.py Thu Jul 19 20:31:06 2012 +0400 @@ -1650,26 +1650,6 @@ self.restore_conversation() self.msg_textview.grab_focus()
- # change tooltip text for audio and video buttons if python-farstream is - # not installed - if not gajim.HAVE_FARSTREAM: - tooltip_text = self._audio_button.get_tooltip_text() - self._audio_button.set_tooltip_text( - '%s\n%s' % (tooltip_text, - _('Feature not available, see Help->Features'))) - tooltip_text = self._video_button.get_tooltip_text() - self._video_button.set_tooltip_text( - '%s\n%s' % (tooltip_text, - _('Feature not available, see Help->Features'))) - elif not self.audio_available : - self._audio_button.set_tooltip_text( - '%s\n%s' % (tooltip_text, - _('Feature not supported by remote client'))) - tooltip_text = self._video_button.get_tooltip_text() - self._video_button.set_tooltip_text( - '%s\n%s' % (tooltip_text, - _('Feature not supported by remote client'))) - gajim.ged.register_event_handler('pep-received', ged.GUI1, self._nec_pep_received) gajim.ged.register_event_handler('vcard-received', ged.GUI1, @@ -1731,6 +1711,22 @@ # Video buttons self._video_button.set_sensitive(self.video_available)
+ # change tooltip text for audio and video buttons if python-farstream is + # not installed + audio_tooltip_text = _('Toggle audio session') + '\n' + video_tooltip_text = _('Toggle video session') + '\n' + if not gajim.HAVE_FARSTREAM: + ext_text = _('Feature not available, see Help->Features') + self._audio_button.set_tooltip_text(audio_tooltip_text + ext_text) + self._video_button.set_tooltip_text(video_tooltip_text + ext_text) + elif not self.audio_available : + ext_text =_('Feature not supported by remote client') + self._audio_button.set_tooltip_text(audio_tooltip_text + ext_text) + self._video_button.set_tooltip_text(video_tooltip_text + ext_text) + else: + self._audio_button.set_tooltip_text(audio_tooltip_text[:-1]) + self._video_button.set_tooltip_text(video_tooltip_text[:-1]) + # Send file if (self.contact.supports(NS_FILE) or \ self.contact.supports(NS_JINGLE_FILE_TRANSFER)) or \