add tooltips in vcard window about subscription and as
This commit is contained in:
		
							parent
							
								
									68de2b3346
								
							
						
					
					
						commit
						751ec180a0
					
				
					 2 changed files with 63 additions and 32 deletions
				
			
		| 
						 | 
				
			
			@ -6648,23 +6648,31 @@ Custom</property>
 | 
			
		|||
		  <property name="spacing">0</property>
 | 
			
		||||
 | 
			
		||||
		  <child>
 | 
			
		||||
		    <widget class="GtkLabel" id="subscription_label">
 | 
			
		||||
		      <property name="width_request">100</property>
 | 
			
		||||
		    <widget class="GtkEventBox" id="subscription_label_eventbox">
 | 
			
		||||
		      <property name="visible">True</property>
 | 
			
		||||
		      <property name="label" translatable="yes"></property>
 | 
			
		||||
		      <property name="use_underline">False</property>
 | 
			
		||||
		      <property name="use_markup">False</property>
 | 
			
		||||
		      <property name="justify">GTK_JUSTIFY_LEFT</property>
 | 
			
		||||
		      <property name="wrap">False</property>
 | 
			
		||||
		      <property name="selectable">False</property>
 | 
			
		||||
		      <property name="xalign">0</property>
 | 
			
		||||
		      <property name="yalign">0.5</property>
 | 
			
		||||
		      <property name="xpad">5</property>
 | 
			
		||||
		      <property name="ypad">5</property>
 | 
			
		||||
		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 | 
			
		||||
		      <property name="width_chars">-1</property>
 | 
			
		||||
		      <property name="single_line_mode">False</property>
 | 
			
		||||
		      <property name="angle">0</property>
 | 
			
		||||
		      <property name="visible_window">True</property>
 | 
			
		||||
		      <property name="above_child">False</property>
 | 
			
		||||
 | 
			
		||||
		      <child>
 | 
			
		||||
			<widget class="GtkLabel" id="subscription_label">
 | 
			
		||||
			  <property name="width_request">100</property>
 | 
			
		||||
			  <property name="visible">True</property>
 | 
			
		||||
			  <property name="label" translatable="yes"></property>
 | 
			
		||||
			  <property name="use_underline">False</property>
 | 
			
		||||
			  <property name="use_markup">False</property>
 | 
			
		||||
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
 | 
			
		||||
			  <property name="wrap">False</property>
 | 
			
		||||
			  <property name="selectable">False</property>
 | 
			
		||||
			  <property name="xalign">0</property>
 | 
			
		||||
			  <property name="yalign">0.5</property>
 | 
			
		||||
			  <property name="xpad">5</property>
 | 
			
		||||
			  <property name="ypad">5</property>
 | 
			
		||||
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 | 
			
		||||
			  <property name="width_chars">-1</property>
 | 
			
		||||
			  <property name="single_line_mode">False</property>
 | 
			
		||||
			  <property name="angle">0</property>
 | 
			
		||||
			</widget>
 | 
			
		||||
		      </child>
 | 
			
		||||
		    </widget>
 | 
			
		||||
		    <packing>
 | 
			
		||||
		      <property name="padding">0</property>
 | 
			
		||||
