Hi again, and excuse me for stuffing the list. Actually there is 1/2 error. The plugin toolbar items are inserted improperly, but added to plugin_items list in the right order. So using "Customize Toolbar" and adding/removing items or otherwise changing them fixes the order.
Patch attached. Not in git format, sorry. -- E-gards: Jimmy
--- ./src/pluginutils.c.orig 2011-10-15 19:28:57.000000000 +0300 +++ ./src/pluginutils.c 2012-04-29 21:17:36.685006711 +0300 @@ -47,7 +47,7 @@ void plugin_add_toolbar_item(GeanyPlugin *plugin, GtkToolItem *item) { GtkToolbar *toolbar = GTK_TOOLBAR(main_widgets.toolbar); - gint pos; + gint pos = toolbar_get_insert_position(); GeanyAutoSeparator *autosep; g_return_if_fail(plugin); @@ -55,26 +55,15 @@ if (!autosep->widget) { - GtkToolItem *sep; + GtkToolItem *sep = gtk_separator_tool_item_new(); - pos = toolbar_get_insert_position(); - - sep = gtk_separator_tool_item_new(); - gtk_toolbar_insert(toolbar, sep, pos); + gtk_toolbar_insert(toolbar, sep, pos++); autosep->widget = GTK_WIDGET(sep); - - gtk_toolbar_insert(toolbar, item, pos + 1); - toolbar_item_ref(sep); - toolbar_item_ref(item); - } - else - { - pos = gtk_toolbar_get_item_index(toolbar, GTK_TOOL_ITEM(autosep->widget)); - g_return_if_fail(pos >= 0); - gtk_toolbar_insert(toolbar, item, pos); - toolbar_item_ref(item); } + + gtk_toolbar_insert(toolbar, item, pos); + toolbar_item_ref(item); /* hide the separator widget if there are no toolbar items showing for the plugin */ ui_auto_separator_add_ref(autosep, GTK_WIDGET(item)); }
_______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel