fix tooltips for gpg toggle_button

This commit is contained in:
Yann Leboulanger 2005-07-05 21:40:40 +00:00
parent 94c01aeecc
commit 2be42ad322
2 changed files with 7 additions and 3 deletions

View File

@ -10000,7 +10000,6 @@ JID: whatever@jabber.org</property>
<child>
<widget class="GtkEventBox" id="gpg_eventbox">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Click to toggle OpenPGP encryption</property>
<property name="visible_window">True</property>
<property name="above_child">False</property>

View File

@ -87,10 +87,15 @@ class TabbedChatWindow(chat.Chat):
self.set_state_image(jid)
contact_button = self.xmls[jid].get_widget('contact_button')
contact_button.set_use_underline(False)
tb = self.xmls[jid].get_widget('gpg_togglebutton')
if not user.keyID:
self.xmls[jid].get_widget('gpg_togglebutton').set_sensitive(False)
tb.set_sensitive(False)
tt = '%s has not broadcasted an OpenPGP key nor you have assigned one'
else:
self.xmls[jid].get_widget('gpg_togglebutton').set_sensitive(True)
tb.set_sensitive(True)
tt = 'OpenPGP Encryption'
tip = gtk.Tooltips()
tip.set_tip(self.xmls[jid].get_widget('gpg_eventbox'), tt)
# add the fat line at the top
self.draw_name_banner(user.name, jid)