~ubuntu-branches/ubuntu/trusty/bluefish/trusty

« back to all changes in this revision

Viewing changes to src/plugin_htmlbar/html_table.c

  • Committer: Package Import Robot
  • Author(s): Daniel Leidert
  • Date: 2012-06-27 22:28:39 UTC
  • mfrom: (1.2.9)
  • Revision ID: package-import@ubuntu.com-20120627222839-5g0f5s6gpaezfhve
Tags: 2.2.3-1
* New upstream release.
* debian/control: Dropped DM-Upload-Allowed.
  (Maintainer): Set to my new address.
  (Suggests): Calculate browsers depending on distribution.
  (Depends): Added python depends for newly shipped Python scripts.
* debian/copyright: Minor update. Link to GPLv2 text.
* debian/rules: Enabled hardening. Added python2 module. Calculate brwoser
  dependencies via dpkg-vendor.
* debian/patches/LP810663_blacklist_from_appmenu.patch: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "../stringlist.h"
33
33
 
34
34
static void
 
35
table_border_clicked_lcb(GtkWidget * checkbutton, Thtml_diag * dg)
 
36
{
 
37
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton))){
 
38
                gtk_widget_set_sensitive(dg->spin[4], FALSE);
 
39
                gtk_widget_set_sensitive(dg->check[2], FALSE);
 
40
        } else {
 
41
                gtk_widget_set_sensitive(dg->spin[4], TRUE);
 
42
                gtk_widget_set_sensitive(dg->check[2], TRUE);
 
43
        }
 
44
}
 
45
 
 
46
static void
35
47
tabledialogok_lcb(GtkWidget * widget, Thtml_diag * dg)
36
48
{
37
49
        gchar *thestring, *finalstring;
38
50
 
39
51
        thestring = g_strdup(cap("<TABLE"));
40
 
        thestring = insert_string_if_entry(GTK_ENTRY(dg->spin[1]), cap("CELLPADDING"), thestring, NULL);
41
 
        thestring = insert_string_if_entry(GTK_ENTRY(dg->spin[3]), cap("CELLSPACING"), thestring, NULL);
42
 
        thestring = insert_string_if_entry(GTK_ENTRY(dg->spin[4]), cap("BORDER"), thestring, NULL);
 
52
        thestring = insert_integer_if_spin(dg->spin[1], cap("CELLPADDING"), thestring,
 
53
                                                           gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[4])), 0);                                                      
 
54
        thestring = insert_integer_if_spin(dg->spin[3], cap("CELLSPACING"), thestring,
 
55
                                                           gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[5])), 0);   
 
56
        if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[3]))) {
 
57
                thestring = insert_attr_if_checkbox(dg->check[3],
 
58
                        main_v->props.xhtml == 1 ? cap("BORDER=\"border\"") : cap("BORDER"), thestring);
 
59
        } else {        thestring =     insert_integer_if_spin(dg->spin[4], cap("BORDER"), thestring,
 
60
                                                           gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[2])), 0);
 
61
        }                                                  
43
62
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[1]), cap("ALIGN"), thestring, NULL);
44
 
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[2]), cap("VALIGN"), thestring, NULL);
45
63
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[3]), cap("BGCOLOR"), thestring, NULL);
46
 
        thestring =
47
 
                insert_integer_if_spin(dg->spin[2], cap("WIDTH"), thestring,
 
64
        thestring =     insert_integer_if_spin(dg->spin[2], cap("WIDTH"), thestring,
48
65
                                                           gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[1])), 0);
49
 
        thestring =
50
 
                insert_string_if_entry(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(dg->combo[4]))), cap("CLASS"), thestring,
51
 
                                                           NULL);
 
66
        thestring =     insert_string_if_entry(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(dg->combo[4]))), cap("CLASS"), 
 
67
                                                                thestring, NULL);
 
68
        thestring =     insert_string_if_entry(GTK_ENTRY(dg->entry[3]), cap("ID"), thestring, NULL);
52
69
        thestring = insert_string_if_entry(GTK_ENTRY(dg->entry[2]), cap("STYLE"), thestring, NULL);
