1
/* Bluefish HTML Editor
2
* toolbars.c - the home of the many toolbars
4
* Copyright (C) 1998-1999 Olivier Sessink and Chris Mazuc
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
#include "default_include.h"
24
#include <sys/types.h>
25
/* #include <sys/param.h> */
32
#include "callbacks.h"
33
#include "coloursel.h" /* sel_colour_cb() */
36
#include "html_form.h"
37
#include "html_table.h"
40
#include "interface.h"
41
#include "javascript.h"
44
#include "ref_dialog.h"
45
#include "configure.h"
57
#include "spell_gui.h"
64
} cust_main_menu_struct;
72
cust_main_menu_struct *main_entry;
76
GList *entry_list_list;
77
GtkWidget *entry1, *entry2, *entry3, *entry4;
78
/* cust_menu_struct *last_entry = NULL;
79
cust_main_menu_struct *last_main_entry = NULL; */
82
/***************************************************************************/
83
static void flush_toolbar(gchar * labeltext, GtkWidget * toolbar, GtkWidget * notebook);
84
/* GtkWidget *new_pixmap(int type, GdkWindow * window, GdkColor * background); */
87
/***************************************************************************/
90
/***************************************************************************/
91
/* takes care of inserting the special characters */
94
void make_main_toolbar(GtkWidget *handle_box)
96
GtkWidget *main_widget = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
97
DEBUG_MSG("make_main_toolbar, started\n");
98
gtk_container_add(GTK_CONTAINER(handle_box), main_widget);
99
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("New"), "",
100
new_pixmap(000, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_new_cb), NULL);
101
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Open..."), "",
102
new_pixmap(001, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_open_cb), NULL);
103
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Save"), "",
104
new_pixmap(002, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_save_cb), NULL);
105
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Save As..."), "",
106
new_pixmap(003, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_save_as_cb), NULL);
107
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Close"), "",
108
new_pixmap(004, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_close_cb), NULL);
109
gtk_toolbar_append_space(GTK_TOOLBAR(main_widget));
110
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Copy"), "",
111
new_pixmap(005, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(copy_cb), NULL);
112
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Cut"), "",
113
new_pixmap(006, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(cut_cb), NULL);
114
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Paste"), "",
115
new_pixmap(007, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(paste_cb), NULL);
116
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Search..."), "",
117
new_pixmap(010, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(search_cb), NULL);
118
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL,
119
_("Search and Replace..."), "", new_pixmap(011,
120
main_v->main_window->window,
121
NULL), GTK_SIGNAL_FUNC(replace_cb), NULL);
122
gtk_toolbar_append_space(GTK_TOOLBAR(main_widget));
123
main_v->toolb.undo = gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Undo"), "",
124
new_pixmap(012, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(undo_cb), NULL);
125
main_v->toolb.redo = gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Redo"), "",
126
new_pixmap(013, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(redo_cb), NULL);
127
gtk_toolbar_append_space(GTK_TOOLBAR(main_widget));
128
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Configure..."),
129
"", new_pixmap(014, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(configure_cb), NULL);
130
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Print..."), "",
131
new_pixmap(015, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(file_print_cb), NULL);
133
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL, _("Spellcheck..."),
134
"", new_pixmap(016, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(spell_check_cb), NULL);
136
gtk_toolbar_append_space(GTK_TOOLBAR(main_widget));
137
gtk_toolbar_append_item(GTK_TOOLBAR(main_widget), NULL,
138
_("View in Netscape"), "",
139
new_pixmap(170, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(view_in_netscape_cb), NULL);
140
gtk_widget_show(main_widget);
141
DEBUG_MSG("make_main_widget, end\n");
144
void make_html_toolbar(GtkWidget *html_handle_box)
148
* every item with a ... in the tooltip brings up a dialog, every item
149
* without the ... in the tooltip will directly insert html code
153
GtkWidget *html_toolbar, *html_widget;
154
GtkWidget *menu_bar; /* for construction of a dropdown menu */
155
GtkWidget *menu_item;
158
DEBUG_MSG("make_html_toolbar, started\n");
159
html_widget = gtk_notebook_new();
160
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(html_widget), GTK_POS_TOP);
161
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(html_widget), TRUE);
162
gtk_notebook_set_show_border(GTK_NOTEBOOK(html_widget), TRUE);
163
gtk_notebook_set_page(GTK_NOTEBOOK(html_widget), 0);
164
gtk_container_add(GTK_CONTAINER(html_handle_box), html_widget);
166
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
167
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
168
_("QuickStart..."), "", new_pixmap(100, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickstart_cb), NULL);
170
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("DTD..."),
171
"", new_pixmap(185, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickstart_cb), NULL);
173
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Head..."),
174
"", new_pixmap(186, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickstart_cb), NULL);
176
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Body..."),
177
"", new_pixmap(101, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(body_cb), NULL);
178
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
179
if (main_v->props.format_by_context) {
180
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Strong"), "",
181
new_pixmap(102, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 16);
182
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Emphasis"), "",
183
new_pixmap(103, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 17);
185
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Bold"), "",
186
new_pixmap(102, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 1);
187
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Italic"), "",
188
new_pixmap(103, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 2);
190
if(main_v->props.allow_dep){
191
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Underline"), "", new_pixmap(104,
192
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 3);
193
if(main_v->props.allow_h4)gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Strikeout"), "", new_pixmap(105,
194
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 4);
196
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
198
/* headings dropdown menu */
199
sub_menu = gtk_menu_new();
201
menu_item = gtk_menu_item_new();
202
gtk_container_add(GTK_CONTAINER(menu_item),
203
new_pixmap(127, main_v->main_window->window, NULL));
204
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 18);
205
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
207
menu_item = gtk_menu_item_new();
208
gtk_container_add(GTK_CONTAINER(menu_item),
209
new_pixmap(128, main_v->main_window->window, NULL));
210
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 19);
211
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
213
menu_item = gtk_menu_item_new();
214
gtk_container_add(GTK_CONTAINER(menu_item),
215
new_pixmap(129, main_v->main_window->window, NULL));
216
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 20);
217
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
219
menu_item = gtk_menu_item_new();
220
gtk_container_add(GTK_CONTAINER(menu_item),
221
new_pixmap(130, main_v->main_window->window, NULL));
222
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 21);
223
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
225
menu_item = gtk_menu_item_new();
226
gtk_container_add(GTK_CONTAINER(menu_item),
227
new_pixmap(131, main_v->main_window->window, NULL));
228
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 22);
229
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
231
menu_item = gtk_menu_item_new();
232
gtk_container_add(GTK_CONTAINER(menu_item),
233
new_pixmap(132, main_v->main_window->window, NULL));
234
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 23);
235
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
237
menu_bar = gtk_menu_bar_new();
238
menu_item = gtk_menu_item_new();
239
gtk_container_add(GTK_CONTAINER(menu_item),
240
new_pixmap(191, main_v->main_window->window, NULL));
241
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), sub_menu);
242
gtk_menu_bar_append(GTK_MENU_BAR(menu_bar), menu_item);
243
gtk_widget_show_all(GTK_WIDGET(menu_bar));
244
gtk_toolbar_append_element(GTK_TOOLBAR(html_toolbar),
245
GTK_TOOLBAR_CHILD_WIDGET, menu_bar,
246
NULL, _("Headings"), NULL,
247
new_pixmap(127, main_v->main_window->window, NULL),
250
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
251
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Paragraph"),
252
"", new_pixmap(106, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 5);
253
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Break"), "",
254
new_pixmap(107, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 6);
255
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Break and clear"), "",
256
new_pixmap(108, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 41);
257
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
258
_("Non-breaking space"), "", new_pixmap(110,
259
main_v->main_window->window, NULL),
260
GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 7);
261
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
262
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Anchor..."),
263
"", new_pixmap(111, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickanchor_cb), NULL);
264
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Rule..."),
265
"", new_pixmap(112, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quickrule_cb), NULL);
266
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Image..."),
267
"", new_pixmap(113, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(image_insert_dialog_cb), NULL);
268
#ifdef HAVE_IMAGE_LIBS
269
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
271
"", new_pixmap(125, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(image_thumbnail_dialog_cb), NULL);
273
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
274
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Center"), "",
275
new_pixmap(114, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 8);
276
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
277
_("Right Justify"), "", new_pixmap(115,
278
main_v->main_window->window, NULL),
279
GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 9);
280
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
281
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Comment"),
282
"", new_pixmap(116, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 10);
283
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("E-Mail..."),
284
"", new_pixmap(117, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(email_cb), NULL);
287
flush_toolbar(_(" Quick bar "), html_toolbar, html_widget);
290
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
291
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Font..."), "", new_pixmap(118,
292
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(fontdialog_cb), NULL);
293
if(main_v->props.allow_dep){
294
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Base Font Size..."), "", new_pixmap(119,
295
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(basefont_cb), NULL);
296
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Font Size +1"), "", new_pixmap(120,
297
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 11);
298
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Font Size -1"), "", new_pixmap(121,
299
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 12);
300
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
302
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
303
_("Preformatted Text"), "", new_pixmap(122,
304
main_v->main_window->window,
305
NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 13);
306
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
308
/* context formatting dropdown menu */
309
sub_menu = gtk_menu_new();
311
menu_item = gtk_menu_item_new();
312
gtk_container_add(GTK_CONTAINER(menu_item),
313
new_pixmap(425, main_v->main_window->window, NULL));
314
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 54);
315
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
317
menu_item = gtk_menu_item_new();
318
gtk_container_add(GTK_CONTAINER(menu_item),
319
new_pixmap(418, main_v->main_window->window, NULL));
320
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 55);
321
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
323
menu_item = gtk_menu_item_new();
324
gtk_container_add(GTK_CONTAINER(menu_item),
325
new_pixmap(419, main_v->main_window->window, NULL));
326
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 53);
327
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
329
menu_item = gtk_menu_item_new();
330
gtk_container_add(GTK_CONTAINER(menu_item),
331
new_pixmap(420, main_v->main_window->window, NULL));
332
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 49);
333
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
335
menu_item = gtk_menu_item_new();
336
gtk_container_add(GTK_CONTAINER(menu_item),
337
new_pixmap(421, main_v->main_window->window, NULL));
338
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 48);
339
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
341
menu_item = gtk_menu_item_new();
342
gtk_container_add(GTK_CONTAINER(menu_item),
343
new_pixmap(422, main_v->main_window->window, NULL));
344
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 51);
345
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
347
menu_item = gtk_menu_item_new();
348
gtk_container_add(GTK_CONTAINER(menu_item),
349
new_pixmap(423, main_v->main_window->window, NULL));
350
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 50);
351
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
353
menu_item = gtk_menu_item_new();
354
gtk_container_add(GTK_CONTAINER(menu_item),
355
new_pixmap(424, main_v->main_window->window, NULL));
356
gtk_signal_connect(GTK_OBJECT(menu_item), "activate", GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 52);
357
gtk_menu_append(GTK_MENU(sub_menu), menu_item);
359
menu_bar = gtk_menu_bar_new();
360
menu_item = gtk_menu_item_new();
361
gtk_container_add(GTK_CONTAINER(menu_item),
362
new_pixmap(420, main_v->main_window->window, NULL));
363
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), sub_menu);
364
gtk_menu_bar_append(GTK_MENU_BAR(menu_bar), menu_item);
365
gtk_widget_show_all(GTK_WIDGET(menu_bar));
366
gtk_toolbar_append_element(GTK_TOOLBAR(html_toolbar),
367
GTK_TOOLBAR_CHILD_WIDGET, menu_bar,
368
NULL, _("Context formatting"), NULL,
369
new_pixmap(420, main_v->main_window->window, NULL),
372
if(main_v->props.allow_dep){
373
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Subscript"), "", new_pixmap(123,
374
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 14);
375
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Superscript"), "", new_pixmap(124,
376
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 15);
377
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
379
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Strong"), "",
380
new_pixmap(102, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 16);
381
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Emphasis"),
382
"", new_pixmap(103, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 17);
383
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
384
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 1"),
385
"", new_pixmap(127, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 18);
386
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 2"),
387
"", new_pixmap(128, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 19);
388
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 3"),
389
"", new_pixmap(129, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 20);
390
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 4"),
391
"", new_pixmap(130, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 21);
392
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 5"),
393
"", new_pixmap(131, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 22);
394
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Heading 6"),
395
"", new_pixmap(132, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 23);
397
flush_toolbar(_(" Fonts "), html_toolbar, html_widget);
399
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
400
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
401
_("Table Wizard..."),
402
"", new_pixmap(133, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(tablewizard), NULL);
403
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
404
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Table..."),
405
"", new_pixmap(134, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(tabledialog_cb), NULL);
406
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
408
"", new_pixmap(135, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(tablerowdialog_cb), NULL);
409
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
410
_("Table Header..."), "", new_pixmap(136,
411
main_v->main_window->window,
412
NULL), GTK_SIGNAL_FUNC(tableheaddialog_cb), NULL);
413
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
414
_("Table Data..."), "", new_pixmap(137,
415
main_v->main_window->window,
416
NULL), GTK_SIGNAL_FUNC(tabledatadialog_cb), NULL);
417
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
418
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Table"), "",
419
new_pixmap(138, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 24);
420
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Table Row"),
421
"", new_pixmap(139, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 25);
422
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
424
"", new_pixmap(140, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 26);
425
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Table Data"),
426
"", new_pixmap(141, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 27);
427
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
428
_("Table Caption"), "", new_pixmap(142,
429
main_v->main_window->window,
430
NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 28);
432
flush_toolbar(_(" Tables "), html_toolbar, html_widget);
434
if(main_v->props.allow_frames){
435
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
436
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frame Wizard..."), "", new_pixmap(143,
437
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(framewizard), NULL);
438
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
439
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frameset..."), "", new_pixmap(144,
440
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(framesetdialog_cb), NULL);
441
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frame..."), "", new_pixmap(145,
442
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(framedialog_cb), NULL);
443
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
444
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frameset"), "", new_pixmap(146,
445
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 29);
446
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Frame"), "", new_pixmap(147,
447
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 30);
448
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Noframes"), "", new_pixmap(148,
449
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 31);
450
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
451
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Base Target"), "", new_pixmap(149,
452
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 32);
454
flush_toolbar(_(" Frames "), html_toolbar, html_widget);
457
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
458
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Form..."),
459
"", new_pixmap(150, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(formdialog_cb), NULL);
460
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
461
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Input button..."),
462
"", new_pixmap(151, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(buttondialog_cb), NULL);
463
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
464
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Text..."),
465
"", new_pixmap(153, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(textdialog_cb), NULL);
466
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Hidden..."),
467
"", new_pixmap(154, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(hiddendialog_cb), NULL);
468
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
470
"", new_pixmap(155, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(textareadialog_cb), NULL);
471
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
472
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
473
_("Radio Button..."),
474
"", new_pixmap(156, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(radiodialog_cb), NULL);
475
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
477
"", new_pixmap(157, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(checkdialog_cb), NULL);
478
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
479
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Select..."),
480
"", new_pixmap(158, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(selectdialog_cb), NULL);
481
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
482
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Option..."),
483
"", new_pixmap(417, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(optiondialog_cb), NULL);
484
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Option group..."),
485
"", new_pixmap(300, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(optgroupdialog_cb), NULL);
487
flush_toolbar(_(" Forms "), html_toolbar, html_widget);
489
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
490
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
492
"", new_pixmap(159, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(quicklist_cb), NULL);
493
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
494
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
495
_("Unordered List"), "", new_pixmap(160,
496
main_v->main_window->window,
497
NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 33);
498
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
500
"", new_pixmap(161, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 34);
501
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("List Item"),
502
"", new_pixmap(162, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 35);
503
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
504
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
505
_("Definition List"), "", new_pixmap(163,
506
main_v->main_window->window,
507
NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 36);
508
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
509
_("Definition Term"), "", new_pixmap(164,
510
main_v->main_window->window,
511
NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *)
513
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Definition"),
514
"", new_pixmap(165, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *)
516
if(main_v->props.allow_dep){
517
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
518
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Menu"), "", new_pixmap(166,
519
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *)(gpointer *) 39);
522
flush_toolbar(_(" Lists "), html_toolbar, html_widget);
525
if(main_v->props.allow_css){
526
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
527
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Create stylesheet..."), "", new_pixmap(180,
528
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(new_css_dialog), NULL);
529
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
530
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Span..."), "", new_pixmap(181,
531
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(span_dialog), NULL);
532
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Div..."), "", new_pixmap(182,
533
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(div_dialog), NULL);
534
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
535
#ifdef OLD_CSS_DIALOG
536
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Add class to tag..."), "", new_pixmap(183,
537
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(insert_class), NULL);
538
#endif /* OLD_CSS_DIALOG */
539
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
540
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Style"), "", new_pixmap(184,
541
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 42);
542
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Link to stylesheet..."), "", new_pixmap(189,
543
main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(link_cb), NULL);
545
flush_toolbar(_(" CSS "), html_toolbar, html_widget);
549
/* javascript toolbar */
551
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
552
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Javascript for Mouseover Effects"),
553
"", new_pixmap(500, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(mouseover_script_cb), NULL);
554
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Javascript to work around Resize Bug in Netscape 4"),
555
"", new_pixmap(501, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(ns47_bugfix_script_cb), NULL);
556
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Javascript preload images"),
557
"", new_pixmap(502, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(imagepreload_script_cb), NULL);
558
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
559
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Empty javascript block"),
560
"", new_pixmap(188, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 44);
561
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Link to javascript..."),
562
"", new_pixmap(187, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(script_cb), NULL);
563
flush_toolbar(_(" Javascript "), html_toolbar, html_widget);
566
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
567
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Standard WML Document"),
568
"", new_pixmap(400, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 6);
569
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Card Element..."),
570
"", new_pixmap(402, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(carddialog_cb), NULL);
571
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Postfield Element..."),
572
"", new_pixmap(408, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(postfielddialog_cb), NULL);
573
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Go Element..."),
574
"", new_pixmap(410, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(godialog_cb), NULL);
575
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Do Element..."),
576
"", new_pixmap(414, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(dodialog_cb), NULL);
577
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Anchor Element..."),
578
"", new_pixmap(415, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(anchordialog_cb), NULL);
579
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Access Element..."),
580
"", new_pixmap(416, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(accessdialog_cb), NULL);
581
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
582
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Bold"),
583
"", new_pixmap(401, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 5);
584
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Italic"),
585
"", new_pixmap(404, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 3);
586
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Insert a Paragraph"),
587
"", new_pixmap(406, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 1);
588
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
589
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Line Break"),
590
"", new_pixmap(403, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 2);
591
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Non-breaking Space"),
592
"", new_pixmap(405, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 4);
593
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
594
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Previous Document in History"),
595
"", new_pixmap(411, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 7);
596
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Refresh Document"),
597
"", new_pixmap(412, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 8);
598
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("No Operation"),
599
"", new_pixmap(413, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_wml_cb), (gpointer *) 9);
600
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
601
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Set variable.."),
602
"", new_pixmap(409, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(vardialog_cb), NULL);
604
flush_toolbar(_(" WML "), html_toolbar, html_widget);
607
html_toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
608
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Imagemap"),
609
"", new_pixmap(167, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *)
611
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Meta..."),
612
"", new_pixmap(168, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(meta_cb), NULL);
613
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Embed..."),
614
"", new_pixmap(169, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(embed_cb), NULL);
615
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
616
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
617
_("Select Colour..."), "",
618
new_pixmap(171, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(sel_colour_cb), NULL);
619
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
620
_("Insert Time..."), "",
621
new_pixmap(172, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(insert_time_cb), NULL);
622
gtk_toolbar_append_space(GTK_TOOLBAR(html_toolbar));
623
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
624
_("PHP reference..."), "",
625
new_pixmap(173, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(php3_dialog), NULL);
626
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
627
_("SSI reference..."), "",
628
new_pixmap(174, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(ssi_dialog), NULL);
629
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
630
_("RXML reference..."), "",
631
new_pixmap(175, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(rxml_dialog), NULL);
632
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL,
633
_("PHP4 reference..."), "",
634
new_pixmap(173, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(php4_dialog), NULL);
635
gtk_toolbar_append_item(GTK_TOOLBAR(html_toolbar), NULL, _("Insert Generator META-Tag"),
636
"", new_pixmap(190, main_v->main_window->window, NULL), GTK_SIGNAL_FUNC(general_html_cb), (gpointer *) 47);
637
flush_toolbar(_(" Other "), html_toolbar, html_widget);
639
gtk_widget_show(html_widget);
640
DEBUG_MSG("make_html_toolbar, end\n");
644
static void flush_toolbar(gchar * labeltext, GtkWidget * toolbar, GtkWidget * notebook)
646
GtkWidget *html_label;
648
gtk_widget_show(toolbar);
649
html_label = gtk_label_new(labeltext);
650
gtk_widget_show(html_label);
651
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), toolbar, html_label);