aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2017-04-14 11:33:57 +0200
committerPeter Wu <peter@lekensteyn.nl>2017-04-17 10:51:10 +0000
commitb478df61f54f08e0279d83e2cc11313fbdf28758 (patch)
tree99585c43e985315c471038eb5a95e3368e9e4a73 /doc
parentf63ad23ef9036a60e78e5efd45936aae1705d5ac (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 'doc')
-rw-r--r--doc/README.dissector5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/README.dissector b/doc/README.dissector
index adf77ef241..04e6177ac8 100644
--- a/doc/README.dissector
+++ b/doc/README.dissector
@@ -3063,10 +3063,11 @@ routines -
/* Register a preference with a file name (string) value.
* File name preferences are basically like string preferences
* except that the GUI gives the user the ability to browse for the
- * file.
+ * file. Set for_writing TRUE to show a Save dialog instead of normal Open.
*/
void prefs_register_filename_preference(module_t *module, const char *name,
- const char *title, const char *description, char **var)
+ const char *title, const char *description, char **var,
+ gboolean for_writing)
/* Register a preference with a range of unsigned integers (e.g.,
* "1-20,30-40").