Added a simple about dialog.

This commit is contained in:
Daniel Molkentin 2012-09-17 21:06:20 +02:00
parent ff4a119c0c
commit 6d13b1b2fb
2 changed files with 17 additions and 0 deletions

View file

@ -29,6 +29,7 @@
#include "mirall/mirallconfigfile.h"
#include "mirall/updatedetector.h"
#include "mirall/proxydialog.h"
#include "mirall/version.h"
#include "mirall/miralltheme.h"
#include "mirall/owncloudtheme.h"
@ -318,6 +319,8 @@ void Application::setupActions()
QObject::connect(_actionConfigure, SIGNAL(triggered(bool)), SLOT(slotConfigure()));
_actionConfigureProxy = new QAction(tr("Configure proxy..."), this);
QObject::connect(_actionConfigureProxy, SIGNAL(triggered(bool)), SLOT(slotConfigureProxy()));
_actionAbout = new QAction(tr("&About..."), this);
QObject::connect(_actionAbout, SIGNAL(triggered(bool)), SLOT(slotAbout()));
_actionQuit = new QAction(tr("Quit"), this);
QObject::connect(_actionQuit, SIGNAL(triggered(bool)), SLOT(quit()));
}
@ -367,6 +370,8 @@ void Application::setupContextMenu()
_contextMenu->addAction(_actionConfigure);
_contextMenu->addAction(_actionConfigureProxy);
_contextMenu->addSeparator();
_contextMenu->addAction(_actionAbout);
_contextMenu->addSeparator();
_contextMenu->addAction(_actionQuit);
_tray->setContextMenu(_contextMenu);
@ -576,6 +581,16 @@ void Application::slotOpenLogBrowser()
_logBrowser->raise();
}
void Application::slotAbout()
{
QMessageBox::about(0, tr("About %1").arg(_theme->appName()),
tr("%1 client, version %2\n\nCopyright 2012, the ownCloud developers\n\nLicensed under GPLv2\n\n"
"The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,"
"MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.")
.arg(_theme->appName())
.arg(MIRALL_STRINGIFY(MIRALL_VERSION)));
}
/*
* the folder is to be removed. The slot is called from a signal emitted by
* the status dialog, which removes the folder from its list by itself.

View file

@ -84,6 +84,7 @@ protected slots:
void slotCheckAuthentication();
void slotAuthCheck( const QString& ,QNetworkReply* );
void slotOpenLogBrowser();
void slotAbout();
void slotStartUpdateDetector();
@ -98,6 +99,7 @@ private:
QAction *_actionConfigure;
QAction *_actionOpenoC;
QAction *_actionConfigureProxy;
QAction *_actionAbout;
#if QT_VERSION >= 0x040700
QNetworkConfigurationManager *_networkMgr;