Cut Paste and Delete menuitem from conversation popupmenu become INSENSITIVE (not removed!)

This commit is contained in:
Nikos Kouremenos 2006-10-15 16:40:42 +00:00
parent a1820a4ed5
commit 06ef2a1a24

View file

@ -324,7 +324,7 @@ class ConversationTextview:
for menuitem in menu.get_children(): for menuitem in menu.get_children():
label = menuitem.get_child() label = menuitem.get_child()
if label and label.get_text() in (_('Cut'), _('Paste'), _('Delete')): if label and label.get_text() in (_('Cut'), _('Paste'), _('Delete')):
menu.remove(menuitem) menuitem.set_sensitive(False)
separator_menuitem_was_added = False separator_menuitem_was_added = False
if not self.used_in_history_window: if not self.used_in_history_window:
item = gtk.SeparatorMenuItem() item = gtk.SeparatorMenuItem()
@ -408,7 +408,7 @@ class ConversationTextview:
def on_textview_button_press_event(self, widget, event): def on_textview_button_press_event(self, widget, event):
# If we clicked on a taged text do NOT open the standard popup menu # If we clicked on a taged text do NOT open the standard popup menu
# if normal text check if we have sth selected # if normal text check if we have sth selected
self.selected_phrase = '' self.selected_phrase = '' # do not move belove event button check!
if event.button != 3: # if not right click if event.button != 3: # if not right click
return False return False