53
70
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[5]), cap("FRAME"), thestring, NULL);
54
71
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[6]), cap("RULES"), thestring, NULL);
70
87
void
71
88
tabledialog_dialog(Tbfwin * bfwin, Ttagpopup * data)
72
89
{
73
 
        GList *alignlist = NULL, *popuplist;
 
90
        GList *alignlist = NULL, *popuplist = NULL;
74
91
        GtkWidget *var_but, *dgtable;
75
92
 
76
93
        static gchar *tagitems[] =
77
 
                { "cellpadding", "cellspacing", "border", "align", "valign", "bgcolor", "width", "class", "style",
78
 
"rules", "frame", NULL
 
94
                { "cellpadding", "cellspacing", "border", "align", "bgcolor", "width", "class", "style",
 
95
"rules", "frame", "id", NULL
79
96
        };
80
 
        gchar *tagvalues[12];
 
97
        gchar *tagvalues[13];
81
98
        gchar *custom = NULL;
82
99
        Thtml_diag *dg;
83
100
 
86
103
 
87
104
        dgtable = html_diag_table_in_vbox(dg, 5, 8);
88
105
 
89
 
        dg->spin[1] = spinbut_with_value(tagvalues[0], 0, 100, 1.0, 5.0);
90
 
        dialog_mnemonic_label_in_table(_("Cell _Padding:"), dg->spin[1], dgtable, 0, 1, 0, 1);
 
106
        dg->spin[1] = spinbut_with_value(NULL, 0, 100, 1.0, 5.0);
 
107
        dg->check[4] = gtk_check_button_new_with_label("%");
 
108
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">Cell _Padding:</span>"), 
 
109
                                dg->spin[1], dgtable, 0, 1, 0, 1);
91
110
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[1], 1, 2, 0, 1);
 
111
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->check[4], 2, 3, 0, 1);
 
112
        /*g_print("cell padding='%s'\n",tagvalues[0]);*/
 
113
        parse_integer_for_dialog(tagvalues[0], dg->spin[1], NULL, dg->check[4]);
92
114
 
93
 
        dg->spin[3] = spinbut_with_value(tagvalues[1], 0, 100, 1.0, 5.0);
94
 
        dialog_mnemonic_label_in_table(_("C_ell Spacing:"), dg->spin[3], dgtable, 0, 1, 1, 2);
 
115
        dg->spin[3] = spinbut_with_value(NULL, 0, 100, 1.0, 5.0);
 
116
        dg->check[5] = gtk_check_button_new_with_label("%");
 
117
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">C_ell Spacing:</span>"), 
 
118
                                dg->spin[3], dgtable, 0, 1, 1, 2);
95
119
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[3], 1, 2, 1, 2);
96
 
 
97
 
        dg->combo[4] = combobox_with_popdown_sized(tagvalues[7], bfwin->session->classlist, 1, 80);
 
120
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->check[5], 2, 3, 1, 2);
 
121
        parse_integer_for_dialog(tagvalues[1], dg->spin[3], NULL, dg->check[5]);
 
122
 
 
123
        dg->entry[3] = dialog_entry_in_table(tagvalues[10], dgtable, 4, 5, 1, 2);
 
124
        dialog_mnemonic_label_in_table(_("_Id:"), dg->entry[3], dgtable, 3, 4, 1, 2);
 
125
 
 
126
        dg->combo[4] = html_diag_combobox_with_popdown_sized(tagvalues[6], bfwin->session->classlist, 1, 90);
98
127
        dialog_mnemonic_label_in_table(_("Cl_ass:"), dg->combo[4], dgtable, 0, 1, 2, 3);
99
128
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[4], 1, 2, 2, 3);
100
129
 
101
 
        dg->entry[2] = dialog_entry_in_table(tagvalues[8], dgtable, 1, 4, 3, 4);
 
130
        dg->entry[2] = dialog_entry_in_table(tagvalues[7], dgtable, 1, 4, 3, 4);
102
131
        dialog_mnemonic_label_in_table(_("St_yle:"), dg->entry[2], dgtable, 0, 1, 3, 4);
103
132
        var_but = style_but_new(dg->entry[2], dg->dialog);
104
133
        gtk_table_attach_defaults(GTK_TABLE(dgtable), var_but, 4, 5, 3, 4);
