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
|
@ -1144,7 +1144,7 @@ class configure_accounts_window:
|
|||
class agent_registration_window:
|
||||
"""Class for agent registration window :
|
||||
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"""
|
||||
widget.get_toplevel().destroy()
|
||||
|
||||
|
@ -1166,30 +1166,30 @@ class agent_registration_window:
|
|||
entry.grab_focus()
|
||||
table.show_all()
|
||||
|
||||
def on_ok(self, widget):
|
||||
def on_ok_button_clicked(self, widget):
|
||||
"""When Ok button is clicked :
|
||||
send registration info to the core"""
|
||||
for name in self.entries.keys():
|
||||
self.infos[name] = self.entries[name].get_text()
|
||||
user1 = gtkgui.user(self.agent, self.agent, ['Agents'], 'offline', 'offline', \
|
||||
'from', '', '', 0, '')
|
||||
user1 = gtkgui.user(self.agent, self.agent, ['Agents'], 'offline', \
|
||||
'offline', 'from', '', '', 0, '')
|
||||
self.plugin.roster.contacts[self.account][self.agent] = [user1]
|
||||
self.plugin.roster.add_user_to_roster(self.agent, self.account)
|
||||
self.plugin.send('REG_AGENT', self.account, self.agent)
|
||||
widget.get_toplevel().destroy()
|
||||
|
||||
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.infos = infos
|
||||
self.plugin = plugin
|
||||
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.entries = {}
|
||||
self.draw_table()
|
||||
self.xml.signal_connect('on_cancel_clicked', self.on_cancel)
|
||||
self.xml.signal_connect('on_button_ok_clicked', self.on_ok)
|
||||
self.xml.signal_autoconnect(self)
|
||||
|
||||
|
||||
class agent_browser_window:
|
||||
|
|
|
@ -3118,7 +3118,7 @@ on the server as a vCard</property>
|
|||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkWindow" id="agent_reg">
|
||||
<widget class="GtkWindow" id="agent_registration_window">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</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>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_cancel">
|
||||
<widget class="GtkButton" id="cancel_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</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>
|
||||
<widget class="GtkAlignment" id="alignment18">
|
||||
|
@ -3269,13 +3269,13 @@ on the server as a vCard</property>
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_ok">
|
||||
<widget class="GtkButton" id="ok_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</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>
|
||||
<widget class="GtkAlignment" id="alignment17">
|
||||
|
|
Loading…
Reference in New Issue