Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'd like to be able to present a dialog that runs at the start of my application and shows the new features this new version implements.

This dialog should only run once, and not be showed again until the user upgrades to a higher version of the app.

I'm not looking for a snippet, but rather for a suggestion on how to do this.

What's the best way to display such a dialog, so that it appears only once on the first run after the app has been upgraded?

share|improve this question

2 Answers 2

Pseudo-code:

version = 1

if settings.read("lastVersion", default=0) < version:
    showDialog()
    settings.save("lastVersion")

Then you just update the version variable for each new version, and done. In text: simply use a setting to save the last version, and if the program version is newer, show the dialog and update the setting.

share|improve this answer

One idea jump to mind. Write the version number into whatever you use as your config store (dconf, dot file, etc...). On start up, check if that value matches the current program version. If not, display your dialog and bump the version number in the config. You could also ship your changelog in a parse-able format so you can only display changes from versions greater than what is in the config.

share|improve this answer
    
Do you happen to know if there is any standard or de-facto standard for parseable changelogs? –  David Planella Aug 14 '12 at 19:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.