106
135
        dg->entry[1] = dialog_entry_in_table(custom, dgtable, 1, 5, 4, 5);
107
136
        dialog_mnemonic_label_in_table(_("Custo_m:"), dg->entry[1], dgtable, 0, 1, 4, 5);
108
137
 
 
138
        alignlist = g_list_append(NULL, "");
109
139
        alignlist = g_list_append(alignlist, "left");
110
140
        alignlist = g_list_append(alignlist, "right");
111
141
        alignlist = g_list_append(alignlist, "center");
112
 
        dg->combo[1] = combobox_with_popdown_sized(tagvalues[3], alignlist, 0, 80);
113
 
        g_list_free(alignlist);
114
 
        dialog_mnemonic_label_in_table(_("Ali_gn:"), dg->combo[1], dgtable, 2, 3, 0, 1);
115
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[1], 3, 5, 0, 1);
116
 
 
117
 
        alignlist = NULL;
118
 
        alignlist = g_list_insert(alignlist, "top", 0);
119
 
        alignlist = g_list_insert(alignlist, "middle", 1);
120
 
        alignlist = g_list_insert(alignlist, "bottom", 2);
121
 
        alignlist = g_list_insert(alignlist, "texttop", 3);
122
 
        alignlist = g_list_insert(alignlist, "baseline", 4);
123
 
        alignlist = g_list_insert(alignlist, "absmiddle", 5);
124
 
        alignlist = g_list_insert(alignlist, "absbottom", 6);
125
 
        dg->combo[2] = combobox_with_popdown_sized(tagvalues[4], alignlist, 1, 80);
126
 
        g_list_free(alignlist);
127
 
 
128
 
        dialog_mnemonic_label_in_table(_("_Valign:"), dg->combo[2], dgtable, 2, 3, 1, 2);
129
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[2], 3, 5, 1, 2);
130
 
 
131
 
        dg->combo[3] = combobox_with_popdown_sized(tagvalues[5], bfwin->session->colorlist, 1, 80);
 
142
        dg->combo[1] = html_diag_combobox_with_popdown_sized(tagvalues[3], alignlist, 0, 90);
 
143
        g_list_free(alignlist);
 
144
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">_Align:</span>"), dg->combo[1], dgtable, 3, 4, 0, 1);
 
145
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[1], 4, 5, 0, 1);
 
146
 
 
147
        dg->combo[3] = html_diag_combobox_with_popdown_sized(tagvalues[4], bfwin->session->colorlist, 1, 90);
132
148
        var_but = color_but_new(gtk_bin_get_child(GTK_BIN(dg->combo[3])), dg->dialog);
133
 
        dialog_mnemonic_label_in_table(_("Backgrou_nd Color:"), dg->combo[3], dgtable, 2, 3, 2, 3);
 
149
        dialog_mnemonic_label_in_table(_("<span color=\"red\">_bgcolor:</span>"), dg->combo[3], dgtable, 2, 3, 2, 3);
134
150
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[3], 3, 4, 2, 3);
135
151
        gtk_table_attach_defaults(GTK_TABLE(dgtable), var_but, 4, 5, 2, 3);
136
152
 
137
153
        dg->spin[2] = spinbut_with_value(NULL, 0, 10000, 1.0, 5.0);
138
154
        dg->check[1] = gtk_check_button_new_with_label("%");
139
 
        dialog_mnemonic_label_in_table(_("_Width:"), dg->spin[2], dgtable, 5, 6, 0, 1);
 
155
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">_Width:</span>"), dg->spin[2], dgtable, 5, 6, 0, 1);
140
156
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[2], 6, 7, 0, 1);
141
157
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->check[1], 7, 8, 0, 1);
142
 
        parse_integer_for_dialog(tagvalues[6], dg->spin[2], NULL, dg->check[1]);
143
 
 
144
 
        dg->spin[4] = spinbut_with_value(tagvalues[2], 0, 100, 1.0, 5.0);
145
 
        dialog_mnemonic_label_in_table(_("Bo_rder:"), dg->spin[4], dgtable, 5, 6, 1, 2);
146
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[4], 6, 8, 1, 2);
 
158
        parse_integer_for_dialog(tagvalues[5], dg->spin[2], NULL, dg->check[1]);
 
159
 
 
160
        dg->spin[4] = spinbut_with_value(NULL, 0, 100, 1.0, 5.0);
 
161
        dg->check[2] = gtk_check_button_new_with_label("%");
 
162
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">Bo_rder:</span>"), dg->spin[4], dgtable, 5, 6, 1, 2);
 
163
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[4], 6, 7, 1, 2);
 
164
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->check[2], 7, 8, 1, 2);
 
165
        parse_integer_for_dialog(tagvalues[2], dg->spin[4], NULL, dg->check[2]);
 
166
 
 
167
        dg->check[3] = gtk_check_button_new();
 
168
        dialog_mnemonic_label_in_table(_("<span color=\"#A36A00\">_Border:</span>"), dg->check[3], dgtable, 5,6, 2,3);
 
169
        g_signal_connect(dg->check[3], "clicked", G_CALLBACK(table_border_clicked_lcb), dg);
 
170
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->check[3], 6,7, 2,3);  
147
171
 
148
172
        popuplist = g_list_append(NULL, "");
149
173
        popuplist = g_list_append(popuplist, "void");
155
179
        popuplist = g_list_append(popuplist, "rhs");
156
180
        popuplist = g_list_append(popuplist, "box");
157
181
        popuplist = g_list_append(popuplist, "border");
158
 
        dg->combo[5] = combobox_with_popdown_sized(tagvalues[10], popuplist, 0, 80);
159
 
        dialog_mnemonic_label_in_table(_("_Frame:"), dg->combo[5], dgtable, 5, 6, 2, 3);
160
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[5], 6, 8, 2, 3);
 
182
        dg->combo[5] = html_diag_combobox_with_popdown_sized(tagvalues[9], popuplist, 0, 90);
 
183
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">_Frame:</span>"), dg->combo[5], dgtable, 5, 6, 3, 4);
 
184
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[5], 6, 8, 3, 4);
161
185
        g_list_free(popuplist);
162
186
 
163
187
        popuplist = g_list_append(NULL, "");
166
190
        popuplist = g_list_append(popuplist, "rows");
167
191
        popuplist = g_list_append(popuplist, "cols");
168
192
        popuplist = g_list_append(popuplist, "all");
169
 
        dg->combo[6] = combobox_with_popdown_sized(tagvalues[9], popuplist, 0, 80);
170
 
        dialog_mnemonic_label_in_table(_("R_ules:"), dg->combo[6], dgtable, 5, 6, 3, 4);
171
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[6], 6, 8, 3, 4);
 
193
        dg->combo[6] = html_diag_combobox_with_popdown_sized(tagvalues[8], popuplist, 0, 90);
 
194
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">R_ules:</span>"), dg->combo[6], dgtable, 5, 6, 4, 5);
 
195
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[6], 6, 8, 4, 5);
172
196
        g_list_free(popuplist);
173
197
 
174
198
        html_diag_finish(dg, G_CALLBACK(tabledialogok_lcb));
183
207
        gchar *thestring, *finalstring;
184
208
 
185
209
        thestring = g_strdup(cap("<TR"));
186
 
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[2]), cap("ALIGN"), thestring, NULL);
 
210
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[1]), cap("ALIGN"), thestring, NULL);
187
211
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[2]), cap("VALIGN"), thestring, NULL);
188
212
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[3]), cap("BGCOLOR"), thestring, NULL);
189
213
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[4]), cap("CLASS"), thestring, NULL);
220
244
 
221
245
        dgtable = html_diag_table_in_vbox(dg, 4, 5);
222
246
 
 
247
        alignlist = g_list_append(NULL, "");
223
248
        alignlist = g_list_insert(alignlist, "left", 0);
224
249
        alignlist = g_list_insert(alignlist, "right", 1);
225
250
        alignlist = g_list_insert(alignlist, "center", 2);
226
 
        dg->combo[1] = combobox_with_popdown_sized(tagvalues[0], alignlist, 0, 90);
 
251
        dg->combo[1] = html_diag_combobox_with_popdown_sized(tagvalues[0], alignlist, 0, 90);
227
252
        g_list_free(alignlist);
