aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/file_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2004-06-29avoid using tmpnam() for security reasons.Ulf Lamping1-14/+10
instead of giving the merge stuff a filename, give it an already opened file descriptor svn path=/trunk/; revision=11273
2004-06-29The patch to fix the race condition introduced by using tmpnam replacedJörg Mayer1-2/+2
insecure code by not-working code. As I currently lack the time to fix this properly until Monday as the earliest possible date I undo the patch. Please note that Ethereal should not be used on multiuser systems with untrusted users until a proper fix has been applied. svn path=/trunk/; revision=11263
2004-06-28minor bugfix for merge dialog: use the correct handle for resizingUlf Lamping1-3/+3
svn path=/trunk/; revision=11259
2004-06-25tmpnam() really should not be used for security reasons.Jörg Mayer1-2/+2
Replace it where used and update README.developer accordingly. svn path=/trunk/; revision=11235
2004-06-21if more than one file is (drag and) dropped into the program,Ulf Lamping1-7/+12
merge them together into a new temporary file (and notice the user by a simple_dialog about it) svn path=/trunk/; revision=11205
2004-06-21use the "correct" resize function for the file selection dialogUlf Lamping1-3/+14
svn path=/trunk/; revision=11202
2004-06-20bugfix: handle NULL pointer correct,Ulf Lamping1-2/+9
if gtk_file_chooser_get_filename returned NULL svn path=/trunk/; revision=11197
2004-06-20preference setting, so "ask for unsaved capture files" can be switched offUlf Lamping1-4/+4
svn path=/trunk/; revision=11196
2004-06-20preview: add 3 seconds timeout, and show the information got so far.Ulf Lamping1-12/+33
This will prevent getting the preview information take a lot of time for *very* long capture files. However, on a Pentium-M 1.6 even a 35MB capture file will not timeout in this 3 second interval. svn path=/trunk/; revision=11192
2004-06-20Include <string.h> to declare "strlen()".Guy Harris1-2/+4
Make "cf_name" a "const gchar *", as, at least in GTK+ 2.x, a "const gchar *" is assigned to it. (If it's just a "gchar *" being assigned to it, declaring it a "const gchar *" does no harm.) svn path=/trunk/; revision=11190
2004-06-20Make the elapsed time value an "unsigned int" (if the stop time isGuy Harris1-16/+13
before the start time, due to packet time stamp bogosity, neither a signed value nor an unsigned value will give a sensible answer, and it doesn't need to be a "long" as the capture's unlikely to span more than 2^32-1 seconds, again modulo packet time stamp bogosity). That eliminates some format item vs. value warnings. Make the packet count an "unsigned int" (it can't be negative, and we're unlikely to have more than 2^32-1 packets - and, if we are, it should be made a guint64). That eliminates some more format item vs. value warnings. Initialize "start_time" and "stop_time" to 0, so that we handle files with no packets (and so that we don't get uninitialized variable warnings). Display the file size with PRIu64, after casting it to "guint64" (that way we handle file sizes if they're "unsigned int", "unsigned long", or a 64-bit type on ILP64 platforms (it's 64 bits in BSDs derived from 4.4BSD, even on ILP64 platforms). Mark the first argument to "file_open_entry_changed()" as unused. Don't use G_CONST_RETURN, as it's not defined by GLib 1.2[.x]. Get rid of an unused variable. Clean up white space. svn path=/trunk/; revision=11189
2004-06-19add preview information to the open and merge dialog boxesUlf Lamping1-10/+314
svn path=/trunk/; revision=11187
2004-06-18merge: bugfixes and code cleanupUlf Lamping1-28/+30
svn path=/trunk/; revision=11175
2004-06-18added some tooltips, minor code cleanupUlf Lamping1-5/+13
svn path=/trunk/; revision=11174
2004-06-17Use an adverb to modify a verb.Guy Harris1-2/+2
svn path=/trunk/; revision=11173
2004-06-17Include <string.h> to declare "strdup()".Guy Harris1-1/+3
svn path=/trunk/; revision=11172
2004-06-17add Merge functionality to Ethereal in an experimental state.Ulf Lamping1-2/+325
Copied and sligthly modified merge.c from mergecap.c (needs a lot of code cleanup, though) svn path=/trunk/; revision=11171
2004-06-01add details for doxygen, various code cleanups as a result of thisUlf Lamping1-27/+9
svn path=/trunk/; revision=11052
2004-05-27use gtk_window_set_default_size() instead of WIDGET_SET_SIZE() for the dialogs,Ulf Lamping1-1/+3
as WIDGET_SET_SIZE() will prevent the user from shrinking the dialog, and gtk_window_set_default_size() will not svn path=/trunk/; revision=11021
2004-05-26more code cleanup from dialog things:Ulf Lamping1-181/+40
changed window_xy (dialog) function calling in a lot of gtk files cleanup of file selection code cleanup in dlg_utils/file_dlg/ui_util Please report any problems!!! svn path=/trunk/; revision=11003
2004-04-23Get rid of static forward declaration of "toggle_captured_cb()", as it'sGuy Harris1-2/+1
no longer defined here. svn path=/trunk/; revision=10669
2004-04-22oops, forgotten to test with GTK1...Ulf Lamping1-2/+6
svn path=/trunk/; revision=10666
2004-04-22seperated common packet range code from the save and the print dialog,Ulf Lamping1-293/+10
and put it into new range_utils files. This will avoid: a) duplicate code in save and print dialog and b) yet another code duplication for future dialogs (export, ...) svn path=/trunk/; revision=10665
2004-03-29Add another wrapper routine, "file_selection_set_extra_widget()", to setGuy Harris1-27/+5
the "extra options" portion of a file selection dialog, and use it rather than #if'ed code. svn path=/trunk/; revision=10512
2004-03-29Make "file_selection_new()" take as its second argument anGuy Harris1-70/+14
Ethereal-defined indication of the action (open vs. save), regardless of whether we're building for GTK+ >= 2.4 or not; we just ignore the argument in pre-2.4 GTK+. Use "file_selection_new()" rather than #if'ed code to use it or "gtk_file_chooser_dialog_new()" for GTK+ >= 2.4 and "gtk_file_selection_new()" or it for pre-2.4 GTK+. Add a "file_selection_set_current_folder()" routine that does the appropriate thing depending on whether we're GTK+ >= 2.4 or not, and use that rather than #if'ed code to use "gtk_file_chooser_set_current_folder()" or "gtk_file_selection_set_filename()". svn path=/trunk/; revision=10511
2004-03-27minor code cleanup, including removed MSVC warningsUlf Lamping1-17/+11
svn path=/trunk/; revision=10509
2004-03-27Use the new GtkFileChooserDialog when built with gtk+ 2.4Olivier Abad1-45/+209
svn path=/trunk/; revision=10502
2004-02-27added dfilter string syntax check to various placesUlf Lamping1-1/+2
svn path=/trunk/; revision=10252
2004-02-17bugfix: use last_open_dir for the recent file,Ulf Lamping1-7/+1
instead of the somewhat duplicated value in the recent struct svn path=/trunk/; revision=10077
2004-02-12The HIG's and/or GUI toolkit documentation for:Guy Harris1-5/+3
Mac OS X GNOME Qt KDE Windows all indicate that {message,alert} boxes are modal, at least for the window to which they apply. (Presumably the idea is that not forcing the user to pay attention to the alert box, and allowing more than one alert box to be up for a given window, causes more problems than not letting the user do stuff to that window in order to figure out what the underlying problem is or figure out what to do to fix it - the message should be sufficient, in most if not all cases, to let you know what the problem is.) Make "simple_dialog()" unconditionally make the alert box modal, and get rid of ESD_TYPE_MODAL. XXX - we need to make it possible to make an alert box modal for a given window, rather than just the top-level window. svn path=/trunk/; revision=10051
2004-02-11Get rid of the "Question" alert box type - rename it to "Confirmation",Guy Harris1-3/+3
as that seems to be the name used in the GNOME HIG, at least. Make it use the Warning icon (that's what the GNOME HIG says - and it's also what's used for the equivalent on Windows), and use it for the "Save current capture?" alert boxes. svn path=/trunk/; revision=10030
2004-02-11Add a routine to be used to put up alert boxes for invalid displayGuy Harris1-2/+3
filter expressions; use that in a number of places, so we use the same alert box. (More work is needed to figure out the right way to handle some other "dfilter_compile()" failures.) Use the error message from the display filter as the primary error, as that's the message that tells you what the underlying problem is. (The GNOME HIG says "In most situations the user should only need the primary text to make a quick decision", so the primary text should tell you what's wrong with the filter, not just that it's invalid. If there are messages from the display filter code that don't give enough information, or are a bit cryptic, such as "Unexpected end of filter string," those should be fixed in the display filter code.) Improve the error used if an empty filter is used for "find frame". svn path=/trunk/; revision=10025
2004-02-04Add some comments about the types of alert boxes you get with theGuy Harris1-3/+3
simple_dialog routines (which are really just message box/alert box routines). Add some macros for combinations of buttons (corresponding to combinations that some GUI toolkits, which only support some combinations, allow). svn path=/trunk/; revision=9977
2004-02-03enhanced some dialog messages,Ulf Lamping1-3/+4
close capture file when user told so svn path=/trunk/; revision=9965
2004-02-01moved window geometry values from prefs to recent,Ulf Lamping1-3/+4
added new pref / recent setting: "maximized main window", which will save, if the main window is maximized or not, this will take effect on GTK version 2 only, but is saved nonetheless svn path=/trunk/; revision=9949
2004-01-31Implemented rudimentary Drag and Drop support.Ulf Lamping1-1/+4
svn path=/trunk/; revision=9926
2004-01-31minor change in dialog textUlf Lamping1-2/+2
svn path=/trunk/; revision=9924
2004-01-31cleanup of new "question dialogs",Ulf Lamping1-5/+8
using GTK2 primary/secondary message text from GNOME HIG for simple_dialogs, added a "question dialog" for the coloring rules "Clear" button svn path=/trunk/; revision=9921
2004-01-31Pass ESD_BTN_OK rather than NULL as a second argument toGuy Harris1-2/+2
"simple_dialog()"; NULL might be #defined to be a pointer expression on some platforms, causing compiler warnings (and, on platforms where a null pointer doesn't have all its bits 0, possibly causing misbehavior, although I don't think there are any such platforms on which Ethereal runs). Don't allow 0 as button mask argument to "simple_dialog()". Squelch a compiler warning. Report fatal problems as errors, not warnings. Report file I/O errors with "file_open_error_message()". Report file write errors (including those reported by "close()", e.g. some errors writing to an NFS server) when saving raw packet data to a file. svn path=/trunk/; revision=9915
2004-01-31renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR toUlf Lamping1-2/+2
better reflect the real error text svn path=/trunk/; revision=9913
2004-01-29every GUI action, which will erease a currently unsaved capture file,Ulf Lamping1-5/+114
will now raise a dialog "Save xy before z?" with Yes/No/Cancel buttons. svn path=/trunk/; revision=9908
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inGuy Harris1-4/+3
addition to an error code, an error info string, for WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and WTAP_ERR_BAD_RECORD errors. Replace the error messages logged with "g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed strings returned as the error info string, and change the callers of those routines to, for those errors, put the info string into the printed message or alert box for the error. Add messages for cases where those errors were returned without printing an additional message. Nobody uses the error code from "cf_read()" - "cf_read()" puts up the alert box itself for failures; get rid of the error code, so it just returns a success/failure indication. Rename "file_read_error_message()" to "cf_read_error_message()", as it handles read errors from Wiretap, and have it take an error info string as an argument. (That handles a lot of the work of putting the info string into the error message.) Make some variables in "ascend-grammar.y" static. Check the return value of "erf_read_header()" in "erf_seek_read()". Get rid of an unused #define in "i4btrace.c". svn path=/trunk/; revision=9852
2004-01-20code cleanup and added some moreUlf Lamping1-2/+2
application specific stock items in toolbar.c, use them where appropriate svn path=/trunk/; revision=9747
2004-01-14destroy the "save as" dialog only, if it's existingUlf Lamping1-2/+3
svn path=/trunk/; revision=9665
2004-01-10close the Save (As) dialog, when the capture file is closedUlf Lamping1-1/+8
svn path=/trunk/; revision=9642
2004-01-10using button compatibility macrosUlf Lamping1-83/+22
svn path=/trunk/; revision=9633
2004-01-09use the same packet range things for "Print" dialog, as already implementedUlf Lamping1-105/+65
in the "Save As" dialog and some other minor changes svn path=/trunk/; revision=9610
2004-01-09some code cleanup in range.cUlf Lamping1-8/+4
svn path=/trunk/; revision=9609
2004-01-08Save As and range: don't use global vars in range.c,Ulf Lamping1-39/+37
as this will be also used for the print dialog later. Calculate packet count for user specified ranges svn path=/trunk/; revision=9598
2004-01-07Get rid of "gtk_box_pack_start()" call to put the range table into theGuy Harris1-2/+1
range frame - we already have a "gtk_container_add()" call that does that. svn path=/trunk/; revision=9596