diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/backend.go | 5 | ||||
-rw-r--r-- | gui/handlers.cpp | 5 | ||||
-rw-r--r-- | gui/handlers.h | 1 | ||||
-rw-r--r-- | gui/qml/main.qml | 3 |
4 files changed, 12 insertions, 2 deletions
diff --git a/gui/backend.go b/gui/backend.go index 9453d88..96f50de 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -40,6 +40,11 @@ func DonateAccepted() { backend.DonateAccepted() } +//export DonateSeen +func DonateSeen() { + backend.DonateSeen() +} + //export SubscribeToEvent func SubscribeToEvent(event string, f unsafe.Pointer) { backend.SubscribeToEvent(event, f) diff --git a/gui/handlers.cpp b/gui/handlers.cpp index 6cafab5..8f0e0d0 100644 --- a/gui/handlers.cpp +++ b/gui/handlers.cpp @@ -37,6 +37,11 @@ void Backend::donateAccepted() DonateAccepted(); } +void Backend::donateSeen() +{ + DonateSeen(); +} + void Backend::login(QString username, QString password) { Login(toGoStr(username), toGoStr(password)); diff --git a/gui/handlers.h b/gui/handlers.h index c342a97..8283645 100644 --- a/gui/handlers.h +++ b/gui/handlers.h @@ -35,6 +35,7 @@ public slots: void switchOn(); void switchOff(); void donateAccepted(); + void donateSeen(); void login(QString username, QString password); void resetError(QString errlabel); void resetNotification(QString label); diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 4ac1972..aed08ea 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -21,11 +21,10 @@ ApplicationWindow { onDataChanged: { ctx = JSON.parse(jsonModel.getJson()) - // FIXME -- we need to inform the backend that we've already seen - // this. Otherwise this keeps popping randonmly on state changes. if (ctx.donateDialog == 'true') { console.debug(jsonModel.getJson()) donate.visible = true + backend.donateSeen() } if (ctx.loginDialog == 'true') { console.debug(jsonModel.getJson()) |