Commit Graph

31 Commits

Author SHA1 Message Date
Guy Harris b1f950b377 Add support for a global "ethereal.conf" preferences file, stored in the
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
2000-07-05 09:41:07 +00:00
Gilbert Ramirez ea8136cd8e Remove instances of getenv("HOME") and provide a get_home_dir() function
which provides a default value if "HOME" is not set.

svn path=/trunk/; revision=1579
2000-01-29 16:41:28 +00:00
Guy Harris 302c116483 Don't have "write_prefs()" display a dialog box if the attempt to open
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
2000-01-03 06:29:39 +00:00
Gilbert Ramirez 8be6563d38 Allow user to modify appearance of lines and expanders in GUI protocol
tree.

svn path=/trunk/; revision=1400
1999-12-30 23:02:56 +00:00
Gilbert Ramirez 8162d65615 Changed the protocol tree widget from a GtkTree to a GtkCTree. The two reasons
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
1999-12-29 20:10:12 +00:00
Guy Harris b0a46e6052 Move the definition of "prefs" from "gtk/prefs_dlg.c" to "prefs.c", so
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.

svn path=/trunk/; revision=1387
1999-12-29 05:53:48 +00:00
Gilbert Ramirez f34e877593 Add a new page to the Preferences notebook: a GUI page. The sole
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
1999-12-16 06:20:18 +00:00
Guy Harris 80618858d6 Move the GTK+ implementations of various UI utilities out of "util.c"
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.

svn path=/trunk/; revision=1255
1999-12-09 07:19:20 +00:00
Gerald Combs ee51e6534a Add stream window color preferences. We don't (yet) use cmaps, so this
may not work with pseudocolor systems.

svn path=/trunk/; revision=1179
1999-12-02 04:30:15 +00:00
Gilbert Ramirez 8617c58f3c More shuffling of GTK-related routines to gtk subdirectory.
svn path=/trunk/; revision=636
1999-09-09 03:32:03 +00:00
Gilbert Ramirez 3c49e45cf7 More shuffling of GTK-related files to gtk subdirectory.
svn path=/trunk/; revision=635
1999-09-09 02:42:40 +00:00
Gilbert Ramirez 65c3e8d9bf Moved GTK-dependent routines for file dialogues, print dialogues, print
preferences, and menus to gtk subdirectory.

svn path=/trunk/; revision=623
1999-09-01 03:04:24 +00:00
Gilbert Ramirez 601c52f0fb Added support for compiling on win32 with Visual C and 'nmake'. It compiles,
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.

svn path=/trunk/; revision=359
1999-07-13 02:53:26 +00:00
Gilbert Ramirez 851d27fff1 Found some erroneous usages of gtk_signal_connect_object. I always wondered
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.

svn path=/trunk/; revision=324
1999-06-21 19:04:35 +00:00
Guy Harris 018a989bbe Don't pop up the "Can't open preferences file" dialog until *after*
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
1999-06-12 07:04:35 +00:00
Gilbert Ramirez 2dbd008ea5 Added display filters to wiretap.
svn path=/trunk/; revision=198
1999-03-01 18:57:07 +00:00
Gerald Combs cb1f8e34c5 * Added Joerg Mayer's Vines patch
* Added Joerg to the AUTHORS file
* Added Guy's bitfield decode patch
* Fixed time output

svn path=/trunk/; revision=142
1998-12-29 04:05:38 +00:00
Gilbert Ramirez b9084e83cb Fixed more bugs with dialogues and gtk+-1.1.x.
svn path=/trunk/; revision=137
1998-12-22 07:07:11 +00:00
Gilbert Ramirez 5676298385 A patch spread across many files to let Ethereal compile under GTK+-1.1.x.
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?

svn path=/trunk/; revision=127
1998-12-17 05:42:33 +00:00
Gerald Combs 369407d7b0 * Disable filter-related widgets if we're using wiretap.
svn path=/trunk/; revision=105
1998-11-18 03:17:18 +00:00
Gerald Combs b0fdc8edb2 * Added patches from Laurent and Guy
svn path=/trunk/; revision=103
1998-11-18 03:01:44 +00:00
Gerald Combs 6ca358948b * Added column formatting functionality.
* 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
1998-11-17 04:29:13 +00:00
Gerald Combs 80787246c0 * Fixes for problems with the preference initialization code (Guy)
svn path=/trunk/; revision=77
1998-10-29 15:59:00 +00:00
Gerald Combs 06e5aae0e3 * Added preference file saves and reads.
svn path=/trunk/; revision=75
1998-10-28 21:38:11 +00:00
Gerald Combs 349f96bb49 * Copied in the correct GNU license (I'm such a goober)
* Hacks to the filter interface (Gerald)
* About box (Laurent)
* AppleTalk support (Simon)
* Mods to the match_strval routine (Gerald)

svn path=/trunk/; revision=61
1998-10-16 01:18:35 +00:00
Gerald Combs 554e5d3f46 * Pod page update
* Minor tweaks to the filter prefs

svn path=/trunk/; revision=40
1998-10-13 02:10:57 +00:00
Gerald Combs 0758da1146 - Added match_strval function to packet.c
- Separated display and capture filters; rearranged some of the look and feel
- Lots of other miscellaneous fixes and updates

svn path=/trunk/; revision=38
1998-10-12 01:40:57 +00:00
Gerald Combs 1b26a7cdb7 * OSPF alignment fixes (Gerald)
* FDDI support (Laurent, Guy)

svn path=/trunk/; revision=36
1998-10-10 03:32:20 +00:00
Gerald Combs 2e7e493198 Merged in a _huge_ patch from Guy Harris. It adds a time stap column,
generalizes the column printing code, adds a "frame" tree item to
   the tree view, and fixes a bunch of miscellaneous coding bugs.

svn path=/trunk/; revision=31
1998-09-27 22:12:47 +00:00
Gerald Combs 3f7ed51f8d Initial prefs support.
svn path=/trunk/; revision=27
1998-09-26 19:28:51 +00:00
Gerald Combs 3da04dd983 * Ethernet manufacturer support (Laurent)
* PPP fixes (Gerald)
* Null/loopback interface support (Gerald)

svn path=/trunk/; revision=25
1998-09-25 23:24:07 +00:00