summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-02-05 05:36:25 (GMT)
committerMarius Kintel <marius@kintel.net>2013-02-05 05:36:25 (GMT)
commitfa00547507566a646db2baffea114104b1ffd567 (patch)
tree85d8d3e09c9b4c1f651829042e20b061166ea415 /src/mainwin.cc
parent03be37d16b585e64de87118053206aaae06e7cf8 (diff)
First version of automatic updates for Mac
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 17b9ef7..a05a4d4 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -48,6 +48,7 @@
#include "ProgressWidget.h"
#include "ThrownTogetherRenderer.h"
#include "csgtermnormalizer.h"
+#include "AutoUpdater.h"
#include <QMenu>
#include <QTime>
@@ -205,6 +206,16 @@ MainWindow::MainWindow(const QString &filename)
animate_panel->hide();
+ // Application menu
+#ifdef DEBUG
+ this->appActionUpdateCheck->setEnabled(false);
+#else
+#ifdef Q_OS_MAC
+ this->appActionUpdateCheck->setMenuRole(QAction::ApplicationSpecificRole);
+ this->appActionUpdateCheck->setEnabled(true);
+ connect(this->appActionUpdateCheck, SIGNAL(triggered()), this, SLOT(actionUpdateCheck()));
+#endif
+#endif
// File menu
connect(this->fileActionNew, SIGNAL(triggered()), this, SLOT(actionNew()));
connect(this->fileActionOpen, SIGNAL(triggered()), this, SLOT(actionOpen()));
@@ -781,6 +792,13 @@ void MainWindow::compileCSG(bool procevents)
}
}
+void MainWindow::actionUpdateCheck()
+{
+ if (AutoUpdater *updater =AutoUpdater::updater()) {
+ updater->checkForUpdates();
+ }
+}
+
void MainWindow::actionNew()
{
#ifdef ENABLE_MDI
contact: Jan Huwald // Impressum