It appears to be a buglet in GTK+; by explicitly calling gtk_widget_show()
on the menu item, it comes out with proper spacing. Previously I simply
used gtk_widget_show_all() on the topmost vbox, and while the option menu
menu-items showed, they came out with incorrect vertical spacing.
svn path=/trunk/; revision=2356
cleanup functions for the cases in which an exception is thrown but not
caught in a region where cleanup needs to occur.
Use these macros in proto_tree_add_item, where we need to free the field_info*
in case an exception is thrown when accessing the tvbuff.
svn path=/trunk/; revision=2355
selection dialog, the colors are saved with null values.
So do not call fetch_colors if the colors_changed boolean
is FALSE ...
svn path=/trunk/; revision=2350
Add a boolean that will be set to TRUE if the user hit OK
in the font selection dialog. And do nothing about fonts
in the apply routine if the font dialog has not been used
by the user. This gets rid of a warning which was displayed
each time the preferences are "OK, Saved or cancelled"
and that whether the user has used the font selection
dialog or not (which was very annoying) ...
svn path=/trunk/; revision=2348
until the GUI-preferences fetch routine is called, and don't re-colorize
marked packets until the GUI-preferences apply routine is called;
those preferences shouldn't take effect until the user clicks "OK" or
"Apply", as that's the way other preferences work.
Treat a request to close the color selection dialog the same as a click
on the "Cancel" button.
svn path=/trunk/; revision=2346
for the dialog window as an argument (as various dialog creators in GTK+
do), not oblige every caller of it to cut-and-paste a
"gtk_window_set_title()" call after it.
svn path=/trunk/; revision=2345
This allows the display of a short field description (and
field abbreviation) in the status bar when a field is selected
in the protocol tree window.
The description is the blurb field when available (i.e. not empty),
the name otherwise.
When the item is unselected, the file context (e.g. the file name)
is restored.
Now it is much easier to build a display filter without the manual ;-)
svn path=/trunk/; revision=2343
Currently, it allows the selection of the foreground and
background colors of the marked frames but it could be
extended further (e.g. color of normal frames).
Add update_marked_frames() in main.c to update the
display (e.g. colors) of marked frames.
svn path=/trunk/; revision=2339
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
the influenza virus, if "wtap_pcap_encap_to_wtap_encap()" returns
WTAP_ENCAP_UNKNOWN, indicating that the libpcap encapsulation type can't
be mapped to a Wiretap encapsulation type, include the data link type in
the message, so the user can at least give us a clue as to what type it
is that we don't support (or, at least, the DLT_ value for that type -
it could well be some standard type whose value just got gratuitously
changed).
svn path=/trunk/; revision=2333
example, "fdata->pfd" doesn't contain junk that upsets dissectors that
try to attach data to the frame (not that it does them much good in
Tethereal, as the frame is never revisited).
svn path=/trunk/; revision=2331
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