-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy n Paste problems under Linux #40
Comments
OK, temp and very ugly fix for now. Seems OK under linux but must also test against Mac. means that text copied and pasted within tomboy-ng will loose its formating. Better than what it does now..... These hacks are to KControls and KMemo, not to tomboy-ng's code base. Hopefully, TK will be interested ...... In KControls.pas we will force ClipboardLoadStreamAs() to always return with plain text in AText, even when it thinks the RTF is OK. This should be a waste of cycles but later on we will force KMemo to only paste Plain Text, never RTF because the RTF is not unicode clean. So, about line 1410 of KControls, add the ifdefs and stuff between them -
And about #4786 of KMemo
|
First thank you for taking the mantle and continuing this project. I really find Tomboy/Gnote to be the best app for my needs (it one of 3 note taking solutions that works with an older linux device). I was looking at using tomboy-mono, but didn't work great on osx. I was using Gnote which was great, but that stop working after 10.13. I was going to try and compile gnote or try homebrewing So, I'm happy to do test some updated binary's for you since I'm running Mac OS X 10.13.3. Or help best I can when I have time. |
Yep, thats the problem. For sure. Anyway, in the next day or so, I will replace the Linux and Mac binaries in v0.14 and if you could test them that would be great. I am guessing you don't mean you want to build your own ? You would need to install Lazarus and the KControls addon and then patch KControls as detailed above. Bit of a slow job but not hard.... |
Yeah, I'm currently rebuilding my system on a new machine so I'm trying to keep it to only the important tools and files. I'm considering a few dev like tools for compiling some software (home-brew, even Lazarus), but Lazarus would only be for this app ... so hard to justify at the moment. I will consider it though once I can build a VM or boot drive for stuff like this. So for now I happy to test your binaries. And can let you know if that changes. |
OK, I have updated the binaries associated with v0.14. The changes made are to the build env not the tomboy-ng source ! |
Tested the latest update (39fa78b). The uni-code works well now, thanks. However formatting and the bullets seem to be missing now on the Mac. Additionally, the search command doesn't seem to work. The new note command does work, but only when a note is already open. |
OK, can I clarify what you mean about Bullets and Formatting missing ? If you have a Note A and it contains the words "My Text" in bold, italic and you copy it to another note, Note B, you will end up with "My Text" in plain text in Note B. Thats what I mean about "not taking its formatting along". I don't rule out fixing the overall problem and have a copy between tomboy-ng notes retain the original formatting but it will involve me learning a lot more about codepages, RTF and UTF8. Obviously copy and paste between different applications almost always is plain text. And, you know what ? Personally, I suspect I'd rather it copied plain text most times ! Next, the search command ? Do you mean search in this note or search all notes ? Are you invoking it by using a control key combo or the menu item ? If menu, from a notes menu or from the top of screen menu ? I don't, personally, use the control (etc) keys very much on the Mac because I never know what keys have already been defined for something else. Ctrl-F (search within a note) without a note having focus does not make sense but maybe Ctrl-Shift-F (search all notes) does. And I guess Ctrl-N (new note) probably does too. I think I can apply same tricks I used to make [that crossy thing key] Q work (quit the app). This would be Mac only code because Win/Linux users must use the mouse to activate the TrayIcon and then choose a menu item. Thanks for your help ! |
Some progress with a 'real' fix. Sadly, it still needs to be applied to KControls rather than the tomboy-ng code and its not a full fix. Sigh. Near end of kmemortf.pas there is a procedure TKMemoRTFWriter.WriteUnicodeString(const AText: TKString); It has a line#4099, "if (Ansi <> '') and (Ansi <> #0) then" This will ensure that a multibyte char is passed on to next part of the procedure that appears as if it was always intended to do just that. This model will now let us copy and paste unicode text and when you do so it does not mess up any pre existing bullet point characters. Good. But I note that when we copy text that contains bullets, the first character of each bullet is dropped ! This appears to be a flaw in the pasting engine, not the copy side of things (exporting as RTF now works cleanly). So, as they say, further research is indicated. David |
Let me see if I can answer your questions. Bullets: Search Command:
As far as defined key as long as your app is currently in the foreground you can use most key for shortcuts (actions). so in this app current you're presented with neither a single note or an All notes window. So it not so confusing to go to the menu, however the previous tomboy compatible I was using had all notes showing at startup. Perhaps this can be a choice in the setting. So I'm not sure how difficult it would be to add. But I think there's an opportunity to add control/command that would work on all platforms. And I think using Ctrl-F & Ctrl-Shift-F could work nicely too. Thanks |
xypd - lets try and keep things simple. Could you please open a separate ticket for this shortcut key issue ? Best not to try to track multiple issues with one ticket. Can get confusing. Especially so as your one is a Mac only issue and I suspect we will strick some problems with keyboard shortcuts as I migrate Mac's tomboy-ng to 64bit cocoa. |
Copy n Paste. |
I can confirm that formatting and bullets also seem to be missing: especially highlighting doesn't seem to work on imported tomboy notes, bold font + italics seem to be working. When copying notes from e.g. gnote to tomboy-ng no formatting or bullets are preserved - it ends up as plain text |
Next release will have this problem fixed in the binaries. But its not a source issue, its 'upstream' in KControls. So, anyone building from source must apply the patch mentioned above to KControls before compiling. I suspect better approach might be to transfer via file. I can easily make tomboy-ng import RTF and, with some effort, some other format as long as its well documented. Worth looking to see what format gnote can export in perhaps ? |
OK, finally committed a fix for the third and final problem identified in first post of this issue. Closing. |
Just as I released 0.14 I realised there is a significant issue, under Linux, wrt copy and paste when Unicode characters are involved. Specifically -
The text was updated successfully, but these errors were encountered: