diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-11 17:00:05 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-12 01:01:46 +0000 |
commit | b8b77aecc38f8ada88de78939e4d35d0fa535bd4 (patch) | |
tree | 8e4920303bff3e98213c8c527d9485ba85a0c59b /ui/gtk/prefs_font_color.c | |
parent | 2ebfa30ffd8c5ef76d06f1705cb7e7797bda954a (diff) | |
download | wireshark-b8b77aecc38f8ada88de78939e4d35d0fa535bd4.tar.gz |
Clamp zooming so that we don't get zero or negative font sizes.
Those are obviously wrong.
Also, clean up some stuff left over from the GTK+ 1.x days; GTK+ 2.x
doesn't expose raw XLFD font names, it lets you specify a font by name
and size, and font_zoom() doesn't determine whether the font is
resizeable - it just constructs a new font name/size pair and leaves it
up to its callers to try to load the font, so "there's no such font as
Wingdings Gothic" and "you can't blow up Fraktur to 10 million points"
both show up as errors loading the font by name.
Bug: 8854
Change-Id: I6af142c75c9ebabd1a95308c203f8cb1f36dd82f
Reviewed-on: https://code.wireshark.org/review/12549
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk/prefs_font_color.c')
-rw-r--r-- | ui/gtk/prefs_font_color.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/gtk/prefs_font_color.c b/ui/gtk/prefs_font_color.c index f6325b7c0f..fafe0f07b9 100644 --- a/ui/gtk/prefs_font_color.c +++ b/ui/gtk/prefs_font_color.c @@ -507,9 +507,8 @@ font_color_prefs_apply(GtkWidget *w _U_, gboolean redissect) case FA_SUCCESS: break; - case FA_FONT_NOT_RESIZEABLE: - /* "user_font_apply()" popped up an alert box. */ - /* turn off zooming - font can't be resized */ + case FA_ZOOMED_TOO_FAR: + /* zoomed too far - turn off zooming */ recent.gui_zoom_level = 0; break; |