228
 
        dialog_mnemonic_label_in_table(_("Ali_gn:"), dg->combo[1], dgtable, 0, 1, 0, 1);
 
253
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">_Align:</span>"), dg->combo[1], dgtable, 0, 1, 0, 1);
229
254
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(dg->combo[1]), 1, 2, 0, 1);
230
255
 
231
 
        alignlist = NULL;
 
256
        alignlist = g_list_append(NULL, "");
232
257
        alignlist = g_list_insert(alignlist, "top", 0);
233
258
        alignlist = g_list_insert(alignlist, "middle", 1);
234
259
        alignlist = g_list_insert(alignlist, "bottom", 2);
235
 
        alignlist = g_list_insert(alignlist, "texttop", 3);
236
 
        alignlist = g_list_insert(alignlist, "baseline", 4);
237
 
        alignlist = g_list_insert(alignlist, "absmiddle", 5);
238
 
        alignlist = g_list_insert(alignlist, "absbottom", 6);
239
 
        dg->combo[2] = combobox_with_popdown_sized(tagvalues[1], alignlist, 0, 90);
 
260
        alignlist = g_list_insert(alignlist, "baseline", 3);
 
261
        dg->combo[2] = html_diag_combobox_with_popdown_sized(tagvalues[1], alignlist, 0, 90);
240
262
        g_list_free(alignlist);
241
263
 
242
 
        dialog_mnemonic_label_in_table(_("_Valign:"), dg->combo[2], dgtable, 0, 1, 1, 2);
 
264
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">_Valign:</span>"), dg->combo[2], dgtable, 0, 1, 1, 2);
243
265
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[2])), 1, 2, 1, 2);
244
266
 
245
 
        dg->combo[4] = combobox_with_popdown_sized(tagvalues[3], bfwin->session->classlist, 1, 90);
 
267
        dg->combo[4] = html_diag_combobox_with_popdown_sized(tagvalues[3], bfwin->session->classlist, 1, 90);
246
268
        dialog_mnemonic_label_in_table(_("Cl_ass:"), dg->combo[4], dgtable, 2, 3, 0, 1);
247
269
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->combo[4], 3, 5, 0, 1);
248
270
 
249
 
        dg->combo[3] = combobox_with_popdown_sized(tagvalues[2], bfwin->session->colorlist, 1, 90);
 
271
        dg->combo[3] = html_diag_combobox_with_popdown_sized(tagvalues[2], bfwin->session->colorlist, 1, 90);
250
272
        color_but = color_but_new(gtk_bin_get_child(GTK_BIN(dg->combo[3])), dg->dialog);
251
 
        dialog_mnemonic_label_in_table(_("Backgrou_nd Color:"), dg->combo[3], dgtable, 2, 3, 1, 2);
 
273
        dialog_mnemonic_label_in_table(_("<span color=\"red\">_bgcolor:</span>"), dg->combo[3], dgtable, 2, 3, 1, 2);
252
274
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[3])), 3, 4, 1, 2);
253
275
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(color_but), 4, 5, 1, 2);
254
276
 
276
298
                thestring = g_strdup(cap("<TD"));
277
299
        } else {
278
300
                thestring = g_strdup(cap("<TH"));
 
301
                thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[5]), cap("SCOPE"), thestring, NULL);
279
302
        }
280
 
        thestring =
281
 
                insert_integer_if_spin(dg->spin[1], cap("WIDTH"), thestring,
282
 
                                                           gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[2])), 0);
283
 
        thestring =
284
 
                insert_integer_if_spin(dg->spin[3], cap("HEIGHT"), thestring,
285
 
                                                           gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[3])), 0);
 
303
        thestring = insert_string_if_entry(GTK_ENTRY(dg->entry[3]), cap("HEADERS"), thestring, NULL);
286
304
        thestring = insert_integer_if_spin(dg->spin[5], cap("COLSPAN"), thestring, FALSE, 0);
287
305
        thestring = insert_integer_if_spin(dg->spin[4], cap("ROWSPAN"), thestring, FALSE, 0);
 
306
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[4]), cap("CLASS"), thestring, NULL);
 
307
        thestring = insert_string_if_entry(GTK_ENTRY(dg->entry[2]), cap("STYLE"), thestring, NULL);
 
