Skip to content

Commit

Permalink
Gui
Browse files Browse the repository at this point in the history
- fixed #17
- added automatic updates check
- removed Updater
Tools
- added Updater
  • Loading branch information
Jmgr committed Jun 20, 2010
1 parent 0534784 commit 56198e9
Show file tree
Hide file tree
Showing 10 changed files with 588 additions and 43 deletions.
8 changes: 6 additions & 2 deletions gui/changelogdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
Contact : [email protected]
*/

#ifndef ACT_NO_UPDATER

#include "changelogdialog.h"
#include "ui_changelogdialog.h"

Expand All @@ -39,9 +41,9 @@ void ChangelogDialog::setVersion(const Tools::Version &version)
ui->versionNumber->setText(version.toString());
}

void ChangelogDialog::setReleaseDate(const QString &releaseDate)
void ChangelogDialog::setReleaseDate(const QDate &releaseDate)
{
ui->releaseDate->setText(releaseDate);
ui->releaseDate->setText(releaseDate.toString(Qt::DefaultLocaleLongDate));
}

void ChangelogDialog::setType(const QString &type)
Expand Down Expand Up @@ -81,3 +83,5 @@ void ChangelogDialog::on_downloadButton_clicked()

accept();
}

#endif
7 changes: 6 additions & 1 deletion gui/changelogdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
Contact : [email protected]
*/

#ifndef ACT_NO_UPDATER

#ifndef CHANGELOGDIALOG_H
#define CHANGELOGDIALOG_H

#include "version.h"

#include <QDialog>
#include <QDate>

namespace Ui
{
Expand All @@ -46,7 +49,7 @@ class ChangelogDialog : public QDialog
~ChangelogDialog();

void setVersion(const Tools::Version &version);
void setReleaseDate(const QString &releaseDate);
void setReleaseDate(const QDate &releaseDate);
void setType(const QString &type);
void setChangelog(const QString &changelog);

Expand All @@ -65,3 +68,5 @@ private slots:
};

#endif // CHANGELOGDIALOG_H

#endif
3 changes: 1 addition & 2 deletions gui/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ namespace Global
{
const Tools::Version ACTIONAZ_VERSION = Tools::Version(0, 0, 1);
const Tools::Version SCRIPT_VERSION = Tools::Version(0, 0, 1);
const QString UPDATE_IP = "jmgr.eu";
const int UPDATE_PORT = 43682;
const QString UPDATE_URL = "http://updates.jmgr.eu/";

QString currentLanguage();
QString currentOS();
Expand Down
8 changes: 3 additions & 5 deletions gui/gui.pro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include(../common.pri)
include(globalshortcut/globalshortcut.pri)
unix:!mac{
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
QMAKE_RPATH=
unix:!mac {
QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN
QMAKE_RPATH =
}
QT += xml \
network \
Expand All @@ -25,7 +25,6 @@ SOURCES += main.cpp \
scripttableview.cpp \
scriptmodelundocommands.cpp \
newactiondialog.cpp \
updater.cpp \
global.cpp \
changelogdialog.cpp \
scriptcontentdialog.cpp
Expand All @@ -42,7 +41,6 @@ HEADERS += mainwindow.h \
scripttableview.h \
scriptmodelundocommands.h \
newactiondialog.h \
updater.h \
changelogdialog.h \
scriptcontentdialog.h
INCLUDEPATH += . \
Expand Down
7 changes: 0 additions & 7 deletions gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "actionbuffer.h"
#include "global.h"
#include "version.h"
#include "actioninfo.h"
#include "globalshortcutmanager.h"

#include <QxtApplication>
Expand Down Expand Up @@ -110,18 +109,12 @@ int main(int argc, char **argv)
qRegisterMetaType<ActionTools::SubParameter>("SubParameter");
qRegisterMetaType<ActionTools::ActionBuffer>("ActionBuffer");
qRegisterMetaType<Tools::Version>("Tools::Version");
qRegisterMetaType<Tools::ActionInfo>("Tools::ActionInfo");
qRegisterMetaType<Tools::ActionPackInfo>("Tools::ActionPackInfo");
qRegisterMetaType<Tools::ActionPackInfoList>("Tools::ActionPackInfoList");

qRegisterMetaTypeStreamOperators<ActionTools::Action>("Action");
qRegisterMetaTypeStreamOperators<ActionTools::Parameter>("Parameter");
qRegisterMetaTypeStreamOperators<ActionTools::SubParameter>("SubParameter");
qRegisterMetaTypeStreamOperators<ActionTools::ActionBuffer>("ActionBuffer");
qRegisterMetaTypeStreamOperators<Tools::Version>("Tools::Version");
qRegisterMetaTypeStreamOperators<Tools::ActionInfo>("Tools::ActionInfo");
qRegisterMetaTypeStreamOperators<Tools::ActionPackInfo>("Tools::ActionPackInfo");
qRegisterMetaTypeStreamOperators<Tools::ActionPackInfoList>("Tools::ActionPackInfoList");

app.setOrganizationName("Actionaz");
app.setOrganizationDomain("actionaz.eu");
Expand Down
Loading

0 comments on commit 56198e9

Please sign in to comment.