aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/capture_file_dialog.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-02-29 13:29:19 -0800
committerGuy Harris <guy@alum.mit.edu>2016-03-01 02:00:25 +0000
commitc0b29fcddd6eb9c7956ff63836a71a1d90169daa (patch)
tree458c0fc4056dcfac80054d019587272ddea84fcb /ui/qt/capture_file_dialog.cpp
parentbe3af7c9643d502e4d2a9f2aa20ff2f3dc1fa75a (diff)
Add a #define for the wildcard pattern that matches all files.
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>
Diffstat (limited to 'ui/qt/capture_file_dialog.cpp')
-rw-r--r--ui/qt/capture_file_dialog.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/ui/qt/capture_file_dialog.cpp b/ui/qt/capture_file_dialog.cpp
index 6bf27fcd03..3b659557f8 100644
--- a/ui/qt/capture_file_dialog.cpp
+++ b/ui/qt/capture_file_dialog.cpp
@@ -36,6 +36,7 @@
#include "../../epan/prefs.h"
#include "../../wsutil/filesystem.h"
#include "../../wsutil/nstime.h"
+#include "ui/all_files_wildcard.h"
#include <wireshark_application.h>
@@ -344,11 +345,11 @@ QString CaptureFileDialog::fileType(int ft, bool extension_globs)
extensions_list = wtap_get_file_extensions_list(ft, TRUE);
if (extensions_list == NULL) {
/* This file type doesn't have any particular extension
- conventionally used for it, so we'll just use "*"
- as the pattern, as this is UN*X, where "*.*" only
- matches files that have an extension. (On Windows,
- it matches all files, but this isn't Windows.) */
- filter += "*";
+ conventionally used for it, so we'll just use a
+ wildcard that matches all file names - even those
+ with no extension, so we don't need to worry about
+ compressed file extensions. */
+ filter += ALL_FILES_WILDCARD;
} else {
GSList *extension;
/* Construct the list of patterns. */
@@ -388,10 +389,7 @@ QStringList CaptureFileDialog::buildFileOpenTypeList() {
* the filter will be a bit long, so it *really* shouldn't be shown.
* What about other platforms?
*/
- /*
- * Add the "All Files" entry. As per the above, we use *, not *.*.
- */
- filters << QString(tr("All Files (*)"));
+ filters << QString(tr("All Files (" ALL_FILES_WILDCARD ")"));
/*
* Add an "All Capture Files" entry, with all the extensions we