From: Alex G. <gs...@cs...> - 2006-08-30 10:57:22
|
Please check and give me your comments! The code sits in branch http://basket.linux62.org/svn/basket/branches/gsasha-2006.08-editing_changes Maybe I'm missing something, but my code is so far a lot simpler than what was there before - it's shorter and has no special case handling. From my testing, it seems to work as expected, but please take a look at the code I commented out - can I remove it? My changes mostly sit in notefactory.cpp. The new functions are decodeSource, decodeHtml, decodeText. The removed code is commented out with #if 0 and marked with "Alex:". Also, the ExtendedTextDrag is now unused. Note that I don't currently handle the "UTF8_STRING", "text/unicode", "TEXT", and "COMPOUND_TEXT" mime types. I've yet to see a usecase where these will be necessary (i.e., not provided by some other mime type). Please tell me if you have a use case for these (and if one exists, we must document in the code the exact program/version that provides such clipboard data to be able to test it). P.S. I'm not sure we should integrate this into 0.6, since it's in a freeze - but can someone remind me how do I merge the changes from the trunk into my branch? ----------------------------------------------------------------------------------------------------------------- There are currently several problems that I'm aware of that must be handled, suggestions welcome: 1. Notes that contain HTML links inside of the form '<a href="x">y</a>' still show differently when just displayed and when being edited. The problem is that in a "display", they are shown in their (almost) full form, the result of application of kurifilter (?). However, when I click the note for editing, the kurifilter gets disabled, and only the "y" text is shown - leaving me no way to access the link target beneath. Well, I think it should be the other way around - when I display the note, I want to see the "y" text (and maybe a tooltip and status bar entry with the full address, and a "copy link address" in the popup menu), but when I open it for editing, then I want to see the whole contents. 2. Basket seems to be unaware that the note's size can change when it's opened for editing, resulting in ugly residual artifacts (try pasting a note with lots of links and then opening it for editing). Is it a bug in basket.cpp? 3. I'm not quite sure what really has to be done with "text/plain" notes. The previous code seemed to contain some hack to replace newlines so that they render correctly. I currently enclose the text in "<pre></pre>", which is obviously not always appropriate, but quite interesting for pastes of source code. Maybe we can add several options to "Edit" menu, such as "Paste as rich text", "Paste as text", "Paste as code"? Regards, Alex |