aboutsummaryrefslogtreecommitdiffstats
path: root/prefs.c
AgeCommit message (Collapse)AuthorFilesLines
2001-06-18Various signed vs. unsigned fixes, from Joerg Mayer.guy1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3560 f5534014-38df-0310-8fa8-9805f1628bb7
2001-06-04Make Ethereal default to promiscuous-mode captures, the way it didguy1-6/+5
before promiscuous-vs-non-promiscuous was made a preference in the preferences file (I suspect at least some of the problems people are seeing with captures on Windows not seeing all the traffic they expect to see might be due to the captures not being done in promiscuous mode - and the default behavior shouldn't have changed in any case). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3511 f5534014-38df-0310-8fa8-9805f1628bb7
2001-05-31Support for "-N" flag enabling selected forms of name resolution, fromguy1-13/+86
Joerg Meyer. Support for saving to the preferences file the settings for all types of name resolution. Do a case-insensitive check for "true" and "false" in Boolean preference settings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3489 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-15There's no "enable name resolution in captures" preference in Ethereal,guy1-10/+20
and never was - there's only an Ethereal-wide "enable name resolution" preference. Name it just "name_resolve". Replace all tests of "g_resolving_actif" with tests of "prefs.name_resolv", and replace all code that sets "g_resolving_actif" with code that sets "prefs.name_resolv", so that the setting of "prefs.name_resolv" actually affects whether names are resolved or not. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3300 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-13Added the ethereal capture preferences to the preference file.jfoster1-1/+50
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3298 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-02"get_home_dir()", in "epan/filesystem.c", usesguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3241 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-05Map the old MGCP preference names to the new ones (including a specialguy1-5/+80
hack to handle the two copies of "mgcp.{tcp,udp}.port" as best we can). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2832 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Add a new "prefs_register_protocol()" routine, which is likeguy1-1/+13
"prefs_register_module()" except that it takes a protocol index as returned by "proto_register_protocol()" as its first argument, rather than taking two character strings as arguments as its first two arguments, and uses the protocol's abbreviation as the name to use for preferences in the preferences file and the "-o" flag and uses the protocol's short name as the name to use in the tabs in the "Edit->Preferences" window. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2812 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Have "proto_register_protocol()" build a list of data structures forguy1-1/+9
protocols, in addition to adding structures to the list of filterable fields. Give it an extra argument that specifies a "short name" for the protocol, for use in such places as pinfo->current_proto; the dialog box for constructing filters; the preferences tab for the protocol; and so on (although we're not yet using it in all those places). Make the preference name that appears in the preferences file and the command line for the DIAMETER protocol "diameter", not "Diameter"; the convention is that the name in question be all-lower-case. Make some routines and variables that aren't exported static. Update a comment in the ICP dissector to make it clear that the dissector won't see fragments other than the first fragment of a fragmented datagram. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2810 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-18Fix a number of problems that caused compiles to fail ifguy1-5/+5
PLUGINS_NEED_ADDRESS_TABLE was defined. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2662 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-15At least on UNIX/X, make the wildcard pattern that's the initialguy1-2/+47
fixed-width font preference match only ISO 8859/1 fonts, so that we don't match ISO 10646 fonts (as happens on some systems). Users will have to select a font with the appropriate character set encoding if they don't want stuff displayed as 8859/1 (note that making the widgets that use the fixed-width font handle arbitrary character sets is probably a non-trivial task, given that the *dissectors* will also have to handle arbitrary character sets, and that the character set used in a given packet isn't necessarily the character set in the user's locale). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2496 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-28More EPAN-related code movements. Get rid of usage of #include "globals.h"gram1-1/+2
and #include "util.h" from epan code. Move get_home_dir() into epan/filesystem.c as it's used by plugins.c. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2461 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-12Oops, I left off one "-*" in the XLFD description for the font that isguy1-2/+2
6x13 on most UNIXes (frankly, I think XLFD should have been hidden very deeply in the bowels of most X toolkits, and not even exposed to most programmers, much less to users). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2420 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-08Graham Bloice's patch to support inverse video rather than boldfaceguy1-1/+13
highlighting of the bytes, in the hex dump window, corresponding to a selected field. Also, make "remember_ptree_widget()" static, as it's not used outside "gtk/proto_draw.c". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2399 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-21Add prefs.gui_marked_[fb]g color preferences for thedeniel1-1/+37
color of marked frames. They are currently only available from preferences file, but I will add the color selection in GUI later. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2327 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-21Instead of each set of built-in preferences having "ok", "save",guy1-8/+86
"cancel", and "delete" methods, give them: "fetch" - fetch from the notebook tab any values not already stored in "prefs", and store them there, but doesn't apply them; "apply" - apply the settings in "prefs"; "destroy" - clean up any windows created from the tab. As we no longer have "cancel" methods, we don't have per-preference code to revert preference values; instead, we have the common preference dialog box code make a copy of all the current preferences, and, when the "Cancel" button is clicked, free the current preferences and copy the saved preferences to it, and apply the preferences. Add an "Apply" button to the preference dialog box, which applies the current preferences without closing the dialog box. Treat a request to delete the preferences dialog box as equivalent to clicking "Cancel". Have a "remember_ptree_widget()" routine to remember all protocol tree widgets, and use the list of those widgets when we set GUI preferences for the protocol tree widgets, rather than setting the main protocol tree widget and then using the list of packet windows. Move that code out of "main.c" to "proto_draw.c", as it's not used by anything in "main.c", but is used by stuff in "proto_draw.c". Make the font one of the preferences we can set on the fly for protocol tree widgets. Also make it something we can set on the fly for the packet list widget. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2316 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-20Instead of having the normal-weight and bold fonts set separately,guy1-1/+14
generate the name of the boldface font from the Roman font; if the two fonts don't have the same widths, the display will look weird when a field is selected, and it's a bit of a pain for the user to have to select *two* fonts. On UNIX/X, default to "-*-fixed-medium-r-semicondensed-*-*-120-*-*-*-*-*-" rather than to "-*-lucidatypewriter-medium-r-normal-*-*-120-*-*-*-*-iso8859-1" - some Linux distributions appear to lack the Lucida typewriter font. Add a "gui.font_name" preference to the preferences file, specifying the normal-weight font to use. Have it settable from the "GUI" tab in the Preferences dialog box - the "Font..." button, when clicked, pops up a font selection dialog box. If we either can't open the selected font or the boldfaced version of the font, default to "6x13" and "6x13bold" as fallbacks - the former will probably be "fixed", and the latter would be "fixedbold" if X actually created such an alias, but it doesn't so we use "6x13bold" instead. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2304 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-15Fix a problem with const char *deniel1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2276 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-15Implements the "Properties" menu item which displays the preferences windowdeniel1-1/+20
at the correct notebook page when a particular protocol (which has registered some preferences) is selected in the tree view. - add set_menus_for_selected_tree_row() in menu.[ch] - add prefs_is_registered_protocol() and prefs_get_title_by_name() in prefs.[ch] git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2275 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-11Miscellaneous code cleaningdeniel1-1/+3
- 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). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2254 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-07Cast an argument to "isspace()" to "guchar" so that if it has the 8thguy1-2/+2
bit set it won't get sign-extended; this squelches a GCC complaint, and may keep weird things from happening if there're non-ASCII ISO 8859/n characters in a preferences file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2221 f5534014-38df-0310-8fa8-9805f1628bb7
2000-07-09Turn the code of "colorize_packet()" into a static routine that is givenguy1-10/+34
a word to use in the progress dialog, and a flag indicating whether the display filter is to be reevaluated or not, and: have "colorize_packet()" call that routine with "Colorizing" and FALSE as those arguments; have the filtering code call that routine with "Filtering" and TRUE as those arguments; add an exported routine to call that routine with "Reprocessing" and TRUE as those arguments, to use to re-generate the packet list and to re-filter the packets if a protocol preference has been changed. Keep track of whether preferences are changed from their initial value by a preferences file or a command-line option, or from their previous value by the "Preferences" dialog box; have "prefs_apply_all()" only call the "apply" callback for a module if they have. Call "prefs_apply_all()" after the command-line arguments have been parsed and after "OK" has been clicked in the "Preferences" dialog box, to notify modules of preference changes if they've registered a callback for that. After "OK" has been clicked in the "Preferences" dialog box, if any preferences have changed, call the reprocessing routine, as the summary line for some frames and/or the current display filter's value when applied to some frames may have changed as a result of a preference change. Do the same after "OK" or "Apply" has been clicked in the "Display Options" dialog box (as it controls a protocol preferences item. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2126 f5534014-38df-0310-8fa8-9805f1628bb7
2000-07-05Add support for a global "ethereal.conf" preferences file, stored in theguy1-43/+542
same directory as the "manuf" file ("/etc" or "/usr/local/etc", most likely). Add a mechanism to allow modules (e.g., dissectors) to register preference values, which: can be put into the global or the user's preference file; can be set from the command line, with arguments to the "-o" flag; can be set from tabs in the "Preferences" dialog box. Use that mechanism to register the "Decode IPv4 TOS field as DiffServ field" variable for IP as a preference. Stuff that still needs to be done: documenting the API for registering preferences; documenting the "-o" values in the man page (probably needs a flag similar to "-G", and a Perl script to turn the output into documentation as is done with the list of field); handling error checking for numeric values (range checking, making sure that if the user changes the variable from the GUI they change it to a valid numeric value); using the callbacks to, for example, update the display when preferences are changed (could be expensive); panic if the user specifies a numeric value with a base other than 10, 8, or 16. We may also want to clean up the existing wired-in preferences not to take effect the instant you tweak the widget, and to add an "Apply" button to the "Preferences" dialog. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2117 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-29Remove instances of getenv("HOME") and provide a get_home_dir() functiongram1-6/+7
which provides a default value if "HOME" is not set. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1579 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-03Don't have "write_prefs()" display a dialog box if the attempt to openguy1-8/+12
the preferences file fails, have it return an error indication and the path of the preferences file, and have its caller display the dialog box. That way you don't have to drag in the dialog box code if you're going to use the preferences code in, say, a "line-mode" Ethereal. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1413 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-30Allow user to modify appearance of lines and expanders in GUI protocolgram1-3/+48
tree. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1400 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-29Changed the protocol tree widget from a GtkTree to a GtkCTree. The two reasonsgram1-1/+26
I did this: First, Havoc Pennington, in "GTK+/Gnome Application Development", in Appendix seciton A.3.88, recommends using GtkCTree instead of GtkTree because GtkCtree is faster, and GtkTree has limitation on its total row height: since it must fit inside a GdkWindow, it is limited to 32,768 pixels of height. GtkTree is more flexible with regards to the types of widgets that can be placed in the tree, but since we deal only with text, that doesn't matter, at least for now. Secondly, a GtkTree doesn't allow arrow-key navigation (at least as far as I could tell). It always bothered me that the up and down arrow keys worked in the packet list and in the hex dump, but no in the protocol tree. GtkCTree does allow arrow-key navigation. In fact, GtkCTree is a subclass of GtkCList (the packet list widget), so they behave a lot alike. I went ahead and fixed the selection bar which has been bothering Richard for a long time now. :) In the GUI preferences dialogue, you can now set both the packet list selection bar and the protocol tree selection bar to either "browse" or "select" mode. "browse" mode is what you're used to: the arrow keys move an outline of the selection bar, but do not change the selection. "select" mode does change the selection when the arrow keys are pressed. The default behavior is set to "select", which seems more natural for a first-time user. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1393 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-29Move the definition of "prefs" from "gtk/prefs_dlg.c" to "prefs.c", soguy1-1/+3
that you don't have to have "gtk/prefs_dlg.c" to get it defined - future non-GTK (text mode, curses, etc.) programs wouldn't have it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1387 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-16Add a new page to the Preferences notebook: a GUI page. The solegram1-1/+15
option right now is the placement of the vertical scrollbars in the 3 panes. (it's one decision; you can't have the placement of the vertical scrollbar in the packet list pane different than the placement in the protocol tree pane, for example). I did this because I find it convenient to have the vertical scrollbars on the *left* side of the text. My mouse cursor is usually expanding and collapsing the protocol tree widgets, and once the protocol tree changes size, I usually have to scroll. I'd rather move my mouse cursor just a few pixels over to find the vertical scrollbar. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1351 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-09Move the GTK+ implementations of various UI utilities out of "util.c"guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1255 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-02Add stream window color preferences. We don't (yet) use cmaps, so thisgerald1-6/+74
may not work with pseudocolor systems. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1179 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-09More shuffling of GTK-related routines to gtk subdirectory.gram1-140/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@636 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-09More shuffling of GTK-related files to gtk subdirectory.gram1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@635 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-01Moved GTK-dependent routines for file dialogues, print dialogues, printgram1-1/+2
preferences, and menus to gtk subdirectory. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@623 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-13Added support for compiling on win32 with Visual C and 'nmake'. It compiles,gram1-1/+13
but does not link. Perhaps someone who understands the MS tools can help out. I made it link a few months ago, but with different version of glib/gtk+. I can't remember how I made it link. Most of the compatibility issues were resolved with adding #ifdef HAVE_UNISTD_H the the source code. Please be sure to add this to all future code. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@359 f5534014-38df-0310-8fa8-9805f1628bb7
1999-06-21Found some erroneous usages of gtk_signal_connect_object. I always wonderedgram1-29/+21
why I had to swap fields (data = w) in some of the callback functions when I added support for gtk+-1.1. Because of the use of gtk_signal_connect_object, the wrong value was being sent to the callback function. We were just lucky that with gtk+-1.0 it worked. gtk_signal_connect_object is for use with callbacks that take one argument. gtk_signal_connect is for use with callbacks that take two arguments. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@324 f5534014-38df-0310-8fa8-9805f1628bb7
1999-06-12Don't pop up the "Can't open preferences file" dialog until *after*guy1-6/+5
we've shown the top-level window, because we want it to pop up on *top* of the top-level window, rather than being hidden behind it. Put a "strerror()"-based reason *why* the open failed in that dialog. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@308 f5534014-38df-0310-8fa8-9805f1628bb7
1999-03-01Added display filters to wiretap.gram1-4/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@198 f5534014-38df-0310-8fa8-9805f1628bb7
1998-12-29* Added Joerg Mayer's Vines patchgerald1-7/+4
* Added Joerg to the AUTHORS file * Added Guy's bitfield decode patch * Fixed time output git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@142 f5534014-38df-0310-8fa8-9805f1628bb7
1998-12-22Fixed more bugs with dialogues and gtk+-1.1.x.gram1-6/+22
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@137 f5534014-38df-0310-8fa8-9805f1628bb7
1998-12-17A patch spread across many files to let Ethereal compile under GTK+-1.1.x.gram1-1/+2
Tests for GTK versions are done during compilation, not during "./configure". The big problems have been taken care of in this patch (functional change in the packet clist and conversion of menu_factory to item_factory), but plenty of smaller problems with dialogue boxes abound. I have fixed a small problem with file_open*(), but have left 2 comments in just in case I'm not going about this the right way. Can someone verify? git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@127 f5534014-38df-0310-8fa8-9805f1628bb7
1998-11-18* Disable filter-related widgets if we're using wiretap.gerald1-1/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@105 f5534014-38df-0310-8fa8-9805f1628bb7
1998-11-18* Added patches from Laurent and Guygerald1-6/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@103 f5534014-38df-0310-8fa8-9805f1628bb7
1998-11-17* Added column formatting functionality.gerald1-42/+193
* Added check_col(), add_col_str() and add_col_fmt() to replace references to ft->win_info. * Added column prefs handling code. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@97 f5534014-38df-0310-8fa8-9805f1628bb7
1998-10-29* Fixes for problems with the preference initialization code (Guy)gerald1-5/+10
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@77 f5534014-38df-0310-8fa8-9805f1628bb7
1998-10-28* Added preference file saves and reads.gerald1-3/+216
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@75 f5534014-38df-0310-8fa8-9805f1628bb7
1998-10-16* Copied in the correct GNU license (I'm such a goober)gerald1-3/+3
* Hacks to the filter interface (Gerald) * About box (Laurent) * AppleTalk support (Simon) * Mods to the match_strval routine (Gerald) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@61 f5534014-38df-0310-8fa8-9805f1628bb7
1998-10-13* Pod page updategerald1-5/+6
* Minor tweaks to the filter prefs git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40 f5534014-38df-0310-8fa8-9805f1628bb7
1998-10-12- Added match_strval function to packet.cgerald1-20/+28
- Separated display and capture filters; rearranged some of the look and feel - Lots of other miscellaneous fixes and updates git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38 f5534014-38df-0310-8fa8-9805f1628bb7
1998-10-10* OSPF alignment fixes (Gerald)gerald1-10/+31
* FDDI support (Laurent, Guy) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36 f5534014-38df-0310-8fa8-9805f1628bb7