Rework account_menu.
This commit is contained in:
parent
5104daa3cf
commit
aabe6db039
|
@ -18,15 +18,25 @@
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkSeparatorMenuItem" id="seperator">
|
<widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkMenuItem" id="open_gmail_inbox_menuitem">
|
<widget class="GtkImageMenuItem" id="start_chat_menuitem">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">_Open Gmail Inbox</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">_Start Chat</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
|
<child internal-child="image">
|
||||||
|
<widget class="GtkImage" id="menu-item-image7">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="stock">gtk-jump-to</property>
|
||||||
|
<property name="icon_size">1</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -43,34 +53,6 @@
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</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="image1239">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="stock">gtk-find</property>
|
|
||||||
<property name="icon_size">1</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkImageMenuItem" id="execute_command_menuitem">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">_Execute Command</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<child internal-child="image">
|
|
||||||
<widget class="GtkImage" id="image1246">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="stock">gtk-execute</property>
|
|
||||||
<property name="icon_size">1</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkSeparatorMenuItem" id="seperator">
|
<widget class="GtkSeparatorMenuItem" id="seperator">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -90,6 +72,46 @@
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</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="image1239">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="stock">gtk-find</property>
|
||||||
|
<property name="icon_size">1</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="execute_command_menuitem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">_Execute Command</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<child internal-child="image">
|
||||||
|
<widget class="GtkImage" id="image1246">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="stock">gtk-execute</property>
|
||||||
|
<property name="icon_size">1</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="open_gmail_inbox_menuitem">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">_Open Gmail Inbox</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkSeparatorMenuItem" id="seperator">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImageMenuItem" id="edit_account_menuitem">
|
<widget class="GtkImageMenuItem" id="edit_account_menuitem">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
|
|
@ -2733,7 +2733,7 @@ class RosterWindow:
|
||||||
block_menuitem.set_sensitive(False)
|
block_menuitem.set_sensitive(False)
|
||||||
|
|
||||||
# Remove group
|
# Remove group
|
||||||
remove_item = gtk.ImageMenuItem(_('_Remove from Roster'))
|
remove_item = gtk.ImageMenuItem(_('_Remove'))
|
||||||
icon = gtk.image_new_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_MENU)
|
icon = gtk.image_new_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_MENU)
|
||||||
remove_item.set_image(icon)
|
remove_item.set_image(icon)
|
||||||
menu.append(remove_item)
|
menu.append(remove_item)
|
||||||
|
@ -2889,6 +2889,7 @@ class RosterWindow:
|
||||||
account_context_menu = xml.get_widget('account_context_menu')
|
account_context_menu = xml.get_widget('account_context_menu')
|
||||||
|
|
||||||
status_menuitem = xml.get_widget('status_menuitem')
|
status_menuitem = xml.get_widget('status_menuitem')
|
||||||
|
start_chat_menuitem = xml.get_widget('start_chat_menuitem')
|
||||||
join_group_chat_menuitem = xml.get_widget('join_group_chat_menuitem')
|
join_group_chat_menuitem = xml.get_widget('join_group_chat_menuitem')
|
||||||
muc_icon = self.load_icon('muc_active')
|
muc_icon = self.load_icon('muc_active')
|
||||||
if muc_icon:
|
if muc_icon:
|
||||||
|
@ -2952,6 +2953,9 @@ class RosterWindow:
|
||||||
execute_command_menuitem.connect('activate',
|
execute_command_menuitem.connect('activate',
|
||||||
self.on_execute_command, contact, account)
|
self.on_execute_command, contact, account)
|
||||||
|
|
||||||
|
start_chat_menuitem.connect('activate',
|
||||||
|
self.on_new_chat_menuitem_activate, account)
|
||||||
|
|
||||||
gc_sub_menu = gtk.Menu() # gc is always a submenu
|
gc_sub_menu = gtk.Menu() # gc is always a submenu
|
||||||
join_group_chat_menuitem.set_submenu(gc_sub_menu)
|
join_group_chat_menuitem.set_submenu(gc_sub_menu)
|
||||||
self.add_bookmarks_list(gc_sub_menu, account)
|
self.add_bookmarks_list(gc_sub_menu, account)
|
||||||
|
@ -2960,7 +2964,8 @@ class RosterWindow:
|
||||||
if gajim.connections[account].connected < 2:
|
if gajim.connections[account].connected < 2:
|
||||||
for widget in [add_contact_menuitem, service_discovery_menuitem,
|
for widget in [add_contact_menuitem, service_discovery_menuitem,
|
||||||
join_group_chat_menuitem,
|
join_group_chat_menuitem,
|
||||||
execute_command_menuitem]:
|
execute_command_menuitem,
|
||||||
|
start_chat_menuitem]:
|
||||||
widget.set_sensitive(False)
|
widget.set_sensitive(False)
|
||||||
else:
|
else:
|
||||||
xml = gtkgui_helpers.get_glade('zeroconf_context_menu.glade')
|
xml = gtkgui_helpers.get_glade('zeroconf_context_menu.glade')
|
||||||
|
|
Loading…
Reference in New Issue