summaryrefslogtreecommitdiff
path: root/ui/alert_box.c
AgeCommit message (Collapse)AuthorFilesLines
2017-04-20Take the error message generation out of the merge_files routines.Guy Harris1-27/+41
Have them just return the information needed for the caller to produce an error message, and have the callers use the new cfile_ routines for reporting errors. This requires that the "write failure alert box" routine take the *input* file name as an argument, so that, on a merge, if the problem is that a record from a given input file can't be written out to the type of output file we're generating, the input file name can be given, along with the record number in that file. Change-Id: If5a5e00539e7e652008a523dec92c0b359a48e71 Reviewed-on: https://code.wireshark.org/review/21257 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20Have separate routines for open-for-reading and open-for-writing errors.Guy Harris1-58/+89
Expand comments while we're at it. Change-Id: I6dcc791eab1c9e323a9572f3d54720d223bdd64b Reviewed-on: https://code.wireshark.org/review/21252 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-20Make the command-line and alert-box failure messages more similar.Guy Harris1-7/+19
Change-Id: I94af221a0ce8b6b3ff8e0e1b94d5379351ac0962 Reviewed-on: https://code.wireshark.org/review/21251 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-19Have a common "capture file write failure alert box" routine.Guy Harris1-4/+84
Take the code from save_record() to pop up an alert box and put it into libui, with the name cfile_write_failure_alert_box(). While we're at it, clean up some variable names and comments. Change-Id: If56e649e5afe50e7a20b39720ec96e8fe2983b24 Reviewed-on: https://code.wireshark.org/review/21233 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-19Have a common "capture file close alert box" routine.Guy Harris1-1/+63
Take the code from cf_read() to pop up an alert box and put it into libui, with the name cfile_read_failure_alert_box(). Use it in a couple of places where we pop up such an error dialog. While we're at it, get rid of the "err" argument to rescan_file(); nobody uses what it returns. Change-Id: Iba7099b95de24309359d94eb96f606020e2ff2c3 Reviewed-on: https://code.wireshark.org/review/21232 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18Fix a comment.Guy Harris1-6/+1
Change-Id: I2ed361efdaa6dcf632f054634dc473d518df4cc8 Reviewed-on: https://code.wireshark.org/review/21204 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18Have a common "capture file close alert box" routine.Guy Harris1-0/+69
Take cf_close_failure_alert_box() and put it into libui, with the name cfile_close_failure_alert_box(). Use it not only in file.c but also in ui/export_pdu_ui_utils.c, ui/gtk/file_import_dlg.c, and ui/qt/import_text_dialog.cpp where the error we get back isn't necessarily an errno. Have ui/gtk/file_import_dlg.c and ui/qt/import_text_dialog.cpp also use cfile_open_failure_alert_box() on open errors. Change-Id: I987f339a23ea58609390306a319923e7f92d5c07 Reviewed-on: https://code.wireshark.org/review/21203 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18Have a commont "capture file open alert box" routine.Guy Harris1-0/+150
Take cf_open_failure_alert_box() and put it into libui, with the name cfile_open_failure_alert_box(). Use it not only in file.c but also in ui/export_pdu_ui_utils.c, where the error we get back isn't necessarily an errno. Change-Id: Ia053f3e403ba464d446bd9530778d5ed302796d2 Reviewed-on: https://code.wireshark.org/review/21174 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Have vwarning_alert_box() pop up a warning, not an error.Guy Harris1-1/+1
Change-Id: I993133931af222c94f4a8814583fef97e49542ca Reviewed-on: https://code.wireshark.org/review/20972 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08Clean up handling of enabled/disabled protocols/heuristic dissectors.Guy Harris1-0/+6
Add a "report a warning message" routine to the "report_err" code in libwsutil, and rename files and routines appropriately, as they don't only handle errors any more. Have a routine read_enabled_and_disabled_protos() that reads all the files that enable or disable protocols or heuristic dissectors, enables and disables them based on the contents of those files, and reports errors itself (as warnings) using the new "report a warning message" routine. Fix that error reporting to report separately on the disabled protocols, enabled protocols, and heuristic dissectors files. Have a routine to set up the enabled and disabled protocols and heuristic dissectors from the command-line arguments, so it's done the same way in all programs. If we try to enable or disable an unknown heuristic dissector via a command-line argument, report an error. Update a bunch of comments. Update the name of disabled_protos_cleanup(), as it cleans up information for disabled *and* enabled protocols and for heuristic dissectors. Support the command-line flags to enable and disable protocols and heuristic dissectors in tfshark. Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df Reviewed-on: https://code.wireshark.org/review/20966 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-27Make failure_alert_box() be printf-like.Guy Harris1-1/+11
Have it be printf-like, and have vfailure_alert_box() be vprintf-like. Rename a few variables to make it clearer what pointers point to vprintf-like functions. Change-Id: I960e2138a18edcc742c450d68a0c6f7248f50c3f Reviewed-on: https://code.wireshark.org/review/14646 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01Remove unneeded includes from ui folderMartin Mathieson1-2/+0
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a Reviewed-on: https://code.wireshark.org/review/6128 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-11-29Avoid including <wiretap/wtap.h> in dissectors.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53655
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-05-13Clean up indentation.Guy Harris1-1/+1
svn path=/trunk/; revision=49279
2012-10-24Fix indent and add Modelines info for new common ui source file(s)Alexis La Goutte1-35/+48
svn path=/trunk/; revision=45765
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-17Add "simple dialog" routines to pop up modal message boxes. Use them inGuy Harris1-14/+27
file.c and routines called from it; non-modal dialogs end up, in some cases, either hidden, devoid of the input focus and not dismissable, or both. svn path=/trunk/; revision=43321
2012-06-04Use the modal version of the bad display filter alert box in the I/OGuy Harris1-20/+0
statistics window. Get rid of the non-modal version (it's not being used any more), and remove the now-redundant _modal from the modal version. svn path=/trunk/; revision=43081
2012-03-08Move alert_box.c to the ui directory.Guy Harris1-0/+134
svn path=/trunk/; revision=41436
2012-01-16Move alert_box.c back up to the top-level directory for now, to fix theGuy Harris1-134/+0
Windows build. We probably want to construct a "ui" (static) library the same way we construct the libwireshark (dynamic) library, out of stuff in the ui directory and the relevant subdirectories. svn path=/trunk/; revision=40541
2012-01-16Move some headers for UI stuff, and the alert_box.c UI-specific file, toGuy Harris1-0/+134
the ui directory. (Perhaps some other files that would be used by all flavors of Wireshark, for any GUI toolkit or for someting such as ncurses, and not for any command-line tool such as TShark, should be moved there as well.) Shuffle some #includes to put the "ui/XXX.h" includes together. svn path=/trunk/; revision=40529