Commit Graph

34 Commits

Author SHA1 Message Date
Ulf Lamping 0861927ce3 huge cleanup of capture file API (functions in file.c/file.h).
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-02-04 18:44:44 +00:00
Guy Harris d9d7d0be95 Mark unused arguments as such.
svn path=/trunk/; revision=13197
2005-01-29 20:35:42 +00:00
Ulf Lamping 3d9c7d48ae Add a new menu item "View/Resize Columns" to, well, resize columns. As this might take a long time, I've provided a progress bar with the option to cancel the operation.
I might later add something like "View/Auto Resize Columns" with a checkbox menu item, so this is done everytime a capture file finished loading. However, I don't know how well this will work together with "Update list of packets in real time" while doing a capture.

svn path=/trunk/; revision=13192
2005-01-29 02:14:25 +00:00
Guy Harris 5817bb4c03 Add a missing case.
svn path=/trunk/; revision=13020
2005-01-13 17:31:33 +00:00
Guy Harris 5da116d531 Throw in a cast to squelch an (unavoidable, and probably harmless -
GTK+'s function signatures aren't necessarily what they should be)
warning.

svn path=/trunk/; revision=12912
2005-01-01 12:32:28 +00:00
Guy Harris 6d24b27606 Make the "col_data" field in a "column_info" structure a pointer to an
array of "const char *" rather than to an array of "char *", and make
the second argument of "col_set_str()" a "const char *" - there's no
guarantee that "col_data" points to something you're allowed to modify.

svn path=/trunk/; revision=12880
2004-12-31 00:12:25 +00:00
Ulf Lamping a309bf0a8a first implementation of the packet history function
svn path=/trunk/; revision=12460
2004-11-01 11:42:08 +00:00
Guy Harris 7f5b234c5c Move the column preferences stuff to epan (the rest of the preferences
stuff is already there).

Update Gerald's e-mail address in column.h.

svn path=/trunk/; revision=12131
2004-09-29 02:54:22 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Gerald Combs 76fd761686 As suggested by Guy: Have mark_frame() do nothing if the frame has
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.

svn path=/trunk/; revision=11775
2004-08-19 14:35:55 +00:00
Guy Harris c3cba6617b Move the color-filter related stuff out of "color.h" into
"color_filters.h", as that's the appropriate place for it - "color.h"
should just deal with "color_t".

svn path=/trunk/; revision=11503
2004-07-24 02:29:14 +00:00
Guy Harris 34de3c15d9 Have "gtk/color_utils.c" contain routines with toolkit-independent APIs,
but toolkit-dependent implementations, for manipulating colors, and have
"gtk/color_utils.h" declare them (the header file should eventually be
moved to the top-level directory).  Move the routines to convert between
GdkColor and color_t out of there into "colors.c", and move their
declarations into "colors.h", as their APIs are toolkit-dependent.

Have the first such routine be a "create_color()" routine, which takes
RGB values and initializes a "color_t", including doing any
toolkit-dependent work necessary for that; use that in the
"gtk/color_filters.c" code (the goal is to remove as many of the toolkit
dependencies as possible from that code, and move it to the top-level
directory).

svn path=/trunk/; revision=11497
2004-07-24 00:35:13 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
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-18 00:24:25 +00:00
Ulf Lamping 25e6749eb4 move font related stuff to new file font_utils.c/.h
do some font related renaming/code cleanup

svn path=/trunk/; revision=11166
2004-06-17 16:35:26 +00:00
Ulf Lamping 0dde603d99 alyways use SIGNAL_EMIT_BY_NAME with one user parameter,
remove SIGNAL_EMIT_BY_NAME1 completely

svn path=/trunk/; revision=11118
2004-06-05 10:27:38 +00:00
Olivier Biot 11f9232336 From Lars Roland: Move timestamp_type into libethereal and provide accessor
methods for getting and setting the timestamp type.

This is a move towards a real libethereal shared library.

svn path=/trunk/; revision=10402
2004-03-18 19:04:33 +00:00
Ulf Lamping 5297f06717 replaced every appearance of gtk_scrolled_window_new() with
scrolled_window_new().
added gtk_scrolled_window_set_policy(AUTOMATIC,AUTOMATIC) to
scrolled_window_new()
added GTK2's gtk_scrolled_window_set_shadow(GTK_SHADOW_IN)
to every place needed

svn path=/trunk/; revision=9999
2004-02-06 19:19:12 +00:00
Ulf Lamping 3f2f2929eb added some more info to the statusbar (filesize, packet count, ..),
fixed a minor bug in the cfile handling (file length in summary dialog)

