This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XWin design suggestion


Sam Edge wrote:
Hi Harold.

I've read the follow-ups on this point with interest. Having sobered
up a bit I'll add another two penn'orth.

Harold L Hunt II <huntharo@msu.edu> wrote in <3EB659BB.40408@msu.edu>
in gmane.os.cygwin.xfree on Mon, 05 May 2003 08:31:55 -0400:


Another way to handle this, and I think this may be the Windows standard, is to always center the Exit confirmation box on the screen. I may just implement that.


It might be better to centre on the XWin application window not on the
whole desktop, or as close as possible to this without letting the
pop-up box end up off-screen. (Which might happen if the user has
dragged the XWin window partially off-screen.)

I've always had positive responses from users when implementing
message and dialog boxes this way since it gives an additional visual
cue as to the application window with which the pop-up is associated.

If the XWin window is minimized to the taskbar/systray or is running
in full-screen mode, centre the pop-up on the primary display. (Or if
a switch is introduced to allow full-screen on a specific
multi-monitor display, then centre on that display.)

There is a little extra work involved in retrieving the display
geometry/geometries and checking for off-screen issues of course but
it does make the "user experience" (!) that much smoother.


I like this idea. Are you sure this isn't the Windows standard? I would have to check the user interface guidelines, but I suspect that the actual standard is more like yours than it is like my simple idea.



Using .config file in users $HOME dir we can reduce dependency (so called vendor locking effect)
on MS-Win and also it will be like other *nix program. Saving settings in a file will also make it easy for copying if there is lot of users and/or PC


[snip]
So, I am going to have to see a much better reason than avoiding using Windows features for using something other than the registry. Sure, we could use an XML config file... but that introduces another dependency on XML libraries, which I really don't want to have.


Hmmm. I agree that there's no point ignoring useful Windows features
such as the registry API where they're appropriate.

However, as a /Cygwin/ application and as a port of XFree86, one could
argue that XWin should behave in a POSIX fashion i.e. get its default
configuration from text files in /etc and user-specific ones in $HOME.
Apart from the mount table and cygrunsrv (which do so for obvious
reasons) I don't know of any "official" Cygwin package that stores its
configuration in the registry. (I may be wrong here - I've not checked
them all!)


Ah ha... some people get the impression that XWin.exe is a Cygwin app. It isn't. However, you only get that point of view if you are deep in the code, since you realize that there is no way that XWin.exe would exist without the GDI and other Win32 API calls. So, XWin.exe is really a Windows-dependent application, thus it is a Windows application. It is also unique amognst almost all (save rxvt) Cygwin apps in that it draws its own Windows window and appears on the task bar independently. In my mind, XWin.exe is a Windows app, whereas the general XFree86 port (all the apps and libraries) consists of Cygwin apps.


Traditionally Xfree86 uses /etc/X11/XF86Config for system-wide
settings so why not add a section there, perhaps after discussing it
with the rest of the XFree86 development bods?


Alternatively have a Cygwin-specific file, say, /etc/X11/Xcygwinrc and
a user-specific version $HOME/.Xcygwinrc.

Keep the format simple, maybe along the lines of OpenSSH with simple
"<keyword> <value>" pairs separated by newlines. A simple parser
shouldn't be too difficult to write or to snag from elsewhere, and the
file should be small enough to rewrite in its entirety when saving
changes from any GUI configuration utility. (You could use the Win32
INI-file API if you wanted a little more structure, although that
would force DOS line-endings.)

I think that it's preferable to have people using a text editor rather
than regedit if/when they do manual configuration and I'd prefer to
use normal POSIX tools (ex, sed, awk, grep, perl etc.) rather than the
riskier regtool method when automating configuration tasks.

Biju's point is also valid. It's nice to be able to just copy
c:\cygwin and the mount table to backup or duplicate a Cygwin
installation.


That is the first good reason I have seen for providing the option of a text file for configuration settings.


In any case, I still think that user preferences should be stored in the registry. Think about a check box that says "Don't ask this again" on the Exit confirmation dialog box.

So now my head's cleared, I think I'd like to vote against using the
registry. Mind you, I realize that, the traditions of BWAM, this isn't
a democracy and you're entitled to code it however you please, Harold!
;-D

I'll add my thanks to Biju's to everyone involved in Cygwin/XFree86
development (and Cygwin itself, of course). I'd be paying through the
nose for Exceed or the like otherwise.


Thanks for your input. I appreciate it.


Harold



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]