SourceForge has been redesigned. Learn more.

#858 Improper plugin_add_toolbar_item() insertion order

Interface (176)

When 2+ tool items are added with plugin_add_toolbar_item(), they are ordered like this: 2 3 4 5 | 1 Quit. The internal plugin_items list order is correct, so rebuilding the toolbar (for example by Edit -> Preferences and adding/removing an item) places them in the right order: | 1 2 3 4 5 Quit, as described in function /**.

Looking at plugin_add_toolbar_item() source, it's obvious that the second and subsequent items are always added before the current separator position. Adding them after | would require counting; it's easier and shorter to always use toolbar_get_insert_position().

Geany 2012-30-04 / Debian wheezy/sid (doesn't matter).


  • Dimitar Zhekov

    Dimitar Zhekov - 2012-07-17

    After a short discussion with Colomban on the mailing list from 2012-05-09..12, I wrote a second version that also keeps a plugin's items together, even if added at different times (p1 adds an item, then p2, then p1 again). It works by counting the number of items, using the already existing mechanism for counting the visible items.

  • Colomban Wendling

    • milestone: --> v1.23
    • status: open --> closed-fixed
  • Colomban Wendling

    Now fixed in Git, thanks for reporting.


Log in to post a comment.