/* Bluefish HTML Editor
 * toolbars.c - the home of the many toolbars
 *
 * Copyright (C) 1998-1999 Olivier Sessink and Chris Mazuc
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#include "default_include.h"

#include <string.h>
#include <dirent.h>
#include <sys/types.h>
/* #include <sys/param.h> */
#include <stdio.h>
#include <stdlib.h>

#include "bluefish.h"
#include "pixmaps.h"
#include "toolbars.h"
#include "callbacks.h"
#include "coloursel.h"  /* sel_colour_cb() */
#include "document.h"
#include "html.h"
#include "html_form.h"
#include "html_table.h"
#include "html2.h"
#include "wml.h"
#include "interface.h"
#include "javascript.h"
#include "images.h"
#include "wizards.h"
#include "ref_dialog.h"
#include "configure.h"

#ifdef UNDO2
#include "undo2.h"
#else
#include "undo.h"
#endif /* UNDO2 */

#include "snr2.h"
#include "gtk_easy.h"

/* define WITH_SPC */
#include "spell_gui.h"

typedef struct {
	gchar *name;
	GList *entry_list;
	GtkWidget *item;
	GtkWidget *subtree;
} cust_main_menu_struct;

typedef struct {
	gchar *name;
	gchar *bef_html;
	gchar *aft_html;
	GtkWidget *item;
	GtkWidget *subtree;
	cust_main_menu_struct *main_entry;
} cust_menu_struct;


GList *entry_list_list;
GtkWidget *entry1, *entry2, *entry3, *entry4;
/* cust_menu_struct *last_entry = NULL;
cust_main_menu_struct *last_main_entry = NULL; */


/***************************************************************************/
static void flush_toolbar(gchar * labeltext, GtkWidget * toolbar, GtkWidget * notebook);
/* GtkWidget *new_pixmap(int type, GdkWindow * window, GdkColor * background); */


/***************************************************************************/


/***************************************************************************/
/* takes care of inserting the special characters */


