Commit Graph

160 Commits

Author SHA1 Message Date
Roland Knall 3fb32662a8 InterfaceList: Add button to toggle hidden interfaces
Add a button to the context menu, to allow for easy display of hidden
interfaces, and make that a storable preference

Change-Id: I8df5562b3ce8119b0ed38f9893c1879127f40c47
Reviewed-on: https://code.wireshark.org/review/18005
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-20 15:50:44 +00:00
Dario Lombardo 5546400b55 frame: print debug line according to new console preference.
Change-Id: I4e4b7d08e7765c43904469bbf8ba5c0581428382
Reviewed-on: https://code.wireshark.org/review/18231
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-10-17 09:22:18 +00:00
Michael Mann 268841f3e0 Combine Decode As and port preferences for tcp.port dissector table.
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-10-08 02:44:53 +00:00
Gerald Combs 1320ea4d57 Be more forgiving about invalid Coloring Rules.
In ColoringRulesDialog:

Only check a rule's display filter if that rule is enabled. This keeps
us from disabling the OK button when we shouldn't.

Adjust the "Your coloring rules file contains unknown rules" dialog text
and buttons for accuracy.

In color_filters.c:

Don't try to compile disabled filters in color_filters_apply. Don't warn
about disabled and invalid filters in read_filters_file.

Bug: 12814
Change-Id: I7143bf8e7a6162d296f1e93769344b69763195c8
Reviewed-on: https://code.wireshark.org/review/17823
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-10-03 17:47:39 +00:00
Roland Knall 99097dd3c6 Interface List: Change display to view/model
This changes the underlying model of the main interface tree.
Because of that, we can resort to a view/model approach, enlisting
the global interfaces list as only data source.

The interface list works identical to the old list, but allows
for filtering of the displayed interfaces by type. Only types, which
are present and whose interfaces are not hidden, are being displayed
for selection.

Change-Id: If8475b227daa026dc0ad3d25bc7fe050d5bf2ac3
Reviewed-on: https://code.wireshark.org/review/17940
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-01 13:18:51 +00:00
Roland Knall 927ffaa794 extcap: Add Save functionality to options dialog
This patch creates the functionality of saving all parameters
for extcap devices in the general preference section.

For now, multiselect and fileselect do not save their values
but patches for this will be provided in the future

Also, all preferences are stored as strings to make handling
easier. This might change in the future, but for the first version
it will stick.

Restore to Defaults is not implemented as of yet, and will be
in a future version, once the preference storing is finalized

Bug: 11666
Change-Id: I178346405146d2e43f4f3481c05c92c0b3595af5
Reviewed-on: https://code.wireshark.org/review/13451
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-02-01 12:12:41 +00:00
Gerald Combs e57bb1919c Make Qt UI capture filter behavior more closely match the GTK+ UI.
If the user enters a capture filter in the Capture Interfaces dialog and
presses "Start", make sure we copy the filter to the main welcome
screen.

Back out capture filter code from g0ce9ac4. Leave out the code that set
the global capture filter. Move the code that set individual capture
filters to the welcome screen.

Fix multiple interface selection in the welcome screen.

Rename allFilterComboBox in the capture interfaces dialog to
captureFilterComboBox to match the main welcome screen.

If the user starts typing in captureFilterComboBox, make sure the
"Capture Filter" column is visible. Update the "Capture Filter" column
as the user types. Conversely, if the user edits the "Capture Filter"
column, update captureFilterComboBox accordingly.

If we're editing a per-interface filter make sure we commit its contents
before starting capture.

Map our device index directly to each tree item instead of using a
separate map which will no longer be valid any time our sort order
changes (which we do right away in our constructor).

Don't set prefs.capture_devices_filter in the Qt UI. The GTK+ UI doesn't
and doing so can lead to surprising behavior. Note that it's mostly
unused.

Note that we don't multiple selected filters very well.

Ping-Bug: 11886
Change-Id: I3c052f4f464411e2fb8fb7d96b218e1ce2bac3fd
Reviewed-on: https://code.wireshark.org/review/13410
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-27 16:13:19 +00:00
Alexis La Goutte 936359053a Qt: Add gui.prepend_window_title option
Bug: 11102
Change-Id: I659b6be4652a65542c217370e01340e4696c0e31
Reviewed-on: https://code.wireshark.org/review/12653
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-29 18:01:27 +00:00
Michael Mann 5e4bbcda98 Refactor GUI dependencies out of color_filters.[ch] and move it to epan directory.
This also moved color.h into color_filters.h

