aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/range_utils.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-04 10:27:59 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-04 10:27:59 +0000
commitafa17a95b0f8abd263c50d5a268a83cc6ede7673 (patch)
tree96b6ef1097232833d3fb842eac490c1d02b0a1f6 /ui/gtk/range_utils.h
parentf275aeadd9963378921eeaa1c15065ceab86a263 (diff)
Make the "Export Selected Packets As..." code path more like the "Save
As..." code path. Extract the code for the "do you want to overwrite this file" and "OK, you do - are you aware it's {user-immutable, read-only}?" code paths into a common routine for use by both of those and, potentially, other save/export/etc. code paths in the future. For "Save As", allow us to save atop the current capture file, as that's just what "Save" does if there are unsaved changes, and "safe save" makes that work. *Don't* allow that for "Export Selected Packets As...", however. The file chooser is run as a modal dialog, so we don't need to worry about creating more than one of them or about the number of marked packets etc. being changed out from under us. Get rid of a bunch of static variables. svn path=/trunk/; revision=43060
Diffstat (limited to 'ui/gtk/range_utils.h')
-rw-r--r--ui/gtk/range_utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/gtk/range_utils.h b/ui/gtk/range_utils.h
index 5c14488cf3..1c63632621 100644
--- a/ui/gtk/range_utils.h
+++ b/ui/gtk/range_utils.h
@@ -39,6 +39,15 @@
*/
extern gboolean range_check_validity(packet_range_t *range);
+/** Check the validity of a packet_range_t, and put up a modal alert box if
+ ** it's not valid.
+ *
+ * @param parent the widget for the window that contained the range specification
+ * @param range the range to check
+ * @return a Boolean that's TRUE if it's valid and FALSE if it isn't
+ */
+extern gboolean range_check_validity_modal(GtkWidget *parent, packet_range_t *range);
+
/** Create a new range widget.
*
* @param range the range to set