308
        thestring =     insert_integer_if_spin(dg->spin[1], cap("WIDTH"), thestring,
 
309
                                                        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[2])), 0);
 
310
        thestring =     insert_integer_if_spin(dg->spin[3], cap("HEIGHT"), thestring,
 
311
                                                        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dg->check[3])), 0);
288
312
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[1]), cap("ALIGN"), thestring, NULL);
289
313
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[2]), cap("VALIGN"), thestring, NULL);
290
314
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[3]), cap("BGCOLOR"), thestring, NULL);
291
 
        thestring = insert_string_if_combobox(GTK_COMBO_BOX(dg->combo[4]), cap("CLASS"), thestring, NULL);
292
 
        thestring =
293
 
                insert_attr_if_checkbox(dg->check[1],
294
 
                                                                main_v->props.xhtml == 1 ? cap("NOWRAP=\"nowrap\"") : cap("NOWRAP"),
295
 
                                                                thestring);
296
 
        thestring = insert_string_if_entry(GTK_ENTRY(dg->entry[2]), cap("STYLE"), thestring, NULL);
 
315
        thestring = insert_attr_if_checkbox(dg->check[1],
 
316
                                                        main_v->props.xhtml == 1 ? cap("NOWRAP=\"nowrap\"") : cap("NOWRAP"), thestring);
297
317
        thestring = insert_string_if_entry(GTK_ENTRY(dg->entry[1]), NULL, thestring, NULL);
298
318
        finalstring = g_strconcat(thestring, ">", NULL);
299
319
        g_free(thestring);
329
349
        GList *alignlist = NULL;
330
350
 
331
351
        static gchar *tagitems[] =
332
 
                { "width", "align", "colspan", "height", "valign", "rowspan", "bgcolor", "nowrap", "class", "style",
333
 
NULL
 
352
                { "width", "align", "colspan", "height", "valign", "rowspan", "bgcolor", "nowrap", "class", "style", 
 
353
                "headers", "scope", NULL
334
354
        };
335
 
        gchar *tagvalues[11];
 
355
        gchar *tagvalues[12];
336
356
        gchar *custom = NULL;
337
357
        Thtml_diag *dg;
338
358
        GtkWidget *dgtable, *var_but;
345
365
 
346
366
        fill_dialogvalues(tagitems, tagvalues, &custom, (Ttagpopup *) data, dg);
347
367
 
348
 
        dgtable = html_diag_table_in_vbox(dg, 5, 7);
 
368
        dgtable = html_diag_table_in_vbox(dg, 6, 7);
349
369
 
 
370
        alignlist = g_list_append(NULL, "");
350
371
        alignlist = g_list_insert(alignlist, "left", 0);
351
372
        alignlist = g_list_insert(alignlist, "right", 1);
352
373
        alignlist = g_list_insert(alignlist, "center", 2);
353
374
        alignlist = g_list_insert(alignlist, "justify", 3);
354
 
        dg->combo[1] = combobox_with_popdown_sized(tagvalues[1], alignlist, 1, 80);
 
375
        dg->combo[1] = html_diag_combobox_with_popdown_sized(tagvalues[1], alignlist, 0, 90);
355
376
        g_list_free(alignlist);
356
 
        dialog_mnemonic_label_in_table(_("Ali_gn:"), dg->combo[1], dgtable, 0, 1, 0, 1);
357
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[1])), 1, 2, 0, 1);
 
377
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">_Align:</span>"), dg->combo[1], dgtable, 2, 3, 0, 1);
 
378
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[1])), 3, 4, 0, 1);
358
379
 
359
 
        alignlist = NULL;
 
380
        alignlist = g_list_append(NULL, "");
360
381
        alignlist = g_list_insert(alignlist, "top", 0);
361
382
        alignlist = g_list_insert(alignlist, "middle", 1);
362
383
        alignlist = g_list_insert(alignlist, "bottom", 2);
363
 
        alignlist = g_list_insert(alignlist, "texttop", 3);
364
 
        alignlist = g_list_insert(alignlist, "baseline", 4);
365
 
        alignlist = g_list_insert(alignlist, "absmiddle", 5);
