GUI preferences is called.
Pull all the code for creating option menus for enumerated
"prefs.gui_XXX" items into a common routine.
svn path=/trunk/; revision=2328
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
the Edit menu which allow you to:
- mark (or unmark) the currently selected frame
- mark all _displayed_ frames
- unmark all _displayed_ frames
Should I be more precise in the menu label ?
(e.g. "Mark All Displayed Frame" instead of "Mark All Frames"
and "Mark Selected Frame" instead of "Mark Frame" ?)
svn path=/trunk/; revision=2325
"dissector" union in the "conversation_t" structure to "old_d" and
"new_d", to avoid using a C++ reserved word.
Add "old_conversation_set_dissector()" and
"conversation_set_dissector()" routines to set the dissector for a
conversation, to hide the details of how that's done (e.g., details such
as whether there's a union at all - eventually, when all dissectors have
been tvbuffified, there won't be a need for the union - and what the
names of the union members are, and so on). Convert all dissectors to
use those routines (they had to be changed anyway, due to the name
change).
svn path=/trunk/; revision=2324
the middle mouse button. The marked packets are displayed in
reverse video but this should change in the future (the color
should be configurable via the GUI).
Then, the marked packets can be saved (via the "Save as"
window dialog).
Other features will be added in the future (I am waiting for
your comments and wishes).
svn path=/trunk/; revision=2322
- have popup_menu_handler return TRUE or FALSE according
to the fact that the event is really processed or not.
- use gtk_signal_connect instead of gtk_signal_connect_object
to have the widget that emitted the signal _and_ the popup
menu widget.
- call gtk_signal_emit_stop_by_name to abort the propagation
if the signal was processed.
svn path=/trunk/; revision=2318
"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=2317
"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
When copying IPv4 or IPv6 addresses, copy the minimum of the number of
bytes in the source and the destination, so that if the prefix length is
bogus, we don't overwrite the buffer.
"tvb_get_ptr()" returns a "guint8 *"; give the variable to which its
value is assigned that type.
svn path=/trunk/; revision=2307
uses "normal" rather than "medium" as the weight name for normal-weight
fonts; map "normal", as well as "medium", to "bold" when constructing
the name of the bold version of a font.
svn path=/trunk/; revision=2306
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
beginning.
Pass "pinfo->fd", not "fd", to "p_get_proto_data()", so that it'll
continue to work even when tvbuffified.
Use "strchr()", not "index()" - "strchr()" is in the ANSI C standard,
and may be in some systems that don't have "index()", whereas those
systems that had "index()" but not "strchr()" got with the ANSI C
program a while ago.
Use "old_dissector_add()" and "old_dissector_delete()" to register and
unregister the SMTP dissector, as it's not yet been tvbuffified.
svn path=/trunk/; revision=2303
This needs some additional parts, and points to the
need for a dissector for the ident protocol, but I want to
try to automatically generate that ...
svn path=/trunk/; revision=2301
protocols running atop SCTP can register themselves with a particular
SCTP port number.
Also, clean up the credits for him - there were two entries, one for
some initial SCTP support in "ipprotostr()" and in the capture dialog,
and one for the SCTP dissector itself - the latter subsumes the former,
so just keep the latter.
svn path=/trunk/; revision=2296
SCTP ports in "col_set_port()", and add a "get_sctp_port()" routine to
resolve SCTP port numbers to services.
Also, make the "get_XXX_port()" routines format the port number as an
unsigned integer, rather than a signed integer, if the service name for
the port isn't found (the port number passed in is unsigned).
svn path=/trunk/; revision=2295
plugin is enabled -> disabled -> re-enabled due to the fact that
the protocol registration is performed at each plugin_init() call
(and there is no protocol cleanup like with dfilter_cleanup).
Now we use the proto_xxx static variable to check if it is the first
activation or not (in this case, the proto_register_xxx routines are
not called.
svn path=/trunk/; revision=2290
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
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
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
- reorganise a bit the two right click popup menus :
. the first part is common to the packet list and protocol tree menus
. the second part is window-specific.
(if we had a popup menu for the hexdump window, that would be the same).
svn path=/trunk/; revision=2281
selection mode of the packet list window isn't actually going to be
changed - it's a bit annoying to have the protocol tree window clear out
from under you if all you've done is pop up the Edit->Preferences dialog
and cancelled it (or accepted it without changing any GUI preference).
svn path=/trunk/; revision=2280
it clearer what properties it lets you edit. (Perhaps it should say
"Edit Protocol Properties", to make it even clearer?)
svn path=/trunk/; revision=2279