GNOME Bugzilla – Bug 319221
Bulletpoint Support
Last modified: 2008-02-26 20:52:43 UTC
As I'm using tomboy to also track stuff I have done (status reports) and stuff i need TODO, I'm missing bulletpoints. I suggest this behavior (I suppose it comes from MS Word/wiki) * foo (ie two spaces+ the asterisk character) to become a formatted unordered list item after pressing newline. additional newlines would become bulletpoints. pressing backspace after the newline would reset the style to regular paragraph.
similarly # foo could do ordered lists
Nesting could be done similarly to JSPWiki: ** would do a level 2 bullet point, and ## would do a level 2 ordered item. I agree that the auto-formatting method for both list styles should be the same, but I think <space><pound><space><item> could be too easily encountered in general situations. Maybe, instead of '#', it could be a number (the starting number for this list) followed by a '.' (period) or a closing parenthesis (')'), which would dictate the style, if available.
*** Bug 347370 has been marked as a duplicate of this bug. ***
Confirming because of the duplicate.
Created attachment 77991 [details] [review] Patch to implement bulleted lists This patch implements bullet support in Tomboy. To create a new bulleted list you can start a line with a "*". Tab will increase the depth of the bullet and backspace with the cursor right before the bullet ill decrease it. Alt + Left and Alt + Right also increase and decrease the depth.
Created attachment 78166 [details] [review] Added <Shift>+<Tab> to decrease indentation Also updated code style to match the rest of Tomboy: variableName -> variable_name ^ (no camel casing) x.MethodCall() -> x.MethodCall (); ^ (use space character) Wrap lines that would exceed 100 chars wide.
Created attachment 78167 [details] [review] Working Shift-Tab patch Sorry. I jumped the gun on the previous patch attachment. This one now compiles. :)
Created attachment 78407 [details] [review] Modified serialization Changed the serialized xml format for the lists to be like HTML ie: <list> <list-item>An item in the list</list-item> <list> <list-item>A sublist</list-item> </list> </list-item> </list> This makes exporting to HTML a lot easier and should be able to cope much better with adding ordered lists in the future. The serializer now also handles the cases where formatting tags such as <bold> cross into or out of a list, or over multiple list items.
Created attachment 78583 [details] [review] Added bullets/indent/unindent to the note "Text" menu This patch includes previous patches.
Checked-in to CVS. I believe that we may still need some clean-up and possibly refactoring on this code, but getting it into CVS will help get it more test coverage. Outstanding issues: - When a bulleted-list line wraps to the next line, the text on the extra lines is not aligned exactly with the first line. - An extra space character is left after each bullet (and remains after bullets are removed from the line). - Does this work with RTL languages? - More? Please add your comments to this bug.
Created attachment 78672 [details] [review] Prevent text from being inserted before a bullet This is a patch to CVS which prevents text from being inserted before the bulllet by moving the cursor after the bullet. This prevents the list from getting messed up when you try to type with the cursor before the bullet.
(In reply to comment #11) > Created an attachment (id=78672) [edit] > Prevent text from being inserted before a bullet Committed to CVS. It works great. Keep these patches coming!
Created attachment 79795 [details] [review] Fixes bug in serialization of lists that start with an item of depth greater than 0.
Committed the patch from comment #13. I'm marking this bug/enhancement as fixed. If additional problems are found surrounding bullets, please open a new bug. Kudos to Chris for getting this going!