change callback, widget and variable names for agent_registration_window in glade and in the code
This commit is contained in:
		
							parent
							
								
									86bc75a036
								
							
						
					
					
						commit
						e0671d5534
					
				
					 2 changed files with 13 additions and 13 deletions
				
			
		| 
						 | 
					@ -1144,7 +1144,7 @@ class configure_accounts_window:
 | 
				
			||||||
class agent_registration_window:
 | 
					class agent_registration_window:
 | 
				
			||||||
	"""Class for agent registration window :
 | 
						"""Class for agent registration window :
 | 
				
			||||||
	window that appears when we want to subscribe to an agent"""
 | 
						window that appears when we want to subscribe to an agent"""
 | 
				
			||||||
	def on_cancel(self, widget):
 | 
						def on_cancel_button_clicked(self, widget):
 | 
				
			||||||
		"""When Cancel button is clicked"""
 | 
							"""When Cancel button is clicked"""
 | 
				
			||||||
		widget.get_toplevel().destroy()
 | 
							widget.get_toplevel().destroy()
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
| 
						 | 
					@ -1166,30 +1166,30 @@ class agent_registration_window:
 | 
				
			||||||
					entry.grab_focus()
 | 
										entry.grab_focus()
 | 
				
			||||||
		table.show_all()
 | 
							table.show_all()
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	def on_ok(self, widget):
 | 
						def on_ok_button_clicked(self, widget):
 | 
				
			||||||
		"""When Ok button is clicked :
 | 
							"""When Ok button is clicked :
 | 
				
			||||||
		send registration info to the core"""
 | 
							send registration info to the core"""
 | 
				
			||||||
		for name in self.entries.keys():
 | 
							for name in self.entries.keys():
 | 
				
			||||||
			self.infos[name] = self.entries[name].get_text()
 | 
								self.infos[name] = self.entries[name].get_text()
 | 
				
			||||||
		user1 = gtkgui.user(self.agent, self.agent, ['Agents'], 'offline', 'offline', \
 | 
							user1 = gtkgui.user(self.agent, self.agent, ['Agents'], 'offline', \
 | 
				
			||||||
			'from', '', '', 0, '')
 | 
								'offline', 'from', '', '', 0, '')
 | 
				
			||||||
		self.plugin.roster.contacts[self.account][self.agent] = [user1]
 | 
							self.plugin.roster.contacts[self.account][self.agent] = [user1]
 | 
				
			||||||
		self.plugin.roster.add_user_to_roster(self.agent, self.account)
 | 
							self.plugin.roster.add_user_to_roster(self.agent, self.account)
 | 
				
			||||||
		self.plugin.send('REG_AGENT', self.account, self.agent)
 | 
							self.plugin.send('REG_AGENT', self.account, self.agent)
 | 
				
			||||||
		widget.get_toplevel().destroy()
 | 
							widget.get_toplevel().destroy()
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	def __init__(self, agent, infos, plugin, account):
 | 
						def __init__(self, agent, infos, plugin, account):
 | 
				
			||||||
		self.xml = gtk.glade.XML(GTKGUI_GLADE, 'agent_reg', APP)
 | 
							self.xml = gtk.glade.XML(GTKGUI_GLADE, 'agent_registration_window', APP)
 | 
				
			||||||
		self.agent = agent
 | 
							self.agent = agent
 | 
				
			||||||
		self.infos = infos
 | 
							self.infos = infos
 | 
				
			||||||
		self.plugin = plugin
 | 
							self.plugin = plugin
 | 
				
			||||||
		self.account = account
 | 
							self.account = account
 | 
				
			||||||
		self.xml.get_widget('agent_reg').set_title(_("Register to %s") % agent)
 | 
							window = self.xml.get_widget('agent_registration_window')
 | 
				
			||||||
 | 
							window.set_title(_('Register to %s') % agent)
 | 
				
			||||||
		self.xml.get_widget('label').set_text(infos['instructions'])
 | 
							self.xml.get_widget('label').set_text(infos['instructions'])
 | 
				
			||||||
		self.entries = {}
 | 
							self.entries = {}
 | 
				
			||||||
		self.draw_table()
 | 
							self.draw_table()
 | 
				
			||||||
		self.xml.signal_connect('on_cancel_clicked', self.on_cancel)
 | 
							self.xml.signal_autoconnect(self)
 | 
				
			||||||
		self.xml.signal_connect('on_button_ok_clicked', self.on_ok)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class agent_browser_window:
 | 
					class agent_browser_window:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3118,7 +3118,7 @@ on the server as a vCard</property>
 | 
				
			||||||
  </child>
 | 
					  </child>
 | 
				
			||||||
