GNOME Bugzilla – Bug 324001
Primary Selection (middle mouse button) is not working
Last modified: 2005-12-14 15:41:51 UTC
gcalctool does not handle the primary selection. (pasting text with the middle mouse button). the bad line: gtk_text_view_set_editable(GTK_TEXT_VIEW(X->display_item), FALSE); in gtk.c works if its "TRUE"
This is deliberate. We don't want users directly changing the display. If you want to use the middle mouse button to get the display value (or a part of it), drag the mouse over it to make a selection. The middle mouse button will then happily paste this.
i want to paste external numbers to gcalctool (for example a price form firefox to calculate it with gcalctool)
Here's what works for me (gcalctool v5.7.15, GNOME 2.12, Solaris x86): In Firefox, select (with the mouse) the number you want to select. Select Edit->Copy In Gcalctool, select Edit->Paste. The number appears in the display. Alternatively, and this is probably Sun specific, I can use the Copy/Paste keys. In Firefox, select (with the mouse) the number you want to select. Hit the Copy keyboard key. In Gcalctool, hit the Paste keyboard key.
this is the normal copy and paste. but i want the primary selection if possible
If you can show me a way to way to do this without having to make the X->display_item editable, then I'll be happy to reopen this and implement it.
without a cursor a little bit hard: on mouse button release: get the current selection (with gtk_clipboard_wait_for_text ()) and display it.
Okay, that's reasonable. I'll reopen the bug and work on a diff. Thanks.
Created attachment 55962 [details] Patch to hopefully implement this. Most of the needed code to handle the clipboard was already written.
Changes checked into CVS HEAD. The version number in configure.in has been bumped to 5.7.16. Thanks for your persistence!
thanks for supporing it.
Forgot to mark it as fixed.