Commits

dicson  committed 06c3327

do not use clipboard on every 'mark set' signal received

  • Participants
  • Parent commits a91b5a0

Comments (0)

Files changed (1)

File src/htmltextview.py

         self.connect('realize', self.on_html_text_view_realized)
         self.connect('unrealize', self.on_html_text_view_unrealized)
         self.connect('copy-clipboard', self.on_html_text_view_copy_clipboard)
-        self.get_buffer().connect_after('mark-set', self.on_text_buffer_mark_set)
+        self.id_ = self.connect('button-release-event',
+            self.on_left_mouse_button_release)
         self.get_buffer().create_tag('eol', scale = pango.SCALE_XX_SMALL)
         self.tooltip = tooltips.BaseTooltip()
         self.config = gajim.config
         self.get_buffer().add_selection_clipboard(self.get_clipboard(
             gtk.gdk.SELECTION_PRIMARY))
 
-    def on_text_buffer_mark_set(self, location, mark, unused_data):
+    def on_left_mouse_button_release(self, widget, event):
         bounds = self.get_buffer().get_selection_bounds()
+        if event.button != 1:
+            return
         if bounds:
             # textview can be hidden while we add a new line in it.
             if self.has_screen():