Commit Graph

4064 Commits

Author SHA1 Message Date
Stig Bjørlykke 06e5197867 Qt: Improved testCaptureFileClose dialog texts
Make the "Unsaved packets" dialog question and informative text
use the same layout for all cases.

Added before_what texts when opening another file and closing the
file.  Changed the texts for restarting the capture.

Renamed FileCloseButtons to FileCloseContext to use it for other
checks than just button texts.

Change-Id: I4a39852a1c18e8ffb7fa6b5c800a84500f995bc8
Reviewed-on: https://code.wireshark.org/review/13524
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-26 18:03:45 +00:00
Roland Knall 1c822e7130 prefutils: Add convenience function
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>
2016-01-26 16:37:06 +00:00
Uli Heilmeier 7e72253c0e Qt: Detect language on Windows and load qt_xx.qm/qt_xx_XX.qm
Sytem language is reported as xx_XX (e.g. de_DE). As we're only
shipping qt_xx.qm in the Windows installer the langfile is missing.

This commits searches for qt_xx_XX.qm and qt_xx.qm files and loads it.
See also https://wiki.qt.io/How_to_create_a_multi_language_application

Furthermore it fixs commit 137dba6e66f58c0dae371e7fb98d3fdd6dc8c1f4
to load qt_xx.qm in the right way.

Change-Id: Iba9e597a44eb42b867542d1d6ffccc55f824bbe1
Reviewed-on: https://code.wireshark.org/review/13525
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>
2016-01-26 16:36:00 +00:00
Alexis La Goutte 4f2ce4cc2e capture(.h): fix api reference
The following parameters of capture_start(capture_options *capture_opts, capture_session *cap_session, info_data_t *cap_data, void(*update_cb)(void)) are not documented:
  parameter 'cap_data'

Change-Id: I5953b35155de49ead64be263b32da2aa671f2206
Reviewed-on: https://code.wireshark.org/review/13546
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-26 09:10:25 +00:00
David Morsberger 469a231707 Change filter button label in qt follow window to 'Filter Out This Stream' to match label in gtk version.
Change required because functionality is now the same between two windowing systems (Hide vs. Filter)

Change-Id: Iec321c93cfe8eefe15bb287ea3267956146255c7
Reviewed-on: https://code.wireshark.org/review/13321
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-26 09:04:19 +00:00
Stig Bjørlykke cb0f530cae Qt: Fix checkSaveAsWithComments() button check
When using QMessageBox with custom buttons, exec() function returns
an opaque value.  Therefore we should use clickedButton() to determine
which button was clicked.

Example in https://wiki.qt.io/Custom_QMessageBox_Buttons

Change-Id: I81824414e31345bb9ea77f72f1b4cdeaa21d2781
Reviewed-on: https://code.wireshark.org/review/13523
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>
2016-01-25 11:37:54 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +00:00
Gerald Combs 107d681e8f [Automatic update for 2016-01-24]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Iaac61b4a2f446b99d4600ae8ae56405ae6fb21da
Reviewed-on: https://code.wireshark.org/review/13512
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-24 16:05:55 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.

Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:41:28 +00:00
Guy Harris bd4644b336 Indicate what an InterfaceTree is.
(I.e., it's just names, traffic sparklines, and, if available, extcap
options; it's not the more detailed list of capture options seen
elsewhere.)

Change-Id: I21cc244ae17abab95f8124e39425e8beae564380
Reviewed-on: https://code.wireshark.org/review/13507
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 00:51:55 +00:00
Jim Young 0fa13371d1 Qt io_graph: Use Interval value when generating Y-axis label or legend
The I/O Graph allows the user to choose from several different Y-axis units.
Three of the selectable Y-axis units unconditionally imply a per-second
time unit (/s) regardless of the actual I/O Graph Interval value selected.
In addition the Y-axis label includes the “/s” as a suffix regardless of the
current Interval value.

This patch removes "/s" suffix from the Y-axis pick-list units.  This patch
also dynamically adds the selected Interval value to the Y-Axis label or
alternatively as the first line of the legend box that is displayed if the
various enabled graphs have differing Y-axis values.  For readability the
pick-list values for sub-second Interval values are changed to 1 ms, 10 ms
and 100 ms from the original pick-list values of 0.001 sec, 0.01 sec and
0.1 sec respectively.

To support adding a “Title” to the legend, the QCustomPlot widget is
augmented with “Legend Title” source authored by “David” as posted at:

  http://www.qcustomplot.com/index.php/support/forum/443

