aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/colors.c
AgeCommit message (Collapse)AuthorFilesLines
2003-01-08Separate the routines to allocate colors from the routines to handleGuy Harris1-222/+19
color filters. svn path=/trunk/; revision=6872
2002-11-03Merge gtk and gtk2 directories.Olivier Abad1-3/+6
svn path=/trunk/; revision=6552
2002-09-23Change to color filters :Olivier Abad1-5/+6
- 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-05Include cleanups in gtk and gtk2:Jörg Mayer1-6/+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-6/+6
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-5/+1
equivalents for the gtk/ directory. svn path=/trunk/; revision=5930
2002-07-29From Joerg Mayer:Guy Harris1-2/+5
gtk/colors.c: Fix a memleak found by valgrind (Note that there are similar bugs in other functions that use the same construct with path!) svn path=/trunk/; revision=5910
2002-05-27Clean up the data structures for the color filter code a bit. The oldGuy Harris1-23/+9
"colfilter" structure contained items of use only when the colorizing dialog was up, so make the items in it private to "gtk/color_dlg.c". Make the "Edit" and "Delete" buttons sensitive only when a row is selected, and make the "Up" and "Down" buttons sensitive only when a row is selected *and* that row has somewhere to move in the specified direction. svn path=/trunk/; revision=5575
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-3/+3
"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-08Don't process a color filter if there's no filter associated with it.Guy Harris1-107/+111
Don't put a color filter into the list of color filters if we can't allocate the colors for the filter. Clean up white space. svn path=/trunk/; revision=4502
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez1-1/+20
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-02From John McDermott:Guy Harris1-83/+52
Adds an "Add Expression..." button to the color filter creation dialog. Improve the look of the "Add color to protocols" window. Clean up some ugly code. Give John credit in the AUTHORS file for the coloring stuff. svn path=/trunk/; revision=4301
2001-10-24Have a routine that takes a file name for a personal configuration fileGuy Harris1-21/+3
and generates the path name; have it, if the file is to be opened for reading on Win32, check whether it exists and, if not, check for it in the old home directory-based configuration directory and, if so, return that path instead, so that files saved with earlier versions of Ethereal will be seen. svn path=/trunk/; revision=4072
2001-10-24On Windows, put Ethereal configuration files under the "ApplicationGuy Harris1-2/+3
Data\Ethereal" directory under the user's profile, as that appears to be the Windows 2000 standard. svn path=/trunk/; revision=4071
2001-10-23Add a new routine to create the ".ethereal" directory for a user.Guy Harris1-1/+12
Use that routine rather than duplicating that code in the routines to write out the preference file and filter files. Use it in the code for the color filter dialog, so that the directory in question is created if necessary. As that routine returns an error indication, have the code that calls that routine put up a message box if the attempt fails. svn path=/trunk/; revision=4065
2001-10-22Add a routine to get the directory in which personal configuration filesGuy Harris1-15/+23
reside. Use it, rather than concatenating the user's home directory and ".ethereal" in a number of files. Fix up some additional places to use G_DIR_SEPARATOR_S as the pathname separator. svn path=/trunk/; revision=4061
2001-10-21Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in formatGuy Harris1-3/+3
strings used to generate pathnames. svn path=/trunk/; revision=4057
2001-10-21Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in formatGuy Harris1-4/+2
strings used to generate pathnames. Move the definition of PF_DIR from <epan/epan.h> to <epan/filesystem.h>, so that files requiring only the definition of PF_DIR don't have to include <epan/epan.h>, and get rid of no-longer-necessary includes of <epan/epan.h>. Add a routine to get the directory for "system files" such as "/etc/ethers" - it's "/etc" on UNIX, and the datafile directory on Windows (as there's no "/etc" on Windows). Use that to construct the pathname of the ethers and ipxnet files. svn path=/trunk/; revision=4056
2001-04-24Signed vs. unsigned fixes from Joerg Mayer.Guy Harris1-2/+2
svn path=/trunk/; revision=3373
2001-04-02"get_home_dir()", in "epan/filesystem.c", usesGuy Harris1-2/+2
"find_last_pathname_separator()" on Win32; move the other pathname manipulation routines from "util.c" into "epan/filesystem.c". Remove from "util.h" the declarations of routines not defined in "util.c", and put them into "epan/filesystem.h" if they're not already there. Adjust #includes to make the above work. svn path=/trunk/; revision=3241
2001-02-01Create a more modular type system for the FT_* types. Put themGilbert Ramirez1-7/+7
into epan/ftypes. Re-write display filter routines using Lemon parser instead of yacc. Besides using a different tool, the new grammar is much simpler, while the display filter engine itself is more powerful and more easily extended. Add dftest executable, to test display filter "bytecode" generation. Add option to "configure" to build dftest or randpkt, both of which are not built by default. Implement Ed Warnicke's ideas about dranges in the new display filter and ftype code. Remove type FT_TEXT_ONLY in favor of FT_NONE, and have protocols registered as FT_PROTOCOL. Thus, FT_NONE is used only for simple labels in the proto tree, while FT_PROTOCOL is used for protocols. This was necessary for being able to make byte slices (ranges) out of protocols, like "frame[0:3]" Win32 Makefile.nmake's will be added tonight. svn path=/trunk/; revision=2967
2000-09-28More EPAN-related code movements. Get rid of usage of #include "globals.h"Gilbert Ramirez1-1/+2
and #include "util.h" from epan code. Move get_home_dir() into epan/filesystem.c as it's used by plugins.c. svn path=/trunk/; revision=2461
2000-08-11Miscellaneous code cleaningLaurent Deniel1-1/+4
- 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-20Use ESD_TYPE_CRIT for most errors (the model used by various GUIs seemsGuy Harris1-4/+4
to use "warning" dialog boxes only to warn the user "if you do that, bad things may happen" *and* to offer them the option either to drive on or quit, so perhaps ESD_TYPE_CRIT should be used for all errors). However, put "Ethereal: Error" rather than "Ethereal: Critical" in the title bar, in the hopes that it'll make it clearer that Something Bad Happened. If the user specifies that captures should be saved to a user-specified file rather than a temporary file, report errors trying to create that file with "file_open_error_message()". Make the "for_writing" argument to "file_open_error_message()" a "gboolean", as it's either TRUE (if the file is being opened for writing) or FALSE (if it's being opened for reading). Report EISDIR as "XXX is a directory (folder), not a file.". svn path=/trunk/; revision=2143
2000-02-12Remove some unnecessary includes from "gtk/color_dlg.c" andGuy Harris1-2/+1
"gtk/colors.c", and make "gtk/color_dlg.c" include "gtk/color_dlg.h" to make sure compilation checks the declaration of the routines with their definitions. svn path=/trunk/; revision=1623
2000-02-12Split the color manipulation stuff into "color_dlg.[ch]", containing theGuy Harris1-1081/+5
dialog boxes for editing color filtes, and "colors.[ch]", containing the toolkit-dependent code to manipulate colors. svn path=/trunk/; revision=1622
2000-02-12The color stuff is almost completely toolkit-dependent (this isn't justGuy Harris1-0/+1387
the color-selection and color-filter-editing GUI stuff; different toolkits, and different windows systems, have their own notions of color objects - they may have nothing in common other than the notion that colors have red, green, and blue values); move it all to the "gtk" subdirectory for now, and, as we discover stuff stuff that can be made platform-independent, drag it up to the top-level directory. svn path=/trunk/; revision=1621