gajim now sends xml stanza via xml console

This commit is contained in:
Nikos Kouremenos 2005-07-04 21:29:22 +00:00
parent 5032f888f9
commit 4e66548813
3 changed files with 438 additions and 58 deletions

View File

@ -850,3 +850,69 @@ class SendSingleMessageDialog:
keyID = None, type = 'normal', subject=subject)
self.message_tv_buffer.set_text('') # we sent ok, clear the textview
class XMLConsoleWindow:
def __init__(self, plugin, account):
self.plugin = plugin
self.account = account
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'xml_console_window', APP)
self.window = self.xml.get_widget('xml_console_window')
self.input_textview = self.xml.get_widget('input_textview')
self.stanzas_log_textview = self.xml.get_widget('stanzas_log_textview')
self.input_tv_buffer = self.input_textview.get_buffer()
print self.xml.get_widget('expander').set_resize_mode(gtk.RESIZE_IMMEDIATE)
self.input_textview.modify_base(
gtk.STATE_NORMAL, gtk.gdk.color_parse('black'))
self.input_textview.modify_text(
gtk.STATE_NORMAL, gtk.gdk.color_parse('green'))
self.stanzas_log_textview.modify_base(
gtk.STATE_NORMAL, gtk.gdk.color_parse('black'))
self.stanzas_log_textview.modify_text(
gtk.STATE_NORMAL, gtk.gdk.color_parse('green'))
if len(gajim.connections) > 1:
title = _('XML Console for %s')\
% gajim.config.get_per('accounts', self.account, 'name')
else:
title = _('XML Console')
self.window.set_title(title)
self.input_textview.grab_focus()
self.xml.signal_autoconnect(self)
self.window.show_all()
def on_send_button_clicked(self, widget):
begin_iter, end_iter = self.input_tv_buffer.get_bounds()
stanza = self.input_tv_buffer.get_text(begin_iter, end_iter)
if stanza:
gajim.connections[self.account].send_stanza(stanza)
self.input_tv_buffer.set_text('') # we sent ok, clear the textview
def on_presence_button_clicked(self, widget):
self.input_tv_buffer.set_text(
'<presence><show></show><status></status><priority></priority></presence>'
)
def on_iq_button_clicked(self, widget):
self.input_tv_buffer.set_text(
'<iq to="" type=""><query xmlns=""></query></iq>'
)
def on_message_button_clicked(self, widget):
self.input_tv_buffer.set_text(
'<message to="" type=""><body></body></message>'
)
def on_expander_size_request(self, widget, req):
pass
def on_xml_console_window_destroy(self, widget):
# remove us from open windows
del self.plugin.windows[self.account]['xml_console']
widget.destroy()

View File