Note: This patch changes the valid Y-axis unit values stored within the
io_graphs preferences files.  Any io_graphs files having entries with the
now obsolete Y-Axis values of “Packets/s”, “Bytes/s” or “Bits/s“ will be
silently upgraded to “Packets”, "Bytes" and "Bits" respectively when
saved.

Bug: 11855
Change-Id: I503ff6dc20b09d90f087342084fb0db6e0080c7f
Reviewed-on: https://code.wireshark.org/review/12219
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-24 00:13:42 +00:00
Uli Heilmeier 88cd6552ea Qt: Load qt_XX.qm to translate Qt Strings
The Windows installation includes the Qt translations files qt_XX.qm
in the installation directory (e.g. C:\Program Files\Wireshark\).

However we've tried to load the files only from the
QLibraryInfo::TranslationsPath (C:\Qt\5.3\msvc2013_64_opengl\translations\).
This path is missing in a normal Windows environment.

Therefore strings like "Ctrl" haven't been translated.

Change-Id: I45bc873fdd95fd0ab5c79e70d9ff062274f899fe
Reviewed-on: https://code.wireshark.org/review/13485
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>
2016-01-24 00:02:43 +00:00
Stig Bjørlykke 720f57d000 ui: Code cleanup
Fixed code layout to use common style in the file.
Mostly whitespace changes.

Change-Id: Id37b57717a9e26248fad07322dff09b1d1f45ac2
Reviewed-on: https://code.wireshark.org/review/13504
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-23 23:15:54 +00:00
Guy Harris a7f470fa24 More pinfo->fd->abs_ts to pinfo->abs_ts.
Change-Id: I70db0a345cc4c5c57c454371deb4f92f9ac4b9ac
Reviewed-on: https://code.wireshark.org/review/13501
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23 03:58:56 +00:00
João Valverde 3343729457 Fix warnings for qt_ui_utils.cpp [-Wcast-qual]
Change-Id: Ie1d2779d9eaf59c2f440efa096f6707375f11c6f
Reviewed-on: https://code.wireshark.org/review/13443
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>
2016-01-22 19:29:42 +00:00
Stig Bjørlykke 77046c0c2d Qt: Add some window title variables
Add some variables to be used in custom window title.

%P = profile name
%V = version info

Change-Id: I049717432a4d3523b541bb4f6f882c75abc38ddb
Reviewed-on: https://code.wireshark.org/review/13419
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-21 18:22:05 +00:00
João Valverde d403c15739 decode_as_utils: Fix warning [-Wcast-qual]
Change-Id: Ia30c3fd579a72b3bff882cb03c06de12bcd743b3
Reviewed-on: https://code.wireshark.org/review/13442
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-21 02:37:01 +00:00
João Valverde faedd049af profile_name_is_valid() returns a malloced string [-Wcast-qual]
Change-Id: I584cdbf6a09e818e0d14c951defdde2fc96787f3
Reviewed-on: https://code.wireshark.org/review/13440
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-21 02:32:46 +00:00
João Valverde 4dd3f668dc Avoid returning malloced memory as const [-Wcast-qual]
Change-Id: I0b2c03cbde963d13d07ef13284d85b922eec3be9
Reviewed-on: https://code.wireshark.org/review/13439
Reviewed-by: João Valverde <j@v6e.pt>
2016-01-21 02:30:18 +00:00
Pascal Quantin 06b75181a0 Qt: fix a crash when trying to open TCP stream graph on a truncated TCP packet
Do not try to show TCP stream graph window if it was rejected in constructor

Change-Id: I4d1401e2c356391ceb8c8e3d37a668fc2a9fc92f
Reviewed-on: https://code.wireshark.org/review/13454
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: Anders Broman <a.broman58@gmail.com>
2016-01-20 23:39:15 +00:00
Pascal Quantin 4b35048af3 Qt: ensure to call destructor when closing a few QDialog windows
Change-Id: I10d2a610e852fdc2f38b84e561f04783af0d612e
Reviewed-on: https://code.wireshark.org/review/13453
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-20 23:38:26 +00:00
Michal Labedzki 0dbe79c53f Qt: Resize columns to contents in DecodeAs
If user first time run DecodeAs columns width are not enough,
so content are trimmed. Do resizing whenever add new item.

Change-Id: I378e2a5b2134479d961f3f00d398d8052f7e556d
Reviewed-on: https://code.wireshark.org/review/13392
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>
2016-01-20 07:02:12 +00:00
Stig Bjørlykke 56bffba031 Qt: Update window title when preferences changed.
When switching profile the prefs.gui_window_title may have changed
so ensure we update the main window title.

