[steve-e]
* improve account context menu * improve groupchat user's context menu * improve group context menu * improve join groupchat menu
This commit is contained in:
parent
246fd6d8fb
commit
b82a5b96bc
|
@ -1,50 +1,27 @@
|
|||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||
<!--*- mode: xml -*-->
|
||||
<glade-interface>
|
||||
|
||||
<widget class="GtkMenu" id="account_context_menu">
|
||||
|
||||
<widget class="GtkMenu" id="account_context_menu">
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="status_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Status</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1235">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-network</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="join_group_chat_menuitem">
|
||||
<widget class="GtkSeparatorMenuItem" id="seperator">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Group Chat</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1236">
|
||||
<property name="visible">True</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>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="open_gmail_inbox_menuitem">
|
||||
<property name="visible">True</property>
|
||||
|
@ -52,106 +29,80 @@
|
|||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</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="image1237">
|
||||
<widget class="GtkImage" id="image1236">
|
||||
<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>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="add_contact_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Add Contact...</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1238">
|
||||
<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="GtkImageMenuItem" id="service_discovery_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Discover Services...</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>
|
||||
<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="execute_command_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Execute Command...</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>
|
||||
<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="GtkSeparatorMenuItem" id="seperator">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="add_contact_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Add Contact</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1238">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="edit_account_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Modify Account...</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1240">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-preferences</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>
|
||||
|
||||
</widget>
|
||||
</glade-interface>
|
||||
|
|
|
@ -10,17 +10,17 @@
|
|||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1409">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-redo</property>
|
||||
<property name="stock">gtk-edit</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="manage_room_menuitem">
|
||||
<widget class="GtkImageMenuItem" id="manage_room_menuitem">
|
||||
<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="label" translatable="yes">_Manage room</property>
|
||||
<property name="label" translatable="yes">_Manage Room</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child>
|
||||
<widget class="GtkMenu" id="menu1">
|
||||
|
@ -60,7 +60,7 @@
|
|||
<child>
|
||||
<widget class="GtkImageMenuItem" id="destroy_room_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Destroy room</property>
|
||||
<property name="label" translatable="yes">_Destroy Room</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1407">
|
||||
|
@ -73,6 +73,14 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="menu-item-image8">
|
||||
<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-properties</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -96,23 +104,10 @@
|
|||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
|
||||
<widget class="GtkSeparatorMenuItem" id="seperator">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="bookmark_room_menuitem">
|
||||
<property name="label" translatable="yes">_Bookmark</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1410">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="history_menuitem">
|
||||
<property name="tooltip" translatable="yes">Click to see past conversation in this room</property>
|
||||
|
@ -127,5 +122,18 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="bookmark_room_menuitem">
|
||||
<property name="label" translatable="yes">_Bookmark</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1410">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
|
|
|
@ -17,20 +17,6 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<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="image1052">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="group_chat_actions_menuitem">
|
||||
<property name="visible">True</property>
|
||||
|
@ -128,5 +114,19 @@
|
|||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<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="image1052">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<child>
|
||||
<widget class="GtkImageMenuItem" id="send_custom_status_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Send cus_tom status</property>
|
||||
<property name="label" translatable="yes">Send Cus_tom Status</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child>
|
||||
<widget class="GtkMenu" id="menu5">
|
||||
|
@ -95,7 +95,7 @@
|
|||
<widget class="GtkImageMenuItem" id="manage_contact">
|
||||
<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="label" translatable="yes">_Manage contact</property>
|
||||
<property name="label" translatable="yes">_Manage Contact</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child>
|
||||
<widget class="GtkMenu" id="menu2">
|
||||
|
@ -246,7 +246,7 @@
|
|||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1715">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-yes</property>
|
||||
<property name="stock">gtk-stop</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
@ -261,7 +261,7 @@
|
|||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1714">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-no</property>
|
||||
<property name="stock">gtk-stop</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
|
|
@ -1156,10 +1156,15 @@ class RosterWindow:
|
|||
|
||||
def add_bookmarks_list(self, gc_sub_menu, account):
|
||||
'''Show join new group chat item and bookmarks list for an account'''
|
||||
item = gtk.MenuItem(_('_Join New Group Chat'))
|
||||
item = gtk.ImageMenuItem(_('_Join New Group Chat'))
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_NEW, gtk.ICON_SIZE_MENU)
|
||||
item.set_image(icon)
|
||||
item.connect('activate', self.on_join_gc_activate, account)
|
||||
gc_sub_menu.append(item)
|
||||
|
||||
item = gtk.SeparatorMenuItem() # separator
|
||||
gc_sub_menu.append(item)
|
||||
|
||||
for bookmark in gajim.connections[account].bookmarks:
|
||||
item = gtk.MenuItem(bookmark['name'], False) # Do not use underline
|
||||
item.connect('activate', self.on_bookmark_menuitem_activate,
|
||||
|
@ -2042,7 +2047,7 @@ class RosterWindow:
|
|||
# Invite to
|
||||
invite_to_submenu = gtk.Menu()
|
||||
invite_menuitem.set_submenu(invite_to_submenu)
|
||||
invite_to_new_room_menuitem = gtk.ImageMenuItem(_('_New group chat'))
|
||||
invite_to_new_room_menuitem = gtk.ImageMenuItem(_('_New Group Chat'))
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_NEW, gtk.ICON_SIZE_MENU)
|
||||
invite_to_new_room_menuitem.set_image(icon)
|
||||
contact_transport = gajim.get_transport_name_from_jid(contact.jid)
|
||||
|
@ -2442,7 +2447,7 @@ class RosterWindow:
|
|||
menu.popup(None, None, None, event_button, event.time)
|
||||
|
||||
def on_groupchat_maximized(self, widget, jid, account):
|
||||
'''When a groupshat is maximised'''
|
||||
'''When a groupchat is maximised'''
|
||||
if not gajim.interface.minimized_controls.has_key(account):
|
||||
return
|
||||
if not gajim.interface.minimized_controls[account].has_key(jid):
|
||||
|
@ -2474,30 +2479,11 @@ class RosterWindow:
|
|||
account = model[iter][C_ACCOUNT].decode('utf-8')
|
||||
|
||||
menu = gtk.Menu()
|
||||
if not group in helpers.special_groups + (_('General'),):
|
||||
|
||||
rename_item = gtk.ImageMenuItem(_('Re_name'))
|
||||
# add a special img for rename menuitem
|
||||
path_to_kbd_input_img = os.path.join(gajim.DATA_DIR, 'pixmaps',
|
||||
'kbd_input.png')
|
||||
img = gtk.Image()
|
||||
img.set_from_file(path_to_kbd_input_img)
|
||||
rename_item.set_image(img)
|
||||
menu.append(rename_item)
|
||||
rename_item.connect('activate', self.on_rename, iter, path)
|
||||
|
||||
# Remove group
|
||||
remove_item = gtk.ImageMenuItem(_('_Remove from Roster'))
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_MENU)
|
||||
remove_item.set_image(icon)
|
||||
menu.append(remove_item)
|
||||
remove_item.connect('activate', self.on_remove_group_item_activated,
|
||||
group, account)
|
||||
|
||||
# unsensitive if account is not connected
|
||||
if gajim.connections[account].connected < 2:
|
||||
rename_item.set_sensitive(False)
|
||||
send_group_message_item = gtk.MenuItem(_('Send Group M_essage'))
|
||||
# Send Group Message
|
||||
send_group_message_item = gtk.ImageMenuItem(_('Send Group M_essage'))
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_NEW, gtk.ICON_SIZE_MENU)
|
||||
send_group_message_item.set_image(icon)
|
||||
|
||||
send_group_message_submenu = gtk.Menu()
|
||||
send_group_message_item.set_submenu(send_group_message_submenu)
|
||||
|
@ -2526,6 +2512,7 @@ class RosterWindow:
|
|||
group_message_to_all_item.connect('activate',
|
||||
self.on_send_single_message_menuitem_activate, account, list_)
|
||||
|
||||
# Send Custom Status
|
||||
send_custom_status_menuitem = gtk.ImageMenuItem(_('Send Cus_tom Status'))
|
||||
# add a special img for this menuitem
|
||||
if gajim.interface.status_sent_to_groups.has_key(account) and \
|
||||
|
@ -2548,6 +2535,23 @@ class RosterWindow:
|
|||
status_menuitem.set_image(icon)
|
||||
status_menuitems.append(status_menuitem)
|
||||
menu.append(send_custom_status_menuitem)
|
||||
|
||||
if not group in helpers.special_groups + (_('General'),):
|
||||
item = gtk.SeparatorMenuItem() # separator
|
||||
menu.append(item)
|
||||
|
||||
# Rename
|
||||
rename_item = gtk.ImageMenuItem(_('Re_name'))
|
||||
# add a special img for rename menuitem
|
||||
path_to_kbd_input_img = os.path.join(gajim.DATA_DIR, 'pixmaps',
|
||||
'kbd_input.png')
|
||||
img = gtk.Image()
|
||||
img.set_from_file(path_to_kbd_input_img)
|
||||
rename_item.set_image(img)
|
||||
menu.append(rename_item)
|
||||
rename_item.connect('activate', self.on_rename, iter, path)
|
||||
|
||||
# Block group
|
||||
is_blocked = False
|
||||
if self.regroup:
|
||||
for g_account in gajim.connections:
|
||||
|
@ -2557,20 +2561,30 @@ class RosterWindow:
|
|||
if group in gajim.connections[account].blocked_groups:
|
||||
is_blocked = True
|
||||
|
||||
if group not in helpers.special_groups + (_('General'),):
|
||||
if is_blocked:
|
||||
unblock_menuitem = gtk.ImageMenuItem(_('_Unblock'))
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_YES, gtk.ICON_SIZE_MENU)
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_STOP, gtk.ICON_SIZE_MENU)
|
||||
unblock_menuitem.set_image(icon)
|
||||
unblock_menuitem.connect('activate', self.on_unblock, iter, list_)
|
||||
menu.append(unblock_menuitem)
|
||||
else:
|
||||
block_menuitem = gtk.ImageMenuItem(_('_Block'))
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_MENU)
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_STOP, gtk.ICON_SIZE_MENU)
|
||||
block_menuitem.set_image(icon)
|
||||
block_menuitem.connect('activate', self.on_block, iter, list_)
|
||||
menu.append(block_menuitem)
|
||||
|
||||
# Remove group
|
||||
remove_item = gtk.ImageMenuItem(_('_Remove from Roster'))
|
||||
icon = gtk.image_new_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_MENU)
|
||||
remove_item.set_image(icon)
|
||||
menu.append(remove_item)
|
||||
remove_item.connect('activate', self.on_remove_group_item_activated,
|
||||
group, account)
|
||||
# unsensitive if account is not connected
|
||||
if gajim.connections[account].connected < 2:
|
||||
rename_item.set_sensitive(False)
|
||||
|
||||
event_button = gtkgui_helpers.get_possible_button_event(event)
|
||||
|
||||
menu.attach_to_widget(self.tree, None)
|
||||
|
@ -2699,7 +2713,6 @@ class RosterWindow:
|
|||
if muc_icon:
|
||||
join_group_chat_menuitem.set_image(muc_icon)
|
||||
open_gmail_inbox_menuitem = xml.get_widget('open_gmail_inbox_menuitem')
|
||||
new_message_menuitem = xml.get_widget('new_message_menuitem')
|
||||
add_contact_menuitem = xml.get_widget('add_contact_menuitem')
|
||||
service_discovery_menuitem = xml.get_widget(
|
||||
'service_discovery_menuitem')
|
||||
|
@ -2730,6 +2743,9 @@ class RosterWindow:
|
|||
if gajim.connections[account].connected < 2:
|
||||
item.set_sensitive(False)
|
||||
|
||||
item = gtk.SeparatorMenuItem()
|
||||
sub_menu.append(item)
|
||||
|
||||
uf_show = helpers.get_uf_show('offline', use_mnemonic = True)
|
||||
item = gtk.ImageMenuItem(uf_show)
|
||||
icon = state_images['offline']
|
||||
|
@ -2759,13 +2775,11 @@ class RosterWindow:
|
|||
gc_sub_menu = gtk.Menu() # gc is always a submenu
|
||||
join_group_chat_menuitem.set_submenu(gc_sub_menu)
|
||||
self.add_bookmarks_list(gc_sub_menu, account)
|
||||
new_message_menuitem.connect('activate',
|
||||
self.on_new_message_menuitem_activate, account)
|
||||
|
||||
# make some items insensitive if account is offline
|
||||
if gajim.connections[account].connected < 2:
|
||||
for widget in [add_contact_menuitem, service_discovery_menuitem,
|
||||
join_group_chat_menuitem, new_message_menuitem,
|
||||
join_group_chat_menuitem,
|
||||
execute_command_menuitem]:
|
||||
widget.set_sensitive(False)
|
||||
else:
|
||||
|
@ -2773,7 +2787,6 @@ class RosterWindow:
|
|||
account_context_menu = xml.get_widget('zeroconf_context_menu')
|
||||
|
||||
status_menuitem = xml.get_widget('status_menuitem')
|
||||
new_message_menuitem = xml.get_widget('new_message_menuitem')
|
||||
zeroconf_properties_menuitem = xml.get_widget(
|
||||
'zeroconf_properties_menuitem')
|
||||
sub_menu = gtk.Menu()
|
||||
|
@ -3713,9 +3726,6 @@ class RosterWindow:
|
|||
except GajimGeneralException:
|
||||
pass
|
||||
|
||||
def on_new_message_menuitem_activate(self, widget, account):
|
||||
dialogs.SingleMessageWindow(account, action = 'send')
|
||||
|
||||
def on_new_chat_menuitem_activate(self, widget, account):
|
||||
dialogs.NewChatDialog(account)
|
||||
|
||||
|
|
Loading…
Reference in New Issue