we can now automatically authorize a contact we ask subscribtion to
automatically fill entry_login and combobox_agent when we can
This commit is contained in:
parent
c0cbef4c09
commit
f711b8c230
|
@ -372,6 +372,8 @@ class addContact_Window:
|
|||
end_iter = buf.get_end_iter()
|
||||
txt = buf.get_text(start_iter, end_iter, 0)
|
||||
self.plugin.roster.req_sub(self, who, txt, self.account, pseudo)
|
||||
if self.xml.get_widget('checkbutton_auth').get_active():
|
||||
self.plugin.send('AUTH', self.account, who)
|
||||
widget.get_toplevel().destroy()
|
||||
|
||||
def fill_who(self):
|
||||
|
@ -450,6 +452,10 @@ class addContact_Window:
|
|||
self.fill_who()
|
||||
if jid:
|
||||
self.xml.get_widget('entry_who').set_text(jid)
|
||||
jida = jid.split("@")
|
||||
self.xml.get_widget('entry_login').set_text(jida[0])
|
||||
if jida[1] in jid_agents:
|
||||
cb.set_active(jid_agents.index(jida[1])+1)
|
||||
self.xml.signal_connect('gtk_widget_destroy', self.delete_event)
|
||||
self.xml.signal_connect('on_button_sub_clicked', self.on_subscribe)
|
||||
self.xml.signal_connect('on_cancel_clicked', self.on_cancel)
|
||||
|
|
|
@ -2150,6 +2150,8 @@ on the server.</property>
|
|||
|
||||
<widget class="GtkWindow" id="Add">
|
||||
<property name="border_width">5</property>
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">270</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Add user</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
|
@ -2172,7 +2174,7 @@ on the server.</property>
|
|||
<child>
|
||||
<widget class="GtkTable" id="table21">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">4</property>
|
||||
<property name="n_rows">5</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">5</property>
|
||||
|
@ -2373,6 +2375,28 @@ on the server.</property>
|
|||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="checkbutton_auth">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Automatically authorize contact</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">10</property>
|
||||
|
|
Loading…
Reference in New Issue