@ -11864,7 +11864,6 @@ JID: whatever@jabber.org</property>
<widget class="GtkDialog" id="input_dialog">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="title" translatable="yes"></property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
@ -15182,7 +15181,7 @@ the Jabber network.</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image769">
<widget class="GtkImage" id="image852">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property>
@ -15209,7 +15208,7 @@ the Jabber network.</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image770">
<widget class="GtkImage" id="image853">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="icon_size">1</property>
@ -15242,7 +15241,7 @@ the Jabber network.</property>
<signal name="activate" handler="on_assign_openpgp_key_menuitem_activate" last_modification_time="Thu, 30 Jun 2005 22:57:59 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image771">
<widget class="GtkImage" id="image854">
<property name="visible">True</property>
<property name="stock">gtk-dialog-authentication</property>
<property name="icon_size">1</property>
@ -15267,7 +15266,7 @@ the Jabber network.</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image772">
<widget class="GtkImage" id="image855">
<property name="visible">True</property>
<property name="stock">gtk-dialog-question</property>
<property name="icon_size">1</property>
@ -15284,11 +15283,11 @@ the Jabber network.</property>
<child>
<widget class="GtkImageMenuItem" id="resend_authorization_to_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Re_send Authorization to</property>
<property name="label" translatable="yes">Send Authorization to</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image773">
<widget class="GtkImage" id="image856">
<property name="visible">True</property>
<property name="stock">gtk-go-up</property>
<property name="icon_size">1</property>
@ -15304,11 +15303,11 @@ the Jabber network.</property>
<child>
<widget class="GtkImageMenuItem" id="rerequest_authorization_from_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Rere_quest Authorization from</property>
<property name="label" translatable="yes">Re_quest Authorization from</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image774">
<widget class="GtkImage" id="image857">
<property name="visible">True</property>
<property name="stock">gtk-go-down</property>
<property name="icon_size">1</property>
@ -15331,7 +15330,7 @@ the Jabber network.</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image775">
<widget class="GtkImage" id="image858">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@ -15350,7 +15349,7 @@ the Jabber network.</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image776">
<widget class="GtkImage" id="image859">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
@ -15382,7 +15381,7 @@ the Jabber network.</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image777">
<widget class="GtkImage" id="image860">
<property name="visible">True</property>
<property name="stock">gtk-justify-fill</property>
<property name="icon_size">1</property>
@ -15777,26 +15776,62 @@ the Jabber network.</property>
</child>
<child>
<widget class="GtkMenuItem" id="information_menuitem">
<widget class="GtkImageMenuItem" id="information_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Information</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image849">
<property name="visible">True</property>
<property name="stock">gtk-justify-fill</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="add_to_roster_menuitem">
<widget class="GtkImageMenuItem" id="add_to_roster_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Add to Roster</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image850">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="send_private_message_menuitem">
<widget class="GtkImageMenuItem" id="send_private_message_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">_Send Private Message</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image851">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
</widget>
@ -16086,7 +16121,7 @@ Maybe I'll refactor later</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image825">
<widget class="GtkImage" id="image841">
<property name="visible">True</property>
<property name="stock">gtk-network</property>
<property name="icon_size">1</property>
@ -16112,7 +16147,7 @@ Maybe I'll refactor later</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image826">
<widget class="GtkImage" id="image842">
<property name="visible">True</property>
<property name="stock">gtk-dialog-warning</property>
<property name="icon_size">1</property>
@ -16133,7 +16168,7 @@ Maybe I'll refactor later</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image827">
<widget class="GtkImage" id="image843">
<property name="visible">True</property>
<property name="stock">gtk-execute</property>
<property name="icon_size">1</property>
@ -16157,7 +16192,7 @@ Maybe I'll refactor later</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image828">
<widget class="GtkImage" id="image844">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
@ -16177,7 +16212,7 @@ Maybe I'll refactor later</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image829">
<widget class="GtkImage" id="image845">
<property name="visible">True</property>
<property name="stock">gtk-find</property>
<property name="icon_size">1</property>
@ -16197,7 +16232,7 @@ Maybe I'll refactor later</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image830">
<widget class="GtkImage" id="image846">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@ -16217,7 +16252,7 @@ Maybe I'll refactor later</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image831">
<widget class="GtkImage" id="image847">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
@ -16237,7 +16272,7 @@ Maybe I'll refactor later</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image832">
<widget class="GtkImage" id="image848">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
<property name="icon_size">1</property>
@ -16251,4 +16286,296 @@ Maybe I'll refactor later</property>
</child>
</widget>
<widget class="GtkWindow" id="xml_console_window">
<property name="border_width">12</property>
<property name="title" translatable="yes"></property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="default_width">550</property>
<property name="default_height">450</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>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<signal name="destroy" handler="on_xml_console_window_destroy" last_modification_time="Mon, 04 Jul 2005 20:12:04 GMT"/>
<child>
<widget class="GtkVPaned" id="vpaned4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position">390</property>
<child>
<widget class="GtkVBox" id="traffic_vbox">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label342">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Jabber Traffic&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</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">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="GtkScrolledWindow" id="scrolledwindow43">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTextView" id="stanzas_log_textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="overwrite">False</property>
<property name="accepts_tab">True</property>
<property name="justification">GTK_JUSTIFY_LEFT</property>
<property name="wrap_mode">GTK_WRAP_CHAR</property>
<property name="cursor_visible">True</property>
<property name="pixels_above_lines">0</property>
<property name="pixels_below_lines">0</property>
<property name="pixels_inside_wrap">0</property>
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
<property name="text" translatable="yes"></property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="shrink">True</property>
<property name="resize">True</property>
</packing>
</child>
<child>
<widget class="GtkExpander" id="expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="expanded">False</property>
<property name="spacing">6</property>
<signal name="size_request" handler="on_expander_size_request" last_modification_time="Mon, 04 Jul 2005 21:12:26 GMT"/>
<child>
<widget class="GtkVBox" id="vbox104">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow42">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTextView" id="input_textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="overwrite">False</property>
<property name="accepts_tab">True</property>
<property name="justification">GTK_JUSTIFY_LEFT</property>
<property name="wrap_mode">GTK_WRAP_CHAR</property>
<property name="cursor_visible">True</property>
<property name="pixels_above_lines">0</property>
<property name="pixels_below_lines">0</property>
<property name="pixels_inside_wrap">0</property>
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
<property name="text" translatable="yes"></property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox31">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">6</property>
<child>
<widget class="GtkButton" id="iq_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_IQ</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_iq_button_clicked" last_modification_time="Mon, 04 Jul 2005 19:35:55 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="presence_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Presence</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_presence_button_clicked" last_modification_time="Mon, 04 Jul 2005 19:36:08 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="message_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">_Message</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_message_button_clicked" last_modification_time="Mon, 04 Jul 2005 19:36:21 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="send_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_send_button_clicked" last_modification_time="Mon, 04 Jul 2005 19:36:26 GMT"/>
<child>
<widget class="GtkAlignment" id="alignment80">
<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="hbox2980">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image833">
<property name="visible">True</property>
<property name="stock">gtk-apply</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="label341">
<property name="visible">True</property>
<property name="label" translatable="yes">_Send</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>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label343">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;XML Input&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</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">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="shrink">True</property>
<property name="resize">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -643,7 +643,6 @@ class RosterWindow:
roster_contact_context_menu.popup(None, None, None, event.button,
event.time)
roster_contact_context_menu.show_all()
roster_contact_context_menu.reposition()
def mk_menu_g(self, event, iter):
'''Make group's popup menu'''
@ -665,7 +664,6 @@ class RosterWindow:
menu.popup(None, None, None, event.button, event.time)
menu.show_all()
menu.reposition()
def mk_menu_agent(self, event, iter):
'''Make agent's popup menu'''
@ -676,66 +674,52 @@ class RosterWindow:
user = self.contacts[account][jid][0]
menu = gtk.Menu()
item = gtk.MenuItem()
item = gtk.ImageMenuItem(_('_Log on'))
icon = gtk.Image()
icon.set_from_stock(gtk.STOCK_YES, gtk.ICON_SIZE_MENU)
label = gtk.Label(_('_Log on'))
label.set_use_underline(True)
hbox = gtk.HBox(False, 3)
hbox.pack_start(icon, False, False)
hbox.pack_start(label, False, False)
item.add(hbox)
item.set_image(icon)
menu.append(item)
show = self.contacts[account][jid][0].show
if show != 'offline' and show != 'error':
item.set_sensitive(False)
item.connect('activate', self.on_agent_logging, jid, None, account)
item = gtk.MenuItem()
item = gtk.ImageMenuItem(_('Log _off'))
icon = gtk.Image()
icon.set_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_MENU)
label = gtk.Label(_('Log _off'))
label.set_use_underline(True)
hbox = gtk.HBox(False, 3)
hbox.pack_start(icon, False, False)
hbox.pack_start(label, False, False)
item.add(hbox)
item.set_image(icon)
menu.append(item)
if show == 'offline' or show == 'error':
item.set_sensitive(False)
item.connect('activate', self.on_agent_logging, jid, 'unavailable',
account)
item = gtk.MenuItem()
item = gtk.MenuItem() # seperator
menu.append(item)
item = gtk.MenuItem()
item = gtk.ImageMenuItem(_('Edit'))
icon = gtk.Image()
icon.set_from_stock(gtk.STOCK_EDIT, gtk.ICON_SIZE_MENU)
label = gtk.Label(_('Edit'))
label.set_use_underline(True)
hbox = gtk.HBox(False, 3)
hbox.pack_start(icon, False, False)
hbox.pack_start(label, False, False)
item.add(hbox)
icon.set_from_stock(gtk.STOCK_PREFERENCES, gtk.ICON_SIZE_MENU)
item.set_image(icon)
menu.append(item)
item.connect('activate', self.on_edit_agent, user, account)
item = gtk.MenuItem()
item = gtk.ImageMenuItem(_('_Remove from Roster'))
icon = gtk.Image()
icon.set_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_MENU)
label = gtk.Label(_('_Remove from Roster'))
label.set_use_underline(True)
hbox = gtk.HBox(False, 3)
hbox.pack_start(icon, False, False)
hbox.pack_start(label, False, False)
item.add(hbox)
item.set_image(icon)
menu.append(item)
item.connect('activate', self.on_remove_agent, user, account)
menu.popup(None, None, None, event.button, event.time)
menu.show_all()
menu.reposition()
def on_xml_console(self, widget, account):
if self.plugin.windows[account].has_key('xml_console'):
self.plugin.windows[account]['xml_console'].window.present()
else:
self.plugin.windows[account]['xml_console'] = \
dialogs.XMLConsoleWindow(self.plugin, account)
def on_edit_account(self, widget, account):
if self.plugin.windows[account].has_key('account_modification'):
@ -766,6 +750,8 @@ class RosterWindow:
status_menuitem = childs[0]
#sep
advanced_actions_menuitem = childs[2]
xml_console_menuitem =\
advanced_actions_menuitem.get_submenu().get_children()[0]
edit_account_menuitem = childs[3]
service_discovery_menuitem = childs[4]
add_contact_menuitem = childs[5]
@ -788,6 +774,8 @@ class RosterWindow:
sub_menu.append(item)
item.connect('activate', self.change_status, account, show)
xml_console_menuitem.connect('activate', self.on_xml_console, account)
edit_account_menuitem.connect('activate', self.on_edit_account, account)
service_discovery_menuitem.connect('activate',
self.on_service_disco_menuitem_activate, account)
@ -799,7 +787,6 @@ class RosterWindow:
account_context_menu.popup(None, None, None, event.button, event.time)
account_context_menu.show_all()
account_context_menu.reposition()
def on_add_to_roster(self, widget, user, account):
dialogs.AddNewContactWindow(self.plugin, account, user.jid)
@ -808,7 +795,7 @@ class RosterWindow:
'''Authorize a user (by re-sending auth menuitem)'''
gajim.connections[account].send_authorization(jid)
dialogs.InformationDialog(_('Authorization has been sent'),
_('Now "%s" will know when your status.') %jid).get_response()
_('Now "%s" will know your status.') %jid).get_response()
def req_sub(self, widget, jid, txt, account, group=None, pseudo=None):
'''Request subscription to a user'''