Skip to content

Draft: main: Only set last-shown-version if welcome actually shown

At startup, if the welcome-dialog-last-shown-version GSetting compares older than WELCOME_DIALOG_LAST_TOUR_CHANGE, Shell attempts to offer the welcome tour to the user, and then sets that GSetting to the current version of Shell.

However, showing the welcome dialog can fail. In particular, if gnome-tour is not installed, WelcomeDialog.open() returns false and the dialog is not shown; but there are other reasons, such as another modal dialog already being open. Previously, welcome-dialog-last-shown-version would nonetheless be updated in this case, so if you subsequently install gnome-tour (or on the next login, if there is no modal dialog), the welcome dialog will not be offered until the next time WELCOME_DIALOG_LAST_TOUR_CHANGE is bumped.

Instead, check whether WelcomeDialog.open() fails; if so, don't update welcome-dialog-last-shown-version.

Having written this patch I'm not actually sure it is desirable behaviour: is it better to (under some unlikely circumstances) not offer the tour, or to (under equally unlikely circumstances) show it at an arbitrary future login when no Shell upgrade has happened?

Merge request reports