2 * Font and Color preferences widget
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 #include <epan/proto.h>
30 #include <epan/prefs.h>
34 #include <ui/recent.h>
35 #include <ui/simple_dialog.h>
37 #include "color_utils.h"
38 #include "follow_tcp.h"
39 #include "font_utils.h"
40 #include "gui_utils.h"
42 #include "old-gtk-compat.h"
43 #include "packet_panes.h"
44 #include "prefs_font_color.h"
47 /* Hack to use GtkColorSelection [GdkColor) or GtkColorChooser [GdkRGBA] */
48 /* (The code to use GtkColorSelection or GtkColorChooser is almost 1 for 1) */
49 #if GTK_CHECK_VERSION(3,4,0)
50 typedef GdkRGBA GdkXxx
;
51 #define color_t_to_gdkxxx color_t_to_gdkRGBAcolor
52 #define gdkxxx_to_color_t gdkRGBAcolor_to_color_t
53 #define TAG_PROP_FG_COLOR "foreground-rgba"
54 #define TAG_PROP_BG_COLOR "background-rgba"
55 #define GTK_COLOR_XXX GTK_COLOR_CHOOSER
56 #define gtk_color_xxx_new gtk_color_chooser_widget_new
57 #define gtk_color_xxx_get_yyy gtk_color_chooser_get_rgba
58 #define gtk_color_xxx_set_yyy gtk_color_chooser_set_rgba
59 #define COLOR_CHANGED_SIGNAL "notify::rgba"
61 typedef GdkColor GdkXxx
;
62 #define color_t_to_gdkxxx color_t_to_gdkcolor
63 #define gdkxxx_to_color_t gdkcolor_to_color_t
64 #define TAG_PROP_FG_COLOR "foreground-gdk"
65 #define TAG_PROP_BG_COLOR "background-gdk"
66 #define gtk_color_xxx_new gtk_color_selection_new
67 #define gtk_color_xxx_get_yyy gtk_color_selection_get_current_color
68 #define gtk_color_xxx_set_yyy gtk_color_selection_set_current_color
69 #define GTK_COLOR_XXX GTK_COLOR_SELECTION
70 #define COLOR_CHANGED_SIGNAL "notify::current-color"
74 #define SAMPLE_MARKED_TEXT "Sample marked packet text\n"
75 #define SAMPLE_IGNORED_TEXT "Sample ignored packet text\n"
76 #define SAMPLE_CLIENT_TEXT "Sample 'Follow Stream' client text\n"
77 #define SAMPLE_SERVER_TEXT "Sample 'Follow Stream' server text\n"
78 #define SAMPLE_TEXT_VALID_TEXT "Sample valid filter text\n"
79 #define SAMPLE_TEXT_INVALID_TEXT "Sample invalid filter text\n"
80 #define SAMPLE_TEXT_DEPRECATED_TEXT "Sample deprecated filter text\n"
93 #define MAX_IDX 11 /* set this to the number of IDX values */
95 #define COLOR_SAMPLE_KEY "text_color_sample"
96 #define FONT_SAMPLE_KEY "font_sample"
97 #define STREAM_CS_KEY "stream_colorselection"
99 static void select_font(GtkWidget
*, gpointer
);
100 static void update_font(PangoFontDescription
*, GtkWidget
*, GtkWidget
*);
101 static void update_text_color(GObject
*obj
, GParamSpec
*pspec
, gpointer data
);
102 static void update_current_color(GtkWidget
*, gpointer
);
104 static const color_t filter_text_fg_color
= {0, 0, 0, 0}; /* black */
105 static GdkXxx tcolors
[MAX_IDX
], filter_text_fg
, *curcolor
= NULL
;
107 #if ! GTK_CHECK_VERSION(3,4,0)
108 static GdkXxx tcolors_orig
[MAX_IDX
];
111 /* Set to FALSE initially; set to TRUE if the user ever hits "OK" on
112 the "Font..." dialog, so that we know that they (probably) changed
113 the font, and therefore that the "apply" function needs to take care
115 static gboolean font_changed
;
117 /* Font name from the font dialog box; if "font_changed" is TRUE, this
118 has been set to the name of the font the user selected. */
119 static gchar
*new_font_name
;
121 static GtkWidget
*font_button
;
123 static const char *font_pangrams
[] = {
124 "Example GIF query packets have jumbo window sizes",
125 "Lazy badgers move unique waxy jellyfish packets"
127 #define NUM_FONT_PANGRAMS (sizeof font_pangrams / sizeof font_pangrams[0])
131 font_color_prefs_show(void)
133 GtkWidget
*main_vb
, *main_grid
, *label
, *combo_box
;
134 GtkWidget
*font_sample
, *color_sample
, *colorsel
;
135 static const gchar
*mt
[] = {
136 "Marked packet foreground", /* MFG_IDX 0*/
137 "Marked packet background", /* MBG_IDX 1*/
138 "Ignored packet foreground", /* IFG_IDX 2*/
139 "Ignored packet background", /* IBG_IDX 3*/
140 "'Follow Stream' client foreground", /* CFG_IDX 4*/
141 "'Follow Stream' client background", /* CBG_IDX 5*/
142 "'Follow Stream' server foreground", /* SFG_IDX 6*/
143 "'Follow Stream' server background", /* SBG_IDX 7*/
144 "Valid filter text entry", /* FTV_IDX 8*/
145 "Invalid filter text entry", /* FTI_IDX 9*/
146 "Deprecated filter text entry" /* FTD_IDX 10*/
148 int mcount
= sizeof(mt
) / sizeof (gchar
*);
151 GRand
*rand_state
= g_rand_new();
152 GString
*preview_string
= g_string_new("");
155 #define GRID_FONT_ROW 0
156 #define GRID_COLOR_ROW 1
157 #define GRID_COLOR_SEL_ROW 3
159 /* The font hasn't been changed yet. */
160 font_changed
= FALSE
;
162 color_t_to_gdkxxx(&tcolors
[MFG_IDX
], &prefs
.gui_marked_fg
);
163 color_t_to_gdkxxx(&tcolors
[MBG_IDX
], &prefs
.gui_marked_bg
);
164 color_t_to_gdkxxx(&tcolors
[IFG_IDX
], &prefs
.gui_ignored_fg
);
165 color_t_to_gdkxxx(&tcolors
[IBG_IDX
], &prefs
.gui_ignored_bg
);
166 color_t_to_gdkxxx(&tcolors
[CFG_IDX
], &prefs
.st_client_fg
);
167 color_t_to_gdkxxx(&tcolors
[CBG_IDX
], &prefs
.st_client_bg
);
168 color_t_to_gdkxxx(&tcolors
[SFG_IDX
], &prefs
.st_server_fg
);
169 color_t_to_gdkxxx(&tcolors
[SBG_IDX
], &prefs
.st_server_bg
);
170 color_t_to_gdkxxx(&tcolors
[FTV_IDX
], &prefs
.gui_text_valid
);
171 color_t_to_gdkxxx(&tcolors
[FTI_IDX
], &prefs
.gui_text_invalid
);
172 color_t_to_gdkxxx(&tcolors
[FTD_IDX
], &prefs
.gui_text_deprecated
);
173 color_t_to_gdkxxx(&filter_text_fg
, &filter_text_fg_color
);
175 #if ! GTK_CHECK_VERSION(3,4,0)
176 for (i
=0; i
<MAX_IDX
; i
++) {
177 tcolors_orig
[i
] = tcolors
[i
];
181 curcolor
= &tcolors
[CFG_IDX
];
183 /* Enclosing containers for each row of widgets */
184 main_vb
= ws_gtk_box_new(GTK_ORIENTATION_VERTICAL
, 5, FALSE
);
185 gtk_container_set_border_width(GTK_CONTAINER(main_vb
), 5);
187 main_grid
= ws_gtk_grid_new();
188 gtk_box_pack_start(GTK_BOX(main_vb
), main_grid
, FALSE
, FALSE
, 0);
189 ws_gtk_grid_set_row_spacing(GTK_GRID(main_grid
), 40);
190 ws_gtk_grid_set_column_spacing(GTK_GRID(main_grid
), 15);
191 gtk_widget_show(main_grid
);
193 label
= gtk_label_new("Main window font:");
194 gtk_misc_set_alignment(GTK_MISC(label
), 1.0f
, 0.5f
);
195 ws_gtk_grid_attach_extended(GTK_GRID(main_grid
), label
,
196 0, GRID_FONT_ROW
, 1, 1,
197 (GtkAttachOptions
)(GTK_EXPAND
|GTK_FILL
), (GtkAttachOptions
)0, 0, 0);
198 gtk_widget_show(label
);
200 font_button
= gtk_font_button_new_with_font(prefs
.gui_gtk2_font_name
);
201 gtk_font_button_set_title(GTK_FONT_BUTTON(font_button
), "Wireshark: Font");
202 ws_gtk_grid_attach(GTK_GRID(main_grid
), font_button
,
203 1, GRID_FONT_ROW
, 1, 1);
204 gtk_widget_show(font_button
);
206 g_string_printf(preview_string
, " %s 0123456789",
207 font_pangrams
[g_rand_int_range(rand_state
, 0, NUM_FONT_PANGRAMS
)]);
209 font_sample
= gtk_text_view_new();
210 gtk_text_view_set_editable(GTK_TEXT_VIEW(font_sample
), FALSE
);
211 buf
= gtk_text_view_get_buffer(GTK_TEXT_VIEW(font_sample
));
212 gtk_text_buffer_get_start_iter(buf
, &iter
);
213 srand((unsigned int) time(NULL
));
214 gtk_text_buffer_insert(buf
, &iter
, preview_string
->str
, -1);
215 ws_gtk_grid_attach_extended(GTK_GRID(main_grid
), font_sample
,
216 2, GRID_FONT_ROW
, 1, 1,
217 (GtkAttachOptions
)(GTK_EXPAND
|GTK_FILL
), (GtkAttachOptions
)0, 0, 0);
218 g_signal_connect(font_button
, "font-set", G_CALLBACK(select_font
), NULL
);
219 gtk_widget_show(font_sample
);
221 g_string_free(preview_string
, TRUE
);
222 g_object_set_data(G_OBJECT(font_button
), FONT_SAMPLE_KEY
, font_sample
);
224 label
= gtk_label_new("Colors:");
225 gtk_misc_set_alignment(GTK_MISC(label
), 1.0f
, 0.5f
);
226 ws_gtk_grid_attach_extended(GTK_GRID(main_grid
), label
,
227 0, GRID_COLOR_ROW
, 1, 1,
228 (GtkAttachOptions
)(GTK_EXPAND
|GTK_FILL
), (GtkAttachOptions
)0, 0,0);
229 gtk_widget_show(label
);
231 /* We have to create this now, and configure it below. */
233 #if GTK_CHECK_VERSION(3,4,0)
234 /* XXX: There appears to be a bug in the GTK3 GtkColorChooserWidget such that
235 * when in the GtkColorChooserWidget "customize" mode (aka "color-edit" mode)
236 * selecting a color doesn't trigger a "motify::rgba" callback.
237 * The effect is that the sample text FG/BG colors don't update for the GTK3
238 * GtkColorChooserWidget in "custon color edit node").
239 * I expect use of the "customize mode" will be minimal and that the bug will
240 * not be very noticeable.
241 * (A GTK3 bug report has beem submitted.
244 colorsel
= gtk_color_xxx_new();
246 combo_box
= gtk_combo_box_text_new();
247 for (i
= 0; i
< mcount
; i
++){
248 gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box
), mt
[i
]);
250 gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box
), CFG_IDX
);
251 g_signal_connect(combo_box
, "changed", G_CALLBACK(update_current_color
), colorsel
);
252 ws_gtk_grid_attach(GTK_GRID(main_grid
), combo_box
,
253 1, GRID_COLOR_ROW
, 1, 1);
255 gtk_widget_show(combo_box
);
257 color_sample
= gtk_text_view_new();
258 update_font(user_font_get_regular(), font_sample
, color_sample
);
259 gtk_text_view_set_editable(GTK_TEXT_VIEW(color_sample
), FALSE
);
260 buf
= gtk_text_view_get_buffer(GTK_TEXT_VIEW(color_sample
));
261 gtk_text_buffer_get_start_iter(buf
, &iter
);
263 gtk_text_buffer_create_tag(buf
, "marked",
264 TAG_PROP_FG_COLOR
, &tcolors
[MFG_IDX
],
265 TAG_PROP_BG_COLOR
, &tcolors
[MBG_IDX
],
267 gtk_text_buffer_create_tag(buf
, "ignored",
268 TAG_PROP_FG_COLOR
, &tcolors
[IFG_IDX
],
269 TAG_PROP_BG_COLOR
, &tcolors
[IBG_IDX
],
271 gtk_text_buffer_create_tag(buf
, "client",
272 TAG_PROP_FG_COLOR
, &tcolors
[CFG_IDX
],
273 TAG_PROP_BG_COLOR
, &tcolors
[CBG_IDX
],
275 gtk_text_buffer_create_tag(buf
, "server",
276 TAG_PROP_FG_COLOR
, &tcolors
[SFG_IDX
],
277 TAG_PROP_BG_COLOR
, &tcolors
[SBG_IDX
],
279 gtk_text_buffer_create_tag(buf
, "text_valid",
280 TAG_PROP_FG_COLOR
, &filter_text_fg
,
281 TAG_PROP_BG_COLOR
, &tcolors
[FTV_IDX
],
283 gtk_text_buffer_create_tag(buf
, "text_invalid",
284 TAG_PROP_FG_COLOR
, &filter_text_fg
,
285 TAG_PROP_BG_COLOR
, &tcolors
[FTI_IDX
],
287 gtk_text_buffer_create_tag(buf
, "text_deprecated",
288 TAG_PROP_FG_COLOR
, &filter_text_fg
,
289 TAG_PROP_BG_COLOR
, &tcolors
[FTD_IDX
],
292 gtk_text_buffer_insert_with_tags_by_name(buf
, &iter
, SAMPLE_MARKED_TEXT
, -1,
294 gtk_text_buffer_insert_with_tags_by_name(buf
, &iter
, SAMPLE_IGNORED_TEXT
, -1,
296 gtk_text_buffer_insert_with_tags_by_name(buf
, &iter
, SAMPLE_CLIENT_TEXT
, -1,
298 gtk_text_buffer_insert_with_tags_by_name(buf
, &iter
, SAMPLE_SERVER_TEXT
, -1,
300 gtk_text_buffer_insert_with_tags_by_name(buf
, &iter
, SAMPLE_TEXT_VALID_TEXT
, -1,
302 gtk_text_buffer_insert_with_tags_by_name(buf
, &iter
, SAMPLE_TEXT_INVALID_TEXT
, -1,
303 "text_invalid", NULL
);
304 gtk_text_buffer_insert_with_tags_by_name(buf
, &iter
, SAMPLE_TEXT_DEPRECATED_TEXT
, -1,
305 "text_deprecated", NULL
);
307 ws_gtk_grid_attach_extended(GTK_GRID(main_grid
), color_sample
,
308 2, GRID_COLOR_ROW
, 1, 2,
309 (GtkAttachOptions
)(GTK_EXPAND
|GTK_FILL
), (GtkAttachOptions
)0, 0, 0);
310 gtk_widget_show(color_sample
);
312 gtk_color_xxx_set_yyy(GTK_COLOR_XXX(colorsel
), curcolor
);
313 ws_gtk_grid_attach_extended(GTK_GRID(main_grid
), colorsel
,
314 1, GRID_COLOR_SEL_ROW
, 2, 1,
315 (GtkAttachOptions
)(GTK_FILL
|GTK_EXPAND
), (GtkAttachOptions
)0, 0, 0);
317 g_object_set_data(G_OBJECT(combo_box
), COLOR_SAMPLE_KEY
, color_sample
);
318 g_object_set_data(G_OBJECT(colorsel
), COLOR_SAMPLE_KEY
, color_sample
);
319 g_signal_connect(colorsel
, COLOR_CHANGED_SIGNAL
, G_CALLBACK(update_text_color
), NULL
);
320 gtk_widget_show(colorsel
);
322 g_rand_free(rand_state
);
323 gtk_widget_show(main_vb
);
329 update_font(PangoFontDescription
*font
, GtkWidget
*font_sample _U_
, GtkWidget
*color_sample _U_
) {
331 if (!font_sample
|| !color_sample
)
334 #if GTK_CHECK_VERSION(3,0,0)
335 gtk_widget_override_font(font_sample
, font
);
336 gtk_widget_override_font(color_sample
, font
);
338 gtk_widget_modify_font(font_sample
, font
);
339 gtk_widget_modify_font(color_sample
, font
);
353 font_name
= g_strdup(gtk_font_button_get_font_name(
354 GTK_FONT_BUTTON(font_button
)));
355 if (font_name
== NULL
) {
356 /* No font was selected; let the user know, but don't
357 tear down the font selection dialog, so they can
359 simple_dialog(ESD_TYPE_ERROR
, ESD_BTN_OK
,
360 "You have not selected a font.");
364 if (!user_font_test(font_name
)) {
365 /* The font isn't usable; "user_font_test()" has already
366 told the user why. Don't tear down the font selection
371 new_font_name
= font_name
;
377 select_font(GtkWidget
*w
, gpointer data _U_
)
379 GtkWidget
*font_sample
= (GtkWidget
*)g_object_get_data(G_OBJECT(w
), FONT_SAMPLE_KEY
);
380 GtkWidget
*color_sample
= (GtkWidget
*)g_object_get_data(G_OBJECT(w
), COLOR_SAMPLE_KEY
);
381 const gchar
*font_name
;
383 if (!font_sample
|| !color_sample
)
386 font_name
= gtk_font_button_get_font_name(GTK_FONT_BUTTON(w
));
388 PangoFontDescription
*font
= pango_font_description_from_string(font_name
);
389 update_font(font
, font_sample
, color_sample
);
395 update_text_color(GObject
*obj
, GParamSpec
*pspec _U_
, gpointer data _U_
) {
396 GtkTextView
*sample
= (GtkTextView
*)g_object_get_data(G_OBJECT(obj
), COLOR_SAMPLE_KEY
);
400 gtk_color_xxx_get_yyy(GTK_COLOR_XXX(obj
), curcolor
); /* updates tcolors[xx] */
402 buf
= gtk_text_view_get_buffer(sample
);
404 tag
= gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buf
), "marked");
406 TAG_PROP_FG_COLOR
, &tcolors
[MFG_IDX
],
407 TAG_PROP_BG_COLOR
, &tcolors
[MBG_IDX
],
410 tag
= gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buf
), "ignored");
412 TAG_PROP_FG_COLOR
, &tcolors
[IFG_IDX
],
413 TAG_PROP_BG_COLOR
, &tcolors
[IBG_IDX
],
416 tag
= gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buf
), "client");
418 TAG_PROP_FG_COLOR
, &tcolors
[CFG_IDX
],
419 TAG_PROP_BG_COLOR
, &tcolors
[CBG_IDX
],
422 tag
= gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buf
), "server");
424 TAG_PROP_FG_COLOR
, &tcolors
[SFG_IDX
],
425 TAG_PROP_BG_COLOR
, &tcolors
[SBG_IDX
],
428 tag
= gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buf
), "text_valid");
430 TAG_PROP_FG_COLOR
, &filter_text_fg
,
431 TAG_PROP_BG_COLOR
, &tcolors
[FTV_IDX
],
434 tag
= gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buf
), "text_invalid");
436 TAG_PROP_FG_COLOR
, &filter_text_fg
,
437 TAG_PROP_BG_COLOR
, &tcolors
[FTI_IDX
],
440 tag
= gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buf
), "text_deprecated");
442 TAG_PROP_FG_COLOR
, &filter_text_fg
,
443 TAG_PROP_BG_COLOR
, &tcolors
[FTD_IDX
],
449 /* ComboBox selection changed (marked/ignored/... forground/background) */
451 update_current_color(GtkWidget
*combo_box
, gpointer data
)
453 GtkWidget
*colorsel
= (GtkWidget
*)data
;
454 GtkTextView
*color_sample
= (GtkTextView
*)g_object_get_data(G_OBJECT(combo_box
), COLOR_SAMPLE_KEY
);
458 i
= gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box
));
459 curcolor
= &tcolors
[i
];
461 #if ! GTK_CHECK_VERSION(3,4,0)
462 gtk_color_selection_set_previous_color(GTK_COLOR_SELECTION(colorsel
), &tcolors_orig
[i
]);
464 gtk_color_xxx_set_yyy(GTK_COLOR_XXX(colorsel
), curcolor
); /* triggers update_text_color() callback */
466 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(color_sample
), &iter
);
467 gtk_text_iter_set_line(&iter
, i
/2);
468 gtk_text_view_scroll_to_iter(color_sample
, &iter
, 0.0, FALSE
, 0, 0);
473 font_color_prefs_fetch(GtkWidget
*w _U_
)
475 gdkxxx_to_color_t(&prefs
.gui_marked_fg
, &tcolors
[MFG_IDX
]);
476 gdkxxx_to_color_t(&prefs
.gui_marked_bg
, &tcolors
[MBG_IDX
]);
477 gdkxxx_to_color_t(&prefs
.gui_ignored_fg
, &tcolors
[IFG_IDX
]);
478 gdkxxx_to_color_t(&prefs
.gui_ignored_bg
, &tcolors
[IBG_IDX
]);
479 gdkxxx_to_color_t(&prefs
.st_client_fg
, &tcolors
[CFG_IDX
]);
480 gdkxxx_to_color_t(&prefs
.st_client_bg
, &tcolors
[CBG_IDX
]);
481 gdkxxx_to_color_t(&prefs
.st_server_fg
, &tcolors
[SFG_IDX
]);
482 gdkxxx_to_color_t(&prefs
.st_server_bg
, &tcolors
[SBG_IDX
]);
483 gdkxxx_to_color_t(&prefs
.gui_text_valid
, &tcolors
[FTV_IDX
]);
484 gdkxxx_to_color_t(&prefs
.gui_text_invalid
, &tcolors
[FTI_IDX
]);
485 gdkxxx_to_color_t(&prefs
.gui_text_deprecated
, &tcolors
[FTD_IDX
]);
488 * XXX - we need to have a way to fetch the preferences into
489 * local storage and only set the permanent preferences if there
490 * weren't any errors in those fetches, as there are several
491 * places where there *can* be a bad preference value.
494 if (strcmp(new_font_name
, prefs
.gui_gtk2_font_name
) != 0) {
496 g_free(prefs
.gui_gtk2_font_name
);
497 prefs
.gui_gtk2_font_name
= g_strdup(new_font_name
);
504 font_color_prefs_apply(GtkWidget
*w _U_
, gboolean redissect
)
507 /* This redraws the packet bytes windows. */
508 switch (user_font_apply()) {
513 case FA_FONT_NOT_RESIZEABLE
:
514 /* "user_font_apply()" popped up an alert box. */
515 /* turn off zooming - font can't be resized */
516 recent
.gui_zoom_level
= 0;
519 case FA_FONT_NOT_AVAILABLE
:
520 /* We assume this means that the specified size
522 simple_dialog(ESD_TYPE_ERROR
, ESD_BTN_OK
,
523 "That font isn't available at the specified zoom level;\n"
524 "turning zooming off.");
525 recent
.gui_zoom_level
= 0;
528 } else if (!redissect
) {
529 /* Redraw the packet bytes windows, in case the
530 highlight style changed, only if we aren't redissecting the whole file.
531 XXX - do it only if the highlight style *did* change. */
532 redraw_packet_bytes_all();
535 follow_tcp_redraw_all();
540 font_color_prefs_destroy(GtkWidget
*w _U_
)
542 /* Free up any saved font name. */
543 if (new_font_name
!= NULL
) {
544 g_free(new_font_name
);
545 new_font_name
= NULL
;
551 * Editor modelines - http://www.wireshark.org/tools/modelines.html
556 * indent-tabs-mode: nil
559 * vi: set shiftwidth=2 tabstop=8 expandtab:
560 * :indentSize=2:tabSize=8:noTabs=true: