Enable "Save As..." iff cf_can_save_as() returns TRUE.
authorGuy Harris <guy@alum.mit.edu>
Sun, 24 Jul 2016 02:16:36 +0000 (19:16 -0700)
committerGuy Harris <guy@alum.mit.edu>
Sun, 24 Jul 2016 02:17:25 +0000 (02:17 +0000)
commitf930da87a738171f10af56a4acd7979c1469211a
treed885db5815a426f5fc681b2f5729df3ff46a4660
parent5488581d183cf245a9ffdeb30732f155d9db8b99
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@alum.mit.edu>
ui/qt/main_window.cpp