aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-12-31 20:14:08 -0800
committerGuy Harris <guy@alum.mit.edu>2016-01-01 04:15:29 +0000
commitee9f102aa9ec36b28992512d840f971be4eba571 (patch)
tree8251e2c26ba9f6c3680633a03901dd386c3d349d /epan/prefs.c
parent93f9416c3660b87896e8b59a4d952fb851002bb5 (diff)
No need for toolkit-dependent color initialization.
We're not allocating colors ourselves in GTK+ (and haven't been doing so since at least 1.12), and all color_t values are valid colors, so we don't need any toolkit-specific processing to fill in a color_t. While we're at it, catch read errors when reading color filter files. Change-Id: Ieb520d141cf15e371a31a01459d466c95ba2209b Reviewed-on: https://code.wireshark.org/review/12985 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index 0d8b53fc61..e94df06ccb 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -3810,6 +3810,10 @@ prefs_capture_options_dialog_column_is_visible(const gchar *column)
#define PRS_GUI_FILTER_EXPR "gui.filter_expressions.expr"
#define PRS_GUI_FILTER_ENABLED "gui.filter_expressions.enabled"
+/*
+ * Extract the red, green, and blue components of a 24-bit RGB value
+ * and convert them from [0,255] to [0,65535].
+ */
#define RED_COMPONENT(x) (guint16) (((((x) >> 16) & 0xff) * 65535 / 255))
#define GREEN_COMPONENT(x) (guint16) (((((x) >> 8) & 0xff) * 65535 / 255))
#define BLUE_COMPONENT(x) (guint16) ( (((x) & 0xff) * 65535 / 255))