svn path=/trunk/; revision=9961
2004-02-03 00:16:59 +00:00
Guy Harris c3d41534ff If comparing any field other than the frame number, if both field values
are the same, compare the frame number, so that the sort order doesn't
depend on how packets happened to be sorted previously (i.e., so that if
you sort on a given column in a given direction, the sort order is
always the same).

svn path=/trunk/; revision=9918
2004-01-31 04:26:23 +00:00
Guy Harris f914e6e9e7 Fix the spelling of "cumulative" (and variables whose names derive from
that spelling).

svn path=/trunk/; revision=9917
2004-01-31 04:10:05 +00:00
Guy Harris d2e4e9ecc9 Fix a comment.
svn path=/trunk/; revision=9897
2004-01-28 10:37:14 +00:00
Guy Harris a92d9edf0f Clean up the comparison code a bit.
svn path=/trunk/; revision=9896
2004-01-28 10:19:36 +00:00
Guy Harris a66012b68c For columns whose data comes from the frame_data structure for a packet,
sort the columns based on that data, rather than on the raw text of the
column - that's probably faster, and also doesn't get rudely surprised
by "atof()" being locale-dependent.

svn path=/trunk/; revision=9895
2004-01-28 09:53:09 +00:00
Ulf Lamping 0353c5823f move timestamp format options from "View->Options" dialog into
menuitems under "View->Time Display Format".
renamed timestamp enum items e.g. from ABSOLUTE to TS_ABSOLUTE,
to prevent conflicting definitions with MSVC

svn path=/trunk/; revision=9729
2004-01-19 03:46:43 +00:00
Ulf Lamping 453309c0c6 added some menuitems "View->Show" including show/hide of all main widgets,
saving the states in the recent file

svn path=/trunk/; revision=9726
2004-01-19 00:42:12 +00:00
Guy Harris 6b61f72a9d Include <string.h> to declare "strcmp()".
svn path=/trunk/; revision=9614
2004-01-09 20:36:47 +00:00
Guy Harris 563f423d76 Turn the GTK+ 1.2.10 clist code into our own widget; that lets us modify it
to add functionality or improve performance, although, until we make it
work on GTK+ 1.3[.x] and 2.x, we shouldn't count on the performance
improvements, or make its API different from that of the GtkClist API
(other than names).

Move all the code that knows about the packet list into
gtk/packet_list.c, so that the GtkClist vs. EthClist stuff is
encapsulated inside it.

svn path=/trunk/; revision=9608
2004-01-09 08:36:23 +00:00
Guy Harris 11d8817da0 Don't automatically size the columns - that's expensive in large
captures, as it has to compute the width of an auto-resizing column in
every row.  Just pick fixed widths for the columns (and tune the width
of the "Protocol" column so that it's not narrower than the column
title).

svn path=/trunk/; revision=9219
2003-12-09 06:48:40 +00:00
Guy Harris 33b25ac15e From Jeff Morriss: avoid at least some N^2 behavior when changing the
time stamp format.

svn path=/trunk/; revision=9179
2003-12-06 04:05:02 +00:00
Olivier Abad 0ec7f232e2 In gtk2 code :
gdk_font_from_description() may return NULL if no GdkFont matching a
PangoFontDescription can be loaded.
Replace primitives using GdkFonts (gdk_string_width, gdk_draw_string)
with their pango equivalent (pango_layout_get_pixel_size,
gdk_draw_layout).

svn path=/trunk/; revision=6639
2002-11-15 22:21:15 +00:00
Olivier Abad 29011060de Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6610
2002-11-11 15:39:06 +00:00
Olivier Abad 05ef1fc475 Merge gtk and gtk2 directories.
svn path=/trunk/; revision=6552
2002-11-03 17:38:45 +00:00
Olivier Abad 1b89d48835 Change to color filters :
- moved color_filter_t in color.h
- change color_filter_t to use color_t instead of GdkColor

This changed allowed to remove the last gtk includes in file.c. It is
now completely free of any gtk related code.

svn path=/trunk/; revision=6324
2002-09-23 19:09:52 +00:00
Olivier Abad d72aca0b7e Removed all gtk calls in file.c :
- created a few packet_list_xxx functions (ui_util.h gtk/packet_list.c
  gtk2/packet_list.c) ;
- removed almost all "gtk/xxx" and "gtk2/xxx" includes in file.c

The only remaining includes are related to color filters. We have to
make color_filter_t GUI independent by replacing GdkColor with color_t.
I'll work on this later.

svn path=/trunk/; revision=6311
2002-09-21 11:36:30 +00:00