Change-Id: Ic1f9c7ac075d77c60cfbebb20624e597f7eb8449
Reviewed-on: https://code.wireshark.org/review/13418
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>
2016-01-19 18:13:02 +00:00
Gerald Combs 9988542fd5 Add a copy button to the Filter Expression preferences.
Add a "copy" button to match other parts of the UI.

Change-Id: I4240aaaaf18a6bbf8e6737a12bcfead2248acca7
Reviewed-on: https://code.wireshark.org/review/13322
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-18 16:38:03 +00:00
Gerald Combs 6d0bc20d4e Qt: Fixup the Display Filter Expression syntax logic.
In the Display Filter Expression dialog, only disable the OK button when
we have an invalid filter.

Move the deprecated warning string from DisplayFilterEdit::checkFilter
to SyntaxLineEdit::checkDisplayFilter so that we can use it in more
places.

Change-Id: I938f5f10258f4fd9dd3a33c174dd9958c9634766
Reviewed-on: https://code.wireshark.org/review/13317
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-18 16:37:43 +00:00
Dario Lombardo ff033c6a2f extcap: add masked to options.
This allows an option to be masked (like a password), by using
the argument-type password.

Change-Id: I2eae1be2e6672bff28ba5f749d7a3f687ebd4631
Reviewed-on: https://code.wireshark.org/review/13385
Reviewed-by: Dario Lombardo <lomato@gmail.com>
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-01-18 15:04:33 +00:00
João Valverde b87a5af633 Fix build [-Werror=maybe-uninitialized]
Found building with GCC 5.3.0 and CFLAGS="-g -Og".

Change-Id: I5bc29b6e91cc98332a513c9d03b02d2f6906608d
Reviewed-on: https://code.wireshark.org/review/13362
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-17 19:12:45 +00:00
Gerald Combs 65ee5f9a5c [Automatic update for 2016-01-17]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I4aacb3b957cbb04f1848504bfb6880fe010723a3
Reviewed-on: https://code.wireshark.org/review/13356
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-17 16:05:40 +00:00
Gerald Combs bebb63bea9 Keep comments from stealing hierarchy statistics.
If a packet has a comment, the Protocol Hierarchy Statistics dialog will
add its stats to a top-level "Packet comments" node instead of the
"Frame" node. Add a check for the pkt_comment protocol ID and skip over
it if we find it. Affects Wireshark 2.0, 1.12, 1.10, and probably
earlier versions.

As an alternative we could always force "Frame" to be the first item in
the tree.

Change-Id: If7cd817071caf6219515f5d8121b3a1a2c0d79a6
Reviewed-on: https://code.wireshark.org/review/13297
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-15 17:56:46 +00:00
Paul Offord d1cb746822 plugin_if: Add function to get capture file info
This is an enhancement to allow a plugin to obtain capture file
and other status information via a simple plugin_if call

Added GTK port to this revision

Bug: 11968
Change-Id: Ibcf4e8b43c6f3b48e971fa4020a07cc273234fb8
Reviewed-on: https://code.wireshark.org/review/13103
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-01-15 11:39:58 +00:00
Roland Knall 75ff25f285 extcap: Add list of extcaps to about dialog
Adds the list of available extcaps to the plugin list in the
About dialog of Wireshark (Qt only). To do this, and additional
sentence is provided in the extcap arguments list, which allows
for additional information to be passed (as of right now, just
version and display is used)

Additionally, cleans up the code when using g_free.

Bug: 11683
Change-Id: I04a958e2b73c9a707ab1cb4f2fc8345833a854a9
Reviewed-on: https://code.wireshark.org/review/13224
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-15 11:30:39 +00:00
Pascal Quantin 11b581be09 Qt: fix Z-order assignment: '' is not a valid widget warning
Change-Id: Ic9f41f34b017d161f13604cf8813bc70aa7a68d4
Reviewed-on: https://code.wireshark.org/review/13284
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: Michael Mann <mmann78@netscape.net>
2016-01-14 13:21:25 +00:00
Stig Bjørlykke 8572c6abe7 Qt: Separate window titles with Em dash on OS X
The window titles on OS X are usually separated by Em dash,
so use this when appending prefs.gui_window_title.

Change-Id: Ice46179fc872eefc7662b42052b428eabf1b6d61
Reviewed-on: https://code.wireshark.org/review/13256
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-14 07:28:43 +00:00
Stig Bjørlykke 91c166867d Qt: Add back setWindowFilePath
With support for prepend and append to the window title.

