On 11/11/13 04:12, Matthew Brush wrote:
On 13-11-10 08:03 PM, lmx wrote:
Hi guys,
for what I understand plugindata.h have the structs of the Program data, and geanyfunctions.h, an functions to access the places in plugindata.h, geanyplugin.h include both...am I right?
I have this table, table_box = gtk_table_new(1,4,FALSE); with a label, two combox's and a button at the end , I want to add them at the end of the toolbar...
Is that possible?I am struggling with this , and I am in a dead end..
I have search in geanyfunctions.h, but I only found a macro for this... :S
plugin_add_toolbar_item(geany_plugin, table_box); //*Is this the only way to add items to toolbar?*
*plugin_add_toolbar_item* only accept a GtktoolItem * ? I think that means only GtkToolButton,GtkSeparatorToolItem, but if I want to add a table(1,4)?how can I do that?
GtkToolItem implements GtkContainer, so you could do like this probably:
... GtkWidget *tool_item = gtk_tool_item_new(); gtk_container_add(GTK_CONTAINER(tool_item), GTK_WIDGET(your_table)); gtk_widget_show_all(tool_item); plugin_add_toolbar_item(geany_plugin, tool_item); ...
thanks Matthew, yes it works ;)
Although it seems a little weird using a GtkTable in a toolbar, maybe you have a good reason. If you want a better example, IIRC the Latex plugin adds stuff to the main toolbar.
its because I will have in this plugin a section to choose board/microcontroller, based on that I will generate a config_board.h for a specific MCU...this is the easiest way, I think... The components seems a litle bit height , but for now its fine ;) thanks
BTW, it's probably best to discuss development stuff on the developer's mailing list.
ok, I'm sorry for the noise.
thanks for the help ;)
regards tux