aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/print_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2003-02-21From Pavel Roskin: in the GTK+ 2 code, associate the "Print Detail"Guy Harris1-2/+2
button with the correct group. svn path=/trunk/; revision=7183
2002-11-11Use gtk1/gtk2 compatibility macros to reduce #ifdefs.Olivier Abad1-135/+57
svn path=/trunk/; revision=6610
2002-11-03Merge gtk and gtk2 directories.Olivier Abad1-22/+160
svn path=/trunk/; revision=6552
2002-09-22From Graeme Hewson:Gerald Combs1-14/+24
In my recent patches to set and use a default directory, I neglected to set the directory when the user enters a file name directly into the "Capture Options" and "Print" dialogs instead of using the file dialog. This set of patches corrects this. svn path=/trunk/; revision=6318
2002-09-09From Graeme Hewson:Guy Harris1-6/+40
Currently Ethereal sets and uses a default directory for reading and writing, but only in some places. This set of patches extends the setting of the default directory to the -w option as well as the -r option, and causes all file dialogs to use and set the default consistently. (I haven't changed the Preferences/Printing/File dialog, though, as that's a special case.) There's also a fix for a bug where Ethereal was issuing the message "Ring buffer requested, but capture isn't being saved to a permanent file" even though a file was specified with -w. There also appear to be some other cleanups in his patch. svn path=/trunk/; revision=6238
2002-09-05Include cleanups in gtk and gtk2:Jörg Mayer1-3/+1
Remove unneded includes Add include wrappers where missing svn path=/trunk/; revision=6191
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-10/+10
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-07-30#ifdef out some variables not used on Windows.Guy Harris1-30/+32
If printing a single packet to a file, don't use the "print to a printer" code for Windows. Only free "print_args.dest" *after* the last usage. svn path=/trunk/; revision=5913
2002-06-19Added MS Window printing to ethereal.Jeff Foster1-33/+89
svn path=/trunk/; revision=5711
2002-06-04Get rid of the "data_src" member of the "frame_data" structure; put itGuy Harris1-4/+4
in the "packet_info" structure instead, as we don't need a pointer for every single frame in the capture file, just for each frame for which we currently have an open "epan_dissect_t". svn path=/trunk/; revision=5614
2002-03-31From Joerg Mayer: get rid of unused arguments, and mark those that can'tGuy Harris1-2/+2
be eliminated (because the function is called through a pointer, and other functions called through the same pointer *do* use the argument) as unused. svn path=/trunk/; revision=5050
2002-03-05From Joerg Mayer: use _U_ to flag unused arguments.Guy Harris1-10/+10
svn path=/trunk/; revision=4878
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-2/+2
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
2002-01-11Have a routine to create a scrolled window, set its vertical scrollbarGuy Harris1-2/+2
preference, and add it to the list of scrolled windows; call that routine to create scrolled windows, rather than creating it and calling other routines to do the other two operations. As "set_scrollbar_placement_all()" and "set_ctree_styles_all()" always set the styles to match the user's preference, don't have them take an argument, have them just use the user's preference settings. Get rid of unnecessary includes of "prefs_dlg.h", replacing them with includes of "prefs.h" if necessary. Don't have "prefs_dlg.h" include "prefs.h" - its sole purpose is to declare routines defined in "prefs_dlg.c" - and add any additional includes of "prefs.h" this requires. Get rid of unnecessary includes of "prefs.h" and "gtkglobals.h". Fix up white space. svn path=/trunk/; revision=4521
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez1-1/+2
Put a hash-table of "interesting" fields in the per-proto-tree data. The dfilter code records which fields/protocols are "interesting" (by which I mean, their value or existence is checked). Thus, the proto_tree routines can create special arrays of field_info*'s that are ready for the dfilter engine to use during a filter operation. Also store the "proto_tree_is_visible" boolean, renamed "visible", in the per-proto-tree data. Move epan_dissect_t to its own header file to make #include dependencies easier to handle. Provide epan_dissect_fill_in_columns(), which accepts just the epan_dissect_t* as an argument. epan_dissect_new() needs to be followed by epan_dissect_run() for the dissection to actually take place. Between those two calls, epan_dissect_prime_dfilter() can be run 0, 1, or multiple times in order to prime the empty proto_tree with the "intersesting" fields from the dfilter_t. svn path=/trunk/; revision=4422
2001-12-09On Win32, a GUI application apparently can't use "popen()" (itGuy Harris1-1/+42
"returns an invalid file handle, if used in a Windows program, that will cause the program to hang indefinitely"), so we can't use a pipe to a print command to print to a printer. Eventually, we should try to use the native Win32 printing API for this (and also use various UNIX printing APIs, when present?). For now, we support only printing to a file in Windows. svn path=/trunk/; revision=4366
2001-12-06Remove proto_tree from capture_file and PacketWinData, since theyGilbert Ramirez1-2/+2
already contain a pointer to an epan_dissect_t, which contains the proto_tree. Routines calling epan_dissect_new() do not create their own proto_tree via proto_tree_create_root(); instead, they pass a boolean to epan_dissect_new() telling it whether it should create the root proto_tree. svn path=/trunk/; revision=4343
2001-07-17Added a "Suppress Unmarked" option to the print dialog toEd Warnicke1-2/+16
allow you to suppress the printing of unmarked packets. This allows a user to mark the packets they wish to print and print ONLY those packets by suppressing all other unmarked packets. This may seem like a bit of a convoluted way of expressing things, as usually the desired behavior would be to print the marked packets. However, we do NOT print marked packets that are not displayed under the current filter. To be maximally explicite I've expressed this as suppressing unmarked frames. svn path=/trunk/; revision=3736
2001-06-08When printing the contents of a raw-data field, don't use the raw dataGuy Harris1-4/+3
of the current frame as the source, use the raw data of the tvbuff that's the data source of that field. svn path=/trunk/; revision=3531
2000-11-21Add a "color.h" file that declares a nominally-toolkit-independentGuy Harris1-1/+3
"color_t" structure to store color values (although currently it has all the same fields that a GdkColor has; its currently advantage is that you don't have to include any GTK/GDK stuff to declare it). Add routines in the "gtk" directory to convert between "color_t" and GdkColor values. Define, in "prefs.h", all colors as "color_t" values rather than GdkColor values. "prefs.h" now no longer needs to include <gtk/gtk.h>, so don't include it. svn path=/trunk/; revision=2692
2000-08-23Bleah. What was I thinking? "dlg_window_new()" should take the titleGuy Harris1-3/+2
for the dialog window as an argument (as various dialog creators in GTK+ do), not oblige every caller of it to cut-and-paste a "gtk_window_set_title()" call after it. svn path=/trunk/; revision=2345
2000-08-11Miscellaneous code cleaningLaurent Deniel1-16/+1
- add <stdarg.h> or <varargs.h> in snprintf.h and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes - remove the check of multiple inclusions in source (.c) code (there is a bit loss of _cpp_ performance, but I prefer the gain of code reading and maintenance; and nowadays, disk caches and VM are correctly optimized ;-). - protect all (well almost) header files against multiple inclusions - add header (i.e. GPL license) in some include files - reorganize a bit the way header files are included: First: #include <system_include_files> #include <external_package_include_files (e.g. gtk, glib etc.)> Then #include "ethereal_include_files" with the correct HAVE_XXX or NEED_XXX protections. - add some HAVE_XXX checks before including some system header files - add the same HAVE_XXX in wiretap as in ethereal Please forgive me, if I break something (I've only compiled and regression tested on Linux). svn path=/trunk/; revision=2254
2000-07-05Add a "dlg_window_new()" routine, which creates a GTK_WINDOW_DIALOGGuy Harris1-2/+2
window and makes it transient for the top-level window; the transient-for at least provides a hint to X window managers to minimize the dialog if the main window is minimized; keep the dialog on top of the main window in the Z order for windows; perhaps (if there are any window managers that actually *do* this) even put it atop the main window in the X-Y plane (KWM doesn't and I seem to remember that the Exceed X server for Windows doesn't). It's generally considered the Right Thing To Do for dialog boxes. Use that routine to create dialog boxes, rather than doing it directly in the code for that dialog box. svn path=/trunk/; revision=2112
2000-06-27Patch from Ben Fowler to rename the global variable "cf" to "cfile", toGuy Harris1-4/+4
make it easier to use grep to find all references to it without getting a lot of false hits and to check, after allocating the memory chunk for "frame_data" structures, that the allocation succeeded. svn path=/trunk/; revision=2092
2000-05-08Catch the ESC key in the file selection dialog boxes popped up forGuy Harris1-1/+6
"File->Open", "File->Save As", and the "File:" buttons in the Capture Preferences and Print dialog boxes, and make it cancel the file selection dialog box. svn path=/trunk/; revision=1921
2000-05-08Keep a pointer to the current "Print" window, if any - if not, theGuy Harris1-15/+80
pointer is NULL - so that, instead of doing nothing if the user selects "File->print" when there's already a "Print" dialog box open, we raise and de-iconify that window. Connect the print dialog box and any file selection dialog box it has open, so that: if the print dialog box goes away, so does the filter dialog box (as it no longer has a text widget into which it can stuff the selected file name); if the "File:" button is clicked when there's already a file selection dialog box open, we just reactivate that existing dialog box rather than popping up a new one. svn path=/trunk/; revision=1918
2000-05-08Set up the buttons in the "Find Frame" and "Print" dialog boxes to useGuy Harris1-11/+26
mnemonics. svn path=/trunk/; revision=1916
2000-05-03Make the "Print" dialog box use the new utilities to make the ReturnGuy Harris1-1/+15
key print the packets and make the Esc key cancel the dialog box. svn path=/trunk/; revision=1907
2000-01-06Printing multiple pages of PostScript wasn't as tricky as I thought; addGuy Harris1-18/+29
support for printing in PostScript to the "Print..." dialog box. svn path=/trunk/; revision=1426
2000-01-03Take the "simple_dialog()" stuff out of "ui_util.h" and "gtk/ui_util.c",Guy Harris1-3/+3
and move it to "simple_dialog.h" and "gtk/simple_dialog.c". svn path=/trunk/; revision=1414
2000-01-03Use the right #define to control inclusion of "ui_util.h".Guy Harris1-2/+2
svn path=/trunk/; revision=1412
1999-12-09Move the GTK+ implementations of various UI utilities out of "util.c"Guy Harris1-2/+2
into "gtk/ui_util.c", and move the declarations of those UI utilities out of "util.h" into "ui_util.h". (The header file is in the top-level directory, rather than the "gtk" directory, because it declares window-system-independent interfaces to routines with window-system-dependent implementations.) Add to "gtk/ui_util.c" a routine to set the window and icon title. Use that routine to make the title of an Ethereal top-level window be {filename} - Ethereal if there's a capture open, and have "{filename}" be "<capture>" if it's a temporary capture file. svn path=/trunk/; revision=1255
1999-11-06Add a "Find Frame" menu item under "Display"; it lets you use a displayGuy Harris1-2/+2
filter to search forward or backward in the list of displayed frames for a matching frame. When filtering the display, readjust the display to show the "current" frame if it passed the display filter. When a file is read in, the first frame becomes the "current" frame; when a frame is selected, it becomes the "current" frame, and remains so *even if you unselect it*, until another frame is selected. Select the first frame when a file is read in. Disable most of the "Display" and "Tools" menu items if there's no current capture file, and enable the relevant ones if there is. svn path=/trunk/; revision=982
1999-09-29Enable "Print hex" only if "Print detail" is on.Guy Harris1-2/+7
svn path=/trunk/; revision=737
1999-09-29Add an item to the "File/Print" dialog box to ask that the full hex dataGuy Harris1-11/+36
of the packet be printed (this is only done if "Print detail" is selected; it should be grayed out of "Print summary" is selected). If that item is selected, suppress the hex printing of uninterpreted data items in the protocol tree. Move some GTK+ keys not used outside of "gtk/print_dlg.c" from "gtk/keys.h" into "gtk/print_dlg.c". svn path=/trunk/; revision=736
1999-09-12Make "Expand all levels" and "Print as displayed" radioGuy Harris1-1/+30
buttons insensitive if "Print summary" is selected, and make them sensitive if "Print detail" is selected, as they apply only to the "print detail" output. svn path=/trunk/; revision=672
1999-09-12Add a "Expand all levels"/"Print as displayed" pair of radio buttons toGuy Harris1-5/+45
the "File/Print" dialog box; "Expand all levels" means that all levels of the protocol tree should be printed, while "Print as displayed" means that only those levels shown in the display should be printed. Free the table of column widths once printing is done. svn path=/trunk/; revision=671
1999-09-12Add summary-vs-detail radio buttons to the print dialog box; detailGuy Harris1-15/+31
prints the protocol tree, and summary prints the fields in the summary clist, with a header line at the beginning of the printout. Print only packets selected by the current packet filter. Just have "ARP" and "RARP" in the "Protocol" field for ARP packets; whether it's a request or a reply can be seen in the "Info" field. Add to the "Frame" section of the protocol tree the time between the current packet and the previous displayed packet, and the packet number. Have FT_RELATIVE_TIME fields be a "struct timeval", and display them as seconds and fractional seconds (we didn't have any fields of that type, and that type of time fits the delta time above). Add an FT_DOUBLE field type (although we don't yet have anything using it). svn path=/trunk/; revision=666
1999-09-09Put RCS IDs (and a copyright notice and GPL notice) in several files,Guy Harris1-0/+25
and fix up the introductory comment on some other files. svn path=/trunk/; revision=640
1999-09-09More shuffling of GTK-related routines to gtk subdirectory.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=636
1999-09-01Moved GTK-dependent routines for file dialogues, print dialogues, printGilbert Ramirez1-0/+347
preferences, and menus to gtk subdirectory. svn path=/trunk/; revision=623