Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8738) key_*** versus request_*** functions
Home

[Freeciv-Dev] (PR#8738) key_*** versus request_*** functions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8738) key_*** versus request_*** functions
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2004 10:45:11 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8738 >

THe client has a bunch of key_*** functions (key_unit_connect, 
key_unit_move, etc., etc.).  All or almost all of these are wrappers for 
identical request_*** functions.

No doubt this is a holdover from older versions of the code.  The GUI 
code is supposed to call key_*** when an action key is pressed.  However 
this simplicity is confused because most actions don't come from keys. 
A menu entry may be activated by a key or a mouse.  Unit activation may 
be activated with a key or the mouse.  Should these actions call the 
key_*** or the request_*** function?

IMO these two forms should be merged into one.  Key presses should be 
left up to the GUI, which just calls the request_*** function to perform 
the action.

In most cases I think this is a simple search-and-replace to change. 
Plus a lot of one-line functions (in control.c) will be deleted.

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#8738) key_*** versus request_*** functions, Jason Short <=