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 319221 - Bulletpoint Support
Bulletpoint Support
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
: 347370 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-10-19 11:50 UTC by Jakub Steiner
Modified: 2008-02-26 20:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to implement bulleted lists (19.84 KB, patch)
2006-12-08 21:54 UTC, Chris Scobell
none Details | Review
Added <Shift>+<Tab> to decrease indentation (22.67 KB, patch)
2006-12-11 21:36 UTC, Boyd Timothy
none Details | Review
Working Shift-Tab patch (22.45 KB, patch)
2006-12-11 21:51 UTC, Boyd Timothy
none Details | Review
Modified serialization (28.67 KB, patch)
2006-12-15 01:41 UTC, Chris Scobell
none Details | Review
Added bullets/indent/unindent to the note "Text" menu (32.69 KB, patch)
2006-12-18 18:06 UTC, Boyd Timothy
committed Details | Review
Prevent text from being inserted before a bullet (555 bytes, patch)
2006-12-20 09:48 UTC, Chris Scobell
committed Details | Review
Fixes bug in serialization of lists that start with an item of depth greater than 0. (535 bytes, patch)
2007-01-08 22:26 UTC, Chris Scobell
committed Details | Review

Description Jakub Steiner 2005-10-19 11:50:25 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.
Comment 1 Jakub Steiner 2005-10-19 11:50:52 UTC
similarly 

  # foo

could do ordered lists
Comment 2 Steven Brown 2006-04-09 01:11:29 UTC
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.
Comment 3 Teppo Turtiainen 2006-07-19 13:09:20 UTC
*** Bug 347370 has been marked as a duplicate of this bug. ***
Comment 4 Teppo Turtiainen 2006-07-19 13:36:22 UTC
Confirming because of the duplicate.
Comment 5 Chris Scobell 2006-12-08 21:54:50 UTC
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.
Comment 6 Boyd Timothy 2006-12-11 21:36:10 UTC
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.
Comment 7 Boyd Timothy 2006-12-11 21:51:42 UTC
Created attachment 78167 [details] [review]
Working Shift-Tab patch

Sorry.  I jumped the gun on the previous patch attachment.  This one now compiles. :)
Comment 8 Chris Scobell 2006-12-15 01:41:35 UTC
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.
Comment 9 Boyd Timothy 2006-12-18 18:06:44 UTC
Created attachment 78583 [details] [review]
Added bullets/indent/unindent to the note "Text" menu

This patch includes previous patches.
Comment 10 Boyd Timothy 2006-12-18 18:32:32 UTC
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.
Comment 11 Chris Scobell 2006-12-20 09:48:05 UTC
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.
Comment 12 Boyd Timothy 2006-12-20 15:28:16 UTC
(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!
Comment 13 Chris Scobell 2007-01-08 22:26:23 UTC
Created attachment 79795 [details] [review]
Fixes bug in serialization of lists that start with an item of depth greater than 0.
Comment 14 Boyd Timothy 2007-01-10 16:37:56 UTC
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!