Am 23.04.2009 um 10:29 schrieb Manfred Bergmann:


Am 21.04.2009 um 16:24 schrieb Troy A. Griffitts:

Eeli Kaikkonen wrote:
Unfortunately I have to destroy your hope here: we have only the static warning which doesn't have to be agreed. But I have already planned replacing it with a dynamic warning.

There is virtual int refreshRemoteSourceConfiguration(). Would it be enough if I override it, opening a dialog etc.? Now I just use setUserDisclaimerConfirmed(bool val). Is it so that the library calls refreshRemoteSourceConfiguration() before every network transaction? And what is the int return value?

Eeli,

All the InstallMgr calls which perform remote access now check if bool isUserDisclaimerConfirmed() returns true before performing their operation. Would it be useful to you, as a frontend programmer wishing to satisfy this criteria in Bibletime, to have isUserDisclaimerConfirmed be made a virtual method, which always returns false in the default impl (not pure virtual since installmgr can still be useful for local/CD installation). Then we would remove setUserDisclaimerConfirmed(bool).

This would essential mandate a best practices methodology for confirming that the user has accepted the disclaimer. Something like:

bool MyInstallMgr::isUserDisclaimerConfirmed() {
 static bool confirmed = false;
 if (!confirmed) {
    confirmed = (showDisclaimerDialog() == mbOk);
 }
}

Then the first time the user attempts a remote activity, InstallMgr checks isUserDisclaimerConfirmed() and your confirmation method is shown. Obviously, if you'd rather choose to show the disclaimer at an earlier point, you can always call isUserDisclaimerConfirmed() yourself to trigger your confirmation method.

I noticed the setUserDisclaimerConfirmed(bool) has been removed.
How can I set this now?

So I need to subclass InstallMgr now?
Hmm, not sure I like it, means more code an an additional class just to return a true here.


Manfred

_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to