aboutsummaryrefslogtreecommitdiffstats
path: root/colors.c
AgeCommit message (Collapse)AuthorFilesLines
1999-11-30Stuff in "colors.c" largely need work only on a "colfilter", not on aGuy Harris1-103/+98
"capture_file" - when handed a "capture_file *", it only cared about the "colors" entry. The only time it cares about a "capture_file" is when it's actually filtering the packets, as it needs to hand the "capture_file *" to "colorize_packets()". Make the stuff exported by "colors.c" in "colors.h" take "colfilter *" arguments (or return a "colfilter *" to be stuffed into a "capture_file"). svn path=/trunk/; revision=1162
1999-11-30Make a whole pile of routines private to "colors.c" static, and removeGuy Harris1-78/+101
their declarations from "colors.h". Do the same with some variables - and remove the ones that aren't used any more. Make some name changes suggested in the comments in "colors.c". Make "color_delete_cb()" take, as the user-supplied argument, "cf->colors", just as "color_new_cb()" does, and make it use its argument to find the color filter, just as "color_new_cb()" does, rather than using "cf.colors". When there are no colors in the list, make the "Edit" button insensitive; make it sensitive if there are any colors in the list, so that we don't crash if you press "Edit" when there are no colors in the list. Make "remember_selected_row()" take, as the user-supplied argument, "cf->colors", rather than "cf" - it needs only the color filter, not the entire "capture_file" structure. When using "gtk_clist_select_row()" to forcibly select a row, pass -1 as the column number, to indicate that we don't care which column is selected. Fix some typos in function names. svn path=/trunk/; revision=1161
1999-11-10More small memleak fixes.Gilbert Ramirez1-1/+2
colors.c wasn't freeing path in one place main.c wasn't freeing rc_file the frame_buffer fix in wtap.c didn't clear everything. svn path=/trunk/; revision=1001
1999-10-12Have "dfilter_compile()" return 0 on success and 1 on failure, andGuy Harris1-10/+7
return the pointer to the compiled filter through a pointer argument. Have it check whether the filter is a null filter and, if so, free up the filter and supply a filter pointer, rather than obliging its callers to check whether the filter actually has any code. (Well, they may want to check if the filter is null, so that they don't save a pointer to the filter text, e.g. so that the display filter displays as "none" rather than as a blank string in the summary box.) In the process, fix the check in "gtk/file_dlg.c" that tests whether the read filter compiled successfully. svn path=/trunk/; revision=812
1999-10-11When a new display filter is to be applied, don't set "cf.dfilter" orGuy Harris1-14/+9
"cf.dfcode" if the new filter doesn't compile, because the filter currently in effect will be the one that was last applied - just free up the text of the new filter, and whatever memory was allocated for the new filter code. This means we allocate a new dfilter when a new filter is to be applied, rather than recycling stuff from the old filter, as we want the old filter code to remain around if the new filter doesn't compile. This means that "cf.dfilter" and "cf.dfcode" will be null if there's no filter in effect. svn path=/trunk/; revision=803
1999-10-07Phil Techau's patch to allocate colors read-only and, if we can't getGuy Harris1-29/+50
that color from the system colormap, get the best color mode from GTK+, allocate a new colormap, and use that colormap. svn path=/trunk/; revision=784
1999-10-05Make "create_color_sel_win()" static to "colors.c" - it's not usedGuy Harris1-2/+3
outside that file. svn path=/trunk/; revision=771
1999-10-05Added Santeri Paavolainen's <santtu@ssh.fi> patch to set default colorsGilbert Ramirez1-10/+34
in the color selection wheel. Added his patch to file.c to look for bogus frame_data pointers, but made it a g_assert(). Modified my previous patch to colors.c to skip bad color display filters. I skipped them, but they still appeared in the color dialogue. Now bad filtes are not put into the color filter list, so they don't appear in the color dialogue. As a [good] side-effect, the next time you save your color filter list, the bad filters are removed from the colorfilters file. svn path=/trunk/; revision=768
1999-10-04Let color filter routines survive a bad display filter. It used toGilbert Ramirez1-1/+2
segfault on a bad colorfilters file. This file now works as expected; that is, the second filter is ignored: # DO NOT EDIT THIS FILE! It was created by Ethereal @ipx@ipx@[65535,65535,65535][65535,19104,22902] @bad@bad@[65535,65535,65535][65535,19104,22902] svn path=/trunk/; revision=765
1999-09-12Replace wrong '}' with ')' in #ifdef codeLaurent Deniel1-2/+2
svn path=/trunk/; revision=667
1999-09-09More shuffling of GTK-related files to gtk subdirectory.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=635
1999-08-28Stop processing of colorization display filters after first match.Gilbert Ramirez1-2/+3
Remove debugging statements from colors.c. Add blurb about Match Selected and Colorization to man page. svn path=/trunk/; revision=607
1999-08-28Removed debug printf's.Gilbert Ramirez1-14/+1
svn path=/trunk/; revision=598
1999-08-25"read_filters()" is actually called late enough in the startup processGuy Harris1-8/+17
that it can pop up a message box; have it do so. Make the "Can't open file" message boxes in "colors.c" include the "errno" error message in the message they put up. Don't complain about being unable to open the color filter file if it doesn't exist (perhaps the user just never made one). Make the message for a failure to open the preferences file resemble that for a failure to open a color filter file. svn path=/trunk/; revision=575
1999-08-24Removed unnecessary #include lines.Gilbert Ramirez1-38/+1
svn path=/trunk/; revision=569
1999-08-24Use "strchr()" rather than "index()" - "strchr()" is the ANSI standardGuy Harris1-2/+2
routine, it's what we use elsewhere in Ethereal, all modern UNIXes have it, and it's declared in <string.h>, unlike "index()" which isn't necessarily declared there (and thus we get GCC warnings about "index()" being undeclared). svn path=/trunk/; revision=567
1999-08-24Added John McDermott's colorization routines. There's still someGilbert Ramirez1-0/+1126
debug printf's in there. svn path=/trunk/; revision=562