Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2004:
[Freeciv-Dev] Re: Xaw: common dialog model
Home

[Freeciv-Dev] Re: Xaw: common dialog model

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Egor Vyscrebentsov <evyscr@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Xaw: common dialog model
From: Jason Dorje Short <jdorje@xxxxxxxxxxxx>
Date: Sat, 04 Dec 2004 20:56:00 -0500

Egor Vyscrebentsov wrote:
Good daytime!

Last several months i learnt xaw clien code. Not that i know it now...
But i understand one thing: there are so many variants of coding common
things in xaw client nowadays.
Working with several tickets i have to create new dialogs. I looked into
code and can't find answer, how i should create dialog right. So, i wanted
to write several rules for me.
Below is the start of this rules. I think, i can't go on until making
several main decisions. So, i ask for you comments, suggestions, rejections.

My question would be, can any of the code be moved out of client/gui-xaw/ and into client/? And code or code segments that are duplilicated in all the gui-xxx/ libraries are candidates for this.

Q: What about "Common comments"? ;) There should be similar comments
   for popup_dialog, popdown_dialog, create_dialog and update_dialog.
   My english is not so good to make them, however...

Long ago I wrote comments for every function in gui-stub. You may copy these over. If any are inadequate create a ticket for it and we'll fix it.

Q: Are there any dialogs that should be only modal? What are they?

No dialog should be modal if it can be avoided. (It's always possible to avoid it but it may take too much work.)

Q: Should 'xaw_set_relative_position()' be called at every popup, or only
   at creating dialog?

When dialogs are closed and reopened they should keep their original positions.

Every dialog should have an action on closing it by window manager (x) button.
<dialog-name>_dialog_msg_close() is used for callback. (See also 'actions.c')
In common case, it should be equal to clicking 'Cancel' button.

OK.  Why "msg"?

-jason



[Prev in Thread] Current Thread [Next in Thread]