Change-Id: I2215a080b85d36ceb47495bbb94617743fc3f83e
Reviewed-on: https://code.wireshark.org/review/13031
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-14 07:27:36 +00:00
Gerald Combs 8fe1cf77eb Fix capture output options.
Remove the "permanent file" checkbox. We weren't properly checking its
value and it was extraneous. Add placeholder text about temporary files.

Move the filename above the other options. That's where it is in the
GTK+ UI and it's arguably the most important.

When capturing to multiple files the size and duration settings aren't
mutually exclusive.

Change-Id: I1da1d3524e3c2de2361050913281472a172faa3a
Reviewed-on: https://code.wireshark.org/review/13269
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: Anders Broman <a.broman58@gmail.com>
2016-01-14 05:22:08 +00:00
Gerald Combs cd5b932812 Qt: "Conversation" → "Coloring"
Change actionViewColorizeNewConversationRule to
actionViewColorizeNewColoringRule and change its text accordingly.
We're building a rule based on a general filter, not a conversation.

Change-Id: Ic408050eed6f24690e3e759e6963f9930fe4b5e9
Reviewed-on: https://code.wireshark.org/review/13266
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: Anders Broman <a.broman58@gmail.com>
2016-01-14 05:21:28 +00:00
Gerald Combs 7c2eaefd07 Qt: Show the horizontal scrollbar in the packet detail.
Call resizeColumnToContents when we fill, clear, expand, or contract
items. This make sure the horizontal scrollbar shows up instead of
eliding items.

A commonly suggested solution is to call
header()->setSectionResizeMode(QHeaderView::ResizeToContents) followed
by header()->setStretchLastSection(false). This makes the scroll bar
show up when the tree is wider than the window, but when the column is
narrower than the window we end up with unused white space on the right.

Change-Id: I5896f6048385bed27858f0ac676b29a1bf1255cd
Reviewed-on: https://code.wireshark.org/review/13265
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-13 21:28:07 +00:00
Peter Wu 5539dba1df Do not apply color rule filter every dissection
Introduce a frame_data flag "need_colorize" to indicate that coloring
rules need to be evaluated and set it for the GUI (not tshark). This
restores the original performance characteristics.

It additionally fixes a regression where the color filter name and
filter is not shown anymore in the tree (I guess it is related to the
edt->tree being NULL when re-selected, resulting in empty color_filter).

Remaining problems:

 - Display filter cannot contain frame.coloring_rule.* fields. Code is
   present to enable this, but then a method is needed to avoid an
   expensive second calculation (which is why it is disabled).
 - The columns are still not updated after coloring rule change.
 - The two frame.coloring_rule fields in the tree are not updated when
   the coloring rule is changed (e.g. Ctrl-1).

The last two issues were supposed to be fixed by the previous patch, but
there is probably some missing code... Tested with GTK and Qt.

Bug: 11980
Change-Id: I3ef7713b28db242e178d20f6a5f333374718b52e
Reviewed-on: https://code.wireshark.org/review/13170
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>
2016-01-13 07:38:25 +00:00
Gerald Combs 1f0c9f6693 Qt: Update some keyboard shortcuts to match the GTK+ UI.
As the QKeySequence documentation says,

  "On Mac OS X, references to "Ctrl", Qt::CTRL, Qt::Control and
   Qt::ControlModifier correspond to the Command keys on the Macintosh
   keyboard, and references to "Meta", Qt::META, Qt::Meta and
   Qt::MetaModifier correspond to the Control keys. Developers on Mac OS
   X can use the same shortcut descriptions across all platforms, and
   their applications will automatically work as expected on Mac OS X."

This also applies to Qt Creator on OS X. If you assign a shortcut to an
action that contains the Control key, it will draw the ^ symbol in the
UI but will save "Meta" in the .ui file instead of "Ctrl", in the manner
of a well-meaning-but-not-helpful comedy sidekick.

This happened for the actions listed below. Replace "Meta" in their
shortcuts with "Ctrl".

- Unmark all (Ctrl+Alt+M)
- Next marked packet (Ctrl+Shift+N)
- Previous marked packet (Ctrl+Shift+B)
- Show packet times... (Ctrl+Alt+1 - Ctrl+Alt+8)

This matches the GTK+ UI on Windows and Linux, and uses the Command key
on OS X. If we really want to use the Control key everywhere we can
override the action sequences in main_window.cpp. We might want to do
this for the "mark" actions since Command+M is the standard key for
"Minimize this window".

