summaryrefslogtreecommitdiff
path: root/ui/recent.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2014-04-29 11:10:27 -0400
committerMichael Mann <mmann78@netscape.net>2014-07-21 23:19:09 +0000
commit59ef97dd652131a6df0edd26cc8709461587a224 (patch)
treec3428c9388757895136b7ea43d168b1966feb68e /ui/recent.c
parentd81a34cc24598778d3f8073cf85027a777cbbc10 (diff)
downloadwireshark-59ef97dd652131a6df0edd26cc8709461587a224.tar.gz
[WIP] Add a conversation dialog.
Items are sorted by value. Move common conversation code to ui/conversation_hash.[ch]. Add a conversation_type_e enum along with convenience functions for fetching titles, tap names, etc. We have a single main dialog instead of a main dialog + individual protocol dialogs. It de-clutters the statistics menu and results in simpler code. Conversation type tabs can be added and removed within the dialog itself. The tab list is sticky and saved with the current profile when the dialog closes. Data can be copied as CSV or YAML. Add a FilterAction class and a corresponding filterAction slot to MainWindow. Use it for the Conversations context menu. Add an addressResolutionChanged signal and related plumbing. Get rid of the iterator members in the conversation item struct. Update the GTK+ code accordingly. Excercise for the reader: - Update TShark to use the common hash code. Ping-Bug: 9231 Ping-Bug: 8703 Ping-Bug: 6727 Change-Id: I8728d771fc5b1a85937bed9d898e53c3ecc3a544 Reviewed-on: https://code.wireshark.org/review/2987 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/recent.c')
-rw-r--r--ui/recent.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/ui/recent.c b/ui/recent.c
index bdb93e7c5c..7a67047463 100644
--- a/ui/recent.c
+++ b/ui/recent.c
@@ -74,7 +74,10 @@
#define RECENT_GUI_GEOMETRY_WLAN_STATS_PANE "gui.geometry_status_wlan_stats_pane"
#define RECENT_LAST_USED_PROFILE "gui.last_used_profile"
#define RECENT_GUI_FILEOPEN_REMEMBERED_DIR "gui.fileopen_remembered_dir"
+#define RECENT_GUI_CONVERSATION_TABS "gui.conversation_tabs"
+
#define RECENT_GUI_GEOMETRY "gui.geom."
+
#define RECENT_KEY_PRIVS_WARN_IF_ELEVATED "privs.warn_if_elevated"
#define RECENT_KEY_PRIVS_WARN_IF_NO_NPF "privs.warn_if_no_npf"
@@ -666,6 +669,7 @@ write_profile_recent(void)
{
char *pf_dir_path;
char *rf_path;
+ char *string_list;
FILE *rf;
/* To do:
@@ -790,6 +794,12 @@ write_profile_recent(void)
fprintf(rf, "# Each pair of strings consists of a column format and its pixel width.\n");
packet_list_recent_write_all(rf);
+ fprintf(rf, "\n# Open conversation dialog tabs.\n");
+ fprintf(rf, "# List of conversation names, e.g. \"TCP\", \"IPv6\".\n");
+ string_list = join_string_list(recent.conversation_tabs);
+ fprintf(rf, RECENT_GUI_CONVERSATION_TABS ": %s\n", string_list);
+ g_free(string_list);
+
if (get_last_open_dir() != NULL) {
fprintf(rf, "\n# Last directory navigated to in File Open dialog.\n");
@@ -1024,8 +1034,9 @@ read_set_recent_pair_static(gchar *key, const gchar *value,
return PREFS_SET_SYNTAX_ERR; /* number must be positive */
recent.gui_geometry_main_lower_pane = (gint)num;
recent.has_gui_geometry_main_lower_pane = TRUE;
- }
- else if (strcmp(key, RECENT_KEY_COL_WIDTH) == 0) {
+ } else if (strcmp(key, RECENT_GUI_CONVERSATION_TABS) == 0) {
+ recent.conversation_tabs = prefs_get_string_list(value);
+ } else if (strcmp(key, RECENT_KEY_COL_WIDTH) == 0) {
col_l = prefs_get_string_list(value);
if (col_l == NULL)
return PREFS_SET_SYNTAX_ERR;