Change-Id: Ic19e27aa1b3ec67e764aa7ee8bbef7b1187bb12e
Reviewed-on: https://code.wireshark.org/review/12831
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-12-28 18:33:41 +00:00
Guy Harris 4d3d6af643 prefs_register_modules() is used only in epan/prefs.c; make it static.
Change-Id: If2a5ad5c836c5dfddb4f6c4ffa41c52e52f2b671
Reviewed-on: https://code.wireshark.org/review/12717
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-18 09:28:01 +00:00
Stig Bjørlykke 2fd168c134 epan: Don't export deregister functions
Most of the deregister functions are used internally from Lua
while reloading plugins.  Don't export them for others to use.

Change-Id: I919dbfa807f696c38d409ca7206104a0fba1ae65
Reviewed-on: https://code.wireshark.org/review/12508
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-11 08:35:11 +00:00
Pascal Quantin 4b206d1b06 Export prefs_register_module() and prefs_register_subtree() functions
Change-Id: I09796eadb5fb8b564adfab5060715571983b1bb3
Reviewed-on: https://code.wireshark.org/review/12428
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-04 14:52:23 +00:00
Gerald Combs 9f8d00c174 Add preferences for related packets and the scroll bar minimap.
Add gui.packet_list_show_related and gui.packet_list_show_minimap.
Show_related enables and disables the related packet delegate.
Show_minimap enables and disables the minimap. Start calling it the
"intelligent scroll bar" since that's the best suggestion for a name
I've seen so far.

Leave them out of the Appearance preference pane for now.

Change-Id: I5869c446fda5c8e62d6b1e49a74d63ba3b117b0f
Reviewed-on: https://code.wireshark.org/review/11332
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-10-27 23:28:56 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
Gerald Combs 9fd3bcc25e Add an elide mode preference for the Qt packet list.
Change-Id: I081cc1e9b2a0eea7f0a3ef1157561c50beb4c4db
Reviewed-on: https://code.wireshark.org/review/9902
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-06 21:06:34 +00:00
Michal Labedzki 1e487664bc Qt: Add option to back white line separator for packet list items
This uses one line (on bottom) of items and makes it white.
Seen in Wireshark on some configurations of GTK 2 on Linux,
so backports it to Qt for people who like it.

In my opinion it helps if you use packet list background colors
for frames and you have a lot of following frames with
the same background color.

Bug: 10954
Change-Id: Id8f58520d7224db4eb8181bcc04febd7416a8578
Reviewed-on: https://code.wireshark.org/review/7293
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-20 21:21:28 +00:00
Guy Harris 083f6b6e6d Have a #define for whether the capture buffer size can be set.
It can be set if either 1) this is Windows (where we're assumed to be
using WinPcap, which includes calls to set the buffer size) or 2) we
have pcap_create() (in which case we also have pcap_set_buffer_size(),
at least in a normal libpcap release).

Use that rather than testing "defined(_WIN32) ||
defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's
being tested.

Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12
Reviewed-on: https://code.wireshark.org/review/7816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25 03:22:33 +00:00
Gerald Combs 5012cf84e6 Call pre_init_prefs each time our profile changes.
Manually back out gafa96c3 so that we can set our preferences to their
default values each time we switch profiles.

Zero the prefs struct at startup.

Change-Id: Ic28db44cd0c4cdf640e977d7277f7357db10ebe8
Reviewed-on: https://code.wireshark.org/review/7282
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-02-21 02:57:46 +00:00
Dario Lombardo 60cc8b4fd8 Support for looking for incomplete dissectors.
Change-Id: I03e592dd3d54fc0e1c4af09d5d5336dda93f950e
Reviewed-on: https://code.wireshark.org/review/6978
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-02-12 11:14:24 +00:00
Michael Mann effc8266ce Add preference to display spaces between bytes for FT_BYTES fields.
I think this can make fields more readable (for a small amount of bytes).

Converted DeviceNet dissector to use proto_tree_add_item for some FT_BYTES field as tvb_bytes_to_str_punct was used to create this effect "manually".

Change-Id: I59e2acf9b00a4eb1279e6c2b2b7bd8ecef20db9b
Reviewed-on: https://code.wireshark.org/review/6304
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-10 19:57:27 +00:00
Gerald Combs e4b0141769 Qt: Obey main toolbar icon preferences.
Remove the preferences for the filter toolbar and mark them GTK+-only.

