Creating Custom toolbars
- From: Dave Smith <dsmith gdev net>
- To: gnome-list gnome org
- Subject: Creating Custom toolbars
- Date: Wed, 3 Feb 1999 00:28:19 -0500 (EST)
This may not be the correct list to ask this question on, if not please
direct me to the right one.
I'm in the middle of porting our application (gIDE) to gnome. One of our
features is a custom toolbar, where a user selects which tools are to be
placed in the toolbar and which are left out. My question is, without
knowing which or how many of the pre-defined buttons a user will select
for the toolbar, how do we assemble the toolbar at compile time?
I have tried:
if (cfg->toolbar_custom)
{
glong i;
GnomeUIInfo *toolbar[50];
for (i = 0; i < cfg->toolbar_custom_items_no; i++)
{
if (!strcmp (cfg->toolbar_custom_items[i], "New"))
{
toolbar[i] = GNOMEUIINFO_ITEM_STOCK (N_("New"),
N_("New File"),
file_new, GNOME_STOCK_PIXMAP_NEW);
};
if (!strcmp (cfg->toolbar_custom_items[i], "Open"))
printf("%s", item);
*toolbar[i] = {GNOMEUIINFO_ITEM_STOCK (N_("Open"),
N_("Open"),
file_open, GNOME_STOCK_PIXMAP_OPEN)};
}
}
i = i++;
toolbar[i] = "GNOMEUIINFO_END";
gnome_app_create_toolbar_with_data (GNOME_APP (app), toolbar,
vbox);
}
but this is apparently impropper syntax. Please advise....
Dave Smith
dsmith@gdev.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]