diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2017-04-14 11:33:57 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2017-04-17 10:51:10 +0000 |
commit | b478df61f54f08e0279d83e2cc11313fbdf28758 (patch) | |
tree | 99585c43e985315c471038eb5a95e3368e9e4a73 /epan/prefs-int.h | |
parent | f63ad23ef9036a60e78e5efd45936aae1705d5ac (diff) |
Qt: Provide both file save and open preferences
This is a breaking change.
prefs_register_filename_preference hasn't been differentiating
between files to be saved and ones to be opened.
On GTK, a neutral dialog is used, so no problems there.
On Qt, a save dialog has been always used, even in dissectors that
were reading configuration files without modification.
prefs_register_filename_preference now takes an argument to indicate
whether UI could be a save dialog with a warning on overwriting
a file, or whether it's a general purpose open file dialog.
Qt now does this. Previously no warning was shown on overwriting a file,
so it may be used for opening files too without irritating the user.
This has been changed, as non-destructive reads should now use
the open dialog.
Dissectors were changed accordingly.
Change-Id: I9087fefa5ee7ca58de0775d4fe2c0fdcfa3a3018
Reviewed-on: https://code.wireshark.org/review/21086
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/prefs-int.h')
-rw-r--r-- | epan/prefs-int.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/epan/prefs-int.h b/epan/prefs-int.h index a5e713b1e1..0537f8ce56 100644 --- a/epan/prefs-int.h +++ b/epan/prefs-int.h @@ -95,20 +95,21 @@ struct pref_custom_cbs { * PREF_OBSOLETE is used for preferences that a module used to support * but no longer supports; we give different error messages for them. */ -#define PREF_UINT (1u << 0) -#define PREF_BOOL (1u << 1) -#define PREF_ENUM (1u << 2) -#define PREF_STRING (1u << 3) -#define PREF_RANGE (1u << 4) -#define PREF_STATIC_TEXT (1u << 5) -#define PREF_UAT (1u << 6) -#define PREF_FILENAME (1u << 7) -#define PREF_COLOR (1u << 8) /* XXX - These are only supported for "internal" (non-protocol) */ -#define PREF_CUSTOM (1u << 9) /* use and not as a generic protocol preference */ -#define PREF_OBSOLETE (1u << 10) -#define PREF_DIRNAME (1u << 11) -#define PREF_DECODE_AS_UINT (1u << 12) /* XXX - These are only supported for "internal" (non-protocol) */ -#define PREF_DECODE_AS_RANGE (1u << 13) /* use and not as a generic protocol preference */ +#define PREF_UINT (1u << 0) +#define PREF_BOOL (1u << 1) +#define PREF_ENUM (1u << 2) +#define PREF_STRING (1u << 3) +#define PREF_RANGE (1u << 4) +#define PREF_STATIC_TEXT (1u << 5) +#define PREF_UAT (1u << 6) +#define PREF_SAVE_FILENAME (1u << 7) +#define PREF_COLOR (1u << 8) /* XXX - These are only supported for "internal" (non-protocol) */ +#define PREF_CUSTOM (1u << 9) /* use and not as a generic protocol preference */ +#define PREF_OBSOLETE (1u << 10) +#define PREF_DIRNAME (1u << 11) +#define PREF_DECODE_AS_UINT (1u << 12) /* XXX - These are only supported for "internal" (non-protocol) */ +#define PREF_DECODE_AS_RANGE (1u << 13) /* use and not as a generic protocol preference */ +#define PREF_OPEN_FILENAME (1u << 14) typedef enum { GUI_ALL, |