https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6533
--- Comment #4 from Guy Harris <guy@xxxxxxxxxxxx> 2011-11-03 15:46:44 PDT ---
> macros called "FILE_OPEN_DEFAULT" and "FILE_SAVE_DEFAULT" are being used to set
> the default save format in win32/file_dlg_win32.c.
FILE_OPEN_DEFAULT, as its name suggests, has nothing whatsoever to do with the
save format.
As the comment before FILE_SAVE_DEFAULT is used says, it means "Default to the
first supported file type, if the file's current type isn't supported." If the
file's current type can be written, Wireshark defaults to *that* type. That
should continue to be the default behavior, and there *must* be a way for the
user to specify that in whatever UI is provided for this, in case they set a
default save format and later want to go back to the system default behavior.
In any case, none of that applies outside Win32.
> Instead of macros we should allow some dynamic input. It would be easy if we ask the user to set a
> default format once at the beginning. We should save this format number(they are referred through
> numbers in the code) in the preferences file.
There is no guarantee that those numbers will not change from release to
release. Every file format also has a "short name" (which can, for example, be
used as an argument to the -F flag in tshark and editcap), and that should be
used, instead.
Either the user-selected default save format should be the default for all save
operations or only for save operations where the file cannot be saved in the
file format of the capture.
The correct behavior would probably be to have the user-selected default format
being put first in the list of file formats in the dialog box. If it should be
used for all save operations, than it should be selected *if* it's in the list
(which it will not always be, if, for example, the current file cannot be saved
in that format). If it should only be used for save operations where the file
cannot be saved in the file format of the capture, then the file format of the
capture should be selected if it's in the list, and, if it's not in the list,
the default format should be selected if *it's* in the list.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.