Win32 Word Count, modeless dialogs, keyboard input, etc


Subject: Win32 Word Count, modeless dialogs, keyboard input, etc
From: Thomas Briggs (tom@sane.com)
Date: Sat Jul 01 2000 - 10:24:31 CDT


   The attached patch accomplishes the following:

   1. Makes it possible for modeless dialogs to receive keyboard input on
Win32. Unfortunately this requires an ugly hack to xap_DialogModeless
(suggestions on a better implementation are welcome). Thanks to Hubert
Figuiere for the help in solving this little doozy.
   2. Implements the Word Count dialog, with all problems I was previously
having solved (thanks mainly to #1). I believe that it's now ready to
face the Bob/Paul Egli challenge. :)
   3. Fixes the Insert Symbol dialog to accept keyboard input (you can't
select the symbol via the keyboard, but at least the tab key works and you
can change the font).

   On a somewhat related note, I have two questions:
   1. I've noticed some odd behaviour in the way that modeles dialogs
work. If you open a modeless dialog, then go back to the document, then
select (for example) Tools | Word Count from the menu bar, the Word Count
dialog is updated but the document retains the input focus. It's
specifically coded this way in the unix version, so I mimicked it in the
Win32 version, but I have to ask: is this really the desired behaviour?
Should I have to click on the dialog with the mouse in order to give it
the input focus?

   2. What's the rule for when modeless dialogs should stay on top of the
documents? The Word Count dialog, for example, falls behind the document
once it loses focus (I mimicked the unix behaviour here as well), but the
Insert Symbol dialog stays on top. Is this by design? Accidental? Is
there a rule we should be following in this regard?

   In case anybody's actually read through this whole thing, I'm going to
throw out one more thought while I'm at it. I must say that I'm really
impressed with the AbiWord codebase - I'm no junior programmer, but for me
to be able to jump in and with relatively little effort implement the
stuff I have says a lot about the code that's already there and the people
who wrote it.

   -Tom




This archive was generated by hypermail 2b25 : Sat Jul 01 2000 - 10:24:41 CDT