aboutsummaryrefslogtreecommitdiffstats
path: root/ui/preference_utils.h
AgeCommit message (Collapse)AuthorFilesLines
2017-01-07Refactor range preference.Michael Mann1-46/+0
Refactored so that all handling of ranges in struct preference can be internal to prefs.c Change-Id: I68577909f9c07b23a16ab3443a523355d4645314 Reviewed-on: https://code.wireshark.org/review/19577 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-4/+14
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-23Qt: Support the -j, -J, and -l command line flagsGerald Combs1-1/+1
Add support for -j, -J, and -l. Mark the -m flag deprecated. Bug: 12546 Change-Id: Ic44b3997840018e5d571aa1813a1646bce11d4a6 Reviewed-on: https://code.wireshark.org/review/16083 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-26prefutils: Add convenience functionRoland Knall1-0/+16
This is a convenience function for allowing multiple key/values to be saved to the preference system, without having to reference pref_t or the real underlying value. It is used by the extcap save functionality, to store the saved values Change-Id: I1c8bf787db8ed2d17628024ec1cd19073e49d017 Reviewed-on: https://code.wireshark.org/review/13471 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2015-06-25Plugin Interface: Add GUI callbacksRoland Knall1-0/+10
Rename ext_menubar to a more appropriate plugin_if. External menus can be implemented by plugins to present additional menus for deep-packet analysis. One side-effect of such menus being implemented as plugins is, that they are being executed in different threads and therefore can only use limited access to the main GUI. Also, there is no safe cross-gui (GTK and Qt) way for many features. This patch implements a first functionality, by which a plugin implemented using ext_menubar can apply a display filter to the main view. For now the implementation supports filtering, as well as saving a preference. Change-Id: Iffe4caa954bbeb8ce356352de4dae348a50efba9 Reviewed-on: https://code.wireshark.org/review/8773 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-15Qt: Implement "Apply as Column" for packet contextRoland Knall1-1/+3
Implement the same functionality for "Apply as Column" as it exists in the GTK version of Wireshark. Especially for the context menu in the packet view panel. Change-Id: Id25b7797616ff3b3acf7aa920395516c8a4e9bf9 Reviewed-on: https://code.wireshark.org/review/7604 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-27Qt: Automatically scroll the packet list.Michal Labedzki1-1/+1
Add an "Auto Scroll in Live Capture" action to the Go menu. It's in the View menu in the GTK+ UI but it seems to make more sense as a navigation item. Use a timeout interval for automatic scrolling. I haven't run any tests to see if this makes a difference but it would seem that the less drawing we do during a high speed capture the better, particularly for remote displays. Update the x-stay-last icons. Note that we might want to make prefs.capture_auto_scroll a "recent" setting. Mark auto_scroll_live and packet_list_check_end GTK+ only. Bug: 10601 Co-authored-by: Gerald Combs <gerald@wireshark.org> Change-Id: I645d27c0814f0e4a0d5b01ae68be366847e2522d Reviewed-on: https://code.wireshark.org/review/7292 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-13Replace tabs by spaces when editor modelines has "expandtab"Bill Meier1-2/+2
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7 Also: tabs-stops should be 8 Reviewed-on: https://code.wireshark.org/review/7100 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-14Always put editor-modelines at the end of the file ...Bill Meier1-3/+3
... to ensure that there are no potential issues with respect to editors limiting the number of lines scanned at the end of the file when checking for editor modelines. Change-Id: Ic85cbb108bb5159d6ec4116fea11f5eebb4e44a4 Reviewed-on: https://code.wireshark.org/review/4688 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-12Add editor modelines; Adjust whitespace as needed.Bill Meier1-0/+13
Change-Id: I4da7b335d905dbca10bbce03aa88e1cdeeb1f8ad Reviewed-on: https://code.wireshark.org/review/4626 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-23From Ville Skyttä: Spelling FixesBill Meier1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9591 svn path=/trunk/; revision=54387
2013-12-15Fix warning found by doxygenAlexis La Goutte1-0/+1
svn path=/trunk/; revision=54130
2013-08-10Fix (-W)documentation error found by ClangAlexis La Goutte1-5/+5
../ui/preference_utils.h:40:11: error: parameter 'pref:' not found in the function declaration [-Werror,-Wdocumentation] * @param pref: A preference. ^~~~~ ../ui/preference_utils.h:40:11: note: did you mean 'pref'? * @param pref: A preference. ^~~~~ pref ../ui/preference_utils.h:41:11: error: parameter 'unused:' not found in the function declaration [-Werror,-Wdocumentation] * @param unused: unused ^~~~~~~ ../ui/preference_utils.h:41:11: note: did you mean 'unused'? * @param unused: unused ^~~~~~~ unused ../ui/preference_utils.h:48:11: error: parameter 'pref:' not found in the function declaration [-Werror,-Wdocumentation] * @param pref: A preference. ^~~~~ ../ui/preference_utils.h:48:11: note: did you mean 'pref'? * @param pref: A preference. ^~~~~ pref ../ui/preference_utils.h:49:11: error: parameter 'changed_p:' not found in the function declaration [-Werror,-Wdocumentation] * @param changed_p: A pointer to a gboolean. Set to TRUE if the prefere... ^~~~~~~~~~ ../ui/preference_utils.h:49:11: note: did you mean 'changed_p'? * @param changed_p: A pointer to a gboolean. Set to TRUE if the prefere... ^~~~~~~~~~ changed_p ../ui/preference_utils.h:60:11: error: parameter 'unused:' not found in the function declaration [-Werror,-Wdocumentation] * @param unused: unused ^~~~~~~ ../ui/preference_utils.h:60:11: note: did you mean 'unused'? * @param unused: unused ^~~~~~~ unused svn path=/trunk/; revision=51274
2013-04-26Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.Evan Huus1-1/+3
svn path=/trunk/; revision=49053
2013-01-23Add column preferences.Gerald Combs1-0/+22
svn path=/trunk/; revision=47231
2013-01-18Rename the "saved_val" preference element to "stashed_val" in order toGerald Combs1-0/+88
more clearly indicate that it's a copy of a preference value rather than something we've saved in the preferences file. Update prefs_pref_to_str() to handle default, stashed, and current prefs. Create ui/preference_utils.[ch] and move some common routines there. Use prefs_pref_type_name() in the GTK+ preferences dialog. Make the "OK" button in the Qt preferences dialog work. We simply write the prefs and redissect on "OK" and do nothing on "Cancel". This is intentionally different from the Apply/OK/Cancel behavior in the GTK+ version. Add a general "emitAppSignal" method to wsApp and use it for packet dissection and preference changes. Suggest that we might want to create a WsString class to make conversion between QStrings, gchar *s, and GStrings easier. svn path=/trunk/; revision=47139