Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Desktop: Add type 'info' and 'OK' button to update dialog when version up-to-date #1148
This removes a minor issue (not found Issues) where the text in the check for update messagebox is automatically selected. It adds a 'OK' button and makes the messagebox consistent with other boxes (type 'info'). This is only for the dialog when the version is up-to-date.
Text is automatically selected in lack of a button. ESC must be pressed to exit the window.
OK is automatically selected, icon is shown. ESC or Enter (for 'OK') can be pressed to exit the window.
I'm not sure.. I guess this use of default values makes this happen for both Mac and Windows in different ways.
As long as you state the type (for the logo) and buttons explicitly, it should anyways look similar on all platforms :) I don't have any strong feelings about using the info icon or Joplin icon for this. If you want the Joplin Icon I guess I can change the type line to using the same icon as in the About Joplin-window:
Note: The 'info' type was copied from the dialog when an update is available, so IIRC this dialog also shows an info icon.
What's the standard for message boxes on Linux? Maybe if the Electron team didn't put the OK button is because it's more normal on Linux not to have one?
In any case, if we make this change, we should probably change
Based on the documentation for Electron I thought that it automatically added 'OK' to Windows, but it indeed seems like this default action happens for MacOS as well - but not for Linux (as shown in my initial screenshot). There's not a coherent standard for Linux AFAIK, it's likely different in different distros and graphical environments. But not having a button does not look good and does not cohere with the general design in the application IMO.
To suppress the default icon action, adding
When I took another look at the code I see that using showmessagebox directly is not recommended:
It's only in