Change-Id: Ie48b19aee29a1cfcea4c41ca6c08ddbba3102377
Reviewed-on: https://code.wireshark.org/review/5693
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-10 01:51:09 +00:00
Alexis La Goutte e7853d37f0 prefs.h : fix indent (use 4 spaces) and add modelines info
Change-Id: I319b76973ade38261f40e6120c436de923b5d5bf
Reviewed-on: https://code.wireshark.org/review/3658
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-17 02:29:31 +00:00
Irene Ruengeler df8c4bf264 Capture Interfaces Dialog:
- allow to change the interface options in the table
- save the options to preferences when the dialog is left
- add a field for setting a capture filter for all selected interfaces
- add a "Compile BPF" button and a window to show the compiled filter output
- try to address Alexis' and Evan's comments

Change-Id: Ic1272e29183ec80e2d2f4b3e494c79dabe2c3b6f
Reviewed-on: https://code.wireshark.org/review/1946
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-12 05:54:59 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Jakub Zawadzki 4f6f488c20 Avoid including <epan/addr_resolv.h> in dissectors
svn path=/trunk/; revision=54333
2013-12-21 17:24:19 +00:00
Irene Rüngeler a2b2dd4b28 Add a function and an enum to register an uat preference for QT only.
svn path=/trunk/; revision=53880
2013-12-09 10:07:33 +00:00
Jakub Zawadzki 65db82872c When including <epan/prefs.h> don't force inclusion of <epan/uat.h>
svn path=/trunk/; revision=53769
2013-12-03 22:16:49 +00:00
Michael Mann 60d6b05e23 Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452)
From Deon van der Westhuysen

- Bug fix: object leak in stats_tree after a tap reset (for example apply statistics preferences with a stats_tree window open)
- Bug fix: correct sample code in README.stats_tree
- Add: slash in plug-in name now creates submenu as docs describe (was a bug?)
- Add: menu separator before the stat_tree registered plug-ins
- Add: stats_tree can now calculate averages for nodes; automatically calculated for range nodes. Add section in README.stats_tree describing averages.
- Add: stats_tree can now calculate burst rate of each node (like rate but with a shorter, sliding time window)
- Add: sorting for stats_tree plug-ins. Can sort on node name, count, average, min, max values and burst rate.
- Add: preferences for stats_tree system (default sort column, burst calc params)
- Add: stats_tree window copy to clipboard and export and plain text, csv and XML.
- Added sample of new functionality in $srcdir/plugins/stats_tree/pinfo_stats_tree.c
- Moved all stats_tree sample plug-ins to "IP Statistics" submenu.

svn path=/trunk/; revision=53657
2013-11-29 22:47:59 +00:00
Alexis La Goutte 49485528d8 Add Packet Editor Preference
svn path=/trunk/; revision=53134
2013-11-07 07:43:11 +00:00
Alexis La Goutte fe4407ebc7 Add Preference to change Language (in QtShark)
Need restart application to change language

svn path=/trunk/; revision=51869
2013-09-09 16:20:45 +00:00
Gerald Combs a05f55bffc Add a UAT dialog. Make UAT preferences uat_t * instead of void *.
C++-ize the UAT headers.

Add an ElidedLabel widget. Use it in the File Set, Profile, and UAT
dialogs.

Update the Qt README.

svn path=/trunk/; revision=50896
2013-07-25 23:49:47 +00:00
Anders Broman 09c5152fa7 From Cal Turney:
Unrecognized preferences and color filters created in proprietary or older versions are discarded when saved.

If the user attempts to save the preferences or colorfilters file, a popup is displayed that warns that unrecognized prefs or color filters have been detected and will be discarded if the save operation is allowed to proceed. In the case of Preferences, the popup message includes the version at which the file was last saved.  A "Continue without Saving" button is provided so that the user can save the profile under a different name.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942

svn path=/trunk/; revision=50716
2013-07-18 04:28:36 +00:00
Anders Broman e9d236ec0b Backing out r50690 (exept simple_dialog)
struct FILE is different on windows vs *nix


https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942

svn path=/trunk/; revision=50691
2013-07-17 05:52:51 +00:00
Anders Broman e0341f776c From Cal Turney:
Unrecognized preferences and color filters created in proprietary or older versions are discarded when saved.

