aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/file_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2007-03-14Get rid of some #if-ed out includes, which aren't needed.guy1-16/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21031 f5534014-38df-0310-8fa8-9805f1628bb7
2007-02-28Sync up my changes so far to the content list (now called objectsfisher1-0/+5
list) feature for http traffic. It's now available under File-> Export->Objects->HTTP. More changes to come.. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20951 f5534014-38df-0310-8fa8-9805f1628bb7
2006-08-26U3 packaging, utility and Wireshark modifications that allows Wireshark to ↵gal1-1/+20
be run from a U3 USB device. For more details see packaging/u3/win32/README.txt git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19046 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-22Get rid of a bunch of "Ethereal"s and "ethereal"s in comments, GUIguy1-1/+1
strings, and function names. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18205 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21name changesahlberg1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-30Include <errno.h> to get errnos.guy1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18040 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-30See whether <stdio.h> will get EISDIR defined.guy1-2/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18039 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-30Move the file selection dialog routines to file_dlg.c, and give it aguy1-0/+342
header file. #if 0 out some includes; if none of the builds have a problem with that, I'll remove them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18036 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-29Most of the stuff in file_dlg.c is specific to capture files, so renameguy1-1898/+0
it to capture_file_dlg.c, and rename its header file. We might want to move the generic file dialog stuff to a file_dlg.c file (it's currently in dlg_utils.c), and move the non-capture-file dialog stuff in capture_file_dlg.c to another file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18034 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-19For the "there's already a file with that name" dialog, use a wordingguy1-2/+3
more like the one used by gedit. (Note that the file in question might not be a capture file, although it probably is.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17355 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-16Freeze and thaw the packet list after a merge so that the packet list showsgerald1-0/+2
the correct information. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17320 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-15Have those functions that end up just calling a win32_ routine if we'reguy1-34/+29
using GTK+ 2.x on Windows just have the call, nothing else (no extra variables). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17308 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-13Copy over the file open/save code from the Win32 native branch.gerald1-32/+65
The Windows-native routines were integrated by inserting #if GTK_MAJOR_VERSION >= 2 && _WIN32 win32_native_routine(GDK_WINDOW_HWND(top_level->window)); return; #endif at the beginning of each GTK+ file routine. There's probably a prettier way to do this. Some of the sizes need to be tweaked in win32-file-dlg.rc, but everything seems to work. Fix up whitespace. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17285 f5534014-38df-0310-8fa8-9805f1628bb7
2006-02-11In "Save As", support only file types we can write to; that simplifiesguy1-65/+20
the logic, making it easier to get it right (fewer interactions between components of the dialog - the file type doesn't affect whether we can save some but not all packets). It also means we don't offer a file type for saving, only to take it away if you choose anything other than saving all packets. If the capture file is a temporary file from a capture done in the current Ethereal session, it's libpcap format, which we can write to, so you would be able to save it. If it's a saved file we read in, saving the file in its entirety in its own format is just copying the file, and it's not clear supporting that adds enough useful functionality to justify the extra complication. Fix "range_update_dynamics()" to update all the rows of the range button/count table properly (make the button active iff there's a non-zero count in the currently-selected column, make a count active iff the column is selected), to select the "Captured" column if the count of displayed packets goes to zero, and to select the "Save all packets" row if the count of packets in the currently-selected row and column goes to zero. (XXX - we should perhaps do that with the "user-defined range" counts as well, which would involve updating the counts on every change to the range field.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17251 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-31fix #152ulfl1-2/+4
set the read filter dialog modal and transient to the parent window if requested. This way, it will receive input signals (solving problems with GTK2's gtk_file_chooser). To do this, add another construct_args flag, so it will be modal only if really needed ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16926 f5534014-38df-0310-8fa8-9805f1628bb7
2005-11-06replace *a lot* of file related calls by their GLib counterparts. This is ↵ulfl1-4/+0
necessary for the switch to GTK 2.6 (at least on WIN32). to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place. deleted related things from config.h.win32 As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16403 f5534014-38df-0310-8fa8-9805f1628bb7
2005-10-26bugfix: don't crash the file open dialog, if the preview gets confused by ↵ulfl1-8/+12
"invalid" timestamps. The localtime call will return NULL on invalid input which results in a NULL pointer exception. Simply print '?' if localtime returned NULL. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16317 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-23disable gzip output compression for now, as it won't work in some cases (see ↵ulfl1-1/+5
source commment for details) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15981 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-14added compression support for capture file output. The Save/As dialog now ↵ulfl1-2/+16
has a checkbox "Compress with gzip" currently limited to Ethereal and all the variants of libpcap filetypes only. We might want to add output compression support to the other tools as well (tethereal, mergecap, ...). We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek. One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15804 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! ulfl1-9/+3
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15520 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-20renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical ↵ulfl1-1/+1
named ui_util.h in / dir git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15465 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-19Add APIs to Wiretap to return the file of the size as supplied by the OSguy1-11/+5
(so if the file's gzipped, it's *NOT* the size of the file after uncompressing), and an approximation of the amount of that data read sequentially so far. Use those for various progress bars and the like. Make the fstat() in the Ascend trace reader directly use wth->fd, as it's inside Wiretap; that gets rid of the last caller of wtap_fd() (as we're no longer directly using fstat() or lseek() in Ethereal), so get rid of wtap_fd(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15437 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-05More char -> const char warning fixes.jmayer1-2/+2
Removed (very few) casts that only change the warning message but don't remove it (with gcc-4). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15227 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-02Fix more "no previous declaration" warningsjmayer1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15173 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-19ask for unsaved file when using the new start capture feature,ulfl1-1/+1
ask for unsaved file when really starting the capture, not already when showing the options dialog, use the start capture icon in the capture options dialog (instead of simply Ok) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14142 f5534014-38df-0310-8fa8-9805f1628bb7
2005-04-12Save As: ask user if he wants to overwrite an already existing fileulfl1-33/+115
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14058 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-26code cleanup: use common prefix for all functions in color_filters.hulfl1-5/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13910 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-17Have "cf_merge_files()" take a pointer-to-pointer-to-char as the outputguy1-10/+10
file name argument; if the pointed-to pointer is null, it opens a temporary file, and sets that pointer to a mallocated copy of the pathname of the temporary file. It no longer needs a file descriptor as an argument. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13419 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-15Have "cf_merge_files()" always close "out_fd" before returning; it doesguy1-1/+0
so if "wtap_dump_fdopen()" succeeds (as a side-effect of calling "wtap_dump_close()"), even if "cf_merge_fails()" after that, so it should do so if it fails. That means we don't need to close it in the callers of "cf_merge_files()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13407 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-05minor enhancements to Guy's last updateulfl1-5/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13304 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-05Put "cf_status_t" back.guy1-6/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13303 f5534014-38df-0310-8fa8-9805f1628bb7
2005-02-04huge cleanup of capture file API (functions in file.c/file.h).ulfl1-11/+11
This includes: all functions in file.h now have a cf_ prefix, will have doxygen tags, will have the capture_file *cf as the first parameter and I tried to generalize the return values for non trivial functions. Hopefully, I didn't introduced any new bugs, as I had to change a lot of files... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13289 f5534014-38df-0310-8fa8-9805f1628bb7
2005-01-27We use the range utilities regardless of whether we're built withguy1-1/+1
libpcap or not. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13182 f5534014-38df-0310-8fa8-9805f1628bb7
2005-01-01The right way to check whether a pointer is null and get a Boolean is toguy1-5/+5
test it against null, not to cast it to a Boolean type - as Boolean types in C89/C90, at least, are just integral types, that cast might just throw away the upper 32 bits; that probably yields the results you want, but the compiler might well justifiably warn about that on an LP64 platform. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12915 f5534014-38df-0310-8fa8-9805f1628bb7
2004-12-31"gtk_entry_get_text()" returns a "const char *" - assign the result toguy1-15/+17
one. "get_basename()" doesn't modify its argument, and its callers don't modify the substring pointed to by the result, so make it take a "const char *" as an argument and return a "const char *". "find_last_pathname_separator()" doesn't modify its argument, so make it a "const char *" - but some of its callers pass a non-"const" "char *" and modify the result, so don't make its return value a "const char *". And, as none of its callers are outside "filesystem.c", make it static. In "about_folders_page_new()", have separate variables for pathnames returned as "const char *" (which are cached by the routine that returns them, so you can't modify them - and can't free them, so get rid of the commented-out "g_free()" calls for them) and pathnames returned as "char *" (which are allocated anew for each call, and can be modified, but have to be freed). Clean up white space. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12881 f5534014-38df-0310-8fa8-9805f1628bb7
2004-12-29Make the tone of the error messages a bit less formal, by usingguy1-1/+1
contractions. (Safari does, at least when you're trying to open a file to which you don't have read access.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12852 f5534014-38df-0310-8fa8-9805f1628bb7
2004-10-27Change some of the merge.c APIs to return more information on failure,guy1-12/+11
and use that information to provide better error messages. Have "merge_open_outfile()" do all the work of filling in the merge_out_file_t structure, with the values to use passed as arguments. Get rid of some structure members that used to be used solely to pass information to "merge_open_outfile()". Add a "cf_merge_files()" routine to do the merging and reporting of errors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12420 f5534014-38df-0310-8fa8-9805f1628bb7
2004-10-22Change some code that affects g_resolv_flags to set a flag if the checkguy1-4/+13
box for the flag is active and clear it if it's inactive, rather than clearing all but RESOLV_CONCURRENT and then setting flags if the check box is active - or, in one case, not clearing any flags due to a typo and then setting them, so they never get cleared. This matches what's done with theresolution flags in some other places. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12375 f5534014-38df-0310-8fa8-9805f1628bb7
2004-10-17When merging, default to the current file format as the output format.guy1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12327 f5534014-38df-0310-8fa8-9805f1628bb7
2004-10-17From Mark C. Brown: allow the file type for the merge operation to beguy1-15/+34
specified in the GUI. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12326 f5534014-38df-0310-8fa8-9805f1628bb7
2004-10-16Remove the fixed maximum number of subranges in a range_t; dynamicallyguy1-3/+21
allocate them to be large enough. Add checks that the numbers in the range fit in a guint32. Check the validity of a range before saving or printing, and report errors in an alert box. Clean up white space. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12320 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-27Move prefs.c and prefs.h into the epan subdirectory.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12115 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-08Fix a minor bug only with GTK2.4: if have a problem while saving a file ↵ulfl1-0/+8
(e.g. filename already exists) will lead to an unresponding file dialog. The fix will close the dialog, which isn't the best solution, but I don't see a better one. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11943 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-04The packet range stuff knows about capture_file structures, so it'sguy1-1/+1
really more of an Ethereal/Tethereal component than a libethereal component (nothing else in libethereal knows about capture files); move it back out of libethereal. (The range stuff doesn't; we leave it in libethereal.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11898 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-04Rename "range.c" and "range.h" to "packet-range.c" and "packet-range.h";guy1-1/+1
they should ultimately be split into files with routines that handle ranges, which are just subsets of [0,2^32), and packet ranges, which are subsets of the packet list, possibly specified by a range. Move them into epan, so they can be used by, for example, utilities that handle ranges, such editcap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11890 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-31added a preference setting, to be able to change the preview timeout in the ↵ulfl1-2/+1
file open dialog (as requested by Ronnie Sahlberg). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11859 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-31Split the preview function into a prepare and a do part, to be able to do ↵ulfl1-24/+47
some experiments about the preview timeout things. As the FileChooser dialog (GTK2.4) doesn't seem to let pass other GTK events (even with calling gtk_main_iteration()), it's not possible to change the preview behaviour to be more keen. To get a mechanism to update the preview independant from the dialog workings, we would need to start a new thread/task, which is too much effort for this IMHO. So we might use the more simple approach of setting the timeout by a preference setting. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11856 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-25Move the file-reloading code from gtk/file_dlg.c to file.c.gerald1-46/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11823 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-19As suggested by Guy: Have mark_frame() do nothing if the frame hasgerald1-1/+1
already been marked and have unmark_frame() do likewise. Don't mess with the marked frame count in mark_all_frames(). Be a little more paranoid about the marked frame count in other places. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11775 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-06From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that anguy1-1/+1
include of <resolv.h> in any system header file gets the system <resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11615 f5534014-38df-0310-8fa8-9805f1628bb7