hwhw/kindlepdfviewer — pull request #587 by tigran123 (2012-11-15 09:45:01+00:00)
Title: Cleanup InfoMessage:inform() API and its usage

Ok, this is the Final Solution, hopefully :)
As Linus says, how many times we can get it wrong, really --- we should have run out of wrong ideas by now :)

This patch changes the second argument of InfoMessage:inform() function to be either DINFO_DELAY or DINFO_NODELAY with the following semantics:

DINFO_DELAY - display the message and delay DINFO_DELAY ms before returning. Save and restore the screen content. This is useful when the message is only conveying information and nothing has changed on the screen.

DINFO_NODELAY - display the message and return immediately without saving/restoring the screen content. This is useful when there is work after the call that will change the screen content anyway and will have to take care of it.

On the emulator DINFO_NODELAY is delayed by a small amount in order to simulate Kindle's behaviour (and make the message noticeable).

The "ON" and "OFF" were changed to "on" and "off" and some other words lowercased to make it easier on the TTS to pronounce them (otherwise it thinks they are abbreviations). Of course I know that we could have passed a separate tts_text argument but there is nothing wrong with the lowercase "on" and "off" (I like them better) so I didn't do that.