366
 
        alignlist = g_list_insert(alignlist, "absbottom", 6);
367
 
        dg->combo[2] = combobox_with_popdown_sized(tagvalues[4], alignlist, 1, 90);
 
384
        alignlist = g_list_insert(alignlist, "baseline", 3);
 
385
        dg->combo[2] = html_diag_combobox_with_popdown_sized(tagvalues[4], alignlist, 0, 90);
368
386
        g_list_free(alignlist);
369
387
 
370
 
        dialog_mnemonic_label_in_table(_("_Valign:"), dg->combo[2], dgtable, 0, 1, 1, 2);
371
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[2])), 1, 2, 1, 2);
 
388
        dialog_mnemonic_label_in_table(_("<span color=\"#006000\">_Valign:</span>"), dg->combo[2], dgtable, 2, 3, 1, 2);
 
389
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[2])), 3, 4, 1, 2);
372
390
 
373
 
        dg->combo[4] = combobox_with_popdown_sized(tagvalues[8], bfwin->session->classlist, 1, 80);
 
391
        dg->combo[4] = html_diag_combobox_with_popdown_sized(tagvalues[8], bfwin->session->classlist, 1, 90);
374
392
        dialog_mnemonic_label_in_table(_("Cl_ass:"), dg->combo[4], dgtable, 0, 1, 2, 3);
375
393
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[4])), 1, 2, 2, 3);
376
394
 
377
 
        dg->entry[2] = dialog_entry_in_table(tagvalues[9], dgtable, 1, 6, 3, 4);
378
 
        dialog_mnemonic_label_in_table(_("St_yle:"), dg->entry[2], dgtable, 0, 1, 3, 4);
 
395
        dg->entry[3] = dialog_entry_in_table(tagvalues[10], dgtable, 1, 4, 3, 4);
 
396
        dialog_mnemonic_label_in_table(_("<span color=\"#A36A00\">_Headers:</span>"), dg->entry[3], dgtable, 0, 1, 3, 4);
 
397
        gtk_widget_set_tooltip_text(dg->entry[3],_("Set of space-separated IDs of th elements."));
 
398
 
 
399
        if (type == 0) {
 
400
                alignlist = g_list_append(NULL, "");
 
401
                alignlist = g_list_insert(alignlist, "row", 0);
 
402
                alignlist = g_list_insert(alignlist, "col", 1);
 
403
                alignlist = g_list_insert(alignlist, "rowgroup", 2);
 
404
                alignlist = g_list_insert(alignlist, "colgroup", 3);
 
405
                alignlist = g_list_insert(alignlist, "auto", 4);                
 
406
                dg->combo[5] = html_diag_combobox_with_popdown_sized(tagvalues[11], alignlist, 0, 90);
 
407
                g_list_free(alignlist);
 
408
                dialog_mnemonic_label_in_table(_("<span color=\"#A36A00\">_Scope:</span>"), dg->combo[5], dgtable, 4, 5, 3, 4);
 
409
                gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[5])), 5, 6, 3, 4);
 
410
                gtk_widget_set_tooltip_text(dg->combo[5],_("the header cell applies to cells in the same:"));
 
411
        }
 
412
 
 
413
        dg->entry[2] = dialog_entry_in_table(tagvalues[9], dgtable, 1, 6, 4, 5);
 
414
        dialog_mnemonic_label_in_table(_("St_yle:"), dg->entry[2], dgtable, 0, 1, 4, 5);
379
415
        var_but = style_but_new(dg->entry[2], dg->dialog);
380
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), var_but, 6, 7, 3, 4);
 
416
        gtk_table_attach_defaults(GTK_TABLE(dgtable), var_but, 6, 7, 4, 5);
381
417
 
382
 
        dg->entry[1] = dialog_entry_in_table(custom, dgtable, 1, 7, 4, 5);
383
 
        dialog_mnemonic_label_in_table(_("Custo_m:"), dg->entry[1], dgtable, 0, 1, 4, 5);
 
418
        dg->entry[1] = dialog_entry_in_table(custom, dgtable, 1, 7, 5,6);
 
419
        dialog_mnemonic_label_in_table(_("Custo_m:"), dg->entry[1], dgtable, 0, 1, 5, 6);
