aboutsummaryrefslogtreecommitdiffstats
path: root/ui/alert_box.h
AgeCommit message (Collapse)AuthorFilesLines
2017-04-20Take the error message generation out of the merge_files routines.Guy Harris1-8/+12
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-10/+15
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-19Have a common "capture file write failure alert box" routine.Guy Harris1-3/+17
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-0/+9
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: I3a18e3fab9fa785e828df843b1b4b899beba1f19 Reviewed-on: https://code.wireshark.org/review/21206 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-18Have a common "capture file close alert box" routine.Guy Harris1-0/+29
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/+13
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-08Clean up handling of enabled/disabled protocols/heuristic dissectors.Guy Harris1-0/+5
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/+2
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>
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>
2012-10-24Fix indent and add Modelines info for new common ui source file(s)Alexis La Goutte1-0/+13
svn path=/trunk/; revision=45765
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-04Use the modal version of the bad display filter alert box in the I/OGuy Harris1-7/+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-01-16Move some headers for UI stuff, and the alert_box.c UI-specific file, toGuy Harris1-0/+70
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