summaryrefslogtreecommitdiff
path: root/ui/qt/capture_file_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-04-24Move UI-only stuff out of libwireshark.Guy Harris1-1/+1
Packet ranges are used only in the UI; move the packet range stuff into libui. Don't pass a print_args_t structure to libwireshark packet-printing routines, just pass the few parameters they need. Move the declaration of print_args_t into file.h. Change-Id: Icff5991eea7d7d56f33b4716105895263d275bcf Reviewed-on: https://code.wireshark.org/review/21308 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-04-05Qt: Remove unused argument in Size stringStig Bjørlykke1-3/+3
Change-Id: I4c09092aba986c4fe224a46cac23d70bc5915aa6 Reviewed-on: https://code.wireshark.org/review/20923 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-03-17Qt: Pluralize packet count in Size stringStig Bjørlykke1-3/+3
Change-Id: Ifb23f4d558aa30df4ec436e42a4e23b23c2af110 Reviewed-on: https://code.wireshark.org/review/20566 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-03-12Qt: Give discard button focus (but not as default)Stig Bjørlykke1-0/+3
Set focus to the discard button in the "Unsaved packet" and "Unsaved comments" dialogs to enable spacebar for discard and enter for save. Bug: 13363 Change-Id: I576b02c4e3f0964aef56a0f1c06ed57c6ba683bf Reviewed-on: https://code.wireshark.org/review/20485 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-12-16Rename packet-range.[ch] to packet_range.[ch]Michael Mann1-1/+1
The check*.pl scripts presume that files with the prefix "packet-" are dissector files and therefore have different rules than other files. Rather than trying to clarify that more with additional directory information, just make any non-dissector file with "packet-" filename prefix conform if it fails a "dissector specific" check from the scripts. Change-Id: I7cb52e1fad4ea62320492bb690904260f958aeb4 Reviewed-on: https://code.wireshark.org/review/19304 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-19Qt: Fix bug in capture file dialog introduced by HideNameFilterDetailsBinh Trinh1-1/+3
Restore File->Save As and File->Export Specified Packets functionalities broken by commit c711bc64573e20e343f343a53ad4d1d50add433d. Change-Id: I5d246d296979b5e509a90569094d672083b06b9b Reviewed-on: https://code.wireshark.org/review/17783 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-09-15Qt: Shorten capture file dialog name filters.Gerald Combs1-16/+24
In the capture file dialog's "Files of type" combobox separate out the wildcards we display from the ones that are applied. Set the HideNameFilterDetails option and for "All Files" and "All Capture Files" leave the option hidden. For other options print the wildcard list twice so that it's both displayed and applied. Go even further and filter out ".gz" wildcards in the displayed list since they're effectively duplicates of their uncompressed counterparts. Based on Dario's work in change 17605. Bug: 12837 Change-Id: I35de8f31492657e37b12ca4c8de5ed9e79d2e2f8 Reviewed-on: https://code.wireshark.org/review/17689 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-12Fix memleaks in capture file dialogPeter Wu1-1/+3
Tried to poke various fields (including the capture filter field), this revealed some memleaks. Change-Id: I1eca431a09839906a4b3c902ad85e55bffc71ca8 Reviewed-on: https://code.wireshark.org/review/17648 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-10Have "All Capture Files" match only capture files.Guy Harris1-5/+4
We support reading some types of files that aren't capture files, in case we have a dissector for that file format (because, for example, it's often transported over HTTP). Don't include them in the set of files "All Capture Files" matches; you can still look for them as they have individual entries in the drop-down menu of file type patterns. Ultimately, there should be Fileshark/TFileshark programs to read those files - and other file types, and even capture files if the goal is to look at the file structure rather than at the packets - and *that's* the program that should offer the ability to load JPEGs and so on. (No, this does not reduce the "All Capture Files" list down to a level that makes the problem in bug 12837 go away. The right way to fix *that* is to arrange, somehow, that the "All Capture Files" entry not actually list all the suffixes it matches.) Change-Id: I705bff5fcd0694c6c6a11892621a195aa7cd0264 Reviewed-on: https://code.wireshark.org/review/17619 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-09Remove name resolution from the file dialogs.Gerald Combs1-94/+31
A single name resolution checkbox was added to the file dialog way back in 2000 in g0f7cf64. At that time it was needed because resolution was synchronous and could drastically affect your load time. Since then we've added asynchronous name resolution and more recently made it mandatory (ge005bc8). We've also added more name resolution checkboxes and other controls. Remove the name resolution checkboxes. You can just as easily change resolution options before or after opening a file and they take up valuable real estate. Combine the size and packets in the Qt and Win32 dialogs and pretty-print the size. Combine the start and elapsed times in the Qt, Win32, and GTK+ dialogs. This lets us shrink the custom areas of the file dialogs even further. Make the default file type combo item more descriptive. Change-Id: Id770adc0f284a4c7f08ee5a7db84f8435f4bf907 Reviewed-on: https://code.wireshark.org/review/17597 Tested-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-07-04Qt: add initializer (CID 1159361).Dario Lombardo1-0/+1
Change-Id: Ib7b66b4e1d600048b8a66b47d035c27ef126da29 Reviewed-on: https://code.wireshark.org/review/16275 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-03-26Push initial directory code up into CaptureFileDialog.Jeff Morriss1-7/+26
That way each (CaptureFileDialog) user doesn't have to (remember to) check the preference, etc., to figure out what directory to start in. Change-Id: Ifa60e1ef9dbd11689a3f72906997cf3ed8ce259c Reviewed-on: https://code.wireshark.org/review/14550 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-01Add a #define for the wildcard pattern that matches all files.Guy Harris1-9/+7
It's *.* on Windows, but just * on UN*X; add a header that provides the definition, and use it instead of hardwiring *.*. Call the entry "All Files", that being the conventional name, rather than "Any File", whilst we're at it. Change-Id: I7c29324fc5b41e93c150e1ec67f1529f171dc6a3 Reviewed-on: https://code.wireshark.org/review/14243 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-29Use *, not *.*, as the wildcard pattern on UN*X.Guy Harris1-9/+12
On Windows, the pattern that matches all files is *.*; *, by itself, doesn't work, as I remember. UN*Xes take the pattern a bit more literally, so if it has a dot in it, it has to match a dot. Bug: 12203 Change-Id: I11518c29c4ffd73485bad6e49b6dd9cc16bbd0b0 Reviewed-on: https://code.wireshark.org/review/14233 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25Qt: Fix checkSaveAsWithComments() button checkStig Bjørlykke1-26/+25
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-23ui: Code cleanupStig Bjørlykke1-2/+2
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>
2015-11-16Label the filter in the file open dialog as a "read filter".Guy Harris1-2/+2
This matches what the Windows file open dialog says, and also should help prevent people thinking that it's a display filter, so that you can clear it and see all the packets in the file. I leave translations to native speakers. Bug: 11708 Change-Id: I060816357bf7958d516429d09708a7ce16d609c5 Reviewed-on: https://code.wireshark.org/review/11877 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-06Qt: refine some strings for l10nYFdyh0001-1/+1
Change-Id: I460559c99c79c9fd40f284c750d64210fe5de50b Reviewed-on: https://code.wireshark.org/review/10813 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-07-08Put back closing } accidentally removed in previous commit.Guy Harris1-0/+2
Change-Id: Ic02b0c86e55751a27d5d0417f4f5314def69e794 Reviewed-on: https://code.wireshark.org/review/9550 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-07Finish removal of Q_UNUSED.Joerg Mayer1-6/+2
Todo: qcustomplot via upstream Change-Id: I19cf98f1281ecb1f6efbb7d36c997d5aa43f5baf Reviewed-on: https://code.wireshark.org/review/9547 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-05-15Qt: Make sure we can fetch ExportDissectionDialog's layout.Gerald Combs1-1/+1
Make sure ExportDissectionDialog is a non-native, funny-looking file dialog so that we can fetch its layout. Fix and add some URLs while we're here. Bug: 11122 Change-Id: Icf62f7a436c7ba27ec20f84e7c1af1a5d7c9b949 Reviewed-on: https://code.wireshark.org/review/8479 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-24Qt: Apply recent settings.Gerald Combs1-0/+1
Add PacketList::applyRecentColumnWidths which set the packet list column widths from our recent settings. Make sure it gets called at startup and when we change profiles. Save the packet list header state so that we can restore it when we reset the model (i.e. freezing and thawing) and load a new capture file. Save the state when the user resizes a column. As a side effect this works around a weird bug that adjusts the width of column 1 at an inopportune time. Add a profileChanging signal so that we can save the main window geometry in each profile. Get rid of MainWindow::configurationProfileChanged. It was unused. Apply saved pane widths and heights. Note that we might want to add a separate pair of recent settings for the Qt panes. Use the last opened directory in the capture file dialog. Git rid of some unneeded Q_UNUSEDs while we're here. Bug: 10953 Change-Id: I812aff59818cf0b4d1598b580627d32728d2e9d7 Reviewed-on: https://code.wireshark.org/review/7247 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-30Qt: Continue using the new window title format.Gerald Combs1-4/+4
Update several dialog titles to "Wireshark · <subtile...>". Change-Id: I64645e913500ecd55a008e1609b46385dafe7de9 Reviewed-on: https://code.wireshark.org/review/6127 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-05-23Revert "Allow wtap_read() and wtap_seek_read() to return non-packet records."Guy Harris1-20/+15
This reverts commit c0c480d08c175eed4524ea9e73ec86298f468cf4. A better way to do this is to have the record type be part of struct wtap_pkthdr; that keeps the metadata for the record together and requires fewer API changes. That is in-progress. Change-Id: Ic558f163a48e2c6d0df7f55e81a35a5e24b53bc6 Reviewed-on: https://code.wireshark.org/review/1741 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23Allow wtap_read() and wtap_seek_read() to return non-packet records.Guy Harris1-15/+20
This is the first step towards implementing the mechanisms requestd in bug 8590; currently, we don't return any records other than packet records from libwiretap, and just ignore non-packet records in the rest of Wireshark, but this at least gets the ball rolling. Change-Id: I34a45b54dd361f69fdad1a758d8ca4f42d67d574 Reviewed-on: https://code.wireshark.org/review/1736 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-09Revert "Refactor Wiretap"Guy Harris1-2/+2
This reverts commit 1abeb277f5e6bd27fbaebfecc8184e37ba9d008a. This isn't building, and looks as if it requires significant work to fix. Change-Id: I622b1bb243e353e874883a302ab419532b7601f2 Reviewed-on: https://code.wireshark.org/review/1568 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-09Refactor WiretapMichael Mann1-2/+2
Start of refactoring Wiretap and breaking structures down into "generally useful fields for dissection" and "capture specific". Since this in intended as a "base" for Wiretap and Filetap, the "wft" prefix is used for "common" functionality. The "architectural" changes can be found in cfile.h, wtap.h, wtap-int.h and (new file) wftap-int.h. Most of the other (painstaking) changes were really just the result of compiling those new architecture changes. bug:9607 Change-Id: Ife858a61760d7a8a03be073546c0e7e582cab2ae Reviewed-on: https://code.wireshark.org/review/1485 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-21Add a missing word to translationAlexis La Goutte1-1/+1
Change-Id: I7ec79840331a5072f12236c27f8dc842c703b23f Reviewed-on: https://code.wireshark.org/review/773 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-04win32: Implement format type selector in open file dialogMichal Labedzki1-3/+1
Change-Id: Idef1829fcc2b7b08783e5288bb6486ce19c4779b Reviewed-on: https://code.wireshark.org/review/405 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Get Windows build working again.Gerald Combs1-1/+2
Change 16 / g579e7e1 introduced a breaking change in capture_file_dialog.cpp on Windows. This works around the problem temporarily until we come up with a proper fix. Fix a Q_OS_WIN check while we're at it. Change-Id: I552d60720e4a45c5144e0047ee3c1fcc7e64f4eb Reviewed-on: https://code.wireshark.org/review/396 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-25Wireshark: Add option to choose format type of capture fileMichal Labedzki1-3/+15
The best heuristic can fail, so add possibility to manually choose capture file format type, so not correctly recognize file format can be loaded in Wireshark. On the other side now it is possible to open capture file as file format to be dissected. Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a Reviewed-on: https://code.wireshark.org/review/16 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2013-11-21Add a statistics tree dialog.Gerald Combs1-1/+1
Add menu items for each corresponding item in gtk/main_menubar.c that calls gtk_stats_tree_cb(). Hopefully that's everything. Note that we use quite a bit less code than the GTK+ flavor and why we might not want to do that. Change a few things in ui/qt/CMakeLists.txt to more closely match the GTK+ version. Add plumbing for tap registrations in CMakeLists.txt and Makefile.am. Add the ability to copy text as CSV or YAML. svn path=/trunk/; revision=53464
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-11-09Replace wtap_nstime with nstime_t, remove wtap_nstime_to_sec.Jakub Zawadzki1-1/+1
After r50154 nstime_t is inside wsutil/ so wiretap don't need it's own copy. svn path=/trunk/; revision=53184
2013-11-08The "file types" we have are actually combinations of types andGuy Harris1-10/+10
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2 are separate "file types", even though they both come from Network Monitor. Rename various functions, #defines, and variables appropriately. svn path=/trunk/; revision=53166
2013-11-08For open dialogs, offer a list of sets of extensions, not of file types;Guy Harris1-8/+75
.cap, for example, doesn't refer to a particular file type - a whole bunch of file types use .cap. Also offer, in addition to "All Files", "All Capture Files", which matches all the extensions we know about. svn path=/trunk/; revision=53156
2013-10-11Remove GTK+ and global cfile dependencies from file_dlg_win32.c.Gerald Combs1-1/+1
Move the declaration of set_last_open_dir() to ui/util.h. It still has separate GTK+ and Qt implemenations. We might want to move it to ui/util.c at some point. Remove a lot of unnecessary GTK+ includes. Remove most of the references to the global cfile while we're at it. svn path=/trunk/; revision=52542
2013-08-29Add support for Qt5 (tested with 5.1.1).Gerald Combs1-7/+8
svn path=/trunk/; revision=51580
2013-07-12packet-range.h moved to the epan directory.Guy Harris1-1/+1
svn path=/trunk/; revision=50518
2013-06-25Move a couple of time-related modules into wsutil.Jeff Morriss1-1/+1
A bunch of files didn't really need to include these header files so remove the include line rather than changing it. svn path=/trunk/; revision=50154
2013-04-24The porting guide for Qt5 requires that Q_OS_ be used insteadJörg Mayer1-16/+16
of Q_WS_ in Qt4 projects See: http://qt-project.org/doc/qt-5.0/qtdoc/portingguide.html svn path=/trunk/; revision=49013
2013-04-01Add a wtap_dump_can_write() routine that indicates whether WiretapGuy Harris1-6/+1
supports writing files with a given set of encapsulations and comment types. Use it, rather than asking for a list of file formats that support the given set of encapsulation and comment types and checking whether we got back such a list, or duplicating its logic. Having file.c use it means that nobody's using wtap_dump_can_write_encaps() any more; get rid of it. Instead, have a private routine that checks whether a given file format supports a given set of encapsulations *and* comment types, and use that internally. svn path=/trunk/; revision=48690
2013-04-01Define a collection of bits for different types of capture file comments.Guy Harris1-25/+33
For each capture file type, have a bitset of comment types supported by that capture file type. Add a Wiretap routine that, for a given file type, returns the bitset of comment types it supports. Have wtap_get_savable_file_types() take a bitset of comment types that need to be supported by the file types it returns. Replace cf_has_comments() with a routine that returns a bitset of capture file comment types in the capture file. Use those routines in the capture file dialogs; don't wire in the notion that pcap-NG supports all comment types and no other file formats support any comment types. (That's currently true, but we don't want to wire that in as being forever true.) svn path=/trunk/; revision=48689
2013-01-05Break out preference type names, type descriptions, stringGerald Combs1-2/+0
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
2012-12-05Add more missing #includes.Gerald Combs1-0/+2
svn path=/trunk/; revision=46410
2012-10-24Make new text translatable for Qtshark * export_dissection_dialog.cpp * ↵Alexis La Goutte1-19/+19
file_set_dialog.ui * export_object_dialog.cpp * capture_file_dialog.cpp svn path=/trunk/; revision=45761
2012-10-16Use topic_action instead of topic_cb for the Windows file dialogs. MoveGerald Combs1-23/+5
the common Qt help code to wireshark_application.cpp. svn path=/trunk/; revision=45594
2012-10-16Remove some no-longer-needed SSL dummy routines.Gerald Combs1-20/+0
svn path=/trunk/; revision=45590
2012-10-15Add help buttons. Ifdef out some code on Windows.Gerald Combs1-4/+37
svn path=/trunk/; revision=45564