diff --git a/src/gtkgui.glade b/src/gtkgui.glade index a527c7c081633cb7f651107cf2f3f913ddcfecbe..8360787ef498f98155a21b904dc696cb11349851 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -10859,15 +10859,15 @@ Custom</property> </child> <child> - <widget class="GtkImageMenuItem" id="single_message_menuitem"> + <widget class="GtkImageMenuItem" id="join_gc_menuitem"> <property name="visible">True</property> - <property name="label" translatable="yes">Send Single _Message</property> + <property name="label" translatable="yes">_Group Chat</property> <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image1373"> + <widget class="GtkImage" id="image1445"> <property name="visible">True</property> - <property name="stock">gtk-new</property> + <property name="stock">gtk-connect</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -10879,15 +10879,15 @@ Custom</property> </child> <child> - <widget class="GtkImageMenuItem" id="join_gc_menuitem"> + <widget class="GtkImageMenuItem" id="single_message_menuitem"> <property name="visible">True</property> - <property name="label" translatable="yes">_Group Chat</property> + <property name="label" translatable="yes">Send Single _Message</property> <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image1445"> + <widget class="GtkImage" id="image1373"> <property name="visible">True</property> - <property name="stock">gtk-connect</property> + <property name="stock">gtk-new</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -16752,15 +16752,15 @@ Maybe I'll refactor later</property> </child> <child> - <widget class="GtkImageMenuItem" id="new_message_menuitem"> + <widget class="GtkImageMenuItem" id="join_group_chat_menuitem"> <property name="visible">True</property> - <property name="label" translatable="yes">Send Single _Message...</property> + <property name="label" translatable="yes">_Group Chat</property> <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image1235"> + <widget class="GtkImage" id="image1234"> <property name="visible">True</property> - <property name="stock">gtk-new</property> + <property name="stock">gtk-connect</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -16770,17 +16770,17 @@ Maybe I'll refactor later</property> </child> </widget> </child> - + <child> - <widget class="GtkImageMenuItem" id="join_group_chat_menuitem"> + <widget class="GtkImageMenuItem" id="new_message_menuitem"> <property name="visible">True</property> - <property name="label" translatable="yes">_Join New Room...</property> + <property name="label" translatable="yes">Send Single _Message...</property> <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image1234"> + <widget class="GtkImage" id="image1235"> <property name="visible">True</property> - <property name="stock">gtk-connect</property> + <property name="stock">gtk-new</property> <property name="icon_size">1</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -16811,6 +16811,26 @@ Maybe I'll refactor later</property> </widget> </child> + <child> + <widget class="GtkImageMenuItem" id="service_discovery_menuitem"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Discover Services...</property> + <property name="use_underline">True</property> + + <child internal-child="image"> + <widget class="GtkImage" id="image1232"> + <property name="visible">True</property> + <property name="stock">gtk-find</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="GtkImageMenuItem" id="edit_account_menuitem"> <property name="visible">True</property> diff --git a/src/roster_window.py b/src/roster_window.py index 9b21cdf2b3e890056da3a67aea5371256564050d..0cf220b2e59f332192d3251f3294f28e7583b842 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1497,11 +1497,11 @@ def build_account_menu(self, account): childs = account_context_menu.get_children() status_menuitem = childs[0] - new_message_menuitem = childs[1] - join_group_chat_menuitem = childs[2] + join_group_chat_menuitem = childs[1] + new_message_menuitem = childs[2] add_contact_menuitem = childs[3] - edit_account_menuitem = childs[4] - + service_discovery_menuitem = childs[4] + edit_account_menuitem = childs[5] sub_menu = gtk.Menu() status_menuitem.set_submenu(sub_menu) @@ -1535,6 +1535,8 @@ def build_account_menu(self, account): edit_account_menuitem.connect('activate', self.on_edit_account, account) add_contact_menuitem.connect('activate', self.on_add_new_contact, account) + service_discovery_menuitem.connect('activate', + self.on_service_disco_menuitem_activate, account) gc_sub_menu = gtk.Menu() # gc is always a submenu join_group_chat_menuitem.set_submenu(gc_sub_menu) @@ -1544,7 +1546,7 @@ def build_account_menu(self, account): # make some items insensitive if account is offline if gajim.connections[account].connected < 2: - for widget in [add_contact_menuitem, + for widget in [add_contact_menuitem, service_discovery_menuitem, join_group_chat_menuitem, new_message_menuitem]: widget.set_sensitive(False)