changeset f2f53f360918 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=f2f53f360918
description: prevent traceback when writing in a closed gc control. Fixes #5455

diffstat:

 src/htmltextview.py |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r 832fa903871f -r f2f53f360918 src/htmltextview.py
--- a/src/htmltextview.py       Tue Dec 29 00:01:55 2009 +0100
+++ b/src/htmltextview.py       Mon Nov 30 14:32:59 2009 +0100
@@ -893,8 +893,10 @@
        def on_text_buffer_mark_set(self, location, mark, unused_data):
                bounds = self.get_buffer().get_selection_bounds()
                if bounds:
-                       clipboard = 
self.get_clipboard(gtk.gdk.SELECTION_PRIMARY)
-                       clipboard.set_text(self.get_selected_text())
+                       # textview can be hidden while we add a new line in it.
+                       if self.has_screen():
+                               clipboard = 
self.get_clipboard(gtk.gdk.SELECTION_PRIMARY)
+                               clipboard.set_text(self.get_selected_text())
 
        def get_selected_text(self):
                bounds = self.get_buffer().get_selection_bounds()
_______________________________________________
Commits mailing list
Commits@gajim.org
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to