diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2017-04-15 23:30:30 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2017-04-25 06:19:39 +0000 |
commit | 77751c94f17e2c110ae9e88b1780e279d610b96b (patch) | |
tree | cd3a06ccf7944b3e131234ac86ae7b26ced8ea6b /ui/recent.c | |
parent | cd55bd29258b8e0ffae9ea9471059b457ebb59ae (diff) | |
download | wireshark-77751c94f17e2c110ae9e88b1780e279d610b96b.tar.gz |
Qt: Add interface toolbar support
An extcap utility can provide configuration for controls to use in a
GUI interface toolbar. This controls are bidirectional and can be
used to control the extcap utility while capturing.
This is useful in scenarios where configuration can be done based on
findings in the capture process, setting temporary values or give other
inputs without restarting current capture.
Todo:
- Add support for Windows
Change-Id: Ie15fa67f92eb27d8b73df6bb36f66b9a7d81932d
Reviewed-on: https://code.wireshark.org/review/19982
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/recent.c')
-rw-r--r-- | ui/recent.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/recent.c b/ui/recent.c index 30c44f485a..898296c1c0 100644 --- a/ui/recent.c +++ b/ui/recent.c @@ -75,6 +75,7 @@ #define RECENT_GUI_RLC_PDUS_FROM_MAC_FRAMES "gui.rlc_pdus_from_mac_frames" #define RECENT_GUI_CUSTOM_COLORS "gui.custom_colors" #define RECENT_GUI_TOOLBAR_SHOW "gui.additional_toolbar_show" +#define RECENT_GUI_INTERFACE_TOOLBAR_SHOW "gui.interface_toolbar_show" #define RECENT_GUI_GEOMETRY "gui.geom." @@ -866,6 +867,12 @@ write_profile_recent(void) fprintf(rf, RECENT_GUI_TOOLBAR_SHOW ": %s\n", string_list); g_free(string_list); + fprintf(rf, "\n# Interface Toolbars show.\n"); + fprintf(rf, "# List of interface toolbars to show.\n"); + string_list = join_string_list(recent.interface_toolbars); + fprintf(rf, RECENT_GUI_INTERFACE_TOOLBAR_SHOW ": %s\n", string_list); + g_free(string_list); + fclose(rf); /* XXX - catch I/O errors (e.g. "ran out of disk space") and return @@ -1121,6 +1128,8 @@ read_set_recent_pair_static(gchar *key, const gchar *value, recent.gui_fileopen_remembered_dir = g_strdup(value); } else if (strcmp(key, RECENT_GUI_TOOLBAR_SHOW) == 0) { recent.gui_additional_toolbars = prefs_get_string_list(value); + } else if (strcmp(key, RECENT_GUI_INTERFACE_TOOLBAR_SHOW) == 0) { + recent.interface_toolbars = prefs_get_string_list(value); } return PREFS_SET_OK; @@ -1294,6 +1303,11 @@ recent_read_profile_static(char **rf_path_return, int *rf_errno_return) recent.gui_additional_toolbars = NULL; } + if (recent.interface_toolbars) { + g_list_free_full (recent.interface_toolbars, g_free); + recent.interface_toolbars = NULL; + } + /* Construct the pathname of the user's profile recent file. */ rf_path = get_persconffile_path(RECENT_FILE_NAME, TRUE); |