[Geeqie-devel] Copy path problem
Hi, I hit upon what seems to be at least an infelicity, and perhaps an outright bug. The Copy Path popup menu item calls back this code: clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); gtk_clipboard_set_text(clipboard, g_shell_quote(fd-path), -1); But, according to the GTK documentation: The currently-selected object or text should be provided on the clipboard identified by GDK_SELECTION_PRIMARY. Cut/copy/paste menu items conceptually copy the contents of the GDK_SELECTION_PRIMARY clipboard to the default clipboard, i.e. they copy the selection to what the user sees as the clipboard. So, the above code should really use GDK_SELECTION_CLIPBOARD. This has an unfortunate practical consequence: after copying the path this way, I am unable to paste it anywhere in the geeqie UI itself, without a roundtrip through some other program like Emacs that understands both kinds of selections. (Don't ask why, but creating a subdirectory named according to the selected file is part of my workflow in some cases). Can this be fixed? -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel
Re: [Geeqie-devel] Copy path problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, Am Mi den 9. Jul 2014 um 7:08 schrieb Ian Zimmerman: Hi, I hit upon what seems to be at least an infelicity, and perhaps an outright bug. The Copy Path popup menu item calls back this code: clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); gtk_clipboard_set_text(clipboard, g_shell_quote(fd-path), -1); But, according to the GTK documentation: The currently-selected object or text should be provided on the clipboard identified by GDK_SELECTION_PRIMARY. Cut/copy/paste menu items conceptually copy the contents of the GDK_SELECTION_PRIMARY clipboard to the default clipboard, i.e. they copy the selection to what the user sees as the clipboard. So? So, the above code should really use GDK_SELECTION_CLIPBOARD. In your pasted text it is always called about GDK_SELECTION_PRIMARY. and never about GDK_SELECTION_CLIPBOARD. But it might be possible that I miss something there as my English might be not the best. For my understanding GDK_SELECTION_PRIMARY is the right one. This has an unfortunate practical consequence: after copying the path this way, I am unable to paste it anywhere in the geeqie UI itself, without a roundtrip through some other program like Emacs that understands both kinds of selections. (Don't ask why, but creating a subdirectory named according to the selected file is part of my workflow in some cases). The problem is that with the current solution, the most used way to copy around text under unix works, using the middle mouse button. Changing that might (I did not test it but that might be worth to test) end up in being unable to paste. Not all consoles knows Strg-V (what comes from the windows world, I think). I personally like to be able to copy the path to selection clipboard and paste it in the terminal where I mostly work. That does not work if I use Strg-C in some GUIs but it works with Geeqie. Can this be fixed? Well, it can, if it really fixes some and don't break others. It is even open source. Just make an patch for suggestion. It might get accepted (or not. :-). Maybe even copy it to more than one buffer might be ok. (Keep in mind that in unix there are three different buffers, most of them evolved in the newer time and not supported by all software. They make fully sens to copy around other stuff than just simple text. Regards Klaus - -- Klaus Ethgen http://www.ethgen.ch/ pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen kl...@ethgen.de Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQGcBAEBCgAGBQJTvQYxAAoJEKZ8CrGAGfasW4IL/A7jYk6B2bp7jaY9n6QhUu2p 7yt9ZJvfDMlahKgIQpFVHpA6VSNKZe8FqZcVHhmJAedk7u43mtf9j8+mtZGhp7vu U53vYo22e8DquIn3oGmN1BANXMEzq+HKZAhlt+chRKyJtQSYptJ/7D8nHFMmFxS7 6rn4YtrSqFmWT+enhmfTLtCdCZmTynosOR5WoqJ9yXTp/mlzQjOkk7h6MnmovTkC KK9PAj+IU7EjVKzM0RRTpFPIdvbHZeKmj/WsG2D+ox7KY6nY9npF2mxiz02KcOGf ca+ljhgKC0lg4STOrGeIp1+yT76HRuRvGN8dvizEYFh0APwlnZEfYnAigB8cw5sQ BfstlA3iy6c65ZLmvoDF2lfKzdfFEqZKVdYcS4n9GPsXczGbzaJggb0h0rUY7oSb vPGE2NJUySQmqFSmLudrCjaqUmtcgBLstyYn2ze6NEE2Pm3wCCndqg4j7YpmCmhZ owJ23T7TnjY8a0Wv/UI4mpnbQlc5a3yKil5oV2dJew== =YxsX -END PGP SIGNATURE- -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel
Re: [Geeqie-devel] Copy path problem
Klaus Ethgen Klaus+geekie@... writes: GTK The currently-selected object or text should be provided on the GTK clipboard identified by GDK_SELECTION_PRIMARY. Cut/copy/paste menu GTK items conceptually copy the contents of the GDK_SELECTION_PRIMARY GTK clipboard to the default clipboard, i.e. they copy the selection to GTK what the user sees as the clipboard. Klaus So? Klaus In your pasted text it is always called about Klaus GDK_SELECTION_PRIMARY. and never about Klaus GDK_SELECTION_CLIPBOARD. But it might be possible that I miss Klaus something there as my English might be not the best. For my Klaus understanding GDK_SELECTION_PRIMARY is the right one. I just snipped too much from the quote. The sentence preceding this one is: GTK Cut/copy/paste menu items and keyboard shortcuts should use the GTK default clipboard, returned by passing GDK_SELECTION_CLIPBOARD for GTK selection. (GDK_NONE is supported as a synonym for GTK GDK_SELECTION_CLIPBOARD for backwards compatibility reasons.) IMO, the two sentences together make it clear that (if needed) GDK_SELECTION_PRIMARY should be activated _as soon as the selection is set or changed_ in the source program. In geeqie, that would mean making the current code execute when user moves through the file list (for example) with Up and Down keys. OTOH when user activates the menu item GDK_SELECTION_CLIPBOARD is the right one. Klaus The problem is that with the current solution, the most used way Klaus to copy around text under unix works, using the middle mouse Klaus button. Changing that might (I did not test it but that might be Klaus worth to test) end up in being unable to paste. Not all consoles Klaus knows Strg-V (what comes from the windows world, I think). Well, all the Gtk conventions come from the Windows world :-) And yes, sometimes that is a problem. But I still use lots of Gtk programs. Klaus I personally like to be able to copy the path to selection Klaus clipboard and paste it in the terminal where I mostly work. That Klaus does not work if I use Strg-C in some GUIs but it works with Klaus Geeqie. You're right that simply changing the current code from GDK_SELECTION_PRIMARY to GDK_SELECTION_CLIPBOARD would break your usage while fixing mine. It would still be the right thing to do IMO because of the convention. But we can keep the cake and eat it if we add new hooks on selection change events, calling back the current code with GDK_SELECTION_PRIMARY. How's that? Klaus Well, it can, if it really fixes some and don't break others. It Klaus is even open source. Just make an patch for suggestion. I can make a patch. It probably won't be trivially short; where do you want it posted? Best regards, Ian. -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel
Re: [Geeqie-devel] Copy path problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, Am Mi den 9. Jul 2014 um 17:08 schrieb Ian Zimmerman: I just snipped too much from the quote. The sentence preceding this one is: I thought such. ;-) Well, all the Gtk conventions come from the Windows world :-) And yes, sometimes that is a problem. But I still use lots of Gtk programs. Not all. But don't mix Gtk and Gnome. However, would be long discussion. Klaus I personally like to be able to copy the path to selection Klaus clipboard and paste it in the terminal where I mostly work. That Klaus does not work if I use Strg-C in some GUIs but it works with Klaus Geeqie. You're right that simply changing the current code from GDK_SELECTION_PRIMARY to GDK_SELECTION_CLIPBOARD would break your usage while fixing mine. It would still be the right thing to do IMO because of the convention. But we can keep the cake and eat it if we add new hooks on selection change events, calling back the current code with GDK_SELECTION_PRIMARY. How's that? You mean just adding also to put the stuff to the other clipboard? Maybe also to the third one too? (GDK_SELECTION_SECONDARY, I think) Klaus Well, it can, if it really fixes some and don't break others. It Klaus is even open source. Just make an patch for suggestion. I can make a patch. It probably won't be trivially short; where do you want it posted?o Here would be great. Or fork the repo on gitorious and create a merge request. Regards Klaus - -- Klaus Ethgen http://www.ethgen.ch/ pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen kl...@ethgen.de Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQGcBAEBCgAGBQJTvYCYAAoJEKZ8CrGAGfasHCwL/jM5exgrhWFtddNqdRgeA/ri MS4HAOcuzKARTmU1qz4fwZQSyy4wgoT0X/kT8DGq6AtEUDcVLKaSvT/x43uCZKOP 0LwQm+h2q5MARpR12EreYaxvoGBtJ7CEfuifIaW4TgBlnc1Ba2W7G+eKpDKAkYHU JU+oXFK9dvIvnLrh44zqdUqRX/MYjcnYlaf7MdA6t2SX706QFd5IwU3aZ3JhFJs5 UEiT1hGRoNzy8ZSMIsYf7ltABCM/9cNfIQn+yl55J+rN/Ogmd9oK0KTyBh8NKAmx fjCxvM6/HXDvLZJHxv6ISAuteVT0Zeekl20ZueGXNgrYC6Ck8bQo/2pM23ViCsIf AdsA0C9jcXlbq4j5IuR0JmFgbZq6Tu2OKqqR8hvFsdxsasvbdba662K5NPrABTTz 257hFAij2U7bXjoT7m2noKaUbv1n12nDXvkJfAfg9nFhzylEkQ/LANaQhkNHEZT8 uHz5jKfaJsOlHLQeIxhAzqNOI9IqLgoqLkhbzaVXFg== =df+9 -END PGP SIGNATURE- -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel