we now have clear in the conversation textview in gc and chat window (close #220)
This commit is contained in:
parent
9967408dd6
commit
e9abca09fc
13
src/chat.py
13
src/chat.py
|
@ -415,6 +415,19 @@ class Chat:
|
|||
gtk.gdk.Cursor(gtk.gdk.HAND2))
|
||||
self.change_cursor = tag
|
||||
return False
|
||||
|
||||
def on_clear(self, widget, textview):
|
||||
buffer = textview.get_buffer()
|
||||
start, end = buffer.get_bounds()
|
||||
buffer.delete(start, end)
|
||||
|
||||
def on_conversation_textview_populate_popup(self, textview, menu):
|
||||
item = gtk.MenuItem()
|
||||
menu.append(item)
|
||||
item = gtk.MenuItem(_('Clear'))
|
||||
menu.append(item)
|
||||
item.connect('activate', self.on_clear, textview)
|
||||
menu.show_all()
|
||||
|
||||
def on_conversation_textview_button_press_event(self, widget, event):
|
||||
# Do not open the standard popup menu, so we block right button
|
||||
|
|
|
@ -7817,6 +7817,7 @@ Custom</property>
|
|||
<signal name="motion_notify_event" handler="on_conversation_textview_motion_notify_event" last_modification_time="Sat, 19 Mar 2005 14:59:33 GMT"/>
|
||||
<signal name="button_press_event" handler="on_conversation_textview_button_press_event" last_modification_time="Sat, 19 Mar 2005 14:59:45 GMT"/>
|
||||
<signal name="key_press_event" handler="on_conversation_textview_key_press_event" last_modification_time="Sun, 03 Apr 2005 08:53:17 GMT"/>
|
||||
<signal name="populate_popup" handler="on_conversation_textview_populate_popup" last_modification_time="Wed, 11 May 2005 19:23:10 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -8993,6 +8994,7 @@ Custom</property>
|
|||
<signal name="motion_notify_event" handler="on_conversation_textview_motion_notify_event" last_modification_time="Thu, 10 Mar 2005 16:07:43 GMT"/>
|
||||
<signal name="button_press_event" handler="on_conversation_textview_button_press_event" last_modification_time="Thu, 10 Mar 2005 17:54:22 GMT"/>
|
||||
<signal name="key_press_event" handler="on_conversation_textview_key_press_event" last_modification_time="Thu, 31 Mar 2005 14:50:51 GMT"/>
|
||||
<signal name="populate_popup" handler="on_conversation_textview_populate_popup" last_modification_time="Wed, 11 May 2005 19:39:04 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
Loading…
Reference in New Issue