diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-05-28 14:10:49 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-05-28 21:16:39 +0000 |
commit | 61cef23486d84da0b53107d35d641f15265bef3f (patch) | |
tree | 5526978adf5c2473d8050403f4595e3ef360f34e /epan/uat.h | |
parent | 1955dd2dec345de00acb68e89518ae1da4853e01 (diff) |
Use an "Open" instead of a "Save" dialog for UAT prefs.
When selecting a file for a PT_TXTMOD_FILENAME UAT preference, use
QFileDialog::getOpenFileName instead of QFileDialog::getSaveFileName.
This matches current GTK+ behavior and the two preferences that use
PT_TXTMOD_FILENAME.
Add a comment noting that the PT_TXTMOD_FILENAME is Open-only.
Bug: 11027
Change-Id: I29eb056422949eda700d448621e508cf094fd7b7
Reviewed-on: https://code.wireshark.org/review/8678
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/uat.h')
-rw-r--r-- | epan/uat.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/uat.h b/epan/uat.h index 24ab2ef2a6..14204a5e53 100644 --- a/epan/uat.h +++ b/epan/uat.h @@ -402,9 +402,16 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out */ #define UAT_FILENAME_CB_DEF(basename,field_name,rec_t) UAT_CSTRING_CB_DEF(basename,field_name,rec_t) +/* XXX UAT_FLD_FILENAME is currently unused. */ #define UAT_FLD_FILENAME(basename,field_name,title,desc) \ {#field_name, title, PT_TXTMOD_FILENAME,{uat_fld_chk_str,basename ## _ ## field_name ## _set_cb,basename ## _ ## field_name ## _tostr_cb},{0,0,0},0,desc,FLDFILL} +/* + * Both the Qt and GTK+ UIs assume that we're opening a preexisting + * file. We might want to split the ..._FILENAME defines into + * ..._FILE_OPEN and ..._FILE_SAVE if we ever need to specify a + * file that we're creating. + */ #define UAT_FLD_FILENAME_OTHER(basename,field_name,title,chk,desc) \ {#field_name, title, PT_TXTMOD_FILENAME,{chk,basename ## _ ## field_name ## _set_cb,basename ## _ ## field_name ## _tostr_cb},{0,0,0},0,desc,FLDFILL} |