really remove some menuitem when we right click self contact row

This commit is contained in:
Yann Leboulanger 2006-07-19 11:06:27 +00:00
parent 39b4eedcf1
commit 957cfe7916
1 changed files with 8 additions and 6 deletions

View File

@ -1330,12 +1330,6 @@ class RosterWindow:
remove_from_roster_menuitem = xml.get_widget( remove_from_roster_menuitem = xml.get_widget(
'remove_from_roster_menuitem') 'remove_from_roster_menuitem')
if our_jid:
for menuitem in (rename_menuitem, edit_groups_menuitem,
above_subscription_separator, subscription_menuitem,
remove_from_roster_menuitem):
menuitem.set_no_show_all(True)
menuitem.hide()
# skip a separator # skip a separator
information_menuitem = xml.get_widget('information_menuitem') information_menuitem = xml.get_widget('information_menuitem')
history_menuitem = xml.get_widget('history_menuitem') history_menuitem = xml.get_widget('history_menuitem')
@ -1426,6 +1420,14 @@ class RosterWindow:
add_to_roster_menuitem.connect('activate', add_to_roster_menuitem.connect('activate',
self.on_add_to_roster, contact, account) self.on_add_to_roster, contact, account)
# Remove many items when it's self contact row
if our_jid:
for menuitem in (rename_menuitem, edit_groups_menuitem,
above_subscription_separator, subscription_menuitem,
remove_from_roster_menuitem):
menuitem.set_no_show_all(True)
menuitem.hide()
# Unsensitive many items when account is offline # Unsensitive many items when account is offline
if gajim.connections[account].connected < 2: if gajim.connections[account].connected < 2:
for widget in [start_chat_menuitem, send_single_message_menuitem, for widget in [start_chat_menuitem, send_single_message_menuitem,