If the user attempts to save the preferences or colorfilters file, a popup is displayed that warns that unrecognized prefs or color filters have been detected and will be discarded if the save operation is allowed to proceed. In the case of Preferences, the popup message includes the version at which the file was last saved.  A "Continue without Saving" button is provided so that the user can save the profile under a different name.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942

svn path=/trunk/; revision=50690
2013-07-17 04:52:19 +00:00
Michael Mann 277aed869e Make colors used by colorize_filter_te_as_* as preferences. Bug 5413 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5413)
svn path=/trunk/; revision=50203
2013-06-28 03:03:36 +00:00
Evan Huus 63ef04ec84 Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.
svn path=/trunk/; revision=49053
2013-04-26 18:28:21 +00:00
Irene Rüngeler 44e6a88b13 Add interface options preferences.
svn path=/trunk/; revision=48275
2013-03-13 12:38:08 +00:00
Irene Rüngeler cb42bc9fec Add buffersize and snap length to the preferences.
svn path=/trunk/; revision=48163
2013-03-07 09:16:55 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Gerald Combs e48236a436 Add automatic software update checks for Win32 using WinSparkle. Add
preferences (currently hidden) to disable updates, set the update
frequency, and set the update "channel" (stable vs development). Add a
"Help" menu item to manually check for updates.

svn path=/trunk/; revision=47748
2013-02-19 22:21:17 +00:00
Gerald Combs d21f62b73b Add a directory name preference type (PREF_DIRNAME) and registration
routine (prefs_register_directory_preference). Add PREF_FILENAME and
PREF_DIRNAME support to the Qt module preferences. Change a couple of
preferences to directory names.

Clean up some names and default settings.

svn path=/trunk/; revision=47573
2013-02-08 18:07:34 +00:00
Gerald Combs 2dff8d7605 Add font and color preferences. Unfortunately Qt doesn't have a color
picker widget so we're back to popping up dialogs. Move the contents of
monospace_font.{cpp,h} to wireshark_application.{cpp,h}.

Pango and Qt use completely different string representations for fonts.
Add a separate gui.qt.font_name preference so that they don't clobber
each other.

svn path=/trunk/; revision=47240
2013-01-24 01:10:12 +00:00
Gerald Combs 6ef1fc5002 GTK+:
Get rid of user-hostile behavior. In the layout preferences pane 2 & 3
radio buttons overrode the user's selection if a duplicate item was
selected. Now we assume that the user knows what he or she is doing and
steal duplicate selections from the other panes.

Qt:

Match the new GTK+ behavior in the layout preferences. Add padding
around the layout images. Add toolbar style preferences to the
Appearance pane (instead of the layout pane).

All:

Remove the selection mode and scrollbar placement prefs and mark them
obsolete as recently discussed on -dev.

Adjust the layout images yet again after more Awful Monitor Testing.

svn path=/trunk/; revision=47214
2013-01-22 18:27:18 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
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
2013-01-18 00:50:14 +00:00
Gerald Combs 0fa6a4c421 Allow editing via the advanced preferences tree. Double-clicking an
item's name, status, or type resets it to its default value.
Double-clicking the item's value lets you edit it. Implement the
advanced search field. (Clicking OK and Cancel still doesn't yet do
anything.)

Note that we could probably use a
prefs_register_{uint16|port}_preference routine for 16-bit values. Make
reset_pref public. Update some names and descriptions.

svn path=/trunk/; revision=46986
2013-01-07 19:13:03 +00:00
Gerald Combs 4a3342e4ba Break out preference type names, type descriptions, string
representations, and default status out of write_prefs and into their
own routines. Split the corresponding custom preference write callbacks.
Fix an apparent memory leak in the hidden column callback.

Add an initial preferences dialog to the Qt port. Use the new preference
routines to implement an "Adavanced" page similar to the "about:config"
page available in many web browsers. Standard pages will hopefully follow
soon.

Remove some QDebug includes and make sure our QTreeWidgets have uniform
row heights set.

svn path=/trunk/; revision=46942
2013-01-05 02:30:58 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Michael Mann e0e533d643 Have (almost) all preferences use the generic preferences API (per https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402). This cleaned up a lot of hardcoded code and allows breaking up the prefs structure (or at least prevent it from growing too large) if desired.
Bugfixed problems mentioned in
http://www.wireshark.org/lists/wireshark-dev/201208/msg00001.html

Column preferences now support default '#' character