</widget>
 | 
					</widget>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<widget class="GtkWindow" id="agent_reg">
 | 
					<widget class="GtkWindow" id="agent_registration_window">
 | 
				
			||||||
  <property name="border_width">5</property>
 | 
					  <property name="border_width">5</property>
 | 
				
			||||||
  <property name="visible">True</property>
 | 
					  <property name="visible">True</property>
 | 
				
			||||||
  <property name="title" translatable="yes">Register to</property>
 | 
					  <property name="title" translatable="yes">Register to</property>
 | 
				
			||||||
| 
						 | 
					@ -3198,13 +3198,13 @@ on the server as a vCard</property>
 | 
				
			||||||
	  <property name="spacing">25</property>
 | 
						  <property name="spacing">25</property>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	  <child>
 | 
						  <child>
 | 
				
			||||||
	    <widget class="GtkButton" id="button_cancel">
 | 
						    <widget class="GtkButton" id="cancel_button">
 | 
				
			||||||
	      <property name="visible">True</property>
 | 
						      <property name="visible">True</property>
 | 
				
			||||||
	      <property name="can_default">True</property>
 | 
						      <property name="can_default">True</property>
 | 
				
			||||||
	      <property name="can_focus">True</property>
 | 
						      <property name="can_focus">True</property>
 | 
				
			||||||
	      <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
						      <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
				
			||||||
	      <property name="focus_on_click">True</property>
 | 
						      <property name="focus_on_click">True</property>
 | 
				
			||||||
	      <signal name="clicked" handler="on_cancel_clicked" last_modification_time="Thu, 18 Mar 2004 14:49:06 GMT"/>
 | 
						      <signal name="clicked" handler="on_cancel_button_clicked" last_modification_time="Wed, 02 Mar 2005 13:06:16 GMT"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	      <child>
 | 
						      <child>
 | 
				
			||||||
		<widget class="GtkAlignment" id="alignment18">
 | 
							<widget class="GtkAlignment" id="alignment18">
 | 
				
			||||||
| 
						 | 
					@ -3269,13 +3269,13 @@ on the server as a vCard</property>
 | 
				
			||||||
	  </child>
 | 
						  </child>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	  <child>
 | 
						  <child>
 | 
				
			||||||
	    <widget class="GtkButton" id="button_ok">
 | 
						    <widget class="GtkButton" id="ok_button">
 | 
				
			||||||
	      <property name="visible">True</property>
 | 
						      <property name="visible">True</property>
 | 
				
			||||||
	      <property name="can_default">True</property>
 | 
						      <property name="can_default">True</property>
 | 
				
			||||||
	      <property name="can_focus">True</property>
 | 
						      <property name="can_focus">True</property>
 | 
				
			||||||
	      <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
						      <property name="relief">GTK_RELIEF_NORMAL</property>
 | 
				
			||||||
	      <property name="focus_on_click">True</property>
 | 
						      <property name="focus_on_click">True</property>
 | 
				
			||||||
	      <signal name="clicked" handler="on_button_ok_clicked" last_modification_time="Fri, 14 Nov 2003 11:03:35 GMT"/>
 | 
						      <signal name="clicked" handler="on_ok_button_clicked" last_modification_time="Wed, 02 Mar 2005 13:06:36 GMT"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	      <child>
 | 
						      <child>
 | 
				
			||||||
		<widget class="GtkAlignment" id="alignment17">
 | 
							<widget class="GtkAlignment" id="alignment17">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue