we can now ask vcard when we recieve a subscription request
This commit is contained in:
parent
19a1f45159
commit
5d8ea9d3bc
|
@ -451,7 +451,7 @@ class Subscription_request_window:
|
|||
self.plugin = plugin
|
||||
self.jid = jid
|
||||
self.account = account
|
||||
xml.get_widget('from_label').set_text(\
|
||||
xml.get_widget('from_label').set_text(
|
||||
_('Subscription request from %s') % self.jid)
|
||||
xml.get_widget('message_textview').get_buffer().set_text(text)
|
||||
xml.signal_autoconnect(self)
|
||||
|
@ -466,6 +466,22 @@ class Subscription_request_window:
|
|||
self.window.destroy()
|
||||
if not self.plugin.roster.contacts[self.account].has_key(self.jid):
|
||||
Add_new_contact_window(self.plugin, self.account, self.jid)
|
||||
|
||||
def on_contact_info_button_clicked(self, widget):
|
||||
'''ask vcard'''
|
||||
if self.plugin.windows[self.account]['infos'].has_key(self.jid):
|
||||
self.plugin.windows[self.account]['infos'][self.jid].window.present()
|
||||
else:
|
||||
self.plugin.windows[self.account]['infos'][self.jid] = \
|
||||
Vcard_window(self.jid, self.plugin, self.account, True)
|
||||
#remove the publish / retrieve buttons
|
||||
vcard_xml = self.plugin.windows[self.account]['infos'][self.jid].xml
|
||||
hbuttonbox = vcard_xml.get_widget('information_hbuttonbox')
|
||||
children = hbuttonbox.get_children()
|
||||
hbuttonbox.remove(children[0])
|
||||
hbuttonbox.remove(children[1])
|
||||
vcard_xml.get_widget('nickname_label').set_text(self.jid)
|
||||
gajim.connections[self.account].request_vcard(self.jid)
|
||||
|
||||
def on_deny_button_clicked(self, widget):
|
||||
'''refuse the request'''
|
||||
|
|
|
@ -2166,13 +2166,13 @@
|
|||
|
||||
<widget class="GtkWindow" id="subscription_request_window">
|
||||
<property name="border_width">4</property>
|
||||
<property name="width_request">400</property>
|
||||
<property name="width_request">550</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="title" translatable="yes">Subscription Request</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
|
@ -2249,7 +2249,7 @@
|
|||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="spacing">20</property>
|
||||
<property name="spacing">12</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="close_button">
|
||||
|
@ -2267,6 +2267,7 @@
|
|||
<child>
|
||||
<widget class="GtkButton" id="deny_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Deny authorization from contact so he cannot know when you're connected</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
@ -2335,9 +2336,81 @@
|
|||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="contact_info_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_contact_info_button_clicked" last_modification_time="Mon, 16 May 2005 13:51:48 GMT"/>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment67">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">0</property>
|
||||
<property name="yscale">0</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="left_padding">0</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2961">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image585">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-justify-fill</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label255">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Contact _Info</property>
|
||||
<property name="use_underline">True</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>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="authorize_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Authorize contact so he can know when you're connected</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
|
|
Loading…
Reference in New Issue