Add missing tooltip and markup in vcard window. See #1069. Make string a doc string.
This commit is contained in:
parent
e95a9fa5ef
commit
b991b32886
3 changed files with 981 additions and 975 deletions
File diff suppressed because it is too large
Load diff
|
@ -792,9 +792,9 @@ class Connection(ConnectionHandlers):
|
||||||
return iq
|
return iq
|
||||||
|
|
||||||
def activate_privacy_rule(self, name):
|
def activate_privacy_rule(self, name):
|
||||||
|
'''activate a privacy rule'''
|
||||||
if not self.connection:
|
if not self.connection:
|
||||||
return
|
return
|
||||||
'''activate a privacy rule'''
|
|
||||||
iq = common.xmpp.Iq('set', common.xmpp.NS_PRIVACY, xmlns = '')
|
iq = common.xmpp.Iq('set', common.xmpp.NS_PRIVACY, xmlns = '')
|
||||||
iq.getTag('query').setTag('active', {'name': name})
|
iq.getTag('query').setTag('active', {'name': name})
|
||||||
self.connection.send(iq)
|
self.connection.send(iq)
|
||||||
|
|
10
src/vcard.py
10
src/vcard.py
|
@ -305,11 +305,11 @@ class VcardWindow:
|
||||||
subscription_label = self.xml.get_widget('subscription_label')
|
subscription_label = self.xml.get_widget('subscription_label')
|
||||||
ask_label = self.xml.get_widget('ask_label')
|
ask_label = self.xml.get_widget('ask_label')
|
||||||
if self.gc_contact:
|
if self.gc_contact:
|
||||||
self.xml.get_widget('subscription_title_label').set_text(_("Role:"))
|
self.xml.get_widget('subscription_title_label').set_markup(_("<b>Role:</b>"))
|
||||||
uf_role = helpers.get_uf_role(self.gc_contact.role)
|
uf_role = helpers.get_uf_role(self.gc_contact.role)
|
||||||
subscription_label.set_text(uf_role)
|
subscription_label.set_text(uf_role)
|
||||||
|
|
||||||
self.xml.get_widget('ask_title_label').set_text(_("Affiliation:"))
|
self.xml.get_widget('ask_title_label').set_markup(_("<b>Affiliation:</b>"))
|
||||||
uf_affiliation = helpers.get_uf_affiliation(self.gc_contact.affiliation)
|
uf_affiliation = helpers.get_uf_affiliation(self.gc_contact.affiliation)
|
||||||
ask_label.set_text(uf_affiliation)
|
ask_label.set_text(uf_affiliation)
|
||||||
else:
|
else:
|
||||||
|
@ -330,8 +330,10 @@ class VcardWindow:
|
||||||
ask_label.set_text(uf_ask)
|
ask_label.set_text(uf_ask)
|
||||||
eb = self.xml.get_widget('ask_label_eventbox')
|
eb = self.xml.get_widget('ask_label_eventbox')
|
||||||
if self.contact.ask == 'subscribe':
|
if self.contact.ask == 'subscribe':
|
||||||
tooltips.set_tip(eb,
|
tt_text = _("You are waiting contact's answer about your subscription request")
|
||||||
_("You are waiting contact's answer about your subscription request"))
|
else:
|
||||||
|
tt_text = _("There is no pending subscription request.")
|
||||||
|
tooltips.set_tip(eb, tt_text)
|
||||||
|
|
||||||
resources = '%s (%s)' % (self.contact.resource, unicode(
|
resources = '%s (%s)' % (self.contact.resource, unicode(
|
||||||
self.contact.priority))
|
self.contact.priority))
|
||||||
|
|
Loading…
Add table
Reference in a new issue