Commit Graph

21 Commits

Author SHA1 Message Date
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"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-21 07:37:49 +00:00
Guy Harris feb5791d6a Have a routine to create a scrolled window, set its vertical scrollbar
preference, and add it to the list of scrolled windows; call that
routine to create scrolled windows, rather than creating it and calling
other routines to do the other two operations.

As "set_scrollbar_placement_all()" and "set_ctree_styles_all()" always
set the styles to match the user's preference, don't have them take an
argument, have them just use the user's preference settings.

Get rid of unnecessary includes of "prefs_dlg.h", replacing them with
includes of "prefs.h" if necessary.  Don't have "prefs_dlg.h" include
"prefs.h" - its sole purpose is to declare routines defined in
"prefs_dlg.c" - and add any additional includes of "prefs.h" this
requires.

Get rid of unnecessary includes of "prefs.h" and "gtkglobals.h".

Fix up white space.

svn path=/trunk/; revision=4521
2002-01-11 07:40:32 +00:00
Gerald Combs 7e092f2dd8 Go nuts with the 3D logo.
Add a routine to ui_util.c that sets a window's icon pixmap to a 16x16
version of the 3D logo.  Call the routine for each window that is created.
This has been tested with kwm and Sawfish (which expect a 16x16 icon), but
we may have to come up with a better solution for other window managers
(e.g. olwm and mwm).

Add a 3D exclamation point image.  Replace the exclamation point and
Ethereal logo images used in simple_dialog() with their 3D counterparts.

Remove the old icons from the source distribution.

svn path=/trunk/; revision=4390
2001-12-12 21:39:01 +00:00
Guy Harris 9d601c6799 On Windows, use the directory in which the binary resides as the
directory in which global data files are stored.  If an installed binary
is being run, that's the correct directory for them; if a build-tree
binary is being run, the "manuf" file will be there, and you can put
other data files there as well, if necessary.

Do the same with plugins, except that, if there's no
"plugins\\{version}" subdirectory of that directory, fall back on the
default installation directory, so you at least have a place where you
can put plugins for use by build-tree binaries.  (Should we, instead,
have the Windows build procedure create a subdirectory of the "plugins"
source directory, with the plugin version number as its name, and copy
the plugins there, so you'd use the build-tree plugin binaries?)

Move "test_for_directory()" out of "util.c" and into
"epan/filesystem.c", with the other file system access portability
wrappers and convenience routines.  Fix "util.h" not to declare it - or
other routines moved to "epan/filesystem.c" a while ago.

svn path=/trunk/; revision=3858
2001-08-21 06:39:18 +00:00
Gerald Combs f9a822d78f Fix a bug reported by Christopher McAvaney in
http://www.ethereal.com/lists/ethereal-dev/200104/msg00152.html.
In the display filter help window, the height of the text widget
can easily exceed the maximum height of an X window, which results
in a nonfunctioning vertical scroll bar.  This fix disables the
GtkScrolledWindow vertical scroll bar, and creates a new scroll bar
attached directly to the GtkText widget.

The layout is a little off - the horizontal scroll bar now occupies the
full height of the GtkScrolledWindow widget.  There doesn't seem to be
an easy way to grab the height of the horizontal scroll bar in order to
pad out the are underneath the vertical scroll bar.

svn path=/trunk/; revision=3411
2001-05-12 19:45:37 +00:00
Guy Harris bf1ebaea4f Use "proto_get_first_protocol()" and "proto_get_next_protocol()" to
enumerate the protocols, as that

	1) gives you the protocols in dictionary order;

	2) leaves out the non-protocol "text";

	3) doesn't even bother to show you non-protocols, so you don't
	   have to check for them.

svn path=/trunk/; revision=3115
2001-03-06 21:07:13 +00:00
Gilbert Ramirez 540f564993 Calculate the height and width of m_r_font globally, since various
routines need it.

When a user clicks on a hex digit or on the corresponding character
(the "text dump" portion) in the hex dump, find the field in the
proto_tree that the byte corresponds to, expand the GtkCTree so that
the field is viewable, select the field, and center it vertically.
LanAlyzer has this feature, and I've missed it in Ethereal.

svn path=/trunk/; revision=3096
2001-03-02 23:10:12 +00:00
Guy Harris bf4d3052e8 Use the pretty name for the type, not the internal name, in the help
dialog for display filter fields.