384
420
 
385
421
        dg->spin[5] = spinbut_with_value(tagvalues[2], 0, 100, 1.0, 2.0);
386
 
        dialog_mnemonic_label_in_table(_("Co_l Span:"), dg->spin[5], dgtable, 2, 3, 0, 1);
387
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[5], 3, 4, 0, 1);
 
422
        dialog_mnemonic_label_in_table(_("Co_l Span:"), dg->spin[5], dgtable, 0, 1, 0, 1);
 
423
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[5], 1, 2, 0, 1);
388
424
 
389
425
        dg->spin[4] = spinbut_with_value(tagvalues[5], 0, 100, 1.0, 5.0);
390
 
        dialog_mnemonic_label_in_table(_("_Row Span:"), dg->spin[4], dgtable, 2, 3, 1, 2);
391
 
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[4], 3, 4, 1, 2);
 
426
        dialog_mnemonic_label_in_table(_("_Row Span:"), dg->spin[4], dgtable, 0, 1, 1, 2);
 
427
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[4], 1, 2, 1, 2);
392
428
 
393
429
        dg->check[1] = gtk_check_button_new();
394
430
        parse_existence_for_dialog(tagvalues[7], dg->check[1]);
395
 
        dialog_mnemonic_label_in_table(_("No Wra_p:"), dg->check[1], dgtable, 2, 3, 2, 3);
 
431
        dialog_mnemonic_label_in_table(_("<span color=\"red\">No _Wrap:</span>"), dg->check[1], dgtable, 2, 3, 2, 3);
396
432
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->check[1], 3, 4, 2, 3);
397
433
 
398
434
        dg->spin[1] = spinbut_with_value(NULL, 0, 10000, 1.0, 5.0);
399
435
        dg->check[2] = gtk_check_button_new_with_label("%");
400
436
        parse_integer_for_dialog(tagvalues[0], dg->spin[1], NULL, dg->check[2]);
401
 
        dialog_mnemonic_label_in_table(_("_Width:"), dg->spin[1], dgtable, 4, 5, 0, 1);
 
437
        dialog_mnemonic_label_in_table(_("<span color=\"red\">_Width:</span>"), dg->spin[1], dgtable, 4, 5, 0, 1);
402
438
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[1], 5, 6, 0, 1);
403
439
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->check[2], 6, 7, 0, 1);
404
440
 
405
441
        dg->spin[3] = spinbut_with_value(NULL, 0, 10000, 1.0, 5.0);
406
442
        dg->check[3] = gtk_check_button_new_with_label("%");
407
443
        parse_integer_for_dialog(tagvalues[3], dg->spin[3], NULL, dg->check[3]);
408
 
        dialog_mnemonic_label_in_table(_("_Height:"), dg->spin[3], dgtable, 4, 5, 1, 2);
 
444
        dialog_mnemonic_label_in_table(_("<span color=\"red\">_Height:</span>"), dg->spin[3], dgtable, 4, 5, 1, 2);
409
445
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->spin[3], 5, 6, 1, 2);
410
446
        gtk_table_attach_defaults(GTK_TABLE(dgtable), dg->check[3], 6, 7, 1, 2);
411
447
 
412
 
        dg->combo[3] = combobox_with_popdown_sized(tagvalues[6], bfwin->session->colorlist, 1, 80);
413
 
        dialog_mnemonic_label_in_table(_("Backgrou_nd Color:"), dg->combo[3], dgtable, 4, 5, 2, 3);
 
448
        dg->combo[3] = html_diag_combobox_with_popdown_sized(tagvalues[6], bfwin->session->colorlist, 1, 90);
 
449
        dialog_mnemonic_label_in_table(_("<span color=\"red\">_bgcolor:</span>"), dg->combo[3], dgtable, 4, 5, 2, 3);
414
450
        gtk_table_attach_defaults(GTK_TABLE(dgtable), GTK_WIDGET(GTK_BIN(dg->combo[3])), 5, 6, 2, 3);
415
451
        gtk_table_attach_defaults(GTK_TABLE(dgtable),
416
452
                                                          GTK_WIDGET(color_but_new(gtk_bin_get_child(GTK_BIN(dg->combo[3])), dg->dialog)),