summaryrefslogtreecommitdiff
path: root/ui/qt/capture_file_properties_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-06-21Qt: display newlines in capture file commentsPeter Wu1-2/+2
Due to the use of HTML, whitespace (including newline) are shown as single horizontal space. Add a special case for newlines. Bug: 13819 Change-Id: Iefa2af7d2948ed18a3b7f8f4ee8cb90100bf3460 Reviewed-on: https://code.wireshark.org/review/22306 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-05Allow bigger snapshot lengths for D-Bus captures.Guy Harris1-1/+1
Use WTAP_MAX_PACKET_SIZE_STANDARD, set to 256KB, for everything except for D-Bus captures. Use WTAP_MAX_PACKET_SIZE_DBUS, set to 128MB, for them, because that's the largest possible D-Bus message size. See https://bugs.freedesktop.org/show_bug.cgi?id=100220 for an example of the problems caused by limiting the snapshot length to 256KB for D-Bus. Have a snapshot length of 0 in a capture_file structure mean "there is no snapshot length for the file"; we don't need the has_snap field in that case, a value of 0 mean "no, we don't have a snapshot length". In dumpcap, start out with a pipe buffer size of 2KB, and grow it as necessary. When checking for a too-big packet from a pipe, check against the appropriate maximum - 128MB for DLT_DBUS, 256KB for everything else. Change-Id: Ib2ce7a0cf37b971fbc0318024fd011e18add8b20 Reviewed-on: https://code.wireshark.org/review/21952 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-02-25Replace "n/a" with an em dash.Gerald Combs1-2/+2
Replace occurrences of "n/a" with an em dash. It matches what we do elsewhere and reduces the need for translation. Change-Id: Ib5b63be765b7da9ae3e66ab19bd25cb497fd722d Reviewed-on: https://code.wireshark.org/review/20267 Reviewed-by: Michael Mann <mmann78@netscape.net> 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>
2016-09-29Qt: Add html_escape to qt_ui_utils.Gerald Combs1-11/+2
Add an html_escape convenience function, which escapes HTML metacharacters using Qt::escape on Qt4 and QString::toHtmlEscaped on Qt5. Use it where we were previously using #if QT_VERSION and calling the API-specific functions. Change-Id: Ifda3e9634a37fc00bdb46e08d5711f934692fef5 Reviewed-on: https://code.wireshark.org/review/17984 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: Roland Knall <rknall@gmail.com>
2016-09-14Qt: Set Close as default buttonStig Bjørlykke1-0/+5
Set Close as default button in some statistics dialogs. Change-Id: I82e17d27de256aabaec1633bb973c554eec907c3 Reviewed-on: https://code.wireshark.org/review/17685 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-07-21No need to check for string option values being null.Guy Harris1-3/+3
A string option, if present, always has a value; it might be a null *string*, but you won't get a null pointer (if the option isn't present, it simply isn't present). Fix some comments while we're at it. Change-Id: I9c1420f56998a7d04de5c5cc2e92631b181f303a Reviewed-on: https://code.wireshark.org/review/16564 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-14Redo the block options APIs.Guy Harris1-10/+13
A block can have zero or more instances of a given option. We distinguish between "one instance only" options, where a block can have zero or one instance, and "multiple instances allowed" options, where a block can have zero or more instances. For "one instance only" options: "add" routines add an instance if there isn't one already and fail if there is; "set" routines add an instance if there isn't one already and change the value of the existing instance if there is one; "set nth" routines fail; "get" routines return the value of the instance if there is one and fail if there isn't; "get nth" routines fail. For "multiple instances allowed" options: "add" routines add an instance; "set" routines fail; "set nth" routines set the value of the nth instance if there is one and fail otherwise; "get" routines fail; "get nth" routines get the value if the nth instance if there is one and fail otherwise. Rename "optionblock" to just "block"; it describes the contents of a block, including both mandatory items and options. Add some support for NRB options, including IPv4 and IPv6 option types. Change-Id: Iad184f668626c3d1498b2ed00c7f1672e4abf52e Reviewed-on: https://code.wireshark.org/review/16444 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-06Directly use wtap_opttypes calls to fetch SHB options.Guy Harris1-26/+34
Don't put them in the summary structure; the summary routines should calculate summary statistics, not dig up every bit of information that *could* appear in a summary. Instead, have the GUI code call wtap_file_get_shb() to get the SHB information and call wtap_optionblock_get_option_string() to fetch the option values. Move the option code definitions into wtap_opttypes.h, as they're used by the API. Change-Id: Icef11f5fb30fdc3df1bb0208aae9ed0aebaf0182 Reviewed-on: https://code.wireshark.org/review/15748 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-21Link version code statically againJoão Valverde1-1/+1
This allows keeping the code-sharing with the static linking. This "fixes" a hypothetical ABI mismatch with wsutil and avoids pulling more external dependencies to wsutil than strictly necessary. A nice side-effect is that libwsutil no longer depends on version.h. Follow up to f95976eefcbeb5d24df383c29d29ef888b503945. Change-Id: I8f0d6a557ab3f7ce6f0e2c269124c89f29d6ad23 Reviewed-on: https://code.wireshark.org/review/15002 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-28Qt: Add dialog geometry restoreStig Bjørlykke1-3/+1
Add GeometryStateDialog class to handle load and save dialog geometry. The QDialog class name will be used as window name. For shared classes the UAT name or the statistics title or abbr will be used. Change-Id: I5a019598307fb3861518f41e733de834788184d8 Reviewed-on: https://code.wireshark.org/review/14139 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-27Fix crash in Capture File Properties dialogPeter Wu1-1/+2
Fixes crash when a capture file is closed while the capture file properties dialog is open. Change-Id: Iba35be38e1f53d422ff8428a672703385d477660 Reviewed-on: https://code.wireshark.org/review/12224 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-27Qt: Protect against unintentional "no capture file" window statusMichal Labedzki1-0/+2
If capture file was closed and we have some WiresharkDialogs opened, then we still need to know filename of capture file related to specific dialog. Change-Id: I15f0e5176b87713bf747eead64021619d0bdf039 Reviewed-on: https://code.wireshark.org/review/11025 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org>
2015-08-21Add packet comments to the properties dialog.Gerald Combs1-9/+68
This pulls in missing functionality from the comment summary dialog. Change-Id: Ib417896a6e8f2b2f903520b26193c249677bbb83 Reviewed-on: https://code.wireshark.org/review/10185 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-06Convert the GSM MAP stats to new "generic stat API".Gerald Combs1-10/+9
Convert both the MAP statistics and summary. As with the GSM A stats this are mostly untested. Change-Id: Ibd3a7346b09d1401e78724c0197ec2a38deb97a3 Reviewed-on: https://code.wireshark.org/review/9883 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-25Qt: use <> for including the generated ui_*.h filesMartin Kaiser1-1/+1
this should make Visual Studio pick up the generated include files from the build directory instead of the source directory (which may contain lefovers from an in-tree build) Change-Id: Ie3de4cdd85a2865e203118a42ab10f443372f03b Reviewed-on: https://code.wireshark.org/review/9129 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-05Qt: Show the full file path in the status bar.Gerald Combs1-1/+1
Add file_size_to_qstring and use it to show the file size. Add a "shrinkable" property to LabelStack. Make the info status shrinkable. Elide text so that long file paths don't widen the main window. Change-Id: Ieb1caaf7e016384609d41fcabaa63d8f7a293eff Bug: 10949 Reviewed-on: https://code.wireshark.org/review/7534 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-29Qt: Add a WiresharkDialog convenience class.Gerald Combs1-25/+16
Add WiresharkDialog, a common base class for dialogs centered around capture files. Make it a parent of Capture File Properties, Traffic Table, Conversations, and Endpoints. Rename CaptureFile::read_only_ to file_closed_. Add methods to WiresharkApplication for generating consistent window titles. Change-Id: Idc771556d8192e60f85dddc08fc4757698dee257 Reviewed-on: https://code.wireshark.org/review/6097 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21Qt: rename SummaryDialog class to CaptureFilePropertiesDialogPascal Quantin1-1/+1
Change-Id: I79aa63621853ff15b8c568e1c7949fb8fa0caca2 Reviewed-on: https://code.wireshark.org/review/5929 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21Qt: keep "Copy to clipboard" button active when closing the ↵Pascal Quantin1-4/+0
capture_file_properties_dialog As the Capture File Properties window content is kept once the capture is closed, allow to copy it Change-Id: I11466e102fcf75a31aaa22225861ad8bf27f89a8 Reviewed-on: https://code.wireshark.org/review/5942 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-21Qt: Don't clear the capture file properties.Gerald Combs1-2/+0
Don't clear the contents of the capture file properties dialog when the capture closes. Retaining the contents lets users compare the properties for multiple files. Change-Id: I6bf684e7bd996f22032ec3d0adcddc343bb17992 Reviewed-on: https://code.wireshark.org/review/5937 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-21Qt: fix a crash when closing a file while capture file properties window is openPascal Quantin1-2/+14
refresh_button_ and copy_comment_button_ are not used neither initialized, get rid of them Also clear text areas and disable buttons Change-Id: I418d712313041dcf4f15aceee01497f01ae74918 Reviewed-on: https://code.wireshark.org/review/5927 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: Gerald Combs <gerald@wireshark.org>
2014-12-09Qt: Update and rename the summary dialog.Gerald Combs1-0/+551
Go back to a single view similar to the GTK+ UI. Apply layouts using Qt Designer. Rename the menu item and class to "Capture File Properties". It's not really a summary if it contains details such as "marked average bits per second". We might want to move this to a "Properties" item under the "File" menu similar to other applications. Add the GTK+ summary icon (for now) to the toolbar and open the properties dialog on clicking. Singleton dialogs delenda est[1]. Let the user open as many summaries on as many capture files as he or she wishes. Also, global cfile delenda est[2]. Don't blindly include QtGui. Add specific components instead. Use consistent method names, variable names, and patterns. Try to document what "consistent" means. Adjust the way we display some statistics to match the summary bar, e.g. displayed = captured if we don't have a filter applied. [1] Not really. [2] Yes, really. Change-Id: I11793b1d79dd0c3f70414ac8592b86181da59916 Reviewed-on: https://code.wireshark.org/review/5274 Reviewed-by: Gerald Combs <gerald@wireshark.org>