svn path=/trunk/; revision=2975
2001-02-01 22:28:58 +00:00
Gilbert Ramirez 8f1fff2e6a Create a more modular type system for the FT_* types. Put them
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
2001-02-01 20:21:25 +00:00
Gilbert Ramirez 90e0fb129d Change Ethereal homepage URL from etheral.zing.org to www.ethereal.com.
svn path=/trunk/; revision=2696
2000-11-22 04:07:04 +00:00
Laurent Deniel 6755d16641 Small changes in help windows:
- update overview.
- add a note if packet capture is not available.

svn path=/trunk/; revision=2406
2000-09-09 15:00:36 +00:00
Guy Harris e91341e3c3 Redraw:
the text in all "Follow TCP Stream" windows;

	the text in the help window if we have one up;

	all hex dump windows;

when GUI preference changes are to be applied, so that font changes and
"Follow TCP Stream" color changes show up.

Update both the Roman and bold font when the font is changed.

Don't decrement the reference counts on the old Roman and bold fonts
until that's all done.

svn path=/trunk/; revision=2401
2000-09-08 10:59:21 +00:00
Gilbert Ramirez e1f3604b37 Change variable from 'char*' to 'const char*' to avoid compiler warning.
svn path=/trunk/; revision=2391
2000-09-07 05:08:19 +00:00
Laurent Deniel 7acf24b370 Fix help display (random character displayed in tab).
svn path=/trunk/; revision=2388
2000-09-05 19:07:06 +00:00
Gilbert Ramirez 0e3cb70212 Add FT_STRINGZ type. NCP dissector is only one that uses it right now.
Remove tvb_get_stringz from quake dissector and add tvb_get_nstringz,
tvb_get_nstringz0, and tvb_strnlen to tvbuff.c.

Remove multiple definitions of pntohl and friends from various places
(except for wiretap) and put into pint.h

Consolidate duplicate code for turning FT_* enums into strings (ala the
glossary).

svn path=/trunk/; revision=2382
2000-08-30 02:50:18 +00:00
Gilbert Ramirez 7c0421b146 Change FT_NSTRING_UINT8 to FT_UINT_STRING. The length parameter passed
to proto_tree_add_item() will indicate if the length of the string is
indicated by an UINT8, UINT16, UINT24, or UINT32.

Change NCP dissector-maker to produce FT_UINT_STRING.

Fix off-by-one in dissection of some NCP reply packets.

svn path=/trunk/; revision=2334
2000-08-22 06:38:32 +00:00
Guy Harris 170f561bf2 Don't catch the "delete_event" signal for the "Help" window - we just
need to catch the "destroy" event, and have its handler clear the global
help window pointer.

That means that the "Close" button callback also need not clear that
pointer, it merely needs to destroy the widget; given that we're now
always passing it a pointer to the widget as the "data" argument, we
just have it destroy that widget.

svn path=/trunk/; revision=2285
2000-08-17 08:17:38 +00:00
Guy Harris da88c237c2 It was silly of me to require that "forget_scrolled_window()" be called
explicitly; the right thing to do was to have
"remember_scrolled_window()" catch the "destroy" signal on the scrolled
window widget, and have the handler for that signal forget the scrolled
window.

Doing that obviates the need to have creators of scrolled windows keep
track of the windows they have and forget them when they're destroyed.

The signal for a "the window manager has requested that this window go
away" event is "delete_event", not "delete-event"; fix the
"gtk_signal_connect()" calls that were using "delete-event".

svn path=/trunk/; revision=2284
2000-08-17 07:56:44 +00:00
Laurent Deniel ec5366cede Fix a long standing bug in the scrolled window handling in follow TCP stream
which make ethereal aborts if the preferences were modified (or cancel) after
the TCP window was closed.

Fix the same bug in the other scrolled window handling (help & protocols).

(forget_scrolled_window() was not called at the window closure).

svn path=/trunk/; revision=2283
2000-08-16 21:08:48 +00:00
Laurent Deniel 6a480953a9 Miscellaneous code cleaning
- 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-08-11 13:37:21 +00:00
Laurent Deniel cedac6e3f1 Add a Help window that contains:
- short overview
- list of known protocols
- list of display filters
- short capture filter help

The display filter help can be extended in the future
when we will have a GUI for filter construction. But
this is better than nothing ;-)
And cut & paste from the text help window and the filter
input field works...

svn path=/trunk/; revision=2227
2000-08-08 12:28:50 +00:00