Wireshark-dev: Re: [Wireshark-dev] UAT and Apply Callback (Partial Solution)

From: "Bryant Eastham" <beastham@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 Oct 2009 14:03:50 -0600
All-

Jeff's recent comment prompted me to check the code again. This led to a
partial solution to my problem, although there are some strange effects.

>From his message I see that the UAT "Apply" button does cause the
packets to be reloaded. By putting my preferences "reinit" call inside
my dissector's "init" callback I can successfully make a change to the
UAT information and see it take place (on OK or Apply).

My confusion, and I doubt I am alone, is that the UAT "OK", "Apply", and
"Cancel" are *not related* to the preference dialog "OK", "Apply", and
"Cancel". This is made more complicated by the fact that the callback
for preferences changed is unrelated to the UAT changes, and that there
does not seem to be a corresponding UAT "changed" callback.

>From a user's (and developer's) perspective this seems very
counterintuitive, given that the UAT "Edit" buttons show up alongside of
the other preference items, but are not controlled in the same way that
they are. For example, hitting "OK" in a UAT dialog does not appear to
be reverted by a "Cancel" in the preferences dialog.

I list the solution as "partial" because I can get it to do what I want,
but I also have to explain the system (and its caveats) to users...

It would seem clearer, IMHO, to show the UAT buttons separated somehow
in the preferences dialog - indicating that they are not controlled the
same way. For the time being I will probably use a static pref string to
highlight the difference.

Thanks, Jeff, for your feedback.

-Bryant