aboutsummaryrefslogtreecommitdiffstats
path: root/color_filters.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-07-10 16:15:55 -0700
committerGerald Combs <gerald@wireshark.org>2015-07-11 00:41:01 +0000
commitd564ea9bea6ba07ac601ca555609677b498845dd (patch)
tree1410ba5423017cf45c959e302a30e919475d6c88 /color_filters.c
parent44408ed5d9f39f49e871f302c97a6044c0fe4e7e (diff)
Qt: Add Colorize Conversation menu items.
Add the "View→Colorize Conversation" menu similar to the GTK+ UI. Add the "Reset" item under the "Colorize Conversation" menu instead of the top-level "View" menu. Make sure the "Reset" shortcut is Ctrl+Space even on OS X. Normally Qt would convert it to Cmd+Space, but that's used by Spotlight. Add StockIcon::colorIcon and use it to create filled square icons. Change-Id: I2af9e26d025cdaf97482422bbb9440e28e18d1ac Reviewed-on: https://code.wireshark.org/review/9595 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'color_filters.c')
-rw-r--r--color_filters.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/color_filters.c b/color_filters.c
index 834c626c26..bf417a93fd 100644
--- a/color_filters.c
+++ b/color_filters.c
@@ -149,7 +149,7 @@ color_filters_set_tmp(guint8 filt_nr, const gchar *filter, gboolean disabled)
gchar *err_msg;
guint8 i;
- /* Go through the tomporary filters and look for the same filter string.
+ /* Go through the temporary filters and look for the same filter string.
* If found, clear it so that a filter can be "moved" up and down the list
*/
for ( i=1 ; i<=10 ; i++ ) {
@@ -194,6 +194,22 @@ color_filters_set_tmp(guint8 filt_nr, const gchar *filter, gboolean disabled)
return;
}
+const color_filter_t *
+color_filters_tmp_color(guint8 filter_num) {
+ gchar *name;
+ color_filter_t *colorf = NULL;
+ GSList *cfl;
+
+ name = g_strdup_printf("%s%02d", CONVERSATION_COLOR_PREFIX, filter_num);
+ cfl = g_slist_find_custom(color_filter_list, name, color_filters_find_by_name_cb);
+ if (cfl) {
+ colorf = (color_filter_t *)cfl->data;
+ }
+ g_free(name);
+
+ return colorf;
+}
+
/* Reset the temporary colorfilters */
void
color_filters_reset_tmp(void)