Wireshark-commits: [Wireshark-commits] master f930da8: Enable "Save As..." iff cf_can_save_as() ret
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f930da87a738171f10af56a4acd7979c1469211a
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
f930da8 by Guy Harris (guy@xxxxxxxxxxxx):
Enable "Save As..." iff cf_can_save_as() returns TRUE.
Currently, cf_can_save() really means "*there's something to save* and
we can write it out"; "Save As..." should be enabled even if there are
no changes to save, in case the user just wants to write the existing
file contents out to a new file and have the new file be the current
file. That matches the behavior of the GTK+ version.
(We might want to enable "Save" even if there are no changes to save;
some other programs do that, such as the TextEdit, WordPad, KWrite, and
gedit simple text editors. If so, however, we should make "Save" write
stuff out even if there are no changes to save.
Note, however, that we're a bit different from most "editors", in that
we don't read the entire file into memory - we keep the file open and
read packet data from it, because we want to be able to read files that
won't fit into memory. That *might* change what we ultimately want to
do with "Save".)
Bug: 12630
Change-Id: I8a2327b5d6ddab7c4f0367f132460b507da38577
Reviewed-on: https://code.wireshark.org/review/16612
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from 5488581 Replace an #ifdef with g_path_is_absolute()
adds f930da8 Enable "Save As..." iff cf_can_save_as() returns TRUE.
Summary of changes:
ui/qt/main_window.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)