Commit Graph

43 Commits

Author SHA1 Message Date
Ulf Lamping 34bddb3c1a adding a function to the help dialog, showing a specific topic (context help),
beautifying the placement of the help button in the button_row,
using the context help for the filter dialog

svn path=/trunk/; revision=9851
2004-01-25 21:27:16 +00:00
Ulf Lamping 8e2a930023 implemented dlg_button_row_new to get a standard function for
layouting the dialog buttons, and use it where appropriate.
This will help us with the GTK1/2 conflict on button layouts and
will also result in a more consistent look of the dialogs at all.

svn path=/trunk/; revision=9771
2004-01-21 21:19:34 +00:00
Ulf Lamping 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Guy Harris 9c89878b2e Have a "toc" file in the help directory, which gives a list of help
topic titles and help file names.

svn path=/trunk/; revision=9416
2003-12-22 21:52:41 +00:00
Ulf Lamping 57b6b53548 Patch from Guy: using distributed help text files,
instead of "#include" built in texts
(and some other minor changes)

svn path=/trunk/; revision=9407
2003-12-22 08:01:01 +00:00
Ulf Lamping 131eeab31d using dlg_utils.c functions to catch the ESC key to close the dialog
svn path=/trunk/; revision=9109
2003-11-27 23:25:55 +00:00
Ulf Lamping 2cd8629c86 using text files from help dir, to display the help texts.
the "dynamic protocol fields" are already moved to gtk/supported_protos_dlg.c

svn path=/trunk/; revision=9098
2003-11-27 00:22:12 +00:00
Guy Harris 7bd2e232a9 Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()"
take a "protocol_t *" as an argument, so they don't have to look up the
"protocol_t" - this will probably speed them up considerably, and
they're called on almost every dissector handoff.

Get rid of a number of "proto_is_protocol_enabled()" calls that aren't
necessary (dissectors called through handles, including those called
through dissector tables, or called as heuristic dissectors, aren't even
called if their protocol isn't enabled).

Change some direct dissector calls to go through handles.

svn path=/trunk/; revision=8979
2003-11-16 23:17:27 +00:00
Guy Harris e22b6afeb7 From Matthijs Melchior:
make the "Help" menu the rightmost menu item, as is done in

		recent versions of Windows;

		Mac OS X;

		recent versions of KDE;

		recent versions of GNOME;

	rather than making it an item on the far right side.

	Make the "Protocol" display in the help mention the number of
	entries, and give it has 3 columns, starting with the one that
	was used to sort this list.

	Make the "Display Filters" display mention the number of fields
	for each protocol and at the end the total number of fields.
	Give it 4 columns, including the 'blurb'.

	List all fields with the correct protocol.

svn path=/trunk/; revision=8253
2003-08-25 21:42:33 +00:00
Laurent Deniel 60c415087a - fix FAQ display (faq_help[] was not initialised before strcat
so random characters at first line display if not worst,
  finally remove this strcat stuff and directly call insert_text
  with each faq_part)

- add missing FAQ redraw in help_redraw

- put FAQ after Capture Filters to restore original order
  (i.e. Display near Capture Filters)

- udpate overview according to manual page

svn path=/trunk/; revision=7263
2003-03-03 21:59:42 +00:00
Jörg Mayer adbb66a68c Remove wip comments
svn path=/trunk/; revision=7250
2003-03-02 19:21:31 +00:00
Jörg Mayer 4f8247dc2b Split FAQ into shorter lines before including it into the gtk help dialog.
Ignore tmp files generated by make-faq.
Update FAQ.

svn path=/trunk/; revision=7249
2003-03-02 17:42:37 +00:00
Jörg Mayer fb2884ff99 Add the FAQ to the help menu
svn path=/trunk/; revision=7033
2003-01-29 12:58:48 +00:00
Laurent Deniel 1a66f9aec9 Update my email address in various places since my old one no longer works
svn path=/trunk/; revision=7003
2003-01-26 19:35:31 +00:00
Gerald Combs 07e0a47740 Update some text in the help dialog.
Replace the large matrix of protocol togglebuttons with a GtkCList. The
CList displays three columns: the enabled/disabled state, the protocol's
abbreviated name and the protocol's full name.  Protocols can be enabled
or disabled by double-clicking on them.  The enable all, disable all, and
invert buttons were left intact.

I made a half-assed attempt at Gtk2 support by copying code from
plugins_dlg.c.  It's incomplete, and probably won't compile.

Using check boxes in the first column instead of the word "Disabled" would
have been nice.  GtkCLists don't let you embed anything besides text and
pixmaps unfortunately.

Update the man page accordingly.

We still need a way to save a list of disabled protocols.

svn path=/trunk/; revision=6707
2002-12-01 19:11:54 +00:00
Olivier Abad 29011060de Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6610
2002-11-11 15:39:06 +00:00
Olivier Abad 05ef1fc475 Merge gtk and gtk2 directories.
svn path=/trunk/; revision=6552
2002-11-03 17:38:45 +00:00
Guy Harris ce6eb43912 Put needed include back in (<string.h>, to declare "memset()").
svn path=/trunk/; revision=6201
2002-09-06 21:27:57 +00:00
Jörg Mayer e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 96ab70e209 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the gtk/ directory.

svn path=/trunk/; revision=5930
2002-08-02 22:34:54 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +00:00
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