[GODT-274] GUI changes for autoupdates

[GODT-275] Add enable/disable auto updates GUI option

Refactor Updater module
GODT-805 Changed manual update information bar layout
GODT-806, GODT-875 Change update dialogs
Refactor InformationBar
This commit is contained in:
Alexander Bilyak
2020-11-10 08:09:17 +00:00
committed by James Houlahan
parent b7b2297635
commit 98ab794f13
34 changed files with 1069 additions and 612 deletions

View File

@ -33,6 +33,7 @@ type GoQMLInterface struct {
_ func() `constructor:"init"`
_ bool `property:"isAutoUpdate"`
_ string `property:"currentAddress"`
_ string `property:"goos"`
_ string `property:"credits"`
@ -49,11 +50,21 @@ type GoQMLInterface struct {
_ string `property:importLogFileName`
_ string `property:"programTitle"`
_ string `property:"newversion"`
_ string `property:"fullversion"`
_ string `property:"downloadLink"`
_ string `property:"landingPage"`
_ string `property:"releaseNotesLink"`
_ string `property:"updateVersion"`
_ bool `property:"updateCanInstall"`
_ string `property:"updateLandingPage"`
_ string `property:"updateReleaseNotesLink"`
_ func() `signal:"notifyManualUpdate"`
_ func() `signal:"notifyManualUpdateRestartNeeded"`
_ func() `signal:"notifyManualUpdateError"`
_ func() `signal:"notifyForceUpdate"`
_ func() `signal:"notifySilentUpdateRestartNeeded"`
_ func() `signal:"notifySilentUpdateError"`
_ func() `slot:"checkForUpdates"`
_ func() `slot:"startManualUpdate"`
// translations
_ string `property:"wrongCredentials"`
@ -79,6 +90,7 @@ type GoQMLInterface struct {
_ func() `signal:"showWindow"`
_ func() `slot:"toggleAutoUpdate"`
_ func() `slot:"quit"`
_ func() `slot:"loadAccounts"`
_ func() `slot:"openLogs"`
@ -89,8 +101,7 @@ type GoQMLInterface struct {
_ func() `signal:"highlightSystray"`
_ func() `signal:"normalSystray"`
_ func(showMessage bool) `slot:"isNewVersionAvailable"`
_ func() string `slot:"getBackendVersion"`
_ func() string `slot:"getBackendVersion"`
_ func(description, client, address string) bool `slot:"sendBug"`
_ func(address string) bool `slot:"sendImportReport"`
@ -128,12 +139,10 @@ type GoQMLInterface struct {
_ func() `signal:"notifyVersionIsTheLatest"`
_ func() `signal:"notifyKeychainRebuild"`
_ func() `signal:"notifyHasNoKeychain"`
_ func() `signal:"notifyUpdate"`
_ func(accname string) `signal:"notifyLogout"`
_ func(accname string) `signal:"notifyAddressChanged"`
_ func(accname string) `signal:"notifyAddressChangedLogout"`
_ func() `slot:"startUpdate"`
_ func(hasError bool) `signal:"updateFinished"`
// errors
@ -150,6 +159,7 @@ func (s *GoQMLInterface) init() {}
func (s *GoQMLInterface) SetFrontend(f *FrontendQt) {
s.ConnectQuit(f.App.Quit)
s.ConnectToggleAutoUpdate(f.toggleAutoUpdate)
s.ConnectLoadAccounts(f.Accounts.LoadAccounts)
s.ConnectOpenLogs(f.openLogs)
s.ConnectOpenDownloadLink(f.openDownloadLink)
@ -170,10 +180,10 @@ func (s *GoQMLInterface) SetFrontend(f *FrontendQt) {
s.SetProgramTitle(f.programName)
s.ConnectOpenLicenseFile(f.openLicenseFile)
s.SetReleaseNotesLink("https://protonmail.com/download/ie/release_notes.html")
s.SetUpdateReleaseNotesLink("https://protonmail.com/download/ie/release_notes.html")
s.ConnectGetLocalVersionInfo(f.getLocalVersionInfo)
s.ConnectIsNewVersionAvailable(f.isNewVersionAvailable)
s.ConnectCheckForUpdates(f.checkForUpdates)
s.ConnectGetBackendVersion(func() string {
return f.programVersion
})
@ -193,7 +203,5 @@ func (s *GoQMLInterface) SetFrontend(f *FrontendQt) {
s.ConnectCheckPathStatus(CheckPathStatus)
s.ConnectStartUpdate(f.StartUpdate)
s.ConnectEmitEvent(f.emitEvent)
}