aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/protocol_preferences_menu.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-07-26Qt: Move utils to separate utils directoryRoland Knall1-1/+1
Following the move for widgets directory, moving utils to the utils directory. Guidelines for this directory are: - Generic use but not a widget - Utility functionality used by many classes Note: additionally all includes affected by this move have been changed to absolute path includes, instead of relative ones. Change-Id: I019ae4b6e6f6d06a5745a63ed195edbd36fb936b Reviewed-on: https://code.wireshark.org/review/22602 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-19Qt: Flush signals when disable protocolsStig Bjørlykke1-0/+4
When opening the enabled protocols dialog from a protocol preferences menu we must flush app signals to ensure a redissect is done. Change-Id: I512b8f6959aabcc15ccffc67615583ee9c60ceec Reviewed-on: https://code.wireshark.org/review/22224 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>
2017-05-04Qt: Inhibit Disable Protocol when applicableJaap Keuter1-0/+1
The packet details context menu allows you, through the Protocol Preferences sub menu to manipulate (disable) the protocol dissection through the Disable <protocol>... option. This opens up the appropriate dialog and select the applicable protocol. This fails for protocols which have their can_toggle flag reset (e.g. the frame protocol). The dialog opens, but the protocol can't be found, hence the top item is selected. Instead disable the menu option for protocols which can't have their enabled state toggled. Change-Id: Ifa83f656a8ab747f379d3ca0114520e5efed4b67 Reviewed-on: https://code.wireshark.org/review/21494 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-17Qt: Provide both file save and open preferencesAhmad Fatoum1-2/+2
This is a breaking change. prefs_register_filename_preference hasn't been differentiating between files to be saved and ones to be opened. On GTK, a neutral dialog is used, so no problems there. On Qt, a save dialog has been always used, even in dissectors that were reading configuration files without modification. prefs_register_filename_preference now takes an argument to indicate whether UI could be a save dialog with a warning on overwriting a file, or whether it's a general purpose open file dialog. Qt now does this. Previously no warning was shown on overwriting a file, so it may be used for opening files too without irritating the user. This has been changed, as non-destructive reads should now use the open dialog. Dissectors were changed accordingly. Change-Id: I9087fefa5ee7ca58de0775d4fe2c0fdcfa3a3018 Reviewed-on: https://code.wireshark.org/review/21086 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-11Qt: mark bool and enum prefs as changed when modified via the menuPeter Wu1-0/+2
When preferences are modified, these must be marked to ensure that the "prefs_changed" callback for Lua dissectors is invoked. Bug: 13536 Change-Id: Ib93b2920ebefbc1532d3c6cd097f802a45ec6f35 Reviewed-on: https://code.wireshark.org/review/21016 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris1-1/+1
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X 10.0", for example. It was "Mac OS X" until 10.8 (although 10.7 was sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS X" from 10.8 to 10.11. Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3 Reviewed-on: https://code.wireshark.org/review/20933 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-25Qt: Use preference editor for port number entriesStig Bjørlykke1-0/+2
After converting port preferences to use Decode As entries the preference editor was no longer used when changing port number pereferences from the Packet Details popup menu. Change-Id: Ifeff3b88bfd96a122b6a58d8917304eb69cf0c38 Reviewed-on: https://code.wireshark.org/review/19781 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-01-22Internalize struct preferenceMichael Mann1-16/+12
Move "struct preference" into prefs.c, essentially creating a "private" structure to handle preferences. The 2 motivating factors were: 1. Better memory management so that clients/users of API don't have to worry about it. 2. Hide the ugliness of the union stuff and make it transparent to the API. A few bugs related to preference <-> Decode As integration were fixed while in the neighborhood. Change-Id: I509b9a236235d066b139c98222b701475e0ed365 Reviewed-on: https://code.wireshark.org/review/19578 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-07Refactor range preference.Michael Mann1-27/+1
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>
2015-10-16qt: remove dead codeDario Lombardo1-4/+0
Change-Id: I45c2863d77858e488aa415708d77033787e45aee Reviewed-on: https://code.wireshark.org/review/11060 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-05Move utf8_entities.h to wsutilJoão Valverde1-1/+1
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0 Reviewed-on: https://code.wireshark.org/review/10786 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-26Don't emit app signals from dialogs.Gerald Combs1-0/+3
Emitting PacketDissectionChanged from a dialog on can render the main window unusable on OS X. A workaround for this was added to the preferences dialog in g8fc2327. Generalize the workaround and use it elsewhere. Fix the "Enabled Protocols" action name while we're here. Bug: 11361 Bug: 11448 Change-Id: I89e98daaaedc877d3b13b0d33b6f3be033e323d7 Reviewed-on: https://code.wireshark.org/review/10271 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-01More packet detail context menu items.Gerald Combs1-4/+5
Add the wiki and field reference items to the packet detail context menu. Add the "Go To Linked Packet" item in the Go menu and packet detail context menu. Use "Linked Packet" instead of "Packet Reference" and "Corresponding Packet". Remove more pending item comments. Change-Id: I66c40f71738f0996690f4818a546520ea0747088 Reviewed-on: https://code.wireshark.org/review/9841 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-28Add "Disable Protocol..." to the ProtoTree context menu.Gerald Combs1-6/+26
Assume that "I don't want to see this" counts as a preference and add it under the "Protocol Preferences" submenu. Change-Id: I396e2476509db9df895826f8817b191893bcb14a Reviewed-on: https://code.wireshark.org/review/9812 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-08Handle setModule(NULL) more safely.Guy Harris1-6/+3
If module_name is null, we can't do much of anything - we don't have a protocol ID, so we don't have a protocol. Change-Id: I42c2fa4b47e39d7ac122c60be91b5d408bf30a1d Reviewed-on: https://code.wireshark.org/review/9569 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-18Add a preferences editor frame.Gerald Combs1-39/+65
This replaces the single preference editor dialog in the GTK+ UI. Change-Id: I10e030981e9f7d1ec121811593586b65cf0797c5 Reviewed-on: https://code.wireshark.org/review/8966 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-17Qt: Add protocol preferences menus.Gerald Combs1-0/+315
Add protocol preferences in the packet list and packet detail context menus. Note that we need a PreferencesEditorFrame in the main window for editing numeric and string preferences. For now we just show the prefs dialog. Change-Id: Ice0cc8e9bc25963cc14aa47698f042f2a73088d8 Reviewed-on: https://code.wireshark.org/review/8957 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>