aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/print_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2006-02-13add missing #include "tempfile.h"Ulf Lamping1-0/+1
svn path=/trunk/; revision=17289
2006-02-13Copy over the file open/save code from the Win32 native branch.Gerald Combs1-8/+39
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. svn path=/trunk/; revision=17285
2005-11-26fix #358: instead of simply using tpmnam() for the Win32 print function, use ↵Ulf Lamping1-2/+18
the "official" function to create a temporary file Well, we actually only need the filename here, so create a temp file with the "official" create_tempfile function, keep that tempfile name and then delete this file again, leaving only the name. I know that's a bit uncommon, but should work and uses the same mechanisms as with other temporary files. So if there are still problems with the official function, we only have one place to fix :-) svn path=/trunk/; revision=16597
2005-11-06replace *a lot* of file related calls by their GLib counterparts. This is ↵Ulf Lamping1-2/+2
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. svn path=/trunk/; revision=16403
2005-08-20- Declare some functions staticJörg Mayer1-1/+1
- Add plugins_dlg.h - Include .h files in their respective .c files - Include .h and remove extern declarations in .c files - set eol-style and keywords on gui_utils.[hc] svn path=/trunk/; revision=15471
2005-08-20renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical ↵Ulf Lamping1-1/+1
named ui_util.h in / dir svn path=/trunk/; revision=15465
2005-08-05More char -> const char warning fixes.Jörg Mayer1-2/+2
Removed (very few) casts that only change the warning message but don't remove it (with gcc-4). svn path=/trunk/; revision=15227
2005-03-11from Stefano Pettini: add CSV export function, similar to PSML exportUlf Lamping1-2/+62
svn path=/trunk/; revision=13724
2005-02-04Instead of having a single enumerated type for status return values fromGuy Harris1-9/+9
cf_ functions, have separate ones for different classes of routines, and use gboolean when the return value is just "success" or "failure" - that way you don't get compiler warnings if a case statement isn't handling a particular status value if the routine in question won't return it. svn path=/trunk/; revision=13293
2005-02-04huge cleanup of capture file API (functions in file.c/file.h).Ulf Lamping1-7/+7
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... svn path=/trunk/; revision=13289
2005-01-24if context menu item "Print" is clicked from the packet list context menu, ↵Ulf Lamping1-2/+17
it should use the selected range setting as default. As we currently have only one packet selectable, this will print only this one. If we would allow selecting multiple packets in the packet list in the future, this option would print all selected packets. svn path=/trunk/; revision=13169
2005-01-20add some more online help functionality and help buttons at various dialog ↵Ulf Lamping1-2/+12
boxes, if a help page *is* available. However, the new help system needs a lot more work before completed. svn path=/trunk/; revision=13152
2004-12-22From Brett Kuskie: recalculate the ranges every time an export dialog isGuy Harris1-15/+15
opened, not just the first time, so that if the packet counts change up-to-date values are displayed. svn path=/trunk/; revision=12813
2004-10-16Remove the fixed maximum number of subranges in a range_t; dynamicallyGuy Harris1-0/+8
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. svn path=/trunk/; revision=12320
2004-09-30For file browsing dialog boxes, the affirmative button should be "OK",Guy Harris1-1/+2
not "Save". In UN*X with GTK+ 2.x, put the affirmative button in file dialogs to the right of the cancel button, as is done with other dialogs. svn path=/trunk/; revision=12146
2004-09-27Move prefs.c and prefs.h into the epan subdirectory.Guy Harris1-1/+1
svn path=/trunk/; revision=12115
2004-07-27Move the code to open the printer/print file from "print_packets()" toGuy Harris1-1/+40
"print_ok_cb()", and have "print_packets()" just work on a "print_stream_t" handed to it, so that different platforms can open the printer/print file in different ways (opening the file is probably not going to be platform-dependent, but opening the printer will be). svn path=/trunk/; revision=11544
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-07-08Make the "human-readable text vs. PSML vs. PDML" choice separate fromGuy Harris1-14/+18
the "text vs. PostScript" choice. The "text vs. PostScript" choice should probably ultimately be done with a generic set of print methods, to handle various platform-native print mechanisms more cleanly (and perhaps the dialog box code for "export as {PDML,PSML}" should be separate from the "export as text"/"print" dialog). svn path=/trunk/; revision=11342
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-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-05-27win_printer is gboolean, not an intUlf Lamping1-4/+4
svn path=/trunk/; revision=11024
2004-05-26more code cleanup from dialog things:Ulf Lamping1-20/+18
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-25removed some labelsUlf Lamping1-26/+6
svn path=/trunk/; revision=10705
2004-04-25Squelch a compiler warning.Guy Harris1-2/+3
svn path=/trunk/; revision=10700
2004-04-25created new "export" dialogs for the current export file formatsUlf Lamping1-83/+319
svn path=/trunk/; revision=10694
2004-04-25put all required data into the print_args,Ulf Lamping1-25/+21
instead of confusing seperation of data svn path=/trunk/; revision=10692
2004-04-25changed the print dialog, so it will keep the user settings after reopening ↵Ulf Lamping1-119/+85
the dialog and some code cleanup svn path=/trunk/; revision=10685
2004-04-24some code cleanup of the printing systemUlf Lamping1-15/+23
svn path=/trunk/; revision=10682
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-316/+4
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-04-22added some options and enhancements to the print output:Ulf Lamping1-1/+20
-ps: added formatting hints for ghostscript, so pdf conversion will be much better -ps: print a thin line at the top and bottom of each page -ps/text: add an option to start a new page for every packet (formfeed) svn path=/trunk/; revision=10660
2004-04-17added PSML output to the printing dialogUlf Lamping1-3/+18
svn path=/trunk/; revision=10628
2004-04-16make print dialog "Packet Format" options somewhat similar to theUlf Lamping1-50/+80
Ethereal panes, thus better understandable svn path=/trunk/; revision=10611
2004-04-16bugfix: make the "no dissections" radiobutton insensitive,Ulf Lamping1-4/+9
if packet details isn't selected svn path=/trunk/; revision=10610
2004-04-15added print output option, to suppress dissection completelyUlf Lamping1-7/+19
(for raw packet hexdump) svn path=/trunk/; revision=10607
2004-04-15added print output of PDML formatUlf Lamping1-16/+29
svn path=/trunk/; revision=10606
2004-02-11Add "write_failure_alert_box()" to put up an alert box for a failedGuy Harris1-3/+2
attempt to write to a file (or close a file opened for writing). Get rid of no-longer-needed #includes of <epan/filesystem.h>. svn path=/trunk/; revision=10027
2004-02-11Add an "open_failure_alert_box()" routine to pop up an alert box for aGuy Harris1-3/+3
failed attempt to open/create a file. Fix one call to pass the right value for the "for_writing" flag. svn path=/trunk/; revision=10026
2004-01-31change layout, as dialog was a bit tall,Ulf Lamping1-25/+29
improved resizability svn path=/trunk/; revision=9927
2004-01-31Pass ESD_BTN_OK rather than NULL as a second argument toGuy Harris1-6/+6
"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-6/+6
better reflect the real error text svn path=/trunk/; revision=9913
2004-01-25There's no need to keep a "FILE *" for the file being printed to in aGuy Harris1-5/+22
"capture_file" structure. Keep it locally, instead. Check for errors when printing packets. Report failure to open a print destination and failure to write to a print destination differently. Don't have the "print preamble" and "print final" routines return success/failure indications - revert to the old scheme where they didn't, and have the callers use "ferror()" to check for errors. Report write errors when printing dissections in Tethereal. Report print errors as errors, not warnings. svn path=/trunk/; revision=9828
2004-01-21implemented dlg_button_row_new to get a standard function forUlf Lamping1-14/+5
layouting the dialog buttons, and use it where appropriate. This will help us with the GTK1/2 conflict on button layouts and will also result in a more consistent look of the dialogs at all. svn path=/trunk/; revision=9771
2004-01-21use stock buttons whereever possible,Ulf Lamping1-2/+2
added some ethereal specific stock icons svn path=/trunk/; revision=9763
2004-01-10using button compatibility macrosUlf Lamping1-3/+3
svn path=/trunk/; revision=9636
2004-01-10using button compatibility macrosUlf Lamping1-136/+34
svn path=/trunk/; revision=9633
2004-01-09use the same packet range things for "Print" dialog, as already implementedUlf Lamping1-113/+354
in the "Save As" dialog and some other minor changes svn path=/trunk/; revision=9610
2003-12-23Base the count of selected packets on whether there's aGuy Harris1-14/+14
currently-selected packet. Use "cfile.count" as the total number of packets in the capture. Use "plurality" to display "packet" vs. "packets". svn path=/trunk/; revision=9423
2003-12-13sensitivity of packet range options fine tuning:Ulf Lamping1-5/+13
don't let the user choose "selected packets", when no packets displayed svn path=/trunk/; revision=9265