aboutsummaryrefslogtreecommitdiffstats
path: root/prefs.h
Commit message (Collapse)AuthorAgeFilesLines
* Make the "max count of recently-visited files" preference unsigned.Guy Harris2003-12-291-3/+3
| | | | | | | | Get rid of an unused variable. Fix up whitespace. svn path=/trunk/; revision=9475
* Connect the recent_file_count_max variable to the ↵Richard Sharpe2003-12-281-2/+2
| | | | | | | | | | prefs.gui_recent_file_count_max variable entry, and fix a small spelling/grammar mistake. Now all we need is some enterprising individual to write the small amount of preferences code to actually allow it to be changed etc, but I have to go to Costco, so, later... svn path=/trunk/; revision=9463
* Add a preferences item for the recent file count max so we can tie it toRichard Sharpe2003-12-281-1/+2
| | | | | | | the edit preferences dialog box and then use it in the code that handles recent files. svn path=/trunk/; revision=9462
* From Ulf Lamping: add a preference to control whether to show or hideGuy Harris2003-10-221-1/+2
| | | | | | the main toolbar (currently no GUI to set it; that's in progress). svn path=/trunk/; revision=8754
* From Ulf Lamping: add a GUI preference item to control the toolbarGuy Harris2003-10-161-1/+9
| | | | | | | | | | | | | | | | | | | | style. Make the style text arrays static, as nobody uses them outside prefs.c. Use FALSE and TRUE for the values for the Boolean controlling the highlighting style. Note that we're now using stock icons in the toolbar in GTK+ 2.x. Put back the resizing of elements in the top-level container, at least for GTK+ 1.2[.x]; otherwise, the toolbar's height never gets smaller, even if you change the style in such a way as to reduce the height of the elements (icons+text -> icons or text, icons -> text). Make some routines and variables not used outside gtk/toolbar.c static. svn path=/trunk/; revision=8720
* From Ian Schorr:Guy Harris2003-10-141-1/+10
| | | | | | | | | | | | | | Add a preference to control whether the "File > Open" dialog box should start out in the last directory in which it looked - and save that in the preferences file across invocations - or should always start out in a user-specified directory, and add another preference to specify that directory. Write out section name comments into the preferences file. Clean up white space a bit. svn path=/trunk/; revision=8699
* Don't put an entry for a protocol into the Preferences dialog if itGuy Harris2003-10-021-3/+6
| | | | | | | doesn't have any settable preferences (for example, if it has only obsolete preferences). svn path=/trunk/; revision=8590
* Don't export MAX_VAR_LEN - nobody uses it.Guy Harris2003-09-101-2/+1
| | | | svn path=/trunk/; revision=8453
* From Nathan Jennings:Guy Harris2003-09-081-1/+6
| | | | | | | | | | | support for user-supplied interface descriptions; support for hiding interfaces in drop-down list in capture dialog. Clean up comments written to preferences file. svn path=/trunk/; revision=8419
* From Michael Lum: add the ability to have a preferences file containingGuy Harris2003-08-071-4/+6
| | | | | | | | | | | a list of disabled protocols, and to save that list from the Edit > Protocols dialog box. Add checks for read errors in "read_prefs()". Clean up white space. svn path=/trunk/; revision=8144
* Add two preferences to control ADNS, one to enable/disable it and one toGerald Combs2003-07-221-1/+2
| | | | | | set its concurrency level. Fix an ADNS queueing bug. svn path=/trunk/; revision=8063
* Support putting preferences into arbitrary places in a tree, which isGuy Harris2002-12-201-12/+41
| | | | | | | | | used to construct the "Edit->Preferences" dialog box; this includes the ability to register a "subtree" for preferences. Instead of special-casing protocol preferences, have a subtree "Protocols" for protocol preferences. svn path=/trunk/; revision=6808
* - add a new GUI preference in the gtk2 port. It allows to useOlivier Abad2002-09-141-1/+2
| | | | | | | | | | alternating colors in all TreeView widgets (see gtk_tree_view_set_rules_hint()). - remove unused preferences in the gtk2 port (tree_expander_style and tree_line_style). svn path=/trunk/; revision=6296
* Removed trailing whitespaces from .h and .c files using theJörg Mayer2002-08-281-4/+4
| | | | | | | winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
* Fix a few more memleaks found by valgrind (all derivingJörg Mayer2002-08-011-3/+3
| | | | | | from the get_persconffile_path mess). svn path=/trunk/; revision=5927
* Add a mechanism for registering "obsolete" preference modules, so thatGuy Harris2002-05-111-1/+10
| | | | | | | | | | if a dissector had preferences at one point but no longer does, it can register that fact, so that the old preferences in the preference file are silently ignored. Use that mechanism in the NCP dissector. svn path=/trunk/; revision=5446
* Add a preferences page for the name resolution flags.Guy Harris2002-01-131-10/+1
| | | | | | | | | | | | | | | | | Separate the preferences value for those flags and the name resolution code's value into separate variables; this means that the resolution code no longer depends on the preferences code, and may let us eventually have the current setting and the preference setting differ (so that a user can temporarily override the preference setting without causing subsequent saves of the preferences to save the temporary value). Add routines to create various types of widgets for preferences, and to fetch the values for "enumerated" preferences, and use them both in the code to handle hardwired preference pages and table-driven preference pages. svn path=/trunk/; revision=4536
* Add a preferences page for capture preferences, so that the user canGuy Harris2002-01-101-1/+2
| | | | | | | | | | | directly edit the capture preferences, rather than only being able to set them implicitly from the values for the most recent capture. Add a preferences item for the interface on which to capture. Get rid of some unused variables. svn path=/trunk/; revision=4510
* Add preferences to save the main window size and position. If enabled,Gerald Combs2001-12-311-1/+10
| | | | | | | | | | the geometry is saved at exit. Should we save the main window pane sizes as well? Move the DEF_WIDTH and DEF_HEIGHT #defines from gtk/main.h to prefs.h. Remove the reference to DEF_WIDTH from proto_hier_stats_dlg.c. svn path=/trunk/; revision=4462
* Allow a dissector to register preferences that it no longer supports asGuy Harris2001-11-041-1/+8
| | | | | | | | | | | | | | | | | | | | | | obsolete; we silently ignore attempts to set those in a preferences file, so that we don't spam the user with error messages caused by them having saved preferences in an earlier release that contained those preferences. Make the Diameter and iSCSI dissectors register obsolete preferences. Crash if some code tries to register a preferences module with a name that contains something other than lower-case ASCII letters, numbers, or underscores, or that has already been registered, or if some code tries to register a preference with a name that contains something other than lower-case ASCII letters, numbers, underscores, or periods, or that has already been registered, so that we don't put code like that in a release and have to shovel code into "prefs.c" to fix it up later. (The problem with multiple modules or preferences with the same name should be obvious; the problem with names with blanks, or upper-case letters, or punctuation, is that they're a pain to type on the command line.) svn path=/trunk/; revision=4148
* Put "extern" in front of a pile of function declarations.Guy Harris2001-10-311-20/+21
| | | | | | | | | | | | | | It makes no difference if they really are function declarations; however, in plugins, when building on OSes that don't let dynamically-loaded modules access functions in the main program (e.g., Windows), when compiling a plugin, <plugin_api.h> defines the names of those functions as (*pointer_name), so they turn into declarations of pointer variables pointing to the functions in question, and, on platforms with a def/ref model in the linker, if a plugin has more than one source file that gets linked into the plugin, the linker may get upset at two definitions of the same variable. svn path=/trunk/; revision=4114
* Add a routine to get the directory in which personal configuration filesGuy Harris2001-10-221-5/+4
| | | | | | | | | | 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
* Note that we should supply a detailed explanation of syntax errors, soGuy Harris2001-07-221-1/+4
| | | | | | | we can say more than just that there was a "Syntax error" in the preferences file. svn path=/trunk/; revision=3772
* Support for "-N" flag enabling selected forms of name resolution, fromGuy Harris2001-05-311-3/+20
| | | | | | | | | | | | 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. svn path=/trunk/; revision=3489
* There's no "enable name resolution in captures" preference in Ethereal,Guy Harris2001-04-151-2/+2
| | | | | | | | | | | | 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. svn path=/trunk/; revision=3300
* Added the ethereal capture preferences to the preference file.Jeff Foster2001-04-131-1/+6
| | | | svn path=/trunk/; revision=3298
* Add a new "prefs_register_protocol()" routine, which is likeGuy Harris2001-01-031-1/+6
| | | | | | | | | | | | "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. svn path=/trunk/; revision=2812
* Add a "color.h" file that declares a nominally-toolkit-independentGuy Harris2000-11-211-8/+8
| | | | | | | | | | | | | | | "color_t" structure to store color values (although currently it has all the same fields that a GdkColor has; its currently advantage is that you don't have to include any GTK/GDK stuff to declare it). Add routines in the "gtk" directory to convert between "color_t" and GdkColor values. Define, in "prefs.h", all colors as "color_t" values rather than GdkColor values. "prefs.h" now no longer needs to include <gtk/gtk.h>, so don't include it. svn path=/trunk/; revision=2692
* Fix a number of problems that caused compiles to fail ifGuy Harris2000-11-181-3/+3
| | | | | | PLUGINS_NEED_ADDRESS_TABLE was defined. svn path=/trunk/; revision=2662
* Graham Bloice's patch to support inverse video rather than boldfaceGuy Harris2000-09-081-1/+2
| | | | | | | | | | 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". svn path=/trunk/; revision=2399
* Add prefs.gui_marked_[fb]g color preferences for theLaurent Deniel2000-08-211-1/+3
| | | | | | | | | color of marked frames. They are currently only available from preferences file, but I will add the color selection in GUI later. svn path=/trunk/; revision=2327
* Instead of each set of built-in preferences having "ok", "save",Guy Harris2000-08-211-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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. svn path=/trunk/; revision=2316
* Instead of having the normal-weight and bold fonts set separately,Guy Harris2000-08-201-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=2304
* Add a comment about the use of prefs_register_module() in protocol dissectorsLaurent Deniel2000-08-171-1/+5
| | | | | | (the name should match the one specified at the proto_register_protocol() call). svn path=/trunk/; revision=2287
* Fix a problem with const char *Laurent Deniel2000-08-151-2/+2
| | | | svn path=/trunk/; revision=2276
* Implements the "Properties" menu item which displays the preferences windowLaurent Deniel2000-08-151-1/+11
| | | | | | | | | | | | 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] svn path=/trunk/; revision=2275
* Turn the code of "colorize_packet()" into a static routine that is givenGuy Harris2000-07-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=2126
* Add support for a global "ethereal.conf" preferences file, stored in theGuy Harris2000-07-051-2/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=2117
* Printing multiple pages of PostScript wasn't as tricky as I thought; addGuy Harris2000-01-061-4/+1
| | | | | | support for printing in PostScript to the "Print..." dialog box. svn path=/trunk/; revision=1426
* Don't have "write_prefs()" display a dialog box if the attempt to openGuy Harris2000-01-031-2/+2
| | | | | | | | | 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. svn path=/trunk/; revision=1413
* Allow user to modify appearance of lines and expanders in GUI protocolGilbert Ramirez1999-12-301-1/+3
| | | | | | tree. svn path=/trunk/; revision=1400
* Changed the protocol tree widget from a GtkTree to a GtkCTree. The two reasonsGilbert Ramirez1999-12-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=1393
* Add a new page to the Preferences notebook: a GUI page. The soleGilbert Ramirez1999-12-161-1/+2
| | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=1351
* Move GTK code out of summary.c and into gtk/summary_dlg.cGilbert Ramirez1999-12-101-1/+5
| | | | | | | | | | | | summary.c now provides a struct of info (see summary.h) Changed the name of the summary dialogue callback (hence the change in menu.c), and added a close button to the dialogue. Moved #include <gtk/gtk.h> out of print.c and into prefs.h where it was needed for GdkColor. svn path=/trunk/; revision=1273
* Add stream window color preferences. We don't (yet) use cmaps, so thisGerald Combs1999-12-021-7/+8
| | | | | | may not work with pseudocolor systems. svn path=/trunk/; revision=1179
* More shuffling of GTK-related routines to gtk subdirectory.Gilbert Ramirez1999-09-091-9/+2
| | | | svn path=/trunk/; revision=636
* Add a "File/Print" menu item, which prints *all* the packets in theGuy Harris1999-07-231-1/+3
| | | | | | | | | | | | | | | | | capture to a file or printer. This should eventually get the ability to print either all the packets or only the packets selected by the display filter, and possibly also the ability to print only packets M through N. Get rid of "cur" member of "capture_file" structure; nobody used it. There's no need to pass a pointer to a "dialog_button" variable to "simple_dialog()" for the error boxes displayed if a file copy or move fails; that dialog box is just a message box and has only an "OK" button. Put the declaration of "prefs" into "prefs.h". svn path=/trunk/; revision=378
* Don't pop up the "Can't open preferences file" dialog until *after*Guy Harris1999-06-121-2/+2
| | | | | | | | | 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. svn path=/trunk/; revision=308
* * Added column formatting functionality.Gerald Combs1998-11-171-10/+10
| | | | | | | | * Added check_col(), add_col_str() and add_col_fmt() to replace references to ft->win_info. * Added column prefs handling code. svn path=/trunk/; revision=97
* * Added preference file saves and reads.Gerald Combs1998-10-281-4/+15
| | | | svn path=/trunk/; revision=75