Ethereal-dev: [Ethereal-dev] Re: Resend: io_stat.c/filter_prefs.h/filter_prefs.c patch: user

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Ronnie Sahlberg" <ronnie_sahlberg@xxxxxxxxxxxxxx>
Date: Mon, 6 Jan 2003 21:00:38 +1100
Hi Ronald,

Good stuff.

There were two things I thought could be improved in the patch:

1,   I didnt really like the change made inside filter_prefs.c that made it
do the strncmp() thingy
and changed it to let the function return the pointer instead (the global
variable was also removed)

2,  I changed all the global variablews in iostat.c to be fields local to
the io->graphs[]...  structure instead.
By not using any global variables at all in the tap extensions, it allows us
the extensions to be reentrant
and that we can have multiple io-stat extensions running at the same time.

Even if ethereal today does not allow one to start more than one io-stat
dialog at a time we might
still want to allow the possibility for the future.
(this is why io-stat goes to such lengths in following pointers such as from
the gio ( == &io->graphs[x])
back to the parent io structure. )


Please review and verify that I got everything right,
I will not check it in until you approve of it.

best regards
    ronnie sahlberg



----- Original Message -----
From: "Ronald Henderson"
Sent: Wednesday, January 01, 2003 2:45 AM
Subject: Resend: io_stat.c/filter_prefs.h/filter_prefs.c patch: user
friendly filter button enhancement...


> Guy/Ronnie:
>
> (I'm resending this due to the ethereal server maintenance on 12/30/02)
>
> I have made the following enhancements to the io_stat GUI based on Guy's
> comments. Please see if you like them for submission...
>
> 1) Added a nummeric label identifier for each trace (Use to identifiy
which
> filter preference display is shown)...
>
> 2) Each Display Filter Dialog now has the following text added to its
frame
> title to identify which trace the filter is associated with: "IO-Stat
> (Filter: n)"  where n = 1|2|3|4|5
>
> 3) Once a Filter Display Dialog is selected all other display "Filter
> Buttons" are grey-out (disabled).
>
> 4) If a io_stat Filter Display Dialog is display and one closes the
io_stat
> window the corresponding Filter Display Dialog is closed out.
>
> I have tested these patches for both GTK 1.x and 2.x
>
> ---rwh
>
>
>
>
>
>
> ##################################
>
> > BTW: I am working on closing out any open display filter dialogs if the
> > iostat dialog is closed out...
>
> One possibility would be to redo the way that's done in general, so that
> the dialog is closed when the text widget to which the dialog is
> attached is deleted (as that's the underlying problem).  That'd involve
> changing all the other places with "Filter:" buttons, though.
>
> One thing I noticed when looking at that was that, unlike the other
> dialog boxes that have only one "Filter:" button, the "IO-Stat" dialog
> box has multiple buttons.  Currently, the "Filter:" buttons don't pop up
> separate dialog boxes, but perhaps they should (right now, if you've
> popped up one dialog, the "Filter:" buttons appear to have no effect -
> the dialog box still applies to the filter string for the first button
> you pressed), although that would require that the different filter
> dialog boxes have titles to let the user know which one applies to which
> filter.  Unfortunately, there's no obvious choice of a string to put
> into there, as the 5 filters don't have separate names (and I don't know
> whether any window system on which Ethereal works provides an API for
> setting the color of a title bar, so that you could say "Filter
> expression for [blue bar]").
>
>  <<filter_prefs.c.patch>>  <<filter_prefs.h.patch>>  <<io_stat.c.patch>>
>
>
>

Attachment: iostat.patch
Description: Binary data