17
19
* along with this program; if not, write to the Free Software
18
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#include "default_include.h"
25
#include <sys/types.h>
23
#include <stdlib.h> /* atoi */
24
#include <string.h> /* strchr() */
25
#include <gdk/gdkkeysyms.h>
30
29
#include "bluefish.h"
32
#include "callbacks.h" /* repeat_last_insert_cb , view_in_netscape_cb*/
33
#include "document.h" /* file_open etc. */
34
#include "highlight.h" /* doc_highlight_full */
35
#include "menu.h" /* my own .h file */
36
#include "undo_redo.h" /* undo_cb() redo_cb() etc. */
37
#include "snr2.h" /* search_cb, replace_cb */
38
#include "gui.h" /* go_to_line_win_cb */
39
#include "stringlist.h" /* free_stringlist() */
40
#include "bf_lib.h" /* append_string_to_file() */
41
#include "gtk_easy.h" /* window_full, bf_stock_ok_button */
42
#include "preferences.h" /* open_preferences_menu_cb */
45
#include "html_table.h"
34
46
#include "html_form.h"
35
#include "html_table.h"
36
#include "coloursel.h" /* sel_colour_cb() */
38
#include "javascript.h"
39
#include "document.h" /* file_open etc. */
40
#include "project.h" /* project_open etc. */
41
#include "interface.h" /* show_about_window_cb() */
42
#include "stringlist.h" /* edit_stringlist() */
43
#include "init.h" /* save_config_files() */
44
#include "snr2.h" /* the new search and replace */
47
47
#include "wizards.h"
48
#include "ref_dialog.h"
49
#include "configure.h"
51
#include "menu.h" /* my own .h file */
60
#include "highlight.h"
64
/***************************************************************************/
65
void save_menu_shortcuts();
66
void load_menu_shortcuts();
67
static void edit_some_list_lcb(GtkWidget * widget, gpointer data);
69
gchar *menu_translate(const gchar * path, gpointer data);
70
#endif /* ENABLE_NLS */
71
static void insert_char_cb(GtkWidget * widget, gint data);
72
void get_main_menu(GtkWidget * window, GtkWidget ** menubar);
75
/***************************************************************************/
76
#ifdef IMAGEMAP_EDITOR_TEST
77
void make_imagemap_win(GtkWidget * widget, gpointer data);
80
/* I wish there was a better way to show he names of the different chars */
81
/* as in actually show them in parenthesis */
83
gtk_text accelerators are:
84
<control>a beginning of line
87
<control>p previous line
90
<alt>b backwards one word
91
<alt>f forward one word
94
<control>w delete backward word
95
<alt>d delete forward line
96
<control>k delete to end of line
97
<control>u delete line
49
#include "rcfile.h" /* rcfile_save_configfile_menu_cb */
54
#include "outputbox.h" /* temporary */
57
The callback for an ItemFactory entry can take two forms. If callback_action is zero, it is of the following form:
59
otherwise it is of the form:
60
void callback( gpointer callback_data,guint callback_action, GtkWidget *widget)
61
callback_data is a pointer to an arbitrary piece of data and is set during the call to gtk_item_factory_create_items().
63
we want to pass the Tbfwin* so we should never use a callback_action of zero
65
static void menu_file_operations_cb(Tbfwin *bfwin,guint callback_action, GtkWidget *widget) {
66
switch(callback_action) {
68
file_new_cb(NULL,bfwin);
71
file_open_cb(NULL,bfwin);
76
file_open_advanced_cb(NULL,bfwin);
81
doc_reload(bfwin->current_document);
84
file_save_cb(NULL, bfwin);
87
file_save_as_cb(NULL, bfwin);
90
file_move_to_cb(NULL, bfwin);
93
file_save_all_cb(NULL, bfwin);
96
file_close_cb(NULL, bfwin);
99
edit_cut_cb(NULL, bfwin);
102
edit_copy_cb(NULL, bfwin);
105
edit_paste_cb(NULL, bfwin);
108
edit_select_all_cb(NULL, bfwin);
111
search_cb(NULL, bfwin);
114
search_again_cb(NULL, bfwin);
117
replace_cb(NULL, bfwin);
120
replace_again_cb(NULL, bfwin);
123
undo_cb(NULL, bfwin);
126
redo_cb(NULL, bfwin);
129
undo_all_cb(NULL, bfwin);
132
redo_all_cb(NULL, bfwin);
135
file_close_all_cb(NULL,bfwin);
137
#ifdef HAVE_GNOME_VFS
139
file_open_url_cb(NULL, bfwin);
143
file_open_from_selection(bfwin);
146
search_from_selection(bfwin);
149
g_print("menu_file_operations_cb, unknown action, abort!\n");
153
static void menu_html_dialogs_lcb(Tbfwin *bfwin,guint callback_action, GtkWidget *widget) {
154
switch (callback_action) {
156
body_dialog(bfwin,NULL);
159
DEBUG_MSG("menu_html_dialogs_lcb,calling quickanchor_dialog with bfwin=%p and data=NULL\n",bfwin);
160
quickanchor_dialog(bfwin,NULL);
163
email_dialog(bfwin,NULL);
166
quickrule_dialog(bfwin,NULL);
169
font_dialog(bfwin,NULL);
172
basefont_dialog(bfwin,NULL);
175
quicklist_dialog(bfwin,NULL);
178
meta_dialog(bfwin,NULL);
181
embed_dialog(bfwin,NULL);
184
image_insert_dialog(bfwin,NULL);
187
thumbnail_insert_dialog(bfwin);
190
tablewizard_dialog(bfwin);
193
tabledialog_dialog(bfwin,NULL);
196
tablerowdialog_dialog(bfwin,NULL);
199
tableheaddialog_dialog(bfwin,NULL);
202
tabledatadialog_dialog(bfwin,NULL);
205
span_dialog(bfwin,NULL);
208
div_dialog(bfwin,NULL);
211
framewizard_dialog(bfwin);
214
frameset_dialog(bfwin,NULL);
217
frame_dialog(bfwin,NULL);
220
formdialog_dialog(bfwin,NULL);
223
inputdialog_dialog(bfwin, NULL, "submit");
226
inputdialog_dialog(bfwin, NULL, "text");
229
buttondialog_dialog(bfwin, NULL);
232
textareadialog_dialog(bfwin,NULL);
235
selectdialog_dialog(bfwin,NULL);
238
optiondialog_dialog(bfwin,NULL);
241
optgroupdialog_dialog(bfwin,NULL);
244
quickstart_dialog(bfwin,NULL);
247
inputdialog_dialog(bfwin, NULL, NULL);
250
insert_time_dialog(bfwin);
253
linkdialog_dialog(bfwin,NULL);
256
new_css_dialog(NULL,bfwin);
258
sel_colour_cb(NULL,bfwin);
261
edit_tag_under_cursor_cb(bfwin);
264
g_print("menu_file_operations_cb, unknown action, abort!\n");
268
#ifdef HAVE_LIBASPELL
269
static void spell_check_menu_cb(Tbfwin *bfwin,guint callback_action, GtkWidget *widget) {
270
spell_check_cb(NULL, bfwin);
272
#endif /* HAVE_LIBASPELL */
274
static void menu_bmark_operations_cb(Tbfwin *bfwin,guint callback_action, GtkWidget *widget) {
275
switch(callback_action) {
280
bmark_add_perm(bfwin);
283
g_print("Bmark action no. %d\n",callback_action);
287
static void toggle_doc_property(Tbfwin *bfwin,guint callback_action, GtkWidget *widget) {
288
switch(callback_action) {
290
bfwin->current_document->wrapstate = GTK_CHECK_MENU_ITEM(widget)->active;
291
doc_set_wrap(bfwin->current_document);
294
bfwin->current_document->linenumberstate = GTK_CHECK_MENU_ITEM(widget)->active;
295
document_set_line_numbers(bfwin->current_document, bfwin->current_document->linenumberstate);
298
bfwin->current_document->autoclosingtag = GTK_CHECK_MENU_ITEM(widget)->active;
301
main_v->props.autoindent = GTK_CHECK_MENU_ITEM(widget)->active;
104
306
static GtkItemFactoryEntry menu_items[] = {
105
307
{N_("/_File"), NULL, NULL, 0, "<Branch>"},
106
308
{N_("/File/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
107
{N_("/File/_New"), "F8", file_new_cb, 0, NULL},
108
{N_("/File/_Open..."), "<control>O", file_open_cb, 0, NULL},
109
{N_("/File/Open advanced..."), NULL, file_open_cb, 1, NULL},
110
{N_("/File/Open from the web..."), NULL, open_from_web_cb, 0, NULL},
111
{N_("/File/Open recent"), NULL, NULL, 0, "<Branch>"},
112
{N_("/File/Open recent/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
113
{N_("/File/Revert to saved"), NULL, revert_to_saved_cb, 0, NULL},
114
{N_("/File/Insert..."), NULL, file_insert_cb, 0, NULL},
115
{N_("/File/sep2"), NULL, NULL, 0, "<Separator>"},
116
{N_("/File/_Save"), "<control>S", file_save_cb, 0, NULL},
117
{N_("/File/Save _as..."), NULL, file_save_as_cb, 0, NULL},
118
{N_("/File/Move to..."), NULL, file_move_to_cb, 0, NULL},
119
{N_("/File/Save all"), NULL, file_save_all_cb, 0, NULL},
309
{N_("/File/_New"), "<control>n", menu_file_operations_cb, 1, "<StockItem>", GTK_STOCK_NEW},
310
{N_("/File/New _Window"), "<shift><control>n", gui_window_menu_cb, 1, "<Item>"},
311
{N_("/File/_Open..."), "<control>O", menu_file_operations_cb, 2, "<StockItem>", GTK_STOCK_OPEN},
312
{N_("/File/Open _recent"), NULL, NULL, 0, "<Branch>"},
313
{N_("/File/Open recent/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
316
{N_("/File/Open Ad_vanced..."), "<shift><control>O", menu_file_operations_cb, 3, "<Item>"},
317
#endif /* EXTERNAL_FIND */
318
#endif /* EXTERNAL_GREP */
319
#ifdef HAVE_GNOME_VFS
320
{N_("/File/Open _URL..."), NULL, menu_file_operations_cb, 25, "<Item>"},
321
#endif /* HAVE_GNOME_VFS */
322
{N_("/File/Open _from selection"), NULL, menu_file_operations_cb, 26, "<Item>"},
323
{N_("/File/sep1"), NULL, NULL, 0, "<Separator>"},
324
{N_("/File/_Save"), "<control>S", menu_file_operations_cb, 5, "<StockItem>", GTK_STOCK_SAVE},
325
{N_("/File/Save _As..."), "<shift><control>S", menu_file_operations_cb, 6, "<StockItem>", GTK_STOCK_SAVE_AS},
326
{N_("/File/Sav_e All"), NULL, menu_file_operations_cb, 8, "<Item>"},
327
{N_("/File/Rever_t to Saved"), NULL, menu_file_operations_cb, 4, "<StockItem>", GTK_STOCK_REVERT_TO_SAVED},
328
{N_("/File/sep2"), NULL, NULL, 0, "<Separator>"},
329
{N_("/File/_Insert..."), NULL, file_insert_menucb, 1, "<Item>"},
330
{N_("/File/Rena_me..."), "F2", menu_file_operations_cb, 7, "<Item>"},
120
331
{N_("/File/sep3"), NULL, NULL, 0, "<Separator>"},
121
{N_("/File/Close"), NULL, file_close_cb, 0, NULL},
122
{N_("/File/Close all"), NULL, file_close_all_cb, 0, NULL},
332
{N_("/File/_Close"), "<control>w", menu_file_operations_cb, 9, "<StockItem>", GTK_STOCK_CLOSE},
333
{N_("/File/Close A_ll"), "<shift><control>w", menu_file_operations_cb, 24, "<Item>"},
334
{N_("/File/Close Win_dow"), NULL, gui_window_menu_cb, 2, "<Item>"},
123
335
{N_("/File/sep4"), NULL, NULL, 0, "<Separator>"},
124
{N_("/File/Print..."), NULL, file_print_cb, 0, NULL},
125
{N_("/File/sep5"), NULL, NULL, 0, "<Separator>"},
126
{N_("/File/Quit"), "<control>Q", cya_later, 0, NULL},
336
{N_("/File/_Quit"), "<control>Q", bluefish_exit_request, 0, "<StockItem>", GTK_STOCK_QUIT},
127
337
{N_("/_Edit"), NULL, NULL, 0, "<Branch>"},
128
{N_("/_Edit/Tearoff1"), NULL, NULL, 0, "<Tearoff>"},
129
{N_("/Edit/Cut"), "<control>x", cut_cb, 0, NULL},
130
{N_("/Edit/Copy"), "<control>c", copy_cb, 0, NULL},
131
{N_("/Edit/Paste"), "<control>v", paste_cb, 0, NULL},
338
{N_("/Edit/Tearoff1"), NULL, NULL, 0, "<Tearoff>"},
339
{N_("/Edit/_Undo"), "<control>z", menu_file_operations_cb, 20, "<StockItem>", GTK_STOCK_UNDO},
340
{N_("/Edit/_Redo"), "<shift><control>z", menu_file_operations_cb, 21, "<StockItem>", GTK_STOCK_REDO},
341
{N_("/Edit/Undo All"), NULL, menu_file_operations_cb, 22, "<Item>"},
342
{N_("/Edit/Redo All"), NULL, menu_file_operations_cb, 23, "<Item>"},
343
{N_("/Edit/sep1"), NULL, NULL, 0, "<Separator>"},
344
{N_("/Edit/Cu_t"), "<control>x", menu_file_operations_cb, 10, "<StockItem>", GTK_STOCK_CUT},
345
{N_("/Edit/_Copy"), "<control>c", menu_file_operations_cb, 11, "<StockItem>", GTK_STOCK_COPY},
346
{N_("/Edit/_Paste"), "<control>v", menu_file_operations_cb, 12, "<StockItem>", GTK_STOCK_PASTE},
132
347
{N_("/Edit/sep2"), NULL, NULL, 0, "<Separator>"},
133
{N_("/Edit/Select all"), "<control>F8", sel_all_cb, 0, NULL},
134
{N_("/Edit/Go to line..."), "<control>g", go_to_line_win_cb, 0, NULL},
348
{N_("/Edit/Select _All"), NULL, menu_file_operations_cb, 13, "<Item>"},
135
349
{N_("/Edit/sep3"), NULL, NULL, 0, "<Separator>"},
136
{N_("/Edit/Find..."), "F6", search_cb, 0, NULL},
137
{N_("/Edit/New find..."), NULL, new_search_cb, 0, NULL},
138
{N_("/Edit/Find again"), "<shift>F6", search_again_cb, 0, NULL},
139
{N_("/Edit/Replace..."), "F7", replace_cb, 0, NULL},
140
{N_("/Edit/New replace..."), NULL, new_replace_cb, 0, NULL},
141
{N_("/Edit/Replace again"), "<shift>F7", replace_again_cb, 0, NULL},
142
{N_("/_Edit/Replace special"), NULL, NULL, 0, "<Branch>"},
143
{N_("/_Edit/Replace special/Tearoff1"), NULL, NULL, 0, "<Tearoff>"},
144
{N_("/Edit/Replace special/Replace iso 8859-1 chars"), NULL, iso8859_1_replace_cb, 0, NULL},
145
{N_("/Edit/Replace special/Replace ascii chars"), NULL, ascii_replace_cb, 0, NULL},
146
{N_("/Edit/Replace special/Escape double quotes"), "<shift>F10", escape_quotes_replace_cb, 0, NULL},
350
{N_("/Edit/_Find..."), "<control>f", menu_file_operations_cb, 14, "<StockItem>", GTK_STOCK_FIND},
351
{N_("/Edit/Find A_gain"), "<control>g", menu_file_operations_cb, 16, "<Item>"},
352
{N_("/Edit/Find from selection"), NULL, menu_file_operations_cb, 27, "<Item>"},
353
{N_("/Edit/R_eplace..."), "<control>h", menu_file_operations_cb, 17, "<StockItem>", GTK_STOCK_FIND_AND_REPLACE},
354
{N_("/Edit/Replace Agai_n"), "<shift><control>h", menu_file_operations_cb, 19, "<Item>"},
355
{N_("/Edit/Replace special"), NULL, NULL, 0, "<Branch>"},
356
{N_("/Edit/Replace special/Tearoff1"), NULL, NULL, 0, "<Tearoff>"},
357
{N_("/Edit/Replace special/_ASCII to HTML Entities"), NULL, doc_convert_asciichars_in_selection, 1, "<Item>"},
358
{N_("/Edit/Replace special/_ISO8859 to HTML Entities"), NULL, doc_convert_asciichars_in_selection, 2, "<Item>"},
359
{N_("/Edit/Replace special/_Both Types to HTML Entities"), NULL, doc_convert_asciichars_in_selection, 3, "<Item>"},
360
{N_("/Edit/Replace special/To _Uppercase"), NULL, doc_convert_asciichars_in_selection, 4, "<Item>"},
361
{N_("/Edit/Replace special/To _Lowercase"), NULL, doc_convert_asciichars_in_selection, 5, "<Item>"},
147
362
{N_("/Edit/sep4"), NULL, NULL, 0, "<Separator>"},
148
{N_("/Edit/Undo"), "<control>z", undo_cb, 0, NULL},
149
{N_("/Edit/Redo"), "<control>r", redo_cb, 0, NULL},
150
{N_("/Edit/Undo all"), NULL, undo_all_cb, 0, NULL},
151
{N_("/Edit/Redo all"), NULL, redo_all_cb, 0, NULL},
363
{N_("/Edit/S_hift Right"), NULL, menu_indent_cb, 2, "<ImageItem>", pixmap_indent},
364
{N_("/Edit/Shift _Left"), NULL, menu_indent_cb, 1, "<ImageItem>", pixmap_unindent},
152
365
{N_("/Edit/sep5"), NULL, NULL, 0, "<Separator>"},
153
{N_("/Edit/Selection to uppercase"), NULL, selection_to_uppercase_cb, 0, NULL},
154
{N_("/Edit/Selection to lowercase"), NULL, selection_to_lowercase_cb, 0, NULL},
366
{N_("/Edit/Add _Bookmark"), "<control>d", menu_bmark_operations_cb, 1, "<Item>"},
155
367
{N_("/Edit/sep6"), NULL, NULL, 0, "<Separator>"},
156
{N_("/Edit/Indent region"), NULL, indent_region_cb, 0, NULL},
157
{N_("/Edit/Unindent region"), NULL, unindent_region_cb, 0, NULL},
158
{N_("/Edit/sep7"), NULL, NULL, 0, "<Separator>"},
159
{N_("/Edit/Word Count"), NULL, word_count_cb, 0, NULL},
368
{N_("/Edit/Save Sett_ings"), NULL, rcfile_save_configfile_menu_cb, 0, "<Item>"},
369
{N_("/Edit/Save Shortcut _Keys"), NULL, rcfile_save_configfile_menu_cb, 3, "<Item>"},
370
{N_("/Edit/Preference_s"), NULL, open_preferences_menu_cb, 0, "<StockItem>", GTK_STOCK_PREFERENCES},
160
371
{N_("/_View"), NULL, NULL, 0, "<Branch>"},
161
{N_("/_View/Tearoff1"), NULL, NULL, 0, "<Tearoff>"},
162
{N_("/View/View in _Netscape"), NULL, view_in_netscape_cb, 0, NULL},
163
{N_("/View/_Drag 'n Drop Window"), NULL, dndwin_cb, 0, NULL},
164
#ifdef HAVE_IMAGE_LIBS
165
{N_("/View/_Preview image under cursor"), NULL, preview_image_by_position_cb, 0, NULL},
167
#ifdef WITH_INTERNAL_PREVIEW
168
{N_("/View/_Preview "), "F4" , preview_cb, 0, NULL},
171
{N_("/View/sep1"), NULL, NULL, 0, "<Separator>"},
172
{N_("/View/Next document"), "F1", notebook_next_document_cb, 0, NULL},
173
{N_("/View/Previous document"), "F2", notebook_prev_document_cb, 0, NULL},
174
{N_("/View/sep3"), NULL, NULL, 0, "<Separator>"},
175
{N_("/View/Highlight syntax"), NULL, toggle_highlight_syntax_cb, 0, "<ToggleItem>"},
176
{N_("/View/Refresh highlighting"), "F5", refresh_hi_cb, 0, NULL},
177
{N_("/View/sep2"), NULL, NULL, 0, "<Separator>"},
178
{N_("/View/Document status"), "F3", show_document_status_cb, 0, NULL},
179
{N_("/_Project"), NULL, NULL, 0, "<Branch>"},
180
{N_("/Project/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
181
{N_("/Project/Open..."), NULL, project_open_cb, 0, NULL},
182
{N_("/Project/Close"), NULL, project_close_cb, 0, NULL},
183
{N_("/Project/Save"), NULL, project_save_cb, 0, NULL},
184
{N_("/Project/Save as..."), NULL, project_save_as_cb, 0, NULL},
185
{N_("/Project/sep1"), NULL, NULL, 0, "<Separator>"},
186
{N_("/Project/Edit..."), NULL, project_edit_cb, 0, NULL},
187
{N_("/Project/sep2"), NULL, NULL, 0, "<Separator>"},
188
{N_("/Project/Add current document"), NULL, project_add_document_cb, 0, NULL},
189
{N_("/Project/Add all open documents"), NULL, project_add_document_cb, 1, NULL},
190
{N_("/_Project/Files"), NULL, NULL, 0, "<Branch>"},
191
{N_("/Project/Files/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
372
{N_("/View/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
373
{N_("/View/View _Main Toolbar"), NULL, gui_toggle_hidewidget_cb, 1, "<ToggleItem>"},
374
{N_("/View/View _HTML Toolbar"), NULL, gui_toggle_hidewidget_cb, 2, "<ToggleItem>"},
375
{N_("/View/View _Custom Menu"), NULL, gui_toggle_hidewidget_cb, 3, "<ToggleItem>"},
376
{N_("/View/View _Sidebar"), "F9", gui_toggle_hidewidget_cb, 4, "<ToggleItem>"},
192
377
{N_("/_Tags"), NULL, NULL, 0, "<Branch>"},
193
378
{N_("/Tags/Tearoff1"), NULL, NULL, 0, "<Tearoff>"},
194
{N_("/Tags/Repeat last"), "F4", repeat_last_insert_cb, 0, NULL},
195
{N_("/Tags/Headings"), NULL, NULL, 0, "<Branch>"},
379
/* {N_("/Tags/Repeat last"), "F4", repeat_last_insert_cb, 0, NULL},*/
380
{N_("/Tags/_Headings"), NULL, NULL, 0, "<Branch>"},
196
381
{N_("/Tags/Headings/Tearoff1"), NULL, NULL, 0, "<Tearoff>"},
197
{N_("/Tags/Headings/H1"), "<alt>F1", general_html_cb, 18, NULL},
198
{N_("/Tags/Headings/H2"), "<alt>F2", general_html_cb, 19, NULL},
199
{N_("/Tags/Headings/H3"), "<alt>F3", general_html_cb, 20, NULL},
200
{N_("/Tags/Headings/H4"), "<alt>F4", general_html_cb, 21, NULL},
201
{N_("/Tags/Headings/H5"), "<alt>F5", general_html_cb, 22, NULL},
202
{N_("/Tags/Headings/H6"), "<alt>F6", general_html_cb, 23, NULL},
203
{N_("/Tags/Special"), NULL, NULL, 0, "<Branch>"},
382
{N_("/Tags/Headings/H_1"), "<control><alt>1", general_html_menu_cb, 18, "<ImageItem>",pixmap_fonth1},
383
{N_("/Tags/Headings/H_2"), "<control><alt>2", general_html_menu_cb, 19, "<ImageItem>",pixmap_fonth2},
384
{N_("/Tags/Headings/H_3"), "<control><alt>3", general_html_menu_cb, 20, "<ImageItem>",pixmap_fonth3},
385
{N_("/Tags/Headings/H_4"), "<control><alt>4", general_html_menu_cb, 21, "<ImageItem>",pixmap_fonth4},
386
{N_("/Tags/Headings/H_5"), "<control><alt>5", general_html_menu_cb, 22, "<ImageItem>",pixmap_fonth5},
387
{N_("/Tags/Headings/H_6"), "<control><alt>6", general_html_menu_cb, 23, "<ImageItem>",pixmap_fonth6},
388
{N_("/Tags/_Special"), NULL, NULL, 0, "<Branch>"},
204
389
{N_("/Tags/Special/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
205
{N_("/Tags/Special/Accent"), NULL, NULL, 0, "<Branch>"},
390
{N_("/Tags/Special/_Accent"), NULL, NULL, 0, "<Branch>"},
206
391
{N_("/Tags/Special/Accent/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
207
{N_("/Tags/Special/Accent/Uppercase"), NULL, NULL, 0, "<Branch>"},
208
{N_("/Tags/Special/Accent/Uppercase/A-I"), NULL, NULL, 0, "<Branch>"},
392
{N_("/Tags/Special/Accent/_Uppercase"), NULL, NULL, 0, "<Branch>"},
393
{N_("/Tags/Special/Accent/Uppercase/_A-I"), NULL, NULL, 0, "<Branch>"},
209
394
{N_("/Tags/Special/Accent/Uppercase/A-I/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
210
{N_("/Tags/Special/Accent/Uppercase/A-I/A grave"), NULL, insert_char_cb, 0, NULL},
211
{N_("/Tags/Special/Accent/Uppercase/A-I/A acute"), NULL, insert_char_cb, 1, NULL},
212
{N_("/Tags/Special/Accent/Uppercase/A-I/A circumflex"), NULL, insert_char_cb, 2, NULL},
213
{N_("/Tags/Special/Accent/Uppercase/A-I/A tilde"), NULL, insert_char_cb, 3, NULL},
214
{N_("/Tags/Special/Accent/Uppercase/A-I/AE ligature"), NULL, insert_char_cb, 4, NULL},
215
{N_("/Tags/Special/Accent/Uppercase/A-I/A diaeresis"), NULL, insert_char_cb, 5, NULL},
216
{N_("/Tags/Special/Accent/Uppercase/A-I/A ring"), NULL, insert_char_cb, 6, NULL},
217
{N_("/Tags/Special/Accent/Uppercase/A-I/C cedilla"), NULL, insert_char_cb, 7, NULL},
218
{N_("/Tags/Special/Accent/Uppercase/A-I/E grave"), NULL, insert_char_cb, 8, NULL},
219
{N_("/Tags/Special/Accent/Uppercase/A-I/E acute"), NULL, insert_char_cb, 9, NULL},
220
{N_("/Tags/Special/Accent/Uppercase/A-I/E circumflex"), NULL, insert_char_cb, 10, NULL},
221
{N_("/Tags/Special/Accent/Uppercase/A-I/E diaeresis"), NULL, insert_char_cb, 11, NULL},
222
{N_("/Tags/Special/Accent/Uppercase/A-I/I grave"), NULL, insert_char_cb, 12, NULL},
223
{N_("/Tags/Special/Accent/Uppercase/A-I/I acute"), NULL, insert_char_cb, 13, NULL},
224
{N_("/Tags/Special/Accent/Uppercase/A-I/I circumflex"), NULL, insert_char_cb, 14, NULL},
225
{N_("/Tags/Special/Accent/Uppercase/A-I/I diaeresis"), NULL, insert_char_cb, 15, NULL},
226
{N_("/Tags/Special/Accent/Uppercase/J-Z"), NULL, NULL, 0, "<Branch>"},
395
{N_("/Tags/Special/Accent/Uppercase/A-I/A grave Ć"), NULL, insert_char_cb, 100, "<Item>"},
396
{N_("/Tags/Special/Accent/Uppercase/A-I/A acute Ć"), NULL, insert_char_cb, 1, "<Item>"},
397
{N_("/Tags/Special/Accent/Uppercase/A-I/A circumflex Ć"), NULL, insert_char_cb, 2, "<Item>"},
398
{N_("/Tags/Special/Accent/Uppercase/A-I/A tilde Ć"), NULL, insert_char_cb, 3, "<Item>"},
399
{N_("/Tags/Special/Accent/Uppercase/A-I/AE ligature Ć"), NULL, insert_char_cb, 4, "<Item>"},
400
{N_("/Tags/Special/Accent/Uppercase/A-I/A diaeresis Ć"), NULL, insert_char_cb, 5, "<Item>"},
401
{N_("/Tags/Special/Accent/Uppercase/A-I/A ring Ć
"), NULL, insert_char_cb, 6, "<Item>"},
402
{N_("/Tags/Special/Accent/Uppercase/A-I/C cedilla Ć"), NULL, insert_char_cb, 7, "<Item>"},
403
{N_("/Tags/Special/Accent/Uppercase/A-I/E grave Ć"), NULL, insert_char_cb, 8, "<Item>"},
404
{N_("/Tags/Special/Accent/Uppercase/A-I/E acute Ć"), NULL, insert_char_cb, 9, "<Item>"},
405
{N_("/Tags/Special/Accent/Uppercase/A-I/E circumflex Ć"), NULL, insert_char_cb, 10, "<Item>"},
406
{N_("/Tags/Special/Accent/Uppercase/A-I/E diaeresis Ć"), NULL, insert_char_cb, 11, "<Item>"},
407
{N_("/Tags/Special/Accent/Uppercase/A-I/I grave Ć"), NULL, insert_char_cb, 12, "<Item>"},
408
{N_("/Tags/Special/Accent/Uppercase/A-I/I acute Ć"), NULL, insert_char_cb, 13, "<Item>"},
409
{N_("/Tags/Special/Accent/Uppercase/A-I/I circumflex Ć"), NULL, insert_char_cb, 14, "<Item>"},
410
{N_("/Tags/Special/Accent/Uppercase/A-I/I diaeresis Ć"), NULL, insert_char_cb, 15, "<Item>"},
411
{N_("/Tags/Special/Accent/Uppercase/_J-Z"), NULL, NULL, 0, "<Branch>"},
227
412
{N_("/Tags/Special/Accent/Uppercase/J-Z/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
228
{N_("/Tags/Special/Accent/Uppercase/J-Z/N tilde"), NULL, insert_char_cb, 16, NULL},
229
{N_("/Tags/Special/Accent/Uppercase/J-Z/O grave"), NULL, insert_char_cb, 17, NULL},
230
{N_("/Tags/Special/Accent/Uppercase/J-Z/O acute"), NULL, insert_char_cb, 18, NULL},
231
{N_("/Tags/Special/Accent/Uppercase/J-Z/O circumflex"), NULL, insert_char_cb, 19, NULL},
232
{N_("/Tags/Special/Accent/Uppercase/J-Z/O tilde"), NULL, insert_char_cb, 20, NULL},
233
{N_("/Tags/Special/Accent/Uppercase/J-Z/O diaeresis"), NULL, insert_char_cb, 21, NULL},
234
{N_("/Tags/Special/Accent/Uppercase/J-Z/O slash"), NULL, insert_char_cb, 22, NULL},
235
{N_("/Tags/Special/Accent/Uppercase/J-Z/U grave"), NULL, insert_char_cb, 23, NULL},
236
{N_("/Tags/Special/Accent/Uppercase/J-Z/U acute"), NULL, insert_char_cb, 24, NULL},
237
{N_("/Tags/Special/Accent/Uppercase/J-Z/U circumflex"), NULL, insert_char_cb, 25, NULL},
238
{N_("/Tags/Special/Accent/Uppercase/J-Z/U diaeresis"), NULL,
239
insert_char_cb, 26, NULL},
240
{N_("/Tags/Special/Accent/Uppercase/J-Z/Y acute"), NULL, insert_char_cb,
242
{N_("/Tags/Special/Accent/Lowercase"), NULL, NULL, 0, "<Branch>"},
243
{N_("/Tags/Special/Accent/Lowercase/A-I"), NULL, NULL, 0, "<Branch>"},
244
{N_("/Tags/Special/Accent/Lowercase/A-I/tearoff1"), NULL, NULL, 0,
246
{N_("/Tags/Special/Accent/Lowercase/A-I/a grave"), NULL, insert_char_cb,
248
{N_("/Tags/Special/Accent/Lowercase/A-I/a acute"), NULL, insert_char_cb,
250
{N_("/Tags/Special/Accent/Lowercase/A-I/a circumflex"), NULL,
251
insert_char_cb, 30, NULL},
252
{N_("/Tags/Special/Accent/Lowercase/A-I/a tilde"), NULL, insert_char_cb,
254
{N_("/Tags/Special/Accent/Lowercase/A-I/a ring"), NULL, insert_char_cb,
256
{N_("/Tags/Special/Accent/Lowercase/A-I/ae ligature"), NULL,
257
insert_char_cb, 33, NULL},
258
{N_("/Tags/Special/Accent/Lowercase/A-I/a diaeresis"), NULL,
259
insert_char_cb, 34, NULL},
260
{N_("/Tags/Special/Accent/Lowercase/A-I/c cedilla"), NULL, insert_char_cb,
262
{N_("/Tags/Special/Accent/Lowercase/A-I/e grave"), NULL, insert_char_cb,
264
{N_("/Tags/Special/Accent/Lowercase/A-I/e acute"), NULL, insert_char_cb,
266
{N_("/Tags/Special/Accent/Lowercase/A-I/e circumflex"), NULL,
267
insert_char_cb, 38, NULL},
268
{N_("/Tags/Special/Accent/Lowercase/A-I/e diaeresis"), NULL,
269
insert_char_cb, 39, NULL},
270
{N_("/Tags/Special/Accent/Lowercase/A-I/i grave"), NULL, insert_char_cb,
272
{N_("/Tags/Special/Accent/Lowercase/A-I/i acute"), NULL, insert_char_cb,
274
{N_("/Tags/Special/Accent/Lowercase/A-I/i circumflex"), NULL,
275
insert_char_cb, 42, NULL},
276
{N_("/Tags/Special/Accent/Lowercase/A-I/i diaeresis"), NULL,
277
insert_char_cb, 43, NULL},
278
{N_("/Tags/Special/Accent/Lowercase/J-Z"), NULL, NULL, 0, "<Branch>"},
279
{N_("/Tags/Special/Accent/Lowercase/J-Z/tearoff1"), NULL, NULL, 0,
281
{N_("/Tags/Special/Accent/Lowercase/J-Z/n tilde"), NULL, insert_char_cb,
283
{N_("/Tags/Special/Accent/Lowercase/J-Z/o grave"), NULL, insert_char_cb,
285
{N_("/Tags/Special/Accent/Lowercase/J-Z/o acute"), NULL, insert_char_cb,
287
{N_("/Tags/Special/Accent/Lowercase/J-Z/o circumflex"), NULL,
288
insert_char_cb, 47, NULL},
289
{N_("/Tags/Special/Accent/Lowercase/J-Z/o tilde"), NULL, insert_char_cb,
291
{N_("/Tags/Special/Accent/Lowercase/J-Z/o diaeresis"), NULL,
292
insert_char_cb, 49, NULL},
293
{N_("/Tags/Special/Accent/Lowercase/J-Z/o slash"), NULL, insert_char_cb,
295
{N_("/Tags/Special/Accent/Lowercase/J-Z/u grave"), NULL, insert_char_cb,
297
{N_("/Tags/Special/Accent/Lowercase/J-Z/u acute"), NULL, insert_char_cb,
299
{N_("/Tags/Special/Accent/Lowercase/J-Z/u circumflex"), NULL,
300
insert_char_cb, 53, NULL},
301
{N_("/Tags/Special/Accent/Lowercase/J-Z/u diaeresis"), NULL,
302
insert_char_cb, 54, NULL},
303
{N_("/Tags/Special/Accent/Lowercase/J-Z/y acute"), NULL, insert_char_cb,
305
{N_("/Tags/Special/Accent/Lowercase/J-Z/y diaeresis"), NULL,
306
insert_char_cb, 56, NULL},
413
{N_("/Tags/Special/Accent/Uppercase/J-Z/N tilde Ć"), NULL, insert_char_cb, 16, "<Item>"},
414
{N_("/Tags/Special/Accent/Uppercase/J-Z/O grave Ć"), NULL, insert_char_cb, 17, "<Item>"},
415
{N_("/Tags/Special/Accent/Uppercase/J-Z/O acute Ć"), NULL, insert_char_cb, 18, "<Item>"},
416
{N_("/Tags/Special/Accent/Uppercase/J-Z/O circumflex Ć"), NULL, insert_char_cb, 19, "<Item>"},
417
{N_("/Tags/Special/Accent/Uppercase/J-Z/OE ligature"), NULL, insert_char_cb, 100, "<Item>"},
418
{N_("/Tags/Special/Accent/Uppercase/J-Z/O tilde Ć"), NULL, insert_char_cb, 20, "<Item>"},
419
{N_("/Tags/Special/Accent/Uppercase/J-Z/O diaeresis Ć"), NULL, insert_char_cb, 21, "<Item>"},
420
{N_("/Tags/Special/Accent/Uppercase/J-Z/O slash Ć"), NULL, insert_char_cb, 22, "<Item>"},
421
{N_("/Tags/Special/Accent/Uppercase/J-Z/U grave Ć"), NULL, insert_char_cb, 23, "<Item>"},
422
{N_("/Tags/Special/Accent/Uppercase/J-Z/U acute Ć"), NULL, insert_char_cb, 24, "<Item>"},
423
{N_("/Tags/Special/Accent/Uppercase/J-Z/U circumflex Ć"), NULL, insert_char_cb, 25, "<Item>"},
424
{N_("/Tags/Special/Accent/Uppercase/J-Z/U diaeresis Ć"), NULL, insert_char_cb, 26, "<Item>"},
425
{N_("/Tags/Special/Accent/Uppercase/J-Z/Y acute Ć"), NULL, insert_char_cb, 27, "<Item>"},
426
{N_("/Tags/Special/Accent/_Lowercase"), NULL, NULL, 0, "<Branch>"},
427
{N_("/Tags/Special/Accent/Lowercase/_A-I"), NULL, NULL, 0, "<Branch>"},
428
{N_("/Tags/Special/Accent/Lowercase/A-I/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
429
{N_("/Tags/Special/Accent/Lowercase/A-I/a grave Ć "), NULL, insert_char_cb, 28, "<Item>"},
430
{N_("/Tags/Special/Accent/Lowercase/A-I/a acute Ć”"), NULL, insert_char_cb, 29, "<Item>"},
431
{N_("/Tags/Special/Accent/Lowercase/A-I/a circumflex Ć¢"), NULL, insert_char_cb, 30, "<Item>"},
432
{N_("/Tags/Special/Accent/Lowercase/A-I/a tilde Ć£"), NULL, insert_char_cb, 31, "<Item>"},
433
{N_("/Tags/Special/Accent/Lowercase/A-I/a ring Ć„"), NULL, insert_char_cb, 32, "<Item>"},
434
{N_("/Tags/Special/Accent/Lowercase/A-I/ae ligature Ʀ"), NULL, insert_char_cb, 33, "<Item>"},
435
{N_("/Tags/Special/Accent/Lowercase/A-I/a diaeresis Ƥ"), NULL, insert_char_cb, 34, "<Item>"},
436
{N_("/Tags/Special/Accent/Lowercase/A-I/c cedilla Ƨ"), NULL, insert_char_cb, 35, "<Item>"},
437
{N_("/Tags/Special/Accent/Lowercase/A-I/e grave ĆØ"), NULL, insert_char_cb, 36, "<Item>"},
438
{N_("/Tags/Special/Accent/Lowercase/A-I/e acute Ć©"), NULL, insert_char_cb, 37, "<Item>"},
439
{N_("/Tags/Special/Accent/Lowercase/A-I/e circumflex ĆŖ"), NULL, insert_char_cb, 38, "<Item>"},
440
{N_("/Tags/Special/Accent/Lowercase/A-I/e diaeresis Ć«"), NULL, insert_char_cb, 39, "<Item>"},
441
{N_("/Tags/Special/Accent/Lowercase/A-I/i grave Ƭ"), NULL, insert_char_cb, 40, "<Item>"},
442
{N_("/Tags/Special/Accent/Lowercase/A-I/i acute Ć"), NULL, insert_char_cb, 41, "<Item>"},
443
{N_("/Tags/Special/Accent/Lowercase/A-I/i circumflex Ć®"), NULL, insert_char_cb, 42, "<Item>"},
444
{N_("/Tags/Special/Accent/Lowercase/A-I/i diaeresis ĆÆ"), NULL, insert_char_cb, 43, "<Item>"},
445
{N_("/Tags/Special/Accent/Lowercase/_J-Z"), NULL, NULL, 0, "<Branch>"},
446
{N_("/Tags/Special/Accent/Lowercase/J-Z/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
447
{N_("/Tags/Special/Accent/Lowercase/J-Z/n tilde Ʊ"), NULL, insert_char_cb, 44, "<Item>"},
448
{N_("/Tags/Special/Accent/Lowercase/J-Z/o grave Ć²"), NULL, insert_char_cb, 45, "<Item>"},
449
{N_("/Tags/Special/Accent/Lowercase/J-Z/o acute Ć³"), NULL, insert_char_cb,46, "<Item>"},
450
{N_("/Tags/Special/Accent/Lowercase/J-Z/oe ligature Ʀ"), NULL, insert_char_cb,99, "<Item>"},
451
{N_("/Tags/Special/Accent/Lowercase/J-Z/o circumflex Ć“"), NULL, insert_char_cb, 47, "<Item>"},
452
{N_("/Tags/Special/Accent/Lowercase/J-Z/o tilde Ƶ"), NULL, insert_char_cb, 48, "<Item>"},
453
{N_("/Tags/Special/Accent/Lowercase/J-Z/o diaeresis ƶ"), NULL, insert_char_cb, 49, "<Item>"},
454
{N_("/Tags/Special/Accent/Lowercase/J-Z/o slash Ćø"), NULL, insert_char_cb, 50, "<Item>"},
455
{N_("/Tags/Special/Accent/Lowercase/J-Z/u grave Ć¹"), NULL, insert_char_cb, 51, "<Item>"},
456
{N_("/Tags/Special/Accent/Lowercase/J-Z/u acute Ćŗ"), NULL, insert_char_cb, 52, "<Item>"},
457
{N_("/Tags/Special/Accent/Lowercase/J-Z/u circumflex Ć»"), NULL, insert_char_cb, 53, "<Item>"},
458
{N_("/Tags/Special/Accent/Lowercase/J-Z/u diaeresis Ć¼"), NULL, insert_char_cb, 54, "<Item>"},
459
{N_("/Tags/Special/Accent/Lowercase/J-Z/y acute Ć½"), NULL, insert_char_cb, 55, "<Item>"},
460
{N_("/Tags/Special/Accent/Lowercase/J-Z/y diaeresis Ćæ"), NULL, insert_char_cb, 56, "<Item>"},
307
461
{N_("/Tags/Special/Accent/separator"), NULL, NULL, 0, "<Separator>"},
308
{N_("/Tags/Special/Accent/Umlaut"), NULL, insert_char_cb, 57, NULL},
309
{N_("/Tags/Special/Accent/Acute"), NULL, insert_char_cb, 58, NULL},
310
{N_("/Tags/Special/Accent/Cedilla"), NULL, insert_char_cb, 59, NULL},
311
{N_("/Tags/Special/Currency"), NULL, NULL, 0, "<Branch>"},
462
{N_("/Tags/Special/Accent/U_mlaut ĀØ"), NULL, insert_char_cb, 57, "<Item>"},
463
{N_("/Tags/Special/Accent/_Acute Ā“"), NULL, insert_char_cb, 58, "<Item>"},
464
{N_("/Tags/Special/Accent/_Cedilla Āø"), NULL, insert_char_cb, 59, "<Item>"},
465
{N_("/Tags/Special/_Currency"), NULL, NULL, 0, "<Branch>"},
312
466
{N_("/Tags/Special/Currency/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
313
{N_("/Tags/Special/Currency/Cent sign"), NULL, insert_char_cb,
315
{N_("/Tags/Special/Currency/Pound sterling"), NULL, insert_char_cb,
317
{N_("/Tags/Special/Currency/Currency sign"), NULL, insert_char_cb,
319
{N_("/Tags/Special/Currency/Yen sign"), NULL, insert_char_cb, 63, NULL},
320
{N_("/Tags/Special/Math-Science"), NULL, NULL, 0, "<Branch>"},
467
{N_("/Tags/Special/Currency/_Cent sign Ā¢"), NULL, insert_char_cb, 60, "<Item>"},
468
{N_("/Tags/Special/Currency/_Pound sterling Ā£"), NULL, insert_char_cb, 61, "<Item>"},
469
{N_("/Tags/Special/Currency/C_urrency sign Ā¤"), NULL, insert_char_cb, 62, "<Item>"},
470
{N_("/Tags/Special/Currency/_Yen sign Ā„"), NULL, insert_char_cb, 63, "<Item>"},
471
{N_("/Tags/Special/Currency/_Euro "), NULL, insert_char_cb, 98, "<Item>"},
472
{N_("/Tags/Special/_Math-Science"), NULL, NULL, 0, "<Branch>"},
321
473
{N_("/Tags/Special/Math-Science/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
322
{N_("/Tags/Special/Math-Science/Logical not sign"), "<alt>1", insert_char_cb,
324
{N_("/Tags/Special/Math-Science/Multiplication sign"), "<alt>8",
325
insert_char_cb, 65, NULL},
326
{N_("/Tags/Special/Math-Science/Division sign"), "<alt>slash", insert_char_cb,
328
{N_("/Tags/Special/Math-Science/Plus-minus sign"), NULL, insert_char_cb,
330
{N_("/Tags/Special/Math-Science/Less-than sign"), "<alt>comma", insert_char_cb,
332
{N_("/Tags/Special/Math-Science/Greater-than sign"), "<alt>period", insert_char_cb,
334
{N_("/Tags/Special/Math-Science/Superscript 1"), NULL, insert_char_cb,
336
{N_("/Tags/Special/Math-Science/Superscript 2"), NULL, insert_char_cb,
338
{N_("/Tags/Special/Math-Science/Superscript 3"), NULL, insert_char_cb,
340
{N_("/Tags/Special/Math-Science/One quarter"), NULL, insert_char_cb,
342
{N_("/Tags/Special/Math-Science/One half"), NULL, insert_char_cb,
344
{N_("/Tags/Special/Math-Science/Three quarters"), NULL, insert_char_cb,
346
{N_("/Tags/Special/Math-Science/Degree sign"), NULL, insert_char_cb,
348
{N_("/Tags/Special/Non Latin"), NULL, NULL, 0, "<Branch>"},
474
{N_("/Tags/Special/Math-Science/Logical _not sign Ā¬"), NULL, insert_char_cb, 64, "<Item>"},
475
{N_("/Tags/Special/Math-Science/_Multiplication sign Ć"), NULL, insert_char_cb, 65, "<Item>"},
476
{N_("/Tags/Special/Math-Science/_Division sign Ć·"), "<control><alt>slash", insert_char_cb, 66, "<Item>"},
477
{N_("/Tags/Special/Math-Science/_Plus-minus sign Ā±"), NULL, insert_char_cb, 67, "<Item>"},
478
{N_("/Tags/Special/Math-Science/_Less-than sign <"), "<control><alt>comma", insert_char_cb, 68, "<Item>"},
479
{N_("/Tags/Special/Math-Science/_Greater-than sign >"), "<control><alt>period", insert_char_cb, 69, "<Item>"},
480
{N_("/Tags/Special/Math-Science/Superscript _1 Ā¹"), NULL, insert_char_cb, 70, "<Item>"},
481
{N_("/Tags/Special/Math-Science/Superscript _2 Ā²"), NULL, insert_char_cb, 71, "<Item>"},
482
{N_("/Tags/Special/Math-Science/Superscript _3 Ā³"), NULL, insert_char_cb, 72, "<Item>"},
483
{N_("/Tags/Special/Math-Science/One _quarter Ā¼"), NULL, insert_char_cb, 73, "<Item>"},
484
{N_("/Tags/Special/Math-Science/One _half Ā½"), NULL, insert_char_cb, 74, "<Item>"},
485
{N_("/Tags/Special/Math-Science/_Three quarters Ā¾"), NULL, insert_char_cb, 75, "<Item>"},
486
{N_("/Tags/Special/Math-Science/Deg_ree sign Ā°"), NULL, insert_char_cb, 76, "<Item>"},
487
{N_("/Tags/Special/_Non Latin"), NULL, NULL, 0, "<Branch>"},
349
488
{N_("/Tags/Special/Non Latin/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
350
{N_("/Tags/Special/Non Latin/ETH (Icelandic)"), NULL, insert_char_cb,
352
{N_("/Tags/Special/Non Latin/THORN (Icelandic)"), NULL, insert_char_cb,
354
{N_("/Tags/Special/Non Latin/eth (Icelandic)"), NULL, insert_char_cb,
356
{N_("/Tags/Special/Non Latin/thorn"), NULL, insert_char_cb, 80, NULL},
357
{N_("/Tags/Special/Non Latin/Sharp s"), NULL, insert_char_cb, 81, NULL},
358
{N_("/Tags/Special/Non Latin/Micro sign"), NULL, insert_char_cb,
360
{N_("/Tags/Special/Other"), NULL, NULL, 0, "<Branch>"},
489
{N_("/Tags/Special/Non Latin/_ETH (Icelandic) Ć"), NULL, insert_char_cb, 77, "<Item>"},
490
{N_("/Tags/Special/Non Latin/_THORN (Icelandic) Ć"), NULL, insert_char_cb, 78, "<Item>"},
491
{N_("/Tags/Special/Non Latin/et_h (Icelandic) Ć°"), NULL, insert_char_cb, 79, "<Item>"},
492
{N_("/Tags/Special/Non Latin/th_orn Ćæ"), NULL, insert_char_cb, 80, "<Item>"},
493
{N_("/Tags/Special/Non Latin/Sharp _s Ć"), NULL, insert_char_cb, 81, "<Item>"},
494
{N_("/Tags/Special/Non Latin/_Micro sign Āµ"), NULL, insert_char_cb, 82, "<Item>"},
495
{N_("/Tags/Special/_Other"), NULL, NULL, 0, "<Branch>"},
361
496
{N_("/Tags/Special/Other/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
362
{N_("/Tags/Special/Other/Non-breaking space"), NULL, insert_char_cb,
364
{N_("/Tags/Special/Other/Section sign"), NULL, insert_char_cb,
366
{N_("/Tags/Special/Other/Copyright sign"), NULL, insert_char_cb,
368
{N_("/Tags/Special/Other/Left angle quotes"), NULL, insert_char_cb,
370
{N_("/Tags/Special/Other/Right angle quotes"), NULL, insert_char_cb,
372
{N_("/Tags/Special/Other/Registered trademark"), NULL, insert_char_cb,
374
{N_("/Tags/Special/Other/Inverted exclamation"), NULL, insert_char_cb,
376
{N_("/Tags/Special/Other/Inverted question mark"), NULL, insert_char_cb,
378
{N_("/Tags/Special/Other/Feminine ordinal"), NULL, insert_char_cb,
380
{N_("/Tags/Special/Other/Masculine ordinal"), NULL, insert_char_cb,
382
{N_("/Tags/Special/Other/Pilcrow (paragraph sign)"), NULL, insert_char_cb,
384
{N_("/Tags/Special/Other/Broken bar"), NULL, insert_char_cb, 94, NULL},
385
{N_("/Tags/Special/Other/Soft hypen"), "<alt>minus", insert_char_cb, 95, NULL},
386
{N_("/Tags/Special/Other/Spacing macron"), NULL, insert_char_cb,
388
{N_("/Tags/Special/Other/Middle dot"), NULL, insert_char_cb,
390
{N_("/Tags/Format by layout"), NULL, NULL, 0, "<Branch>"},
497
{N_("/Tags/Special/Other/_Non-breaking space"), NULL, insert_char_cb, 83, "<Item>"},
498
{N_("/Tags/Special/Other/_Section sign Ā§"), NULL, insert_char_cb, 84, "<Item>"},
499
{N_("/Tags/Special/Other/_Copyright sign Ā©"), NULL, insert_char_cb, 85, "<Item>"},
500
{N_("/Tags/Special/Other/_Left angle quotes Ā«"), NULL, insert_char_cb, 86, "<Item>"},
501
{N_("/Tags/Special/Other/_Right angle quotes Ā»"), NULL, insert_char_cb, 87, "<Item>"},
502
{N_("/Tags/Special/Other/Registered _trademark Ā®"), NULL, insert_char_cb, 88, "<Item>"},
503
{N_("/Tags/Special/Other/Inverted _exclamation Ā”"), NULL, insert_char_cb, 89, "<Item>"},
504
{N_("/Tags/Special/Other/Inverted _question mark Āæ"), NULL, insert_char_cb, 90, "<Item>"},
505
{N_("/Tags/Special/Other/_Feminine ordinal ĀŖ"), NULL, insert_char_cb, 91, "<Item>"},
506
{N_("/Tags/Special/Other/_Masculine ordinal Āŗ"), NULL, insert_char_cb, 92, "<Item>"},
507
{N_("/Tags/Special/Other/_Pilcrow (paragraph sign) Ā¶"), NULL, insert_char_cb, 93, "<Item>"},
508
{N_("/Tags/Special/Other/_Broken bar Ā¦"), NULL, insert_char_cb, 94, "<Item>"},
509
{N_("/Tags/Special/Other/Soft _hypen -"), NULL, insert_char_cb, 95, "<Item>"},
510
{N_("/Tags/Special/Other/Spa_cing macron ĀÆ"), NULL, insert_char_cb, 96, "<Item>"},
511
{N_("/Tags/Special/Other/Middle _dot Ā·"), NULL, insert_char_cb, 97, "<Item>"},
512
{N_("/Tags/_Format by layout"), NULL, NULL, 0, "<Branch>"},
391
513
{N_("/Tags/Format by layout/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
392
{N_("/Tags/Format by layout/Bold"), "<alt>v", general_html_cb, 1, NULL},
393
{N_("/Tags/Format by layout/Italic"), "<alt>i", general_html_cb, 2, NULL},
394
{N_("/Tags/Format by layout/Underline"), "<alt>u", general_html_cb, 3, NULL},
395
{N_("/Tags/Format by layout/Strikeout"), "<alt>s", general_html_cb, 4, NULL},
396
{N_("/Tags/Format by context"), NULL, NULL, 0, "<Branch>"},
514
{N_("/Tags/Format by layout/_Bold"), "<control><alt>b", general_html_menu_cb, 1, "<ImageItem>",pixmap_bold},
515
{N_("/Tags/Format by layout/_Italic"), "<control><alt>i", general_html_menu_cb, 2, "<ImageItem>",pixmap_italic},
516
{N_("/Tags/Format by layout/_Underline"), "<control><alt>u", general_html_menu_cb, 3, "<ImageItem>",pixmap_underline},
517
{N_("/Tags/Format by layout/_Strikeout"), "<control><alt>s", general_html_menu_cb, 4, "<Item>"},
518
{N_("/Tags/Format by layout/Sm_all"), NULL, general_html_menu_cb, 56, "<Item>"},
519
{N_("/Tags/Format by layout/Bi_g"), NULL, general_html_menu_cb, 57, "<Item>"},
521
{N_("/Tags/F_ormat by context"), NULL, NULL, 0, "<Branch>"},
397
522
{N_("/Tags/Format by context/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
398
{N_("/Tags/Format by context/Strong"), NULL, general_html_cb, 16, NULL},
399
{N_("/Tags/Format by context/Emphasis"), NULL, general_html_cb, 17, NULL},
400
{N_("/Tags/Format by context/Define"), NULL, general_html_cb, 48, NULL},
401
{N_("/Tags/Format by context/Code"), NULL, general_html_cb, 49, NULL},
402
{N_("/Tags/Format by context/Sample"), NULL, general_html_cb, 50, NULL},
403
{N_("/Tags/Format by context/Keyboard"), NULL, general_html_cb, 51, NULL},
404
{N_("/Tags/Format by context/Variable"), NULL, general_html_cb, 52, NULL},
405
{N_("/Tags/Format by context/Citation"), NULL, general_html_cb, 53, NULL},
406
{N_("/Tags/Format by context/Abbreviation"), NULL, general_html_cb, 54, NULL},
407
{N_("/Tags/Format by context/Acronym"), NULL, general_html_cb, 55, NULL},
408
{N_("/Tags/Format general"), NULL, NULL, 0, "<Branch>"},
523
{N_("/Tags/Format by context/_Strong"), "<control><alt>g", general_html_menu_cb, 16, "<ImageItem>",pixmap_bold},
524
{N_("/Tags/Format by context/_Emphasis"), "<control><alt>e", general_html_menu_cb, 17, "<ImageItem>",pixmap_italic},
525
{N_("/Tags/Format by context/_Define"), NULL, general_html_menu_cb, 48, "<ImageItem>",pixmap_dfn},
526
{N_("/Tags/Format by context/_Code"), NULL, general_html_menu_cb, 49, "<ImageItem>",pixmap_code},
527
{N_("/Tags/Format by context/Sa_mple"), NULL, general_html_menu_cb, 50, "<ImageItem>",pixmap_samp},
528
{N_("/Tags/Format by context/_Keyboard"), NULL, general_html_menu_cb, 51, "<ImageItem>",pixmap_kbd},
529
{N_("/Tags/Format by context/_Variable"), NULL, general_html_menu_cb, 52, "<ImageItem>",pixmap_var},
530
{N_("/Tags/Format by context/Ci_tation"), NULL, general_html_menu_cb, 53, "<ImageItem>",pixmap_cite},
531
{N_("/Tags/Format by context/_Abbreviation"), NULL, general_html_menu_cb, 54, "<ImageItem>",pixmap_abbr},
532
{N_("/Tags/Format by context/Ac_ronym"), NULL, general_html_menu_cb, 55, "<ImageItem>",pixmap_acronym},
533
{N_("/Tags/Format _general"), NULL, NULL, 0, "<Branch>"},
409
534
{N_("/Tags/Format general/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
410
{N_("/Tags/Format general/Paragraph"), "<alt>P", general_html_cb, 5, NULL},
411
{N_("/Tags/Format general/Break"), "<Control><Alt>r", general_html_cb, 6, NULL},
412
{N_("/Tags/Format general/Break clear all"), NULL, general_html_cb, 41, NULL},
413
{N_("/Tags/Format general/Non-Breaking Space"), "<alt>n", general_html_cb, 7, NULL},
414
{N_("/Tags/Format general/<separator>"), NULL, NULL, 0, "<Separator>"},
415
{N_("/Tags/Format general/Font Size +1"), "<control>equal", general_html_cb, 11, NULL},
416
{N_("/Tags/Format general/Font Size -1"), "<control>minus", general_html_cb, 12, NULL},
417
{N_("/Tags/Format general/<separator>"), NULL, NULL, 0, "<Separator>"},
418
{N_("/Tags/Format general/Preformatted Text"), "<Control><Alt>p", general_html_cb, 13, NULL},
419
{N_("/Tags/Format general/Subscript"), "<alt><shift>s", general_html_cb, 14, NULL},
420
{N_("/Tags/Format general/Superscript"), "<alt><control>s", general_html_cb, 15, NULL},
421
{N_("/Tags/Format general/<separator>"), NULL, NULL, 0, "<Separator>"},
422
{N_("/Tags/Format general/Center"), "<alt>c", general_html_cb, 8, NULL},
423
{N_("/Tags/Format general/Align right"), "<Alt>r", general_html_cb, 9, NULL},
424
{N_("/Tags/Table"), NULL, NULL, 0, "<Branch>"},
535
{N_("/Tags/Format general/_Paragraph"), "<control><alt>p", general_html_menu_cb, 5, "<ImageItem>",pixmap_paragraph},
536
{N_("/Tags/Format general/_Break"), "<control><alt>k", general_html_menu_cb, 6, "<ImageItem>",pixmap_brbreak},
537
{N_("/Tags/Format general/Break clear _all"), NULL, general_html_menu_cb, 41, "<ImageItem>",pixmap_breakall},
538
{N_("/Tags/Format general/_Non-Breaking Space"), "<control><alt>n", general_html_menu_cb, 7, "<ImageItem>",pixmap_nbsp},
539
{N_("/Tags/Format general/<separator>"), NULL, NULL, 0, "<Separator>"},
540
{N_("/Tags/Format general/Font Si_ze +1"), "<control><alt>equal", general_html_menu_cb, 11, "<ImageItem>",pixmap_fontp1},
541
{N_("/Tags/Format general/Font _Size -1"), "<control><alt>minus", general_html_menu_cb, 12, "<ImageItem>",pixmap_fontm1},
542
{N_("/Tags/Format general/<separator>"), NULL, NULL, 0, "<Separator>"},
543
{N_("/Tags/Format general/Preformatted _Text"), "<Control><Alt>f", general_html_menu_cb, 13, "<ImageItem>",pixmap_fontpre},
544
{N_("/Tags/Format general/Su_bscript"), NULL, general_html_menu_cb, 14, "<ImageItem>",pixmap_fontsub},
545
{N_("/Tags/Format general/Su_perscript"), NULL, general_html_menu_cb, 15, "<ImageItem>",pixmap_fontsuper},
546
{N_("/Tags/Format general/<separator>"), NULL, NULL, 0, "<Separator>"},
547
{N_("/Tags/Format general/_Center"), NULL, general_html_menu_cb, 8, "<ImageItem>",pixmap_center},
548
{N_("/Tags/Format general/Align _right"), "<control><Alt>r", general_html_menu_cb, 9, "<ImageItem>",pixmap_right},
549
{N_("/Tags/_Table"), NULL, NULL, 0, "<Branch>"},
425
550
{N_("/Tags/Table/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
426
{N_("/Tags/Table/Table"), NULL, general_html_cb, 24, NULL},
427
{N_("/Tags/Table/Tablerow"), NULL, general_html_cb, 25, NULL},
428
{N_("/Tags/Table/Tableheader"), NULL, general_html_cb, 26, NULL},
429
{N_("/Tags/Table/Tabledata"), NULL, general_html_cb, 27, NULL},
430
{N_("/Tags/Table/Tablecaption"), NULL, general_html_cb, 28, NULL},
431
{N_("/Tags/List"), NULL, NULL, 0, "<Branch>"},
551
{N_("/Tags/Table/_Table"), "<control><alt>t", general_html_menu_cb, 24, "<ImageItem>", pixmap_table2},
552
{N_("/Tags/Table/Table _Row"), NULL, general_html_menu_cb, 25, "<ImageItem>", pixmap_table_tr2},
553
{N_("/Tags/Table/Table _Header"), NULL, general_html_menu_cb, 26, "<ImageItem>", pixmap_table_th2},
554
{N_("/Tags/Table/Table _Data"), NULL, general_html_menu_cb, 27, "<ImageItem>", pixmap_table_td2},
555
{N_("/Tags/Table/Table _Caption"), NULL, general_html_menu_cb, 28, "<ImageItem>", pixmap_table_capt},
556
{N_("/Tags/_List"), NULL, NULL, 0, "<Branch>"},
432
557
{N_("/Tags/List/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
433
{N_("/Tags/List/Unordered list"), NULL, general_html_cb, 33, NULL},
434
{N_("/Tags/List/Ordered list"), NULL, general_html_cb, 34, NULL},
435
{N_("/Tags/List/List item"), "<alt>l", general_html_cb, 35, NULL},
436
{N_("/Tags/List/Definition list"), NULL, general_html_cb, 36, NULL},
437
{N_("/Tags/List/Definition term"), NULL, general_html_cb, 37, NULL},
438
{N_("/Tags/List/Definition"), NULL, general_html_cb, 38, NULL},
439
{N_("/Tags/List/menu"), NULL, general_html_cb, 39, NULL},
440
{N_("/Tags/Insert Generator META-Tag"), NULL, general_html_cb, 47, NULL},
441
{N_("/Tags/Comment"), NULL, general_html_cb, 10, NULL},
442
{N_("/_Dialogs"), NULL, NULL, 0, "<Branch>"},
558
{N_("/Tags/List/Unordered _List"), "<control><alt>L", general_html_menu_cb, 33, "<ImageItem>", pixmap_list_ul},
559
{N_("/Tags/List/_Ordered List"), "<control><alt>O", general_html_menu_cb, 34, "<ImageItem>", pixmap_list_ol},
560
{N_("/Tags/List/List Ite_m"), "<control><alt>M", general_html_menu_cb, 35, "<ImageItem>", pixmap_list_li},
561
{N_("/Tags/List/De_finition List"), NULL, general_html_menu_cb, 36, "<ImageItem>", pixmap_list_dl},
562
{N_("/Tags/List/Definition _Term"), NULL, general_html_menu_cb, 37, "<ImageItem>", pixmap_list_dt},
563
{N_("/Tags/List/_Definition"), NULL, general_html_menu_cb, 38, "<ImageItem>", pixmap_list_dd},
564
{N_("/Tags/List/Men_u"), NULL, general_html_menu_cb, 39, "<Item>"},
565
{N_("/Tags/Fo_rm"), NULL, NULL, 0, "<Branch>"},
566
{N_("/Tags/Form/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
567
{N_("/Tags/Form/_Form"), NULL, general_html_menu_cb, 67, "<ImageItem>", pixmap_form},
568
{N_("/Tags/Form/_Button"), NULL, general_html_menu_cb, 58, "<Item>"},
569
{N_("/Tags/Form/_Input"), NULL, general_html_menu_cb, 65, "<Item>"},
570
{N_("/Tags/Form/_Textarea"), NULL, general_html_menu_cb, 66, "<Item>"},
571
/* {N_("/Tags/Form/"), NULL, general_html_menu_cb, , "<Item>"},*/
572
{N_("/Tags/_Misc"), NULL, NULL, 0, "<Branch>"},
573
{N_("/Tags/Misc/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
574
{N_("/Tags/Misc/Insert Generator _META-Tag"), NULL, general_html_menu_cb, 47, "<Item>"},
575
{N_("/Tags/Misc/_Span"), NULL, general_html_menu_cb, 60, "<Item>"},
576
{N_("/Tags/Misc/_Div"), NULL, general_html_menu_cb, 62, "<Item>"},
577
{N_("/Tags/Misc/_Link"), NULL, general_html_menu_cb, 61, "<Item>"},
578
{N_("/Tags/Misc/S_cript"), NULL, general_html_menu_cb, 59, "<Item>"},
579
{N_("/Tags/Misc/_Anchor"), NULL, general_html_menu_cb, 63, "<ImageItem>", pixmap_anchor},
580
{N_("/Tags/Misc/_Image"), NULL, general_html_menu_cb, 64, "<ImageItem>", pixmap_image},
581
/* {N_("/Tags/Misc/"), NULL, general_html_menu_cb, , "<Item>"},*/
582
{N_("/Tags/_Comment"), "<control><alt>C", general_html_menu_cb, 10, "<ImageItem>", pixmap_comment},
583
{N_("/Dial_ogs"), NULL, NULL, 0, "<Branch>"},
443
584
{N_("/Dialogs/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
444
{N_("/Dialogs/General"), NULL, NULL, 0, "<Branch>"},
585
{N_("/Dialogs/_General"), NULL, NULL, 0, "<Branch>"},
445
586
{N_("/Dialogs/General/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
446
{N_("/Dialogs/General/Quickstart..."), "<alt>q", quickstart_cb, 0, NULL},
587
{N_("/Dialogs/General/_Quickstart..."), "<shift><alt>q", menu_html_dialogs_lcb, 32, "<ImageItem>", pixmap_quick_start},
447
588
/* {N_("/Dialogs/General/DTD"), NULL, dtd_cb, 0, NULL},
448
589
{N_("/Dialogs/General/Head"), NULL, head_cb, 0, NULL}, */
449
{N_("/Dialogs/General/Body..."), NULL, body_cb, 0, NULL},
450
{N_("/Dialogs/General/Anchor..."), "<alt>a", quickanchor_cb, 0, NULL},
451
{N_("/Dialogs/General/Email..."), NULL, email_cb, 0, NULL},
452
{N_("/Dialogs/General/Rule..."), "<alt>h", quickrule_cb, 0, NULL},
453
{N_("/Dialogs/General/Font..."), NULL, fontdialog_cb, 0, NULL},
454
{N_("/Dialogs/General/Basefont..."), NULL, basefont_cb, 0, NULL},
455
{N_("/Dialogs/General/Quicklist..."), NULL, quicklist_cb, 0, NULL},
456
{N_("/Dialogs/General/Meta..."), "<alt>m", meta_cb, 0, NULL},
457
{N_("/Dialogs/General/Embed..."), NULL, embed_cb, 0, NULL},
458
{N_("/Dialogs/General/Select colour..."), NULL, sel_colour_cb, 0, NULL},
459
{N_("/Dialogs/General/Insert time..."), NULL, insert_time_cb, 0, NULL},
460
{N_("/Dialogs/General/Insert image..."), "<control>i", image_insert_dialog_cb, 0, NULL},
461
#if HAVE_LIBGDK_IMLIB
462
{N_("/Dialogs/General/Insert thumbnail..."), "<control>t", image_thumbnail_dialog_cb, 0, NULL},
464
{N_("/Dialogs/Table"), NULL, NULL, 0, "<Branch>"},
590
{N_("/Dialogs/General/_Body..."), "<shift><alt>B", menu_html_dialogs_lcb, 1, "<ImageItem>", pixmap_body},
591
{N_("/Dialogs/General/_Anchor..."), "<shift><alt>a", menu_html_dialogs_lcb, 2, "<ImageItem>", pixmap_anchor},
592
{N_("/Dialogs/General/_Email..."), "<shift><alt>e", menu_html_dialogs_lcb, 3, "<Item>"},
593
{N_("/Dialogs/General/_Rule..."), "<shift><alt>r", menu_html_dialogs_lcb, 4, "<ImageItem>", pixmap_hrule},
594
{N_("/Dialogs/General/_Font..."), "<shift><alt>f", menu_html_dialogs_lcb, 5, "<Item>"},
595
{N_("/Dialogs/General/Basef_ont..."), NULL, menu_html_dialogs_lcb, 6, "<Item>"},
596
{N_("/Dialogs/General/Quick_list..."), "<shift><alt>L", menu_html_dialogs_lcb, 7, "<ImageItem>", pixmap_list},
597
{N_("/Dialogs/General/_Meta..."), "<shift><alt>m", menu_html_dialogs_lcb, 8, "<Item>"},
598
{N_("/Dialogs/General/Embe_d..."), NULL, menu_html_dialogs_lcb, 9, "<Item>"},
599
{N_("/Dialogs/General/Select _Color..."), NULL, menu_html_dialogs_lcb, 37, "<Item>"},
600
{N_("/Dialogs/General/Insert _Time..."), NULL, menu_html_dialogs_lcb, 34, "<Item>"},
601
{N_("/Dialogs/General/Insert _Image..."), "<shift><alt>I", menu_html_dialogs_lcb, 10, "<ImageItem>", pixmap_image},
602
{N_("/Dialogs/General/Insert T_humbnail..."), "<shift><alt>N", menu_html_dialogs_lcb, 11, "<ImageItem>", pixmap_thumbnail},
603
{N_("/Dialogs/_Table"), NULL, NULL, 0, "<Branch>"},
465
604
{N_("/Dialogs/Table/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
466
{N_("/Dialogs/Table/Table..."), NULL, tabledialog_cb, 0, NULL},
467
{N_("/Dialogs/Table/Tablerow..."), NULL, tablerowdialog_cb, 0, NULL},
468
{N_("/Dialogs/Table/Tablehead..."), NULL, tableheaddialog_cb, 0, NULL},
469
{N_("/Dialogs/Table/Tabledata..."), NULL, tabledatadialog_cb, 0, NULL},
470
{N_("/Dialogs/CSS"), NULL, NULL, 0, "<Branch>"},
605
{N_("/Dialogs/Table/Table _Wizard..."), NULL, menu_html_dialogs_lcb, 12, "<ImageItem>", pixmap_tablewhiz},
606
{N_("/Dialogs/Table/_Table..."), "<shift><alt>T", menu_html_dialogs_lcb, 13, "<ImageItem>", pixmap_table},
607
{N_("/Dialogs/Table/Table _Row..."), NULL, menu_html_dialogs_lcb, 14, "<ImageItem>", pixmap_table_tr},
608
{N_("/Dialogs/Table/Table _Head..."), NULL, menu_html_dialogs_lcb, 15, "<ImageItem>", pixmap_table_th},
609
{N_("/Dialogs/Table/Table _Data..."), NULL, menu_html_dialogs_lcb, 16, "<ImageItem>", pixmap_table_td},
610
{N_("/Dialogs/_CSS"), NULL, NULL, 0, "<Branch>"},
471
611
{N_("/Dialogs/CSS/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
472
{N_("/Dialogs/CSS/Create style..."), NULL, new_css_dialog, 0, NULL},
473
{N_("/Dialogs/CSS/Span..."), NULL, span_dialog, 0, NULL},
474
{N_("/Dialogs/CSS/Div..."), NULL, div_dialog, 0, NULL},
475
#ifdef OLD_CSS_DIALOG
476
{N_("/Dialogs/CSS/Add class..."), NULL, insert_class, 0, NULL},
478
{N_("/Dialogs/CSS/Style..."), NULL, general_html_cb, 42, NULL},
479
{N_("/Dialogs/CSS/Link to stylesheet..."), NULL, link_cb, 0, NULL},
480
{N_("/Dialogs/Frame"), NULL, NULL, 0, "<Branch>"},
612
{N_("/Dialogs/CSS/_Create Style..."), "<shift><alt>S", menu_html_dialogs_lcb, 36, "<ImageItem>",pixmap_cssnewstyle},
613
{N_("/Dialogs/CSS/S_pan..."), NULL, menu_html_dialogs_lcb, 17, "<ImageItem>",pixmap_cssspan},
614
{N_("/Dialogs/CSS/_Div..."), "<shift><alt>D", menu_html_dialogs_lcb, 18, "<ImageItem>",pixmap_cssdiv},
615
{N_("/Dialogs/CSS/_Style..."), NULL, general_html_menu_cb, 42, "<ImageItem>",pixmap_cssstyle},
616
{N_("/Dialogs/CSS/_Link to Stylesheet..."), NULL, menu_html_dialogs_lcb, 35, "<Item>"},
617
{N_("/Dialogs/_Frame"), NULL, NULL, 0, "<Branch>"},
481
618
{N_("/Dialogs/Frame/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
482
{N_("/Dialogs/Frame/Frameset..."), NULL, framesetdialog_cb, 0, NULL},
483
{N_("/Dialogs/Frame/Frame..."), NULL, framedialog_cb, 0, NULL},
484
{N_("/Dialogs/Form"), NULL, NULL, 0, "<Branch>"},
619
{N_("/Dialogs/Frame/Frame _Wizard..."), NULL, menu_html_dialogs_lcb, 19, "<ImageItem>", pixmap_framewhiz},
620
{N_("/Dialogs/Frame/Frame_set..."), NULL, menu_html_dialogs_lcb, 20, "<ImageItem>", pixmap_frameset},
621
{N_("/Dialogs/Frame/_Frame..."), NULL, menu_html_dialogs_lcb, 21, "<ImageItem>", pixmap_frame},
622
{N_("/Dialogs/F_orm"), NULL, NULL, 0, "<Branch>"},
485
623
{N_("/Dialogs/Form/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
486
{N_("/Dialogs/Form/Form..."), NULL, formdialog_cb, 0, NULL},
487
{N_("/Dialogs/Form/Input button..."), NULL, buttondialog_cb, 0, NULL},
488
{N_("/Dialogs/Form/Text..."), NULL, textdialog_cb, 0, NULL},
489
{N_("/Dialogs/Form/Hidden..."), NULL, hiddendialog_cb, 0, NULL},
490
{N_("/Dialogs/Form/Textarea..."), NULL, textareadialog_cb, 0, NULL},
491
{N_("/Dialogs/Form/Radio buttons..."), NULL, radiodialog_cb, 0, NULL},
492
{N_("/Dialogs/Form/Check buttons..."), NULL, checkdialog_cb, 0, NULL},
493
{N_("/Dialogs/Form/Select..."), NULL, selectdialog_cb, 0, NULL},
494
{N_("/Dialogs/Form/Option..."), NULL, optiondialog_cb, 0, NULL},
495
{N_("/Dialogs/Form/Option group..."), NULL, optgroupdialog_cb, 0, NULL},
496
{N_("/Dialogs/Javascript"), NULL, NULL, 0, "<Branch>"},
624
{N_("/Dialogs/Form/F_orm..."), NULL, menu_html_dialogs_lcb, 22, "<ImageItem>", pixmap_form},
625
{N_("/Dialogs/Form/_Input..."), NULL, menu_html_dialogs_lcb, 33, "<Item>"},
626
{N_("/Dialogs/Form/Input Buttons..."), NULL, menu_html_dialogs_lcb, 23, "<ImageItem>", pixmap_form_submit},
627
{N_("/Dialogs/Form/Input Text..."), NULL, menu_html_dialogs_lcb, 24, "<ImageItem>", pixmap_form_text},
628
{N_("/Dialogs/Form/Text_area..."), NULL, menu_html_dialogs_lcb, 26, "<ImageItem>", pixmap_form_textarea},
629
{N_("/Dialogs/Form/_Select..."), NULL, menu_html_dialogs_lcb, 29, "<ImageItem>", pixmap_form_select},
630
{N_("/Dialogs/Form/O_ption..."), NULL, menu_html_dialogs_lcb, 30, "<ImageItem>", pixmap_form_option},
631
{N_("/Dialogs/Form/Option _Group..."), NULL, menu_html_dialogs_lcb, 31, "<ImageItem>",pixmap_form_optiongroup },
632
{N_("/Dialogs/Form/_Button..."), NULL, menu_html_dialogs_lcb, 25, "<Item>"},
633
/* {N_("/Dialogs/Javascript"), NULL, NULL, 0, "<Branch>"},
497
634
{N_("/Dialogs/Javascript/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
498
635
{N_("/Dialogs/Javascript/Mouseover Script"), NULL, mouseover_script_cb, 0, NULL},
499
636
{N_("/Dialogs/Javascript/Netscape 4 Resize Bugfix Script"), NULL, ns47_bugfix_script_cb, 0, NULL},
518
655
{N_("/Dialogs/WML/Refresh"), NULL, general_wml_cb, 8, NULL},
519
656
{N_("/Dialogs/WML/Noop"), NULL, general_wml_cb, 9, NULL},
520
657
{N_("/Dialogs/WML/sep13"), NULL, NULL, 0, "<Separator>"},
521
{N_("/Dialogs/WML/Set Variable..."), NULL, vardialog_cb, 0, NULL},
522
#ifdef IMAGEMAP_EDITOR_TEST
523
{N_("/Dialogs/imagemap development..."), NULL, make_imagemap_win, 0, NULL},
658
{N_("/Dialogs/WML/Set Variable..."), NULL, vardialog_cb, 0, NULL},*/
659
{N_("/Dialogs/sep1"), NULL, NULL, 0, "<Separator>"},
660
{N_("/Dialogs/_Edit tag under cursor..."), "F3", menu_html_dialogs_lcb, 38, "<ImageItem>", pixmap_edit_tag},
661
{N_("/_Document"), NULL, NULL, 0, "<Branch>"},
662
{N_("/Document/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
663
{N_("/Document/_Increase Tabsize"), NULL, gui_change_tabsize, 1, "<Item>"},
664
{N_("/Document/_Decrease Tabsize"), NULL, gui_change_tabsize, 0, "<Item>"},
665
{N_("/Document/_Auto Indent"), NULL, toggle_doc_property, 4, "<ToggleItem>"},
666
{N_("/Document/sep1"), NULL, NULL, 0, "<Separator>"},
667
{N_("/Document/Auto Close H_TML tags"), "<control>T", toggle_doc_property, 3, "<ToggleItem>"},
668
{N_("/Document/_Wrap"), NULL, toggle_doc_property, 1, "<ToggleItem>"},
669
{N_("/Document/_Line Numbers"), NULL, toggle_doc_property, 2, "<ToggleItem>"},
670
{N_("/Document/sep2"), NULL, NULL, 0, "<Separator>"},
671
{N_("/Document/_Highlight Syntax"), NULL, doc_toggle_highlighting_cb, 1, "<ToggleItem>"},
672
{N_("/Document/_Update Highlighting"), "F5", doc_update_highlighting, 0, "<Item>"},
673
{N_("/Document/sep3"), NULL, NULL, 0, "<Separator>"},
674
{N_("/Document/Document Ty_pe"), NULL, NULL, 0, "<Branch>"},
675
{N_("/Document/Document Type/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
676
{N_("/Document/Character _Encoding"), NULL, NULL, 0, "<Branch>"},
677
{N_("/Document/Character Encoding/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
678
{N_("/Document/sep4"), NULL, NULL, 0, "<Separator>"},
679
#ifdef HAVE_LIBASPELL
680
{N_("/Document/Check _Spelling..."), NULL, spell_check_menu_cb, 0, "<StockItem>", GTK_STOCK_SPELL_CHECK},
681
#endif /* HAVE_LIBASPELL */
682
{N_("/Document/_Floating window"), NULL, file_floatingview_menu_cb, 1, "<Item>"},
683
{N_("/Document/Word _Count"), NULL, word_count_cb, 1, "<Item>"},
684
{N_("/_Go"), NULL, NULL, 0, "<Branch>"},
685
{N_("/Go/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
686
{N_("/Go/_Previous document"), NULL, gui_notebook_switch, 1, "<StockItem>", GTK_STOCK_GO_BACK},
687
{N_("/Go/_Next document"), NULL, gui_notebook_switch, 2, "<StockItem>", GTK_STOCK_GO_FORWARD},
688
{N_("/Go/sep1"), NULL, NULL, 0, "<Separator>"},
689
{N_("/Go/_First document"), NULL, gui_notebook_switch, 3, "<StockItem>", GTK_STOCK_GOTO_FIRST},
690
{N_("/Go/L_ast document"), NULL, gui_notebook_switch, 4, "<StockItem>", GTK_STOCK_GOTO_LAST},
691
{N_("/Go/sep1"), NULL, NULL, 0, "<Separator>"},
692
{N_("/Go/Goto _Line"), "<control>l", go_to_line_win_cb, 1, "<StockItem>", GTK_STOCK_JUMP_TO},
693
{N_("/Go/Goto _Selection"), NULL, go_to_line_from_selection_cb, 1, "<Item>"},
694
{N_("/_Project"), NULL, NULL, 0, "<Branch>"},
695
{N_("/Project/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
696
{N_("/Project/_New Project"), NULL, project_menu_cb, 6, "<Item>"},
697
{N_("/Project/_Open Project..."), NULL, project_menu_cb, 1, "<Item>"},
698
{N_("/Project/Open _recent"), NULL, NULL, 0, "<Branch>"},
699
{N_("/Project/Open recent/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
700
{N_("/Project/sep1"), NULL, NULL, 0, "<Separator>"},
701
{N_("/Project/_Save"), NULL, project_menu_cb, 2, "<Item>"},
702
{N_("/Project/Save _as..."), NULL, project_menu_cb, 3, "<Item>"},
703
{N_("/Project/Save & _close"), NULL, project_menu_cb, 4, "<Item>"},
704
{N_("/Project/sep2"), NULL, NULL, 0, "<Separator>"},
705
{N_("/Project/E_dit Project Options..."), NULL, project_menu_cb, 5, "<StockItem>", GTK_STOCK_PREFERENCES},
525
706
{N_("/E_xternal"), NULL, NULL, 0, "<Branch>"},
526
{N_("/External/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
527
{N_("/External/Weblint..."), NULL, run_weblint_cb, 0, NULL},
528
{N_("/External/sep1"), NULL, NULL, 0, "<Separator>"},
529
{N_("/External/Filters"), NULL, NULL, 0, "<Branch>"},
530
{N_("/External/Filters/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
531
{N_("/External/Commands"), NULL, NULL, 0, "<Branch>"},
707
{N_("/External/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
708
/* {N_("/External/_Commands"), NULL, NULL, 0, "<Branch>"},
532
709
{N_("/External/Commands/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
534
{N_("/_Perl"), NULL, NULL, 0, "<Branch>"},
535
{N_("/Perl/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
536
{N_("/Perl/Status..."), NULL, perl_status_cb, 0, NULL},
537
{N_("/Perl/Strip CR Codes"), NULL, perl_strip_cr_cb, 0, NULL},
539
{N_("/_Options"), NULL, NULL, 0, "<Branch>"},
540
{N_("/Options/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
541
{N_("/Options/Preferences..."), NULL, configure_cb, 0, NULL},
542
{N_("/Options/View Main toolbar"), NULL, toggle_main_toolbar_cb, 0, "<ToggleItem>"},
543
{N_("/Options/View HTML toolbar"), NULL, toggle_html_toolbar_cb, 0, "<ToggleItem>"},
544
{N_("/Options/View Custom toolbar"), NULL, toggle_cust_menubar_cb, 0, "<ToggleItem>"},
545
{N_("/Options/View Filebrowser"), NULL, toggle_filebrowser_cb, 0, "<ToggleItem>"},
546
{N_("/Options/sep2"), NULL, NULL, 0, "<Separator>"},
547
{N_("/Options/_Lists"), NULL, NULL, 0, "<Branch>"},
548
{N_("/Options/Lists/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
549
{N_("/Options/Lists/External filters..."), NULL, edit_some_list_lcb, 1, NULL},
550
{N_("/Options/Lists/External programs..."), NULL, edit_some_list_lcb, 2, NULL},
551
{N_("/Options/Lists/Syntax highlighting..."), NULL, edit_some_list_lcb, 3, NULL},
552
{N_("/Options/Lists/Reset syntax highlighting"), NULL, reset_syntax_highlighting_lcb, 0, NULL},
553
{N_("/Options/sep1"), NULL, NULL, 0, "<Separator>"},
554
{N_("/Options/Save config"), NULL, save_config_files, 0, NULL},
555
{N_("/Options/Save shortcut key settings"), NULL, save_menu_shortcuts, 0, NULL},
710
{N_("/External/_Outputbox"), NULL, NULL, 0, "<Branch>"},
711
{N_("/External/Outputbox/tearoff1"), NULL, NULL, 0, "<Tearoff>"},
712
{N_("/External/sep1"), NULL, NULL, 0, "<Separator>"},*/
556
713
{N_("/_Help"), NULL, NULL, 0, "<Branch>"},
557
{N_("/Help/_About..."), NULL, show_about_window_cb, 0, NULL}
560
static gchar *sp_chars[] = {
561
"À", "Á", "Â", "Ã", "Æ",
562
"Ä", "Å", "Ç", "È", "É",
563
"Ê", "Ë", "Ì", "Í", "Î",
564
"Ï", "Ñ", "Ò", "Ó", "Ô",
565
"Õ", "Ö", "Ø", "Ù", "Ú",
566
"Û", "Ü", "Ý", "à", "á",
567
"â", "ã", "å", "æ", "ä",
568
"ç", "è", "é", "ê", "ë",
569
"ì", "í", "î", "ï", "ñ",
570
"ò", "ó", "ô", "õ", "ö",
571
"ø", "ù", "ú", "û", "ü",
572
"ý", "ÿ", "¨", "´", "¸", "¢",
573
"£", "¤", "¥", "¬", "&mult;", "÷",
574
"±", "<", ">", "¹", "²", "³",
575
"¼", "½", "¾", "°", "Ð", "Þ",
576
"ð", "þ", "ß", "µ", " ", "§",
577
"©", "«", "»", "®", "¡", "¿",
578
"ª", "º", "¶", "¦", "­", "¯",
582
#define PATH_MAX 1024
585
void save_menu_shortcuts() {
588
filename = g_malloc(PATH_MAX+1);
589
filename = strncat(strncpy(filename, g_get_home_dir(), PATH_MAX), "/.bluefish/menudump", PATH_MAX);
590
gtk_item_factory_dump_rc(filename, NULL, TRUE);
594
void load_menu_shortcuts() {
597
filename = g_malloc(PATH_MAX+1);
598
filename = strncat(strncpy(filename, g_get_home_dir(), PATH_MAX), "/.bluefish/menudump", PATH_MAX);
599
gtk_item_factory_parse_rc(filename);
603
static void make_external_commands() {
604
make_external_menu_entries(2);
606
static void make_external_filters() {
607
make_external_menu_entries(1);
610
static void edit_some_list_lcb(GtkWidget * widget, gpointer data)
612
switch (GPOINTER_TO_INT(data)) {
615
gchar *titles[] = { _("name"), _("command"), NULL};
616
estrl_dialog(&main_v->props.external_filters, _("Bluefish configuration - external filters"), 7, 2, &titles[0], make_external_filters);
621
gchar *titles[] = { _("name"), _("command"), NULL};
622
estrl_dialog(&main_v->props.external_commands, _("Bluefish configuration - external commands"), 7, 2, &titles[0], make_external_commands);
627
gchar *titles[] = {_("color"), _("regex pattern"), NULL};
628
estrl_dialog(&main_v->props.syntax_configstrings, _("Bluefish configuration - syntax highlighting"), 8, 2, &titles[0], make_syntax_struct_list);
638
/***************************************************************************/
639
/* takes care of inserting the special characters */
640
static void insert_char_cb(GtkWidget * widget, gint data)
642
insert_dbl_text(sp_chars[data], NULL);
714
{N_("/Help/_About..."), NULL, about_dialog_create, 0, "<Item>"},
718
gchar *menu_translate(const gchar * path, gpointer data) {
720
/* static gchar *menupath = NULL;
721
if (menupath) g_free(menupath);
722
menupath = g_strdup(path);
723
if ((strstr(path, "/tearoff1") != NULL)
724
|| (strstr(path, "/---") != NULL)
725
|| (strstr(path, "/sep1") != NULL)) {
726
DEBUG_MSG("menu_translate, nogettext returning %s for %s\n", menupath, path);
729
retval = gettext(path);
734
/************************************************/
735
/* generic functions for dynamic created menu's */
736
/************************************************/
744
#define BFW_DYNMENU(var) ((Tbfw_dynmenu *)(var))
746
static Tbfw_dynmenu *find_bfw_dynmenu_by_data_in_list(GList *thelist, gpointer data) {
747
GList *tmplist = g_list_first(thelist);
749
if (BFW_DYNMENU(tmplist->data)->data == data) return BFW_DYNMENU(tmplist->data);
750
tmplist = g_list_next(tmplist);
757
static Tbfw_dynmenu *find_bfw_dynmenu_by_label_in_list(GList *itemlist, gchar *label) {
760
tmplist = g_list_first(itemlist);
762
if(!strcmp(GTK_LABEL(GTK_BIN(BFW_DYNMENU(tmplist->data)->menuitem)->child)->label, label)) {
763
return BFW_DYNMENU(tmplist->data);
765
tmplist = g_list_next(tmplist);
771
static GtkWidget *remove_menuitem_in_list_by_label(const gchar *labelstring, GList **menuitemlist) {
775
tmplist = g_list_first(*menuitemlist);
777
DEBUG_MSG("remove_recent_entry, tmplist=%p, data=%p\n", tmplist, tmplist->data);
778
DEBUG_MSG("remove_recent_entry, tmplist->data=%s\n",GTK_LABEL(GTK_BIN(tmplist->data)->child)->label);
779
if(!strcmp(GTK_LABEL(GTK_BIN(tmplist->data)->child)->label, labelstring)) {
781
*menuitemlist = g_list_remove(*menuitemlist, tmplist->data);
782
DEBUG_MSG("remove_recent_entry, returning %p\n", tmp);
785
tmplist = g_list_next(tmplist);
790
/* the result of this function can be added to the menuitem-list */
791
static GtkWidget *create_dynamic_menuitem(Tbfwin *bfwin, gchar *menubasepath, const gchar *label, GCallback callback, gpointer data, gint menu_insert_offset) {
792
GtkWidget *tmp, *menu;
793
GtkItemFactory *factory;
795
/* add it to bfwin->menubar */
796
factory = gtk_item_factory_from_widget(bfwin->menubar);
797
menu = gtk_item_factory_get_widget(factory, menubasepath);
798
DEBUG_MSG("create_dynamic_menuitem, menubar=%p, menu=%p basepath=%s, label=%s\n", bfwin->menubar, menu, menubasepath,label);
800
tmp = gtk_menu_item_new_with_label(label);
801
g_signal_connect(G_OBJECT(tmp), "activate",callback, data);
803
gtk_widget_show(tmp);
804
if (menu_insert_offset == -1) {
805
gtk_menu_shell_append(GTK_MENU_SHELL(menu),tmp);
807
gtk_menu_shell_insert(GTK_MENU_SHELL(menu),tmp,menu_insert_offset);
811
DEBUG_MSG("create_dynamic_menuitem, NO MENU FOR BASEPATH %s\n", menubasepath);
816
static void create_parent_and_tearoff(gchar *menupath, GtkItemFactory *ifactory) {
818
GtkWidget *widg=NULL;
819
GtkItemFactoryEntry entry;
821
basepath = g_strndup(menupath, (strlen(menupath) - strlen(strrchr(menupath, '/'))));
822
DEBUG_MSG("create_parent_and_tearoff, basepath=%s for menupath=%s\n", basepath, menupath);
823
widg = gtk_item_factory_get_widget(ifactory, basepath);
825
DEBUG_MSG("create_parent_and_tearoff, no widget found for %s, will create it\n", basepath);
826
create_parent_and_tearoff(basepath, ifactory);
827
entry.path = g_strconcat(basepath, "/tearoff1", NULL);
828
entry.accelerator = NULL;
829
entry.callback = NULL;
830
entry.callback_action = 0;
831
entry.item_type = "<Tearoff>";
832
gtk_item_factory_create_item(ifactory, &entry, NULL, 2);
838
static void menu_current_document_type_change(GtkMenuItem *menuitem,Tbfw_dynmenu *bdm) {
839
DEBUG_MSG("menu_current_document_type_change, started for hlset %p\n", bdm->data);
840
if (GTK_CHECK_MENU_ITEM(menuitem)->active) {
841
if (doc_set_filetype(bdm->bfwin->current_document, bdm->data)) {
842
doc_highlight_full(bdm->bfwin->current_document);
844
menu_current_document_set_toggle_wo_activate(bdm->bfwin,bdm->bfwin->current_document->hl, NULL);
847
doc_set_statusbar_editmode_encoding(bdm->bfwin->current_document);
848
DEBUG_MSG("menu_current_document_type_change, finished\n");
851
void filetype_menus_empty() {
852
GList *tmplist = g_list_first(main_v->bfwinlist);
854
Tbfwin *bfwin = BFWIN(tmplist->data);
855
GList *tmplist2 = g_list_first(bfwin->menu_filetypes);
857
Tbfw_dynmenu *bdm = BFW_DYNMENU(tmplist2->data);
858
g_signal_handler_disconnect(bdm->menuitem,bdm->signal_id);
859
gtk_widget_destroy(bdm->menuitem);
861
tmplist2 = g_list_next(tmplist2);
863
tmplist = g_list_next(tmplist);
867
void filetype_menu_rebuild(Tbfwin *bfwin,GtkItemFactory *item_factory) {
869
GtkWidget *parent_menu;
870
GList *tmplist = g_list_last(main_v->filetypelist);
872
item_factory = gtk_item_factory_from_widget(bfwin->menubar);
874
DEBUG_MSG("filetype_menu_rebuild, adding filetypes in menu\n");
875
bfwin->menu_filetypes = NULL;
876
parent_menu = gtk_item_factory_get_widget(item_factory, N_("/Document/Document Type"));
878
Tfiletype *filetype = (Tfiletype *)tmplist->data;
879
if (filetype->editable) {
880
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
881
bdm->data = filetype;
883
bdm->menuitem = gtk_radio_menu_item_new_with_label(group, filetype->type);
884
bdm->signal_id = g_signal_connect(G_OBJECT(bdm->menuitem), "activate",G_CALLBACK(menu_current_document_type_change), (gpointer) bdm);
885
gtk_widget_show(bdm->menuitem);
886
gtk_menu_insert(GTK_MENU(parent_menu), bdm->menuitem, 1);
887
group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(bdm->menuitem));
888
bfwin->menu_filetypes = g_list_append(bfwin->menu_filetypes, bdm);
890
tmplist = g_list_previous(tmplist);
646
895
* menu factory crap, thanks to the gtk tutorial for this
647
896
* both the 1.0 and the 1.2 code is directly from the tutorial
649
void get_main_menu(GtkWidget * window, GtkWidget ** menubar)
898
void menu_create_main(Tbfwin *bfwin, GtkWidget *vbox) {
651
899
GtkItemFactory *item_factory;
652
900
GtkAccelGroup *accel_group;
653
901
gint nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]);
654
902
accel_group = gtk_accel_group_new();
655
item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel_group);
903
item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<bluefishmain>", accel_group);
656
904
#ifdef ENABLE_NLS
657
gtk_item_factory_set_translate_func(item_factory, menu_translate, "<main>", NULL);
659
gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL);
660
gtk_window_add_accel_group(GTK_WINDOW(window), accel_group);
662
*menubar = gtk_item_factory_get_widget(item_factory, "<main>");
663
setup_toggle_item(item_factory, "/Options/View Main toolbar", main_v->props.v_main_tb);
664
setup_toggle_item(item_factory, "/Options/View HTML toolbar", main_v->props.v_html_tb);
665
setup_toggle_item(item_factory, "/Options/View Custom toolbar", main_v->props.v_custom_tb);
666
setup_toggle_item(item_factory, "/Options/View Filebrowser", main_v->props.v_filebrowser);
667
setup_toggle_item(item_factory, "/View/Highlight syntax", main_v->props.cont_highlight_update);
671
/*********************************************************************/
905
gtk_item_factory_set_translate_func(item_factory, menu_translate, "<bluefishmain>", NULL);
907
gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, bfwin);
908
gtk_window_add_accel_group(GTK_WINDOW(bfwin->main_window), accel_group);
909
bfwin->menubar = gtk_item_factory_get_widget(item_factory, "<bluefishmain>");
910
gtk_box_pack_start(GTK_BOX(vbox), bfwin->menubar, FALSE, TRUE, 0);
911
gtk_accel_map_add_entry("<bluefishmain>/Edit/Shift Right", GDK_period, GDK_CONTROL_MASK);
912
gtk_accel_map_add_entry("<bluefishmain>/Edit/Shift Left", GDK_comma, GDK_CONTROL_MASK);
913
gtk_accel_map_add_entry("<bluefishmain>/Go/Previous document", GDK_Page_Up, GDK_CONTROL_MASK);
914
gtk_accel_map_add_entry("<bluefishmain>/Go/Next document", GDK_Page_Down, GDK_CONTROL_MASK);
915
gtk_accel_map_add_entry("<bluefishmain>/Go/First document", GDK_Page_Up, GDK_SHIFT_MASK | GDK_CONTROL_MASK);
916
gtk_accel_map_add_entry("<bluefishmain>/Go/Last document", GDK_Page_Down, GDK_SHIFT_MASK | GDK_CONTROL_MASK);
917
gtk_widget_show(bfwin->menubar);
919
setup_toggle_item(item_factory, "/View/View Main Toolbar", main_v->props.view_main_toolbar);
920
setup_toggle_item(item_factory, "/View/View HTML Toolbar", main_v->props.view_html_toolbar);
921
setup_toggle_item(item_factory, "/View/View Custom Menu", main_v->props.view_custom_menu);
922
setup_toggle_item(item_factory, "/View/View Sidebar", main_v->props.view_left_panel);
923
setup_toggle_item(item_factory, "/Document/Auto Indent", main_v->props.autoindent);
924
set_project_menu_widgets(bfwin, FALSE);
925
filetype_menu_rebuild(bfwin, item_factory);
929
/*************************************************************/
930
/* Output Box handling */
931
/*************************************************************/
932
static GtkWidget *dynamic_menu_append_spacing(Tbfwin *bfwin, gchar *basepath) {
933
GtkItemFactory *factory;
934
GtkWidget *menu, *menuitem;
935
factory = gtk_item_factory_from_widget(bfwin->menubar);
936
menu = gtk_item_factory_get_widget(factory, basepath);
937
menuitem = gtk_menu_item_new();
938
gtk_widget_show(menuitem);
939
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menuitem);
943
static void menu_outputbox_lcb(GtkMenuItem *menuitem,Tbfw_dynmenu *bdm) {
944
gchar **arr = (gchar **)bdm->data;
945
outputbox(bdm->bfwin,arr[1], atoi(arr[2]), atoi(arr[3]), atoi(arr[4]), arr[5], (arr[6][0]=='1'));
948
/*******************************************************************/
949
/* Open Recent menu handling */
950
/*******************************************************************/
951
/* the only required header */
952
static GtkWidget *create_recent_entry(Tbfwin *bfwin, const gchar *filename, gboolean is_project, gboolean check_for_duplicates);
953
/*******************************************************************/
955
static GtkWidget *remove_recent_entry(Tbfwin *bfwin, const gchar *filename, gboolean is_project) {
960
worklist = (is_project) ? &bfwin->menu_recent_projects : &bfwin->menu_recent_files;
962
if(strcmp(filename, "last") ==0) {
963
tmplist = g_list_first(*worklist);
966
DEBUG_MSG("remove_recent_entry, remove last entry\n");
967
*worklist = g_list_remove(*worklist, tmplist->data);
970
DEBUG_MSG("remove_recent_entry, worklist contained no items, returning NULL\n");
974
return remove_menuitem_in_list_by_label(filename, worklist);
978
static void open_recent_project_cb(GtkWidget *widget, Tbfwin *bfwin) {
979
gchar *filename = GTK_LABEL(GTK_BIN(widget)->child)->label;
980
DEBUG_MSG("open_recent_project_cb, started, filename is %s\n", filename);
981
project_open_from_file(bfwin, filename);
982
add_to_recent_list(bfwin,filename, 0, TRUE);
986
* This function should be called when a menu from the Open Recent list
987
* has been selected. */
988
static void open_recent_file_cb(GtkWidget *widget, Tbfwin *bfwin) {
990
gchar *filename = GTK_LABEL(GTK_BIN(widget)->child)->label;
991
DEBUG_MSG("open_recent_file_cb, started, filename is %s\n", filename);
993
statusbar_message(bfwin,_("Loading file(s)..."),2000);
995
success = (doc_new_with_file(bfwin,filename, FALSE, FALSE) != NULL);
997
gchar *message = g_strconcat(_("The filename was:\n"), filename, NULL);
998
warning_dialog(bfwin->main_window,_("Could not open file\n"), message);
1002
DEBUG_MSG("open_recent_file_cb, document %s opened\n", filename);
1003
add_to_recent_list(bfwin,filename, 0, FALSE);
1006
/* create_recent_entry
1007
* This function builds the gtkitemfactoryentry and inserts it at the
1008
* bfwin->menubar. Furthermore, it returns a pointer to it, so that
1009
* this pointer can be added in the main_v->recent_files list */
1010
static GtkWidget *create_recent_entry(Tbfwin *bfwin, const gchar *filename, gboolean is_project, gboolean check_for_duplicates) {
1013
if (check_for_duplicates) {
1014
tmp = remove_recent_entry(bfwin,filename,is_project);
1016
gtk_widget_hide(tmp);
1017
gtk_widget_destroy(tmp);
1021
return create_dynamic_menuitem(bfwin,N_("/Project/Open recent")
1022
, filename, G_CALLBACK(open_recent_project_cb), bfwin
1025
return create_dynamic_menuitem(bfwin,N_("/File/Open recent")
1026
, filename, G_CALLBACK(open_recent_file_cb), bfwin
1031
GList *recent_menu_from_list(Tbfwin *bfwin, GList *startat, gboolean is_project) {
1032
GList *retlist=NULL, *tmplist=startat;
1034
DEBUG_MSG("recent_menu_init, adding recent project %s\n",(gchar *)tmplist->data);
1035
retlist = g_list_append(retlist, create_recent_entry(bfwin,tmplist->data,is_project,FALSE));
1036
tmplist = g_list_next(tmplist);
1041
/* void recent_menu_from_file(Tbfwin *bfwin, gchar *file_name, gboolean is_project) {
1043
GList *inputlist, *recentfiles=NULL, *tmplist, **worklist;
1045
worklist = (is_project) ? &bfwin->menu_recent_projects : &bfwin->menu_recent_files;
1046
/ * empty any existing menu * /
1047
tmplist = g_list_first(*worklist);
1049
gtk_widget_destroy(tmplist->data);
1050
tmplist = g_list_next(tmplist);
1053
filename = g_strconcat(g_get_home_dir(), file_name, NULL);
1054
inputlist = get_stringlist(filename, NULL);
1055
/ * the last entry in inputlist is the most recent file * /
1056
tmplist = g_list_first(inputlist);
1058
recentfiles = add_to_history_stringlist(recentfiles, (gchar *)tmplist->data, TRUE);
1059
tmplist = g_list_next(tmplist);
1061
free_stringlist(inputlist);
1062
num = g_list_length(recentfiles) - main_v->props.max_recent_files;
1063
*worklist = recent_menu_from_list(bfwin, g_list_nth(recentfiles, (num > 0)?num:0), is_project);
1064
put_stringlist_limited(filename, recentfiles, main_v->props.max_recent_files);
1065
free_stringlist(recentfiles);
1069
/* recent_menu_init()
1070
* Gets the list of documents from .bluefish/recentlist and inserts
1071
* it at the File-->Open Recent menu. If the file doesn't exist (probably
1072
* because this is the first time Bluefish is running) then a menu
1073
* item telling that no recent files exist will appear */
1074
void recent_menu_init(Tbfwin *bfwin) {
1075
/* recent_menu_from_file(bfwin, "/.bluefish/recentlist", FALSE);
1076
recent_menu_from_file(bfwin, "/.bluefish/recentprojects", TRUE);*/
1077
recent_menu_from_list(bfwin, bfwin->session->recent_files, FALSE);
1078
recent_menu_from_list(bfwin, main_v->globses.recent_projects, TRUE);
1081
/* when a project is opened, the recent menu should show the recent files
1082
from that project */
1083
void recent_menu_init_project(Tbfwin *bfwin) {
1085
GList *tmplist = g_list_first(bfwin->menu_recent_files);
1087
gtk_widget_destroy(tmplist->data);
1088
tmplist = g_list_next(tmplist);
1090
num = g_list_length(bfwin->session->recent_files) - main_v->props.max_recent_files;
1091
bfwin->menu_recent_files = recent_menu_from_list(bfwin, g_list_nth(bfwin->session->recent_files, (num > 0)?num:0), FALSE);
1094
/* Add_to_recent_list
1095
* This should be called when a new file is opened, i.e. from
1096
* file_open_cb, it adds a new entry which also appears in the
1097
* menu bar, and (if nessecary) deletes the last entry */
1098
void add_to_recent_list(Tbfwin *bfwin,gchar *filename, gint closed_file, gboolean is_project) {
1099
DEBUG_MSG("add_to_recent_list, started for %s\n", filename);
1101
GList *tmplist = g_list_first(main_v->bfwinlist);
1103
Tbfwin *curbfwin = BFWIN(tmplist->data);
1104
if (!curbfwin->project || curbfwin == bfwin || is_project) {
1107
worklist = (is_project) ? &curbfwin->menu_recent_projects : &curbfwin->menu_recent_files;
1109
/* First of all, create the entry and insert it at the list*/
1110
*worklist = g_list_append(*worklist,create_recent_entry(curbfwin,filename,is_project,TRUE));
1112
DEBUG_MSG("add_to_recent_list, inserted item in menu\n");
1113
if(g_list_length(*worklist) > main_v->props.max_recent_files) {
1114
tmp = remove_recent_entry(bfwin,"last",is_project);
1116
DEBUG_MSG("add_to_recent_list, list too long, entry %s to be deleted\n", GTK_LABEL(GTK_BIN(tmp)->child)->label);
1117
gtk_widget_hide(tmp);
1118
gtk_widget_destroy(tmp);
1122
tmplist = g_list_next(tmplist);
1126
main_v->globses.recent_projects = add_to_history_stringlist(main_v->globses.recent_projects, filename, FALSE,TRUE);
1128
bfwin->session->recent_files = add_to_history_stringlist(bfwin->session->recent_files, filename, FALSE,TRUE);
1133
/ * once we get rid of the other ways to store recent files this will be the only line we still need * /
1135
main_v->globses.recent_projects = add_to_history_stringlist(main_v->globses.recent_projects, filename, TRUE);
1137
bfwin->session->recent_files = add_to_history_stringlist(bfwin->session->recent_files, filename, TRUE);
1139
DEBUG_MSG("add_to_recent_list, added to session recent_files, length=%d\n",g_list_length(bfwin->session->recent_files));
1140
if (bfwin->project) {
1141
/ * we do nothing when the file is opened, since opened files are anyway opened again in a project * /
1143
gchar *tmpfilename, *recentfile;
1144
recentfile = g_strconcat(g_get_home_dir(), (is_project) ? "/.bluefish/recentprojects" : "/.bluefish/recentlist", NULL);
1145
/ * save the new list * /
1146
tmpfilename = g_strconcat(filename, "\n", NULL);
1147
DEBUG_MSG("add_to_recent_list, trying to append to %s\n", recentfile);
1148
append_string_to_file(recentfile, tmpfilename);
1150
g_free(tmpfilename);
1159
static void remove_all_window_entries_in_window(Tbfwin *menubfwin) {
1160
GList *tmplist = g_list_first(menubfwin->menu_windows);
1161
DEBUG_MSG("removing all window entries in menubfwin %p\n",menubfwin);
1163
Tbfw_dynmenu *bdm = BFW_DYNMENU(tmplist->data);
1164
/*g_signal_handler_disconnect(bdm->menuitem,bdm->signal_id);*/
1165
DEBUG_MSG("remove_all_window_entries_in_window, destroy menuitem=%p\n",bdm->menuitem);
1166
gtk_widget_destroy(bdm->menuitem);
1168
tmplist = g_list_next(tmplist);
1170
g_list_free(menubfwin->menu_windows);
1171
menubfwin->menu_windows = NULL;
1173
static void remove_window_entry_from_window(Tbfwin *menubfwin, Tbfwin *tobfwin) {
1174
Tbfw_dynmenu *bdm = find_bfw_dynmenu_by_data_in_list(menubfwin->menu_windows, tobfwin);
1175
DEBUG_MSG("remove_window_entry_from_window, menuwin=%p, found bdm=%p\n",menubfwin,bdm);
1177
/*g_signal_handler_disconnect(bdm->menuitem,bdm->signal_id);*/
1178
DEBUG_MSG("remove_window_entry_from_window, destroy menuitem=%p\n",bdm->menuitem);
1179
gtk_widget_destroy(bdm->menuitem);
1180
menubfwin->menu_windows = g_list_remove(menubfwin->menu_windows,bdm);
1185
static void rename_window_entry_from_window(Tbfwin *menubfwin, Tbfwin *tobfwin, gchar *newtitle) {
1186
Tbfw_dynmenu *bdm = find_bfw_dynmenu_by_data_in_list(menubfwin->menu_windows, tobfwin);
1187
DEBUG_MSG("rename_window_entry_from_window, menubfwin=%p, found bdm=%p\n",menubfwin,bdm);
1189
GtkWidget *label = gtk_bin_get_child(GTK_BIN(bdm->menuitem));
1190
DEBUG_MSG("rename_window_entry_from_window, setting label to have title %s\n",newtitle);
1191
gtk_label_set_text(GTK_LABEL(label), newtitle);
1194
static void menu_window_lcb(GtkWidget *widget, Tbfw_dynmenu *bdm) {
1195
gtk_window_present(GTK_WINDOW(BFWIN(bdm->data)->main_window));
1197
static void add_window_entry(Tbfwin *menubfwin, Tbfwin *tobfwin) {
1198
const gchar *winname;
1199
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
1200
bdm->bfwin = menubfwin;
1201
bdm->data = tobfwin;
1202
winname = gtk_window_get_title(GTK_WINDOW(tobfwin->main_window));
1203
DEBUG_MSG("add_window_entry, menubfwin=%p, bdm=%p with title %s\n",menubfwin,bdm,winname);
1204
bdm->menuitem = create_dynamic_menuitem(menubfwin,_("/Windows"),winname,G_CALLBACK(menu_window_lcb),(gpointer)bdm,-1);
1205
DEBUG_MSG("add_window_entry, menuitem=%p\n",bdm->menuitem);
1206
menubfwin->menu_windows = g_list_append(menubfwin->menu_windows, bdm);
1208
void add_window_entry_to_all_windows(Tbfwin *tobfwin) {
1209
GList *tmplist = g_list_first(main_v->bfwinlist);
1211
if (tmplist->data != tobfwin) {
1212
add_window_entry(BFWIN(tmplist->data), tobfwin);
1214
tmplist = g_list_next(tmplist);
1217
void add_allwindows_entries_to_window(Tbfwin *menubfwin) {
1218
GList *tmplist = g_list_first(main_v->bfwinlist);
1220
if (tmplist->data != menubfwin) {
1221
add_window_entry(menubfwin, BFWIN(tmplist->data));
1223
tmplist = g_list_next(tmplist);
1226
void remove_window_entry_from_all_windows(Tbfwin *tobfwin) {
1227
GList *tmplist = g_list_first(main_v->bfwinlist);
1229
remove_window_entry_from_window(BFWIN(tmplist->data), tobfwin);
1230
tmplist = g_list_next(tmplist);
1232
remove_all_window_entries_in_window(tobfwin);
1234
void rename_window_entry_in_all_windows(Tbfwin *tobfwin, gchar *newtitle) {
1235
GList *tmplist = g_list_first(main_v->bfwinlist);
1237
rename_window_entry_from_window(BFWIN(tmplist->data), tobfwin, newtitle);
1238
tmplist = g_list_next(tmplist);
1246
static void view_in_browser(Tbfwin *bfwin, gchar *browser) {
1247
if (bfwin->current_document->filename) {
1248
Tconvert_table *table, *tmpt;
1250
table = tmpt = g_new(Tconvert_table, 2);
1252
if (bfwin->project && bfwin->project->webdir
1253
&& bfwin->project->basedir && strlen(bfwin->project->webdir)>2
1254
&& strlen(bfwin->project->basedir)>2
1255
&& strncmp(bfwin->current_document->filename, bfwin->project->basedir, strlen(bfwin->project->basedir))==0
1257
tmpt->my_char = g_strconcat(bfwin->project->webdir, &bfwin->current_document->filename[strlen(bfwin->project->basedir)], NULL);
1259
tmpt->my_char = g_strdup(bfwin->current_document->filename);
1262
tmpt->my_char = NULL;
1263
command = replace_string_printflike(browser, table);
1264
g_free(table->my_char);
1266
DEBUG_MSG("view_in_browser, should start %s now\n", command);
1270
warning_dialog(bfwin->main_window,_("Could not view file in browser, the file does not yet have a name\n"), NULL);
1274
void browser_toolbar_cb(GtkWidget *widget, Tbfwin *bfwin) {
1275
GList *tmplist = g_list_first(main_v->props.browsers);
1276
if (tmplist && tmplist->data) {
1277
gchar **arr = tmplist->data;
1278
DEBUG_MSG("first browser in main_v->props.browsers(%p) is %s with command %s\n", main_v->props.browsers, arr[0], arr[1]);
1279
view_in_browser(bfwin,arr[1]);
1283
static void browser_lcb(GtkWidget *widget, Tbfw_dynmenu *bdm) {
1284
gchar **arr = (gchar **)bdm->data;
1285
if (!bdm->bfwin->current_document->filename || bdm->bfwin->current_document->modified) {
1286
file_save_cb(NULL, bdm->bfwin);
1288
view_in_browser(bdm->bfwin,arr[1]);
1290
static void external_command_lcb(GtkWidget *widget, Tbfw_dynmenu *bdm) {
1291
gchar *secure_tempname = NULL, *secure_tempname2 = NULL;
1292
gboolean need_s=FALSE, need_f=FALSE, need_i=FALSE;
1293
gchar **arr = (gchar **)bdm->data;
1295
* %s - current document filename
1296
* %f - output filename that we need to read after the command has finished (filter)
1297
* %i - input filename for the filter
1299
need_f = (strstr(arr[1], "%f") != NULL);
1300
need_i = (strstr(arr[1], "%i") != NULL);
1301
need_s = (strstr(arr[1], "%s") != NULL);
1304
file_save_cb(NULL, bdm->bfwin);
1305
if (!bdm->bfwin->current_document->filename) {
1308
if (bdm->bfwin->current_document->filename[0] == '/'){
1309
/* for local files we chdir() to their directory */
1310
gchar *tmpstring = g_path_get_dirname(bdm->bfwin->current_document->filename);
1315
if (need_f || need_s || need_i) {
1317
Tconvert_table *table, *tmpt;
1318
table = tmpt = g_new(Tconvert_table, 4);
1320
DEBUG_MSG("adding 's' to table\n");
1322
tmpt->my_char = bdm->bfwin->current_document->filename;
1326
secure_tempname = create_secure_dir_return_filename();
1327
DEBUG_MSG("adding 'f' to table\n");
1329
tmpt->my_char = secure_tempname;
1334
GtkTextIter itstart, itend;
1335
gtk_text_buffer_get_bounds(bdm->bfwin->current_document->buffer,&itstart,&itend);
1336
secure_tempname2 = create_secure_dir_return_filename();
1337
DEBUG_MSG("adding 'i' to table\n");
1339
tmpt->my_char = secure_tempname2;
1341
/* now we also save the current filename (or in the future the selection) to this file */
1342
buffer = gtk_text_buffer_get_text(bdm->bfwin->current_document->buffer,&itstart,&itend,FALSE);
1343
buffer_to_file(BFWIN(bdm->bfwin), buffer, secure_tempname2);
1346
tmpt->my_char = NULL;
1347
command = replace_string_printflike(arr[1], table);
1355
/* empty textbox and fill from file secure_tempname */
1356
end = doc_get_max_offset(bdm->bfwin->current_document);
1357
suc6 = g_file_get_contents(secure_tempname, &buf, NULL, NULL);
1360
doc_replace_text(bdm->bfwin->current_document, buf, 0, end);
1365
if (secure_tempname) remove_secure_dir_and_filename(secure_tempname);
1366
if (secure_tempname2) remove_secure_dir_and_filename(secure_tempname2);
1368
DEBUG_MSG("external_command_lcb, about to start %s\n", arr[1]);
1373
* external_menu_rebuild:
1376
* rebuild the browsers, external commands and outputbox menu's
1378
* Return value: void
1380
void external_menu_rebuild(Tbfwin *bfwin) {
1383
/* first cleanup all menu's */
1384
tmplist = g_list_first(bfwin->menu_external);
1386
Tbfw_dynmenu *bdm = (Tbfw_dynmenu *)tmplist->data;
1387
DEBUG_MSG("external_menu_rebuild,destroying,bfwin=%p,bdm=%p,menuitem=%p\n",bfwin,bdm,bdm->menuitem);
1388
gtk_widget_destroy(bdm->menuitem);
1390
tmplist = g_list_next(tmplist);
1392
g_list_free(bfwin->menu_external);
1393
bfwin->menu_external = NULL;
1395
tmplist = g_list_first(bfwin->menu_outputbox);
1397
gtk_widget_destroy(BFW_DYNMENU(tmplist->data)->menuitem);
1398
g_free(BFW_DYNMENU(tmplist->data));
1399
tmplist = g_list_next(tmplist);
1401
g_list_free(bfwin->menu_outputbox);
1402
bfwin->menu_outputbox = NULL;
1404
if (main_v->props.ext_outputbox_in_submenu) {
1405
create_parent_and_tearoff(N_("/External/Outputbox/"), gtk_item_factory_from_widget(bfwin->menubar));
1407
if (main_v->props.ext_commands_in_submenu) {
1408
create_parent_and_tearoff(N_("/External/Commands/"), gtk_item_factory_from_widget(bfwin->menubar));
1410
if (main_v->props.ext_browsers_in_submenu) {
1411
create_parent_and_tearoff(N_("/External/Browsers/"), gtk_item_factory_from_widget(bfwin->menubar));
1414
if (!main_v->props.ext_browsers_in_submenu) {
1415
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
1416
bdm->menuitem = dynamic_menu_append_spacing(bfwin,N_("/External"));
1417
bfwin->menu_external = g_list_append(bfwin->menu_external,bdm);
1419
tmplist = g_list_first(main_v->props.browsers);
1421
gchar **arr = tmplist->data;
1425
if (count_array(arr)==2) {
1426
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
1428
if (main_v->props.ext_browsers_in_submenu) {
1429
tmp1 = N_("/External/Browsers");
1431
tmp1 = N_("/External");
1435
DEBUG_MSG("external_menu_rebuild,Adding browser %s with command %s to the menu at %s\n", arr[0], arr[1], tmp1);
1436
bdm->menuitem = create_dynamic_menuitem(bfwin,tmp1,arr[0],G_CALLBACK(browser_lcb),bdm,-1);
1437
DEBUG_MSG("external_menu_rebuild,creating,bfwin=%p,bdm=%p,menuitem=%p\n",bfwin,bdm,bdm->menuitem);
1438
bfwin->menu_external = g_list_append(bfwin->menu_external, bdm);
1442
DEBUG_MSG("need count=2 for browser menu! %p has count %d\n", arr, count_array(arr));
1445
tmplist = g_list_next(tmplist);
1448
if (!main_v->props.ext_commands_in_submenu) {
1449
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
1450
bdm->menuitem = dynamic_menu_append_spacing(bfwin,N_("/External"));
1451
bfwin->menu_external = g_list_append(bfwin->menu_external,bdm);
1454
tmplist = g_list_first(main_v->props.external_commands);
1456
gchar **arr = tmplist->data;
1460
if (count_array(arr)==2) {
1462
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
1463
if (main_v->props.ext_commands_in_submenu) {
1464
tmp1 = N_("/External/Commands");
1466
tmp1 = N_("/External");
1470
bdm->menuitem = create_dynamic_menuitem(bfwin,tmp1,arr[0],G_CALLBACK(external_command_lcb),bdm,-1);
1471
bfwin->menu_external = g_list_append(bfwin->menu_external, bdm);
1473
tmplist = g_list_next(tmplist);
1477
if (!main_v->props.ext_outputbox_in_submenu) {
1478
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
1479
bdm->menuitem = dynamic_menu_append_spacing(bfwin,N_("/External"));
1480
bfwin->menu_outputbox = g_list_append(bfwin->menu_outputbox, bdm);
1483
tmplist = g_list_first(main_v->props.outputbox);
1485
gchar **arr = tmplist->data;
1486
/* outputbox(gchar *pattern, gint file_subpat, gint line_subpat, gint output_subpat, gchar *command, gboolean show_all_output)
1489
* arr[2] = file subpattern
1490
* arr[3] = line subpattern
1491
* arr[4] = output subpattern
1493
* arr[6] = show_all_output
1495
if (count_array(arr)==7) {
1496
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
1498
if (main_v->props.ext_outputbox_in_submenu) {
1499
tmp1 = N_("/External/Outputbox");
1501
tmp1 = N_("/External");
1505
bdm->menuitem = create_dynamic_menuitem(bfwin,tmp1,arr[0],G_CALLBACK(menu_outputbox_lcb),(gpointer)bdm,-1);
1506
bfwin->menu_outputbox = g_list_append(bfwin->menu_outputbox,bdm);
1508
tmplist = g_list_next(tmplist);
1512
static void menu_current_document_encoding_change(GtkMenuItem *menuitem,Tbfw_dynmenu *bdm) {
1513
if (GTK_CHECK_MENU_ITEM(menuitem)->active) {
1514
gchar *encoding = (gchar *)bdm->data;
1515
Tbfwin *bfwin = bdm->bfwin;
1516
if (encoding && (!bfwin->current_document->encoding || strcmp(encoding,bfwin->current_document->encoding)!=0)) {
1517
if (bfwin->current_document->encoding) {
1518
g_free(bfwin->current_document->encoding);
1520
bfwin->current_document->encoding = g_strdup(encoding);
1521
if (main_v->props.auto_set_encoding_meta) {
1522
update_encoding_meta_in_file(bfwin->current_document, bfwin->current_document->encoding);
1524
doc_set_statusbar_editmode_encoding(bfwin->current_document);
1525
DEBUG_MSG("menu_current_document_encoding_change, set to %s\n", encoding);
1530
void encoding_menu_rebuild(Tbfwin *bfwin) {
1532
GtkWidget *parent_menu;
1534
tmplist = g_list_first(bfwin->menu_encodings);
1536
Tbfw_dynmenu *bdm = tmplist->data;
1537
gtk_widget_destroy(GTK_WIDGET(bdm->menuitem));
1539
tmplist = g_list_next(tmplist);
1541
g_list_free(bfwin->menu_encodings);
1542
bfwin->menu_encodings = NULL;
1544
tmplist = g_list_last(main_v->props.encodings);
1545
parent_menu = gtk_item_factory_get_widget(gtk_item_factory_from_widget(bfwin->menubar), N_("/Document/Character Encoding"));
1547
gchar **strarr = (gchar **)tmplist->data;
1548
if (count_array(strarr)==2) {
1549
Tbfw_dynmenu *bdm = g_new(Tbfw_dynmenu,1);
1550
bdm->menuitem = gtk_radio_menu_item_new_with_label(group, strarr[0]);
1551
bdm->data = strarr[1];
1553
g_signal_connect(G_OBJECT(bdm->menuitem), "activate",G_CALLBACK(menu_current_document_encoding_change), (gpointer) bdm);
1554
gtk_widget_show(bdm->menuitem);
1555
gtk_menu_insert(GTK_MENU(parent_menu), bdm->menuitem, 1);
1556
group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(bdm->menuitem));
1557
bfwin->menu_encodings = g_list_append(bfwin->menu_encodings, bdm);
1559
tmplist = g_list_previous(tmplist);
1563
void menu_current_document_set_toggle_wo_activate(Tbfwin *bfwin, Tfiletype *filetype, gchar *encoding) {
1564
Tbfw_dynmenu *bdm = find_bfw_dynmenu_by_data_in_list(bfwin->menu_filetypes, filetype);
1565
if (bdm && filetype && bdm->menuitem && !GTK_CHECK_MENU_ITEM(bdm->menuitem)->active) {
1566
DEBUG_MSG("setting widget from hlset %p active\n", bfwin->current_document->hl);
1567
g_signal_handler_disconnect(G_OBJECT(bdm->menuitem),bdm->signal_id);
1568
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(bdm->menuitem), TRUE);
1569
bdm->signal_id = g_signal_connect(G_OBJECT(bdm->menuitem), "activate",G_CALLBACK(menu_current_document_type_change), (gpointer) bdm);
1573
DEBUG_MSG("widget from filetype %p is already active, or filetype does not have a widget!!\n", bfwin->current_document->hl);
1578
tmplist = g_list_first(main_v->props.encodings);
1580
gchar **tmparr = (gchar **)tmplist->data;
1581
if (strcmp(tmparr[1], encoding)==0) {
1582
Tbfw_dynmenu *bdm = find_bfw_dynmenu_by_data_in_list(bfwin->menu_encodings, tmparr[1]);
1584
g_signal_handlers_block_matched(G_OBJECT(bdm->menuitem), G_SIGNAL_MATCH_FUNC,
1585
0, 0, NULL, menu_current_document_encoding_change, NULL);
1586
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(bdm->menuitem),TRUE);
1587
g_signal_handlers_unblock_matched(G_OBJECT(bdm->menuitem), G_SIGNAL_MATCH_FUNC,
1588
0, 0, NULL, menu_current_document_encoding_change, NULL);
1592
tmplist = g_list_next(tmplist);
672
1601
#define MAX_TEXT_ENTRY 10
674
1602
typedef struct {
675
1603
GtkWidget *dialog;
676
1604
GtkWidget *textentry[MAX_TEXT_ENTRY];
679
1608
} Tcust_con_struc;
1611
GtkItemFactoryEntry entry;
682
Tcust_con_struc->array[0] = title / menupath
683
Tcust_con_struc->array[1] = type:
685
1 = custom search and replace
1618
instead of having one list where both insert and replace types have their
1619
place, I changed that to 2 arraylists:
1620
main_v->props.cmenu_insert
1621
main_v->props.cmenu_replace
688
Tcust_con_struc->array[2] = formatstring before, containing %0, %1... that should be replaced by the
1624
array[0] = title / menupath
1625
array[1] = formatstring before, containing %0, %1... that should be replaced by the
689
1626
values from the dialog
690
Tcust_con_struc->array[3] = formatstring after
691
Tcust_con_struc->array[4] = number of variables from the dialog
692
Tcust_con_struc->array[5..] = the description of those variables
1627
array[2] = formatstring after
1628
array[3] = number of variables from the dialog
1629
array[4..] = the description of those variables
694
** for search and replace **
695
Tcust_con_struc->array[2] = search pattern, containing %0 etc.
696
Tcust_con_struc->array[3] = replace pattern, containing %0 etc.
697
Tcust_con_struc->array[4] = replace where:
700
2 = selection (selection required)
701
3 = all open documents
703
Tcust_con_struc->array[5] = replace type:
705
1 = regular expression
706
Tcust_con_struc->array[6] = case sensitivity:
709
Tcust_con_struc->array[7] = number of variables from the dialog
710
Tcust_con_struc->array[8..] = the description of those variables
1632
array[0] = title / menupath
1633
array[1] = search pattern, containing %0 etc.
1634
array[2] = replace pattern, containing %0 etc.
1635
array[3] = replace where:
1638
2 = selection (selection required)
1639
3 = all open documents
1641
array[4] = replace type:
1643
1 = regular expression
1644
array[5] = case sensitivity:
1647
array[6] = number of variables from the dialog
1648
array[7..] = the description of those variables
714
static gchar *replace_with(gchar numc, gchar **array) {
717
numi = ((int) numc) -48;
718
for (i=0; array[i] != NULL; i++) {
719
DEBUG_MSG("replace_with, i=%d, searching for numi=%d\n", i, numi);
721
DEBUG_MSG("replace_with, returning %d= %s\n", i, array[i]);
729
static gchar *replace_string(gchar *in_string, gchar **array) {
731
gchar *found, *search_in, *freestr;
732
gchar *newstring, *tmpnewstring, *begin, *replace_w;
734
newstring = g_strdup("");
735
freestr = search_in = begin = g_strdup(in_string);
736
while ( (search_in) && (found = strchr(search_in, '%')) ) {
737
DEBUG_MSG("replace_string, found=%s, search_in=%s\n", found, search_in);
739
DEBUG_MSG("replace_string, char=%c\n", *tmp3);
741
DEBUG_MSG("replace_string, char=%c\n", *tmp3);
742
if ((replace_w = replace_with(*tmp3, array))) {
744
tmpnewstring = newstring;
745
newstring = g_strconcat(tmpnewstring, begin, replace_w, NULL);
746
DEBUG_MSG("replace_string, newstring=%s\n", newstring);
747
g_free(tmpnewstring);
750
} else if (*tmp3 == '\0') {
751
DEBUG_MSG("replace_string, *tmp3 = \\0, found end of string\n");
755
DEBUG_MSG("replace_string, search_in=%s\n", search_in);
758
tmpnewstring = newstring;
759
newstring = g_strconcat(tmpnewstring, begin,NULL);
760
DEBUG_MSG("replace_string, newstring=%s\n", newstring);
761
g_free(tmpnewstring);
767
static void cust_con_struc_dialog_destroy_lcb(GtkWidget *widget, GdkEvent *event, Tcust_con_struc *ccs) {
1651
static void cust_con_struc_dialog_destroy_lcb(GtkWidget *widget, Tcust_con_struc *ccs) {
768
1652
window_destroy(ccs->dialog);
772
1656
static void cust_con_struc_dialog_cancel_lcb(GtkWidget *widget, gpointer data) {
773
cust_con_struc_dialog_destroy_lcb(NULL, NULL, data);
1657
cust_con_struc_dialog_destroy_lcb(NULL, data);
776
1660
static void cust_con_struc_dialog_ok_lcb(GtkWidget *widget, Tcust_con_struc *ccs) {
1661
Tconvert_table *table, *tmpt;
778
1662
gint num_vars, i;
780
1664
DEBUG_MSG("cust_con_struc_dialog_ok_lcb, ccs at %p\n", ccs);