> 2) It should make only one call to "gtk_paned_gutter_size()" - there are
> only two panes, so there should be only one slider. (Delete the call
> that does
>
> gtk_paned_gutter_size(GTK_PANED(u_pane), (GTK_PANED(u_pane))->handle_size);
>
> .)
Actually, there's more to getting rid of the extraneous pane than that.
Get rid of "u_pane" and all references to it, rename "l_pane" to "pane",
add the tree view to that pane with
gtk_paned_add1(GTK_PANED(pane), tv_scrollw);
and add the byte view to it with
gtk_paned_pack2(GTK_PANED(pane), bv_table, FALSE, FALSE);
A couple more problems:
1) "DataPtr->pd" shouldn't be set to "cf.pd" - "cf.pd" is
subject to change as the user clicks on different packets in
the packet list. Instead, it needs to do something such as
DataPtr->pd = g_malloc(DataPtr->cap_len);
memcpy(DataPtr->pd, cf.pd, DataPtr->cap_len);
to make a *copy* of the packet data; there then also needs to
be a new function such as "destroy_new_window()":
static void
destroy_new_window(gpointer data)
{
struct NewWinData *DataPtr = data;
g_free(DataPtr->pd);
g_free(DataPtr);
}
and the destroy function set up in the
"gtk_signal_connect_full()" should be "destroy_new_window()".
2) In addition, it *also* needs to create its own protocol tree,
rather than using the one for the current packet - the one
for the current packet is subject to being destroyed if the
user clicks on a different packet in the packet list.