svn path=/trunk/; revision=44348
2012-08-08 16:54:02 +00:00
Jörg Mayer 37c7f3a7b0 Fix:
In file included from /home/jmayer/work/wireshark/svn/trunk/epan/addr_resolv.c:131:0:
/home/jmayer/work/wireshark/svn/trunk/epan/prefs.h:423:5: error: ‘struct pref_custom_cbs’ declared inside parameter list [-Werror]


svn path=/trunk/; revision=44332
2012-08-08 12:28:26 +00:00
Michael Mann 3d12ea758b Base framework to allow all preferences to be part of generic preferences API. Implementation will follow, but I wanted the framework in place first.
svn path=/trunk/; revision=44331
2012-08-08 12:13:24 +00:00
Irene Rüngeler 2e1952678f Make the columns of the capture options dialog selectable. Changes are stored in the preferences file.
The ordering can be changed by dragging the column. The order is not stored.

svn path=/trunk/; revision=44239
2012-08-03 11:15:40 +00:00
Anders Broman df0bef704a From Michael Mann:
Expand show version preference.
implementation of Steven's suggestion of a radio button (actually
dropdown) of the 4 possibilities. 

I changed  the default to  have the version on both in
the welcome screen and on the window as that's how it was and people tend not to change the preferences I think.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6437

svn path=/trunk/; revision=44153
2012-07-31 07:27:39 +00:00
Guy Harris 85f219be2e From Michael Mann:
Add a preference for the packet length statistics.

Fixes bug 3239.

svn path=/trunk/; revision=43597
2012-07-07 08:15:41 +00:00
Anders Broman c19583b72c From Michael Mann:
Generic preferences implementation - Printing and Name Resolution.

svn path=/trunk/; revision=43579
2012-07-06 04:48:36 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jeff Morriss 4fdc3c3cc2 Create, and start using, file name preferences.
File name preferences are basically just string preferences except that the
GUI will present a "Browse" button that allows the user to go and find the
file s/he wants (rather than having to blindly type in the full path).

svn path=/trunk/; revision=43228
2012-06-13 01:13:12 +00:00
Gerald Combs 6b178bd415 Add 'extern "C"' wrappers and #include guards to various header files.
svn path=/trunk/; revision=40321
2011-12-29 00:08:47 +00:00
Guy Harris 6b1284fa7c Get rid of the last remnants of the "check the syntax of capture
filters" preference; now that we always build with threads, we do the
syntax checking in a separate thread, so it doesn't hang the UI, and we
no longer have UI to change it but we were still trying to fetch the
value of the non-existent checkbox for it and getting a warning printed.