Change-Id: I1537cee5bc27a32b505bace01c1de3703a18dd6a
Reviewed-on: https://code.wireshark.org/review/13238
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-13 06:06:50 +00:00
Guy Harris fea05007e4 Need to include <epan/prefs.h> to declare preference functions.
Change-Id: I5fbc9d25dde30ce8d14c80e765a3a8a630fec708
Reviewed-on: https://code.wireshark.org/review/13239
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 19:03:28 +00:00
Evan Huus 4802325ea6 Fix type: strlen returns a size_t
Change-Id: I5a3ea655c4a362bbacb72e8c7a19f3c96d22a0fc
Reviewed-on: https://code.wireshark.org/review/13231
Reviewed-by: Evan Huus <eapache@gmail.com>
2016-01-12 15:17:40 +00:00
Michael Mann c62547b951 Refactor "Follow Stream" functionality on all GUI interfaces.
Create a "registration" system for Follow functionality so most of the work can be abstracted into a dissector and GUI can just be responsible for "display".
This also removes the global variables in follow.c to open up multithreading possibilities.

TCP, UDP and HTTP all have the same "tap interface" for Follow functionality (passing a tvb with byte data to "follow"). SSL still has it's own behavior, so Follow structures have to take that into account.

TShark through the Follow registration now has support for HTTP.

The only thing possibly missing is dynamic menu generation to further reduce explicit knowledge of Follow "type" (and rely on registration)

Bug: 11988
Change-Id: I559d9ee1312406ad0986d4dce9fa67ea2103b339
Reviewed-on: https://code.wireshark.org/review/13161
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-12 15:08:18 +00:00
Stig Bjørlykke da798683de Qt: Refactor testCaptureFileClose
Cleanup arguments and simplify code for button texts.

Change-Id: Ie505650889212082e088a525f4b82e62b9177b0d
Reviewed-on: https://code.wireshark.org/review/13180
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>
2016-01-12 14:20:25 +00:00
Guy Harris 694036c0e0 Fix indentation.
Change-Id: Icefabed4c9069bb3fe015739c805cd8fb2426ea5
Reviewed-on: https://code.wireshark.org/review/13213
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 07:24:07 +00:00
Guy Harris a5dee51a1a Move some definitions and declarations around.
This removes duplicates (including one incorrect duplicate), and also
means we have only one chunk_type_values[] value_string.

Change-Id: I4c3035b1cfb5c86cc7a5bf79feb9a5b0204b6dcc
Reviewed-on: https://code.wireshark.org/review/13212
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 07:22:30 +00:00
Guy Harris 95d6848253 Add some missing curly braces.
Change-Id: Ifcacd1fedd8c71d47ab618d036765b8195d4ccbb
Reviewed-on: https://code.wireshark.org/review/13209
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 05:24:11 +00:00
Guy Harris 8a5b29c8f3 Fix indentation.
Change-Id: I5b01865b33b65ee55718be680b6d17cdeee1a809
Reviewed-on: https://code.wireshark.org/review/13208
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 05:20:42 +00:00
Stig Bjørlykke ebdaace002 Lua: Added reload_lua_plugins
This makes it possible to trigger reloading Lua plugins from
within a Lua plugin.  This can be used when having a plugin to
update local plugins from a external source.

Renamed reload() to reload_packets() to clarify what's reloaded,
and added a alias (marked as obsoleted) from reload().

Change-Id: I4e529992af5f651613950329e73718dbda317d2e
Reviewed-on: https://code.wireshark.org/review/13024
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>
2016-01-11 07:43:36 +00:00
Gerald Combs 8ee0be1513 Qt: Restore the filename in the status bar.
Change isNull checks to isEmpty. This keeps us from pushing an empty
field status and clobbering the file name in the status bar. Make sure
we do the same for other statuses.

Change-Id: I68ea669bdafc6e1177c1b8aaa07781464371de96
Reviewed-on: https://code.wireshark.org/review/13175
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-10 23:02:39 +00:00
Stig Bjørlykke 2440f534b1 Qt: Fix testCaptureFileClose without packets
In MainWindow::testCaptureFileClose() we must always stop a running
capture if closing, even if not having any packets, because
cf_close() will fail (assert) if still in progress.

This fixes an issue (crash) when closing the application with
a running capture without packets.

This also fixes restarting current capture without packets, both
with and without "Confirm unsaved capture files".

Bug: 11981
Change-Id: Id0655fcc799682a4f45c855bc2e76386dffc35a5
Reviewed-on: https://code.wireshark.org/review/13121
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>
2016-01-10 19:23:19 +00:00