void make_main_toolbar(GtkWidget *handle_box)
{
	GtkWidget *main_widget = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	DEBUG_MSG("make_main_toolbar, started\n");
	gtk_container_add(GTK_CONTAINER(handle_box), main_widget);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("New"), "",
							new_pixmap(000, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_new_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Open..."), "",
							new_pixmap(001, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_open_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Save"), "",
							new_pixmap(002, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_save_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Save As..."), "",
							new_pixmap(003, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_save_as_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Close"), "",
							new_pixmap(004, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_close_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(main_widget));
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Copy"), "",
							new_pixmap(005, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(copy_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Cut"), "",
							new_pixmap(006, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(cut_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Paste"), "",
							new_pixmap(007, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(paste_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Search..."), "",
							new_pixmap(010, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(search_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL,
							_("Search and Replace..."), "", new_pixmap(011,
																	main_v->main_window->window,
																	NULL), GTK_SIGNAL_FUNC(replace_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(main_widget));
	main_v->toolb.undo = gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Undo"), "",
							new_pixmap(012, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(undo_cb), NULL);
	main_v->toolb.redo = gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Redo"), "",
							new_pixmap(013, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(redo_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(main_widget));
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Configure..."),
							"", new_pixmap(014, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(configure_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Print..."), "",
							new_pixmap(015, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_print_cb), NULL);
#ifdef WITH_SPC	
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Spellcheck..."),
							"", new_pixmap(016, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(spell_check_cb), NULL);
#endif	
	gtk_toolbar_append_space(GTK_TOOLBAR(main_widget));
	gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL,
							_("View in Netscape"), "",
							new_pixmap(170, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(view_in_netscape_cb), NULL);
	gtk_widget_show(main_widget);
	DEBUG_MSG("make_main_widget, end\n");
}

void make_html_toolbar(GtkWidget *html_handle_box)
{

/*
 * every item with a ... in the tooltip brings up a dialog, every item
 * without the ... in the tooltip will directly insert html code
 *
 */

	GtkWidget *html_toolbar, *html_widget;
	GtkWidget *menu_bar;	/* for construction of a dropdown menu */
	GtkWidget *menu_item;
	GtkWidget *sub_menu;

	DEBUG_MSG("make_html_toolbar, started\n");
	html_widget = gtk_notebook_new();
	gtk_notebook_set_tab_pos(GTK_NOTEBOOK(html_widget), GTK_POS_TOP);
	gtk_notebook_set_show_tabs(GTK_NOTEBOOK(html_widget), TRUE);
	gtk_notebook_set_show_border(GTK_NOTEBOOK(html_widget), TRUE);
	gtk_notebook_set_page(GTK_NOTEBOOK(html_widget), 0);
	gtk_container_add(GTK_CONTAINER(html_handle_box), html_widget);

	html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("QuickStart..."), "", new_pixmap(100, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickstart_cb), NULL);
/* not used anymore
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("DTD..."),
							"", new_pixmap(185, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickstart_cb), NULL);

	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Head..."),
							"", new_pixmap(186, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickstart_cb), NULL);
*/
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Body..."),
							"", new_pixmap(101, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(body_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	if (main_v->props.format_by_context) {
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Strong"), "",
							new_pixmap(102, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 16);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Emphasis"), "",
							new_pixmap(103, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 17);	
	} else {
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Bold"), "",
							new_pixmap(102, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 1);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Italic"), "",
							new_pixmap(103, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 2);
	}
	if(main_v->props.allow_dep){
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Underline"), "", new_pixmap(104,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 3);
		if(main_v->props.allow_h4)gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Strikeout"), "", new_pixmap(105,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 4);
	}
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));

	/* headings dropdown menu */
	sub_menu = gtk_menu_new();
	/*H1*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(127, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 18);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*H2*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(128, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 19);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*H3*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(129, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 20);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*H4*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(130, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 21);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*H5*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(131, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 22);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*H6*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(132, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 23);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);

	menu_bar = gtk_menu_bar_new();
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(191, main_v->main_window->window, NULL));
	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), sub_menu);
	gtk_menu_bar_append(GTK_MENU_BAR(menu_bar), menu_item);
	gtk_widget_show_all(GTK_WIDGET(menu_bar));
	gtk_toolbar_append_element(GTK_TOOLBAR(html_toolbar),
							GTK_TOOLBAR_CHILD_WIDGET, menu_bar,
							NULL, _("Headings"), NULL,
							new_pixmap(127, main_v->main_window->window, NULL),
							NULL, NULL);

	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Paragraph"),
							"", new_pixmap(106, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 5);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Break"), "",
							new_pixmap(107, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 6);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Break and clear"), "",
							new_pixmap(108, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 41);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Non-breaking space"), "", new_pixmap(110,
																	main_v->main_window->window, NULL),
							GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 7);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Anchor..."),
							"", new_pixmap(111, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickanchor_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Rule..."),
							"", new_pixmap(112, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickrule_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Image..."),
							"", new_pixmap(113, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(image_insert_dialog_cb), NULL);
#ifdef HAVE_IMAGE_LIBS
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Thumbnail..."),
							"", new_pixmap(125, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(image_thumbnail_dialog_cb), NULL);
#endif
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Center"), "",
							new_pixmap(114, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 8);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Right Justify"), "", new_pixmap(115,
															   main_v->main_window->window, NULL),
							GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 9);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Comment"),
							"", new_pixmap(116, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 10);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("E-Mail..."),
							"", new_pixmap(117, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(email_cb), NULL);


	flush_toolbar(_(" Quick bar "), html_toolbar, html_widget);


	html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Font..."), "", new_pixmap(118,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(fontdialog_cb), NULL);
	if(main_v->props.allow_dep){
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Base Font Size..."), "", new_pixmap(119,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(basefont_cb), NULL);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Font Size +1"), "", new_pixmap(120,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 11);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Font Size -1"), "", new_pixmap(121,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 12);
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	}
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Preformatted Text"), "", new_pixmap(122,
																   main_v->main_window->window,
																   NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 13);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));

	/* context formatting dropdown menu */
	sub_menu = gtk_menu_new();
	/*abbr*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(425, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 54);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*acronym*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(418, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 55);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*cite*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(419, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 53);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/* code */
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(420, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 49);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*dfn*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(421, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 48);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*kbd*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(422, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 51);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*samp*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(423, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 50);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);
	/*var*/
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(424, main_v->main_window->window, NULL));
	gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 52);
	gtk_menu_append(GTK_MENU(sub_menu), menu_item);

	menu_bar = gtk_menu_bar_new();
	menu_item = gtk_menu_item_new();
	gtk_container_add(GTK_CONTAINER(menu_item), 
				new_pixmap(420, main_v->main_window->window, NULL));
	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), sub_menu);
	gtk_menu_bar_append(GTK_MENU_BAR(menu_bar), menu_item);
	gtk_widget_show_all(GTK_WIDGET(menu_bar));
	gtk_toolbar_append_element(GTK_TOOLBAR(html_toolbar),
							GTK_TOOLBAR_CHILD_WIDGET, menu_bar,
							NULL, _("Context formatting"), NULL,
							new_pixmap(420, main_v->main_window->window, NULL),
							NULL, NULL);

	if(main_v->props.allow_dep){
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Subscript"), "", new_pixmap(123,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 14);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Superscript"), "", new_pixmap(124,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 15);
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	}
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Strong"), "",
							new_pixmap(102, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 16);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Emphasis"),
							"", new_pixmap(103, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 17);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 1"),
							"", new_pixmap(127, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 18);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 2"),
							"", new_pixmap(128, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 19);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 3"),
							"", new_pixmap(129, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 20);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 4"),
							"", new_pixmap(130, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 21);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 5"),
							"", new_pixmap(131, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 22);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 6"),
							"", new_pixmap(132, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 23);

	flush_toolbar(_(" Fonts "), html_toolbar, html_widget);

	html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Table Wizard..."),
							"", new_pixmap(133, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(tablewizard), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Table..."),
							"", new_pixmap(134, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(tabledialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Table Row..."),
							"", new_pixmap(135, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(tablerowdialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Table Header..."), "", new_pixmap(136,
																 main_v->main_window->window,
																 NULL), GTK_SIGNAL_FUNC(tableheaddialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Table Data..."), "", new_pixmap(137,
															   main_v->main_window->window,
															   NULL), GTK_SIGNAL_FUNC(tabledatadialog_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Table"), "",
							new_pixmap(138, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 24);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Table Row"),
							"", new_pixmap(139, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 25);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Table Header"),
							"", new_pixmap(140, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 26);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Table Data"),
							"", new_pixmap(141, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 27);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Table Caption"), "", new_pixmap(142,
															   main_v->main_window->window,
															   NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 28);

	flush_toolbar(_(" Tables "), html_toolbar, html_widget);

	if(main_v->props.allow_frames){
		html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frame Wizard..."), "", new_pixmap(143,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(framewizard), NULL);
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frameset..."), "", new_pixmap(144,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(framesetdialog_cb), NULL);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frame..."),	"", new_pixmap(145,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(framedialog_cb), NULL);
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frameset"),	"", new_pixmap(146,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 29);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frame"), "", new_pixmap(147,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 30);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Noframes"), "", new_pixmap(148,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 31);
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Base Target"), "", new_pixmap(149,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 32);

		flush_toolbar(_(" Frames "), html_toolbar, html_widget);
	}

	html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Form..."),
							"", new_pixmap(150, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(formdialog_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Input button..."),
							"", new_pixmap(151, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(buttondialog_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Text..."),
							"", new_pixmap(153, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(textdialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Hidden..."),
							"", new_pixmap(154, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(hiddendialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Textarea..."),
							"", new_pixmap(155, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(textareadialog_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Radio Button..."),
							"", new_pixmap(156, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(radiodialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Check Box..."),
							"", new_pixmap(157, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(checkdialog_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Select..."),
							"", new_pixmap(158, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(selectdialog_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Option..."),
							"", new_pixmap(417, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(optiondialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Option group..."),
							"", new_pixmap(300, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(optgroupdialog_cb), NULL);

	flush_toolbar(_(" Forms "), html_toolbar, html_widget);

	html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Quick List..."),
							"", new_pixmap(159, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quicklist_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Unordered List"), "", new_pixmap(160,
																main_v->main_window->window,
																NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 33);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Ordered List"),
							"", new_pixmap(161, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 34);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("List Item"),
							"", new_pixmap(162, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 35);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Definition List"), "", new_pixmap(163,
																 main_v->main_window->window,
																 NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 36);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Definition Term"), "", new_pixmap(164,
																 main_v->main_window->window,
																 NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *)
							(gpointer *) 37);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Definition"),
							"", new_pixmap(165, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *)
							(gpointer *) 38);
	if(main_v->props.allow_dep){
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Menu"), "",	new_pixmap(166,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *)(gpointer *) 39);
	}

	flush_toolbar(_(" Lists "), html_toolbar, html_widget);

	/* CSS toolbar */
	if(main_v->props.allow_css){
		html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Create stylesheet..."), "", new_pixmap(180,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(new_css_dialog), NULL);
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Span..."), "", new_pixmap(181,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(span_dialog), NULL);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Div..."), "", new_pixmap(182,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(div_dialog), NULL);
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
#ifdef OLD_CSS_DIALOG
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Add class to tag..."), "", new_pixmap(183,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(insert_class), NULL);
#endif /* OLD_CSS_DIALOG */
		gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Style"), "", new_pixmap(184,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 42);
		gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Link to stylesheet..."), "", new_pixmap(189,
			main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(link_cb), NULL);

		flush_toolbar(_(" CSS "), html_toolbar, html_widget);
	}

  
  /* javascript toolbar */
	
	html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Javascript for Mouseover Effects"),
							"", new_pixmap(500, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(mouseover_script_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Javascript to work around Resize Bug in Netscape 4"),
							"", new_pixmap(501, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(ns47_bugfix_script_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Javascript preload images"),
							"", new_pixmap(502, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(imagepreload_script_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Empty javascript block"),
							"", new_pixmap(188, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 44);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Link to javascript..."),
							"", new_pixmap(187, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(script_cb), NULL);
	flush_toolbar(_(" Javascript "), html_toolbar, html_widget);

	/* WML toolbar */
	html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Standard WML Document"),
							"", new_pixmap(400, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 6);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Card Element..."),
							"", new_pixmap(402, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(carddialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Postfield Element..."),
							"", new_pixmap(408, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(postfielddialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Go Element..."),
							"", new_pixmap(410, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(godialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Do Element..."),
							"", new_pixmap(414, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(dodialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Anchor Element..."),
							"", new_pixmap(415, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(anchordialog_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Access Element..."),
							"", new_pixmap(416, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(accessdialog_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Bold"),
							"", new_pixmap(401, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 5);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Italic"),
							"", new_pixmap(404, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 3);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Insert a Paragraph"),
							"", new_pixmap(406, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 1);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Line Break"),
							"", new_pixmap(403, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 2);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Non-breaking Space"),
							"", new_pixmap(405, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 4);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Previous Document in History"),
							"", new_pixmap(411, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 7);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Refresh Document"),
							"", new_pixmap(412, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 8);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("No Operation"),
							"", new_pixmap(413, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 9);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Set variable.."),
							"", new_pixmap(409, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(vardialog_cb), NULL);

	flush_toolbar(_(" WML "), html_toolbar, html_widget);

	/* other toolbar */
	html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Imagemap"),
							"", new_pixmap(167, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *)
							(gpointer *) 40);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Meta..."),
							"", new_pixmap(168, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(meta_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Embed..."),
							"", new_pixmap(169, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(embed_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Select Colour..."), "",
							new_pixmap(171, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(sel_colour_cb), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("Insert Time..."), "",
							new_pixmap(172, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(insert_time_cb), NULL);
	gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("PHP reference..."), "",
							new_pixmap(173, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(php3_dialog), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("SSI reference..."), "",
							new_pixmap(174, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(ssi_dialog), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("RXML reference..."), "",
							new_pixmap(175, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(rxml_dialog), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
							_("PHP4 reference..."), "",
							new_pixmap(173, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(php4_dialog), NULL);
	gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Insert Generator META-Tag"),
							"", new_pixmap(190, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 47);
	flush_toolbar(_(" Other "), html_toolbar, html_widget);

	gtk_widget_show(html_widget);
	DEBUG_MSG("make_html_toolbar, end\n");
}


static void flush_toolbar(gchar * labeltext, GtkWidget * toolbar, GtkWidget * notebook)
{
	GtkWidget *html_label;

	gtk_widget_show(toolbar);
	html_label = gtk_label_new(labeltext);
	gtk_widget_show(html_label);
	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), toolbar, html_label);
}