(We still check for it when reading, so that we don't print warnings if
it's present.)

svn path=/trunk/; revision=39788
2011-11-10 23:02:42 +00:00
Stig Bjørlykke 1a046d693b From Edwin Groothuis via bug 6207:
Added Filter Toolbar Save functionality.

From me:
Removed unused code.

svn path=/trunk/; revision=38937
2011-09-08 09:35:10 +00:00
Graeme Lunt b5cddc0336 An option to autoscroll the expanded item in the details view to a fixed
position (percentage) within the details view. 


svn path=/trunk/; revision=38558
2011-08-16 10:57:52 +00:00
Chris Maynard 539c74fb0c From Jim Young via bug 3196: Enhancement to Expert Info Composite Tab Labels
Reference: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3196

svn path=/trunk/; revision=38324
2011-08-03 18:45:06 +00:00
Stig Bjørlykke 6747aef250 Added a preference to turn of capture filter syntax check.
This can be used to disable the effect in bug 5356.

svn path=/trunk/; revision=37830
2011-06-29 10:42:29 +00:00
Guy Harris 3a1097a0ae Some work on generalizing the "display filter" tap parameter dialog box
to more generally support fetching parameters for taps.

svn path=/trunk/; revision=37559
2011-06-05 22:39:23 +00:00
Gerald Combs c6fecb57b0 From Ivan Sy via bug 3343:
- Support for DTLS and SSL RSA keys list using User Accessible Table
- Support for IPv6 SSL as posted by bug#3343 comment#1
- 'any' and 'anyipv4' for IPv4 wildcard
- 'anyipv6' for IPv6 wildcard
- UAT fields validation.


From me:

- Update paramaters to match UAT API changes.
- Change the UAT filename.
- Fix buffer overflow for IPv6 addresses.
- Allow the use of hostnames along with numeric addresses.
- Don't convert strings to addresses twice.
- Don't use the same variable name for different data types.
- Make "any" mean "any IPv4 or any IPv6".
- Bend the concept of obsolete preferences slightly so that we can convert
  and old-style key list to a UAT.
- Clean up whitespace.
- Don't point to a User's Guide section for now; it may make more sense to
  keep using the wiki page.
  
SSL dissector changes have been tested. DTLS dissector changes have not.

svn path=/trunk/; revision=36875
2011-04-26 21:59:11 +00:00
Jeff Morriss 6eba069093 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4768 :
Return an error if the user specifies a value in a range in excess of the
range-specified maximum.

Except when reading in preferences files which might have ranges that exceed
the maximum (because we didn't use to check): in that case silently lower the
out-of-range values.

svn path=/trunk/; revision=34698
2010-10-29 22:09:31 +00:00
Guy Harris e1e576c11b Support monitor mode in the capture preferences.
Use prefs_is_capture_device_hidden() to find out whether a device should
be hidden - don't scan the list of hidden devices ourselves.

svn path=/trunk/; revision=32820
2010-05-15 19:38:13 +00:00
Balint Reczey e24d953fe1 Disable OID resolution and loading SMI modules by default.
Add an option to enable OID resolution.
Add an option to suppress errors reported by libsmi.

svn path=/trunk/; revision=32096
2010-03-03 17:19:30 +00:00
Stig Bjørlykke 47be3577a7 Introduce "Ignore Packet" in the packet list.
This will remove the package from the dissection functions without
removing it from the capture file.

svn path=/trunk/; revision=31287
2009-12-17 01:18:14 +00:00
Anders Broman ce39b29305 Make the filter toolbar style a preference.
svn path=/trunk/; revision=30136
2009-09-25 05:19:18 +00:00
Stig Bjørlykke a61e285004 Added a preference to capture in Pcap-NG from GUI.
svn path=/trunk/; revision=28740
2009-06-15 16:36:02 +00:00
Balint Reczey 5c7253a681 Made find_preference function public as prefs_find_preference.
svn path=/trunk/; revision=27166
2009-01-06 14:34:18 +00:00
Stephen Fisher 1fa606decf More updates to the IGE Mac OS X integration feature:
- Adds preference "MacOS X style" to the (G)UI preferences pane
 - When the preference above is enabled, the menu bar is moved from
   the Wireshark window to the top of the screen.  It is no longer displayed
   in both places at once.  This preference defaults to on.
 - Calls function to enable shortcut keys for OS X top of screen menus.
 - NOTE: The IGE Mac Integration functions change the Control key to Command
         key in the menus.  This may or may not be desirable.


svn path=/trunk/; revision=26565
2008-10-26 23:07:37 +00:00
Stig Bjørlykke 7e3514c200 Add a hidden preference to show the version in the welcome page.
svn path=/trunk/; revision=26371
2008-10-07 15:18:40 +00:00
Gerald Combs a6bb39afe3 Add a hidden preference to set the welcome screen title.
svn path=/trunk/; revision=26366
2008-10-06 22:49:01 +00:00
Stig Bjørlykke e0740e22e5 Remove the "Save column widths" option so we always save the widths.
svn path=/trunk/; revision=25968
2008-08-09 16:14:34 +00:00
Sake Blok 643d1baa53 From Kovarththanan Rajaratnam (Bug 2660):
Make display filter max recent entries a preference

(From me: fixed an off by one bug in saving to the recent file)


svn path=/trunk/; revision=25960
2008-08-08 19:41:35 +00:00
Stig Bjørlykke 561f66c1b8 Added an option to set default link-layer header type for each interface.
Set linktype history for each interface so we don't mix them.
Fixed some indents.

svn path=/trunk/; revision=25411
2008-06-02 17:45:03 +00:00
Martin Mathieson d4dca0d94b Allow configuration of tap update interval.
- rename rtp_player config group to taps/statistics
- will rename prefs_rtp_player files later
  (svn didn't seem keen to rename with changes present,
   and output says its just a copy/delete anyway...)

svn path=/trunk/; revision=25133
2008-04-21 10:57:32 +00:00
Stig Bjørlykke a4f76f95a0 Added an option to display hidden protocol items.
svn path=/trunk/; revision=25108
2008-04-17 23:14:01 +00:00
Stig Bjørlykke 41e9bde037 Added an option to save column widths in the recent file.
Not 100% implemented for usage with configuration profiles with 
different column layout yet, as this requires some of the recent
values to be saved in each profile.

svn path=/trunk/; revision=24949
2008-04-12 19:37:05 +00:00
Ulf Lamping df724f83cd remove GTK1 specific font handling
svn path=/trunk/; revision=24842
2008-04-08 04:47:32 +00:00
Anders Broman e4edda69af From Peter Johansson :
Support for EtherCAT subdissectors.

svn path=/trunk/; revision=24567
2008-03-05 20:44:02 +00:00
Stig Bjørlykke f3747bf637 Hide hidden devices in "Capture Interfaces" dialog.
Added a function to check for hidden devices, which also work correctly
for plumbed devices on solaris.

svn path=/trunk/; revision=24231
2008-01-31 16:47:05 +00:00
Jaap Keuter 2e0f8088c3 From Jim Young:
This patch provides a new RTP Player preferences dialog.  It allows one to
select the maximum number of visable channels in the RTP Player window.  The
default is four (4) channels which is the maximum number of usable channels 
that the RTP Player can display and still have access to the bottom row buttons 
on a 1024*768 resolution display.  Specifying a value less than 1 or greater than 
10 will be result in the RTP Player displaying the default 4 channels.

svn path=/trunk/; revision=24112
2008-01-16 07:36:34 +00:00
Stig Bjørlykke a2d1e9005d This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files.

This can be found in the "Configuration Profiles..." menu item from the Edit
menu, or by pressing Shift-Ctrl-A.  It's also possible to start wireshark
and tshark with a named profile by using the "-C ProfileName" option.
A new status pane in the main window will show the current profile.

The configuration files currently stored in the Profiles are:
- Preferences
- Capture Filters
- Display Filters
- Coloring Rules
- Disabled Protocols
- User Accessible Tables

The recent data are by design not added to the profile.

Planned future enhancements:
- make a more convenient function to switch between profiles
- add a "clone profile" button to copy an existing profile
- make the profiles list active and accept return as OK
- save users "Decode as" in the profile
- make new, clone and deletion of profiles more secure
- make some of the recent values available in the profile

This patch also fixes:
- setting default status pane sizes
- a bug setting status pane for packets when not having main lower pane.

svn path=/trunk/; revision=24089
2008-01-14 16:40:23 +00:00
Tomas Kukosa 6caaafbb6d Next few improvements to speed up startup about 10%.
- use GTree instead of GList for preference module lists

svn path=/trunk/; revision=23679
2007-11-30 09:22:01 +00:00
Tomas Kukosa a5ca7ec384 hide implementation of module list
(it makes easier change from GList to GTree as we have many modules now and GList implementation is slow for searching)

svn path=/trunk/; revision=23669
2007-11-29 07:52:52 +00:00
Sake Blok 9b6f806089 This patch adds (ten) temporary coloring rules which will only live until Wireshark is
quit. Temporary coloring filters can be set by:

- pressing <ctrl>-<digit> will create a conversation coloring filter based on the
  addresses of the currently selected packet (order TCP/UDP/IP/Ethernet)
  This can also be achieved from the "View|Colorize Conversation" menu.

- Rightclicking on a packet in the packet-list will give the option to
  "Colorize Conversation" just as "Conversation Filter" does.

- Rightclicking on an item in the packet-detail-list will give the option to
  "Colorize with filter" which works similar to "Apply as filter"

Temporary filters can be cleared from the same menus or by pressing <ctrl>-<space>.

This patch also adds an item to the above mentioned menu's to add a permanent color filter
in the same way.


The colors for the temporary coloring rules are now hardcoded as I do not know
how to change the color of menu-items and therefore I chose to use icons to
show the actual color of each of the ten temporary coloring rules. Is it at all
possible to have different menu items in different colors?

One other way of solving this is to recreate the icons on the fly after changing
the colors. I will have a look into that once it is clear whether I can use 
different colors within the menu structure.


svn path=/trunk/; revision=23560
2007-11-24 11:38:16 +00:00
Stephen Fisher eae32f15eb Back out part of revision 23395 - leave the toolbar arrow, but remove the
preference to turn it on / off per discussion on -dev list.


svn path=/trunk/; revision=23407
2007-11-09 02:08:00 +00:00
Stephen Fisher d7c1ba361f Add an arrow with drop-down menu including any toolbar buttons that do not
fit on the top of the screen.  This only works in GTK 2.4+ and there is
a layout preference setting to disable it.


svn path=/trunk/; revision=23395
2007-11-07 21:50:48 +00:00
Graeme Lunt a51f1694c9 This change allows a structure to be created under the "Protocols" section of the preferences.
A new function is introduced, prefs_register_protocol_subtree(), that allows the subtree the protocol should appear under to be specified. The subtree is specified as a string, with a '/' delimiting each subtree element. For example,
	prefs_register_protocol(proto_dap, prefs_register_dap);
becomes
	prefs_register_protocol_subtree("OSI/X.500", proto_dap, prefs_register_dap);

The function will create all the intermediate subtree nodes that are required, if they don't already exist. 
This allows the grouping of procotols which should make the list of protocols more manageable as even more are added. The current aim is to group by protocol family e.g. 
+ OSI
  + X.400
      X.411
      X.420
  + X.500
      DISP
      DAP
      DOP
      DSP
  + X.509
      X509AF
      X509CE
      ...

but others grouping could be envisioned (e.g. by first letter). 

As the intermediate nodes may already have preferences (e.g. OSI), then modules are now allowed to have submodules. Previously each node was either a subtree or held preferences. This is consistent with the "User Interface" node.

The subtree structure has no effect on how the preferences are saved to file, and the "Protocol Preferences..." menu option will bring up the preferences expanded to the correct node.

In addition, a new "blank page" has been introduced for intermediate nodes that have no preferences (and is also used when the "Protocols" node itself is chosen). This prevents confusion when the user moves from a node with preferences to a node without preferences, but the page old page is still shown.

There is also a change to prevent '#' characters in a value being treated as a comment when parsing the preferences file. (There is nothing that adds comments when writing the preferences file.) 


svn path=/trunk/; revision=21066
2007-03-19 19:08:22 +00:00
Luis Ontanon d70a58f881 second iteration:
* fields of an uat table now are passed using an array of uat_filed_t
* field callbacks take two more userdata arguments
* add some macros to define uat field callbacks.
* uats can be registered as preferences for a specific protocol
   - the preference widget is a button that opens the uat's window
* dfilter-macro => reflect changes to API


svn path=/trunk/; revision=20695
2007-02-03 14:25:02 +00:00
Gerald Combs 40ca271813 From Giorgio Tino: Add a "static text" protocol preference type. This
can be used to add descriptive text inline with other preference items.
The "preference" contents are not written to disk.

Fixup whitespace.


svn path=/trunk/; revision=20037
2006-12-05 00:43:00 +00:00
Ulf Lamping 627b9196a5 various minor prefs code cleanup
svn path=/trunk/; revision=19916
2006-11-17 01:24:03 +00:00
Gerald Combs 1e480346d1 Add prefs_apply(), which lets us apply preferences (specifically,
trigger a module's callback) for a specific module.

svn path=/trunk/; revision=19487
2006-10-11 00:37:29 +00:00
Gerald Combs 993305a75f First step in integrating the AirPcap WEP preferences with those
from the 802.11 dissector.  Use a #define for the maximum number of
WEP keys.  Use AirPcap's if we have it (64).  Rename find_module()
prefs_find_module() and make it public.

svn path=/trunk/; revision=19467
2006-10-10 00:28:53 +00:00
Ulf Lamping cdb57f37a2 now: Don't have a Save button in the following settings dialogs:
- Edit/Preferences
- View/Coloring Rules
- Capture/Capture Filters
- Analyze/Display Filters
- Analyze/Enabled Protocols

The settings will be automatically saved when pressing the Ok button.

If someone really wants the explicit Save buttons as before - you can get them back at the Edit/Preferences/User Interface page.

svn path=/trunk/; revision=19415
2006-10-03 19:53:10 +00:00
Ulf Lamping e940ff36b4 from Stephen Fisher:
Attached is a patch for consideration that changes the title in the 
preferences notebook to be the full description of the preference (but 
leaves the short name in the preferences list on the left).

svn path=/trunk/; revision=19370
2006-09-29 22:48:38 +00:00
Gerald Combs f7e38bd5e6 Change ETH_VAR_IMPORT to WS_VAR_IMPORT. Try to fix a duplicate variable
definition in the Catapult DCT2000 code.

svn path=/trunk/; revision=18524
2006-06-20 18:30:54 +00:00