After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 324001 - Primary Selection (middle mouse button) is not working
Primary Selection (middle mouse button) is not working
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.7.x
Other Linux
: Normal normal
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2005-12-13 18:28 UTC by Jochen Baier
Modified: 2005-12-14 15:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to hopefully implement this. (1.43 KB, text/plain)
2005-12-13 21:38 UTC, Rich Burridge
Details

Description Jochen Baier 2005-12-13 18:28:57 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"
Comment 1 Rich Burridge 2005-12-13 18:49:29 UTC
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. 
Comment 2 Jochen Baier 2005-12-13 19:04:02 UTC
i want to paste external numbers to gcalctool (for example a price form firefox
to calculate it with gcalctool)
Comment 3 Jochen Baier 2005-12-13 19:33:56 UTC
i want to paste external numbers to gcalctool (for example a price form firefox
to calculate it with gcalctool)
Comment 4 Rich Burridge 2005-12-13 19:45:34 UTC
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.
Comment 5 Jochen Baier 2005-12-13 20:22:43 UTC
this is the normal copy and paste. but i want the primary selection if possible
Comment 6 Rich Burridge 2005-12-13 20:28:43 UTC
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.

Comment 7 Jochen Baier 2005-12-13 20:43:55 UTC
without a cursor a little bit hard:

on mouse button release: get the current selection (with
gtk_clipboard_wait_for_text ())  and display it.
Comment 8 Rich Burridge 2005-12-13 21:09:42 UTC
Okay, that's reasonable. I'll reopen the bug and work
on a diff. Thanks.
Comment 9 Rich Burridge 2005-12-13 21:38:50 UTC
Created attachment 55962 [details]
Patch to hopefully implement this.

Most of the needed code to handle the clipboard was already written.
Comment 10 Rich Burridge 2005-12-13 21:42:57 UTC
Changes checked into CVS HEAD. The version number in
configure.in has been bumped to 5.7.16.

Thanks for your persistence!
Comment 11 Jochen Baier 2005-12-13 21:54:26 UTC
thanks for supporing it.
Comment 12 Rich Burridge 2005-12-14 15:41:51 UTC
Forgot to mark it as fixed.