[Xastir-dev] Comments requested..best way to fix an issue

Curt Mills archer at eskimo.com
Tue Dec 14 02:12:01 EST 2004


On Mon, 13 Dec 2004, David Flood wrote:

> Well, I decided to start what I thought was "small" and fix the issue where
> if you are in "TrackMe" mode and change the callsign through the Station /
> Track Station command, the "TrackMe" button stays pressed on the menu bar.

Yes, you're describing the unwanted operation of that button.  Press
TrackMe, then later go to the Track Station dialog and change the
callsign.  TrackMe button _should_ get unselected.


> The way I see it, there are two ways to fix this.
>
> The first (and probably the right but more difficult way) is to compare the
> entered callsign when OK is clicked on and if it isn't ours, then unset the
> button.

That seems the correct way to me.


> The second way makes it a simple redraw issue.  If anything other than
> "Cancel" is clicked on, unset the button regardless of what really happened.

I don't like that one, although it is a bit better than the current
implementation.

There are X11 calls to set/reset a togglebutton.  I think there are
usually parameters that you pass to the call which will cause the
callback for that button to be called, or not to be called.  In this
case you want to deselect the button making sure the callback is
_not_ called, else you'll immediately go into TrackMe mode with your
callsign again.

You should be able to do a check for my_callsign.  You'll find
examples of that all over in the code.  Check in db.c:is_my_call(),
which is designed to make it easy for you.

-- 
Curt, WE7U.				archer at eskimo dot com
http://www.eskimo.com/~archer
  Lotto:  A tax on people who are bad at math. - unknown
Windows:  Microsoft's tax on computer illiterates. - WE7U.
The world DOES revolve around me:  I picked the coordinate system!"




More information about the Xastir-dev mailing list