| 739 | } |
| 740 | |
| 741 | void LightscreenWindow::updaterDone(bool result) |
| 742 | { |
| 743 | mUpdater->deleteLater(); |
| 744 | |
| 745 | settings()->setValue("lastUpdateCheck", QDate::currentDate().dayOfYear()); |
| 746 | |
| 747 | if (!result) { |
| 748 | return; |
| 749 | } |
| 750 | |
| 751 | QMessageBox msgBox; |
| 752 | msgBox.setWindowTitle(tr("Lightscreen")); |
| 753 | msgBox.setText(tr("There's a new version of Lightscreen available.<br>Would you like to see more information?<br>(<em>You can turn this notification off</em>)")); |
| 754 | msgBox.setIcon(QMessageBox::Information); |
| 755 | |
| 756 | QPushButton *yesButton = msgBox.addButton(QMessageBox::Yes); |
| 757 | QPushButton *turnOffButton = msgBox.addButton(tr("Turn Off"), QMessageBox::ActionRole); |
| 758 | QPushButton *remindButton = msgBox.addButton(tr("Remind Me Later"), QMessageBox::RejectRole); |
| 759 | |
| 760 | Q_UNUSED(remindButton); |
| 761 | |
| 762 | msgBox.exec(); |
| 763 | |
| 764 | if (msgBox.clickedButton() == yesButton) { |
| 765 | QDesktopServices::openUrl(QUrl("https://lightscreen.com.ar/whatsnew?from=" + qApp->applicationVersion())); |
| 766 | } else if (msgBox.clickedButton() == turnOffButton) { |
| 767 | settings()->setValue("options/disableUpdater", true); |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | void LightscreenWindow::upload(const QString &fileName) |
| 772 | { |