| 
						 | 
				
			
			@ -6699,22 +6707,30 @@ Custom</property>
 | 
			
		|||
		  </child>
 | 
			
		||||
 | 
			
		||||
		  <child>
 | 
			
		||||
		    <widget class="GtkLabel" id="ask_label">
 | 
			
		||||
		    <widget class="GtkEventBox" id="ask_label_eventbox">
 | 
			
		||||
		      <property name="visible">True</property>
 | 
			
		||||
		      <property name="label" translatable="yes"></property>
 | 
			
		||||
		      <property name="use_underline">False</property>
 | 
			
		||||
		      <property name="use_markup">False</property>
 | 
			
		||||
		      <property name="justify">GTK_JUSTIFY_LEFT</property>
 | 
			
		||||
		      <property name="wrap">False</property>
 | 
			
		||||
		      <property name="selectable">False</property>
 | 
			
		||||
		      <property name="xalign">0.5</property>
 | 
			
		||||
		      <property name="yalign">0.5</property>
 | 
			
		||||
		      <property name="xpad">0</property>
 | 
			
		||||
		      <property name="ypad">0</property>
 | 
			
		||||
		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 | 
			
		||||
		      <property name="width_chars">-1</property>
 | 
			
		||||
		      <property name="single_line_mode">False</property>
 | 
			
		||||
		      <property name="angle">0</property>
 | 
			
		||||
		      <property name="visible_window">True</property>
 | 
			
		||||
		      <property name="above_child">False</property>
 | 
			
		||||
 | 
			
		||||
		      <child>
 | 
			
		||||
			<widget class="GtkLabel" id="ask_label">
 | 
			
		||||
			  <property name="visible">True</property>
 | 
			
		||||
			  <property name="label" translatable="yes"></property>
 | 
			
		||||
			  <property name="use_underline">False</property>
 | 
			
		||||
			  <property name="use_markup">False</property>
 | 
			
		||||
			  <property name="justify">GTK_JUSTIFY_LEFT</property>
 | 
			
		||||
			  <property name="wrap">False</property>
 | 
			
		||||
			  <property name="selectable">False</property>
 | 
			
		||||
			  <property name="xalign">0.5</property>
 | 
			
		||||
			  <property name="yalign">0.5</property>
 | 
			
		||||
			  <property name="xpad">0</property>
 | 
			
		||||
			  <property name="ypad">0</property>
 | 
			
		||||
			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 | 
			
		||||
			  <property name="width_chars">-1</property>
 | 
			
		||||
			  <property name="single_line_mode">False</property>
 | 
			
		||||
			  <property name="angle">0</property>
 | 
			
		||||
			</widget>
 | 
			
		||||
		      </child>
 | 
			
		||||
		    </widget>
 | 
			
		||||
		    <packing>
 | 
			
		||||
		      <property name="padding">0</property>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										17
									
								
								src/vcard.py
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								src/vcard.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -274,14 +274,29 @@ class VcardWindow:
 | 
			
		|||
		self.xml.get_widget('os_label').set_text(os)
 | 
			
		||||
 | 
			
		||||
	def fill_jabber_page(self):
 | 
			
		||||
		tooltips = gtk.Tooltips()
 | 
			
		||||
		self.xml.get_widget('nickname_label').set_text(self.contact.name)
 | 
			
		||||
		self.xml.get_widget('jid_label').set_text(self.contact.jid)
 | 
			
		||||
		uf_sub = helpers.get_uf_sub(self.contact.sub)
 | 
			
		||||
		self.xml.get_widget('subscription_label').set_text(uf_sub)
 | 
			
		||||
		eb = self.xml.get_widget('subscription_label_eventbox')
 | 
			
		||||
		if self.contact.sub == 'from':
 | 
			
		||||
			tt_text = _("This contact is interested in your presence information, but he/she is not interested in yours")
 | 
			
		||||
		elif self.contact.sub == 'to':
 | 
			
		||||
			tt_text = _("You are interested in the contact's presence information, but he/she is not interested in yours")
 | 
			
		||||
		elif self.contact.sub == 'both':
 | 
			
		||||
			tt_text = _("You and the contact are interested in each other's presence information")
 | 
			
		||||
		else: # None
 | 
			
		||||
			tt_text = _("You are not interested in the contact's presence, and neither he/she is interested in yours")
 | 
			
		||||
		tooltips.set_tip(eb, tt_text)
 | 
			
		||||
 | 
			
		||||
		label = self.xml.get_widget('ask_label')
 | 
			
		||||
		
 | 
			
		||||
		uf_ask = helpers.get_uf_ask(self.contact.ask)
 | 
			
		||||
		label.set_text(uf_ask)
 | 
			
		||||
		eb = self.xml.get_widget('ask_label_eventbox')
 | 
			
		||||
		if self.contact.ask == 'subscribe':
 | 
			
		||||
			tooltips.set_tip(eb,
 | 
			
		||||
			_("You are waiting contact's answer about your subscription request"))
 | 
			
		||||
		self.xml.get_widget('nickname_entry').set_text(self.contact.name)
 | 
			
		||||
		log = 1
 | 
			
		||||
		if self.contact.jid in gajim.config.get_per('accounts', self.account,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue