pidgin: 0d3a3dbf: Middle click pastes the internal clipboa...

wabz at pidgin.im wabz at pidgin.im
Sun May 11 03:30:53 EDT 2008


-----------------------------------------------------------------
Revision: 0d3a3dbf15f3b76dc4ee06bc9177442fe4906bc5
Ancestor: f1dabaefda9742c6d71cba71697771bf74710f8a
Author: wabz at pidgin.im
Date: 2008-05-11T07:24:59
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0d3a3dbf15f3b76dc4ee06bc9177442fe4906bc5

Modified files:
        ChangeLog finch/libgnt/gntentry.c

ChangeLog: 

Middle click pastes the internal clipboard

-------------- next part --------------
============================================================
--- ChangeLog	92794a3345d87a90ba23a0c2167036421d499fa0
+++ ChangeLog	0e1391ad1734f8bde42a1862e8e7f41e2f5c8fb6
@@ -54,6 +54,8 @@ version 2.x.x:
 	Finch:
 	* New default binding ctrl+x to open context menus.
 	* Menu triggers and other bindings will no longer conflict.
+	* Middle click pastes the internal clipboard (when mouse support is
+	  enabled).
 
 version 2.4.1 (03/31/2008):
 	http://developer.pidgin.im/query?status=closed&milestone=2.4.1
============================================================
--- finch/libgnt/gntentry.c	a132f44e54998960a592db1024c0bcaf4fb4f04d
+++ finch/libgnt/gntentry.c	c1b92caf0d653e716b3042d6db232e564467cb97
@@ -839,6 +839,17 @@ gnt_entry_lost_focus(GntWidget *widget)
 	entry_redraw(widget);
 }
 
+static gboolean
+gnt_entry_clicked(GntWidget *widget, GntMouseEvent event, int x, int y)
+{
+	if (event == GNT_MIDDLE_MOUSE_DOWN) {
+		clipboard_paste(GNT_BINDABLE(widget), NULL);
+		return TRUE;
+	}
+	return FALSE;
+
+}
+
 static void
 gnt_entry_class_init(GntEntryClass *klass)
 {
@@ -846,6 +857,7 @@ gnt_entry_class_init(GntEntryClass *klas
 	char s[2] = {erasechar(), 0};
 
 	parent_class = GNT_WIDGET_CLASS(klass);
+	parent_class->clicked = gnt_entry_clicked;
 	parent_class->destroy = gnt_entry_destroy;
 	parent_class->draw = gnt_entry_draw;
 	parent_class->map = gnt_entry_map;


More information about the Commits mailing list