update about window

add report a bug link
This commit is contained in:
arcan1s
2014-08-01 09:54:26 +04:00
parent 0d26d6230e
commit e9c10e262e
13 changed files with 304 additions and 229 deletions

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>390</width>
<height>290</height>
<width>388</width>
<height>288</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
@ -50,7 +50,7 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="6" column="0">
<spacer name="spacer_about">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -63,7 +63,7 @@
</property>
</spacer>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_links">
<property name="text">
<string/>
@ -79,7 +79,7 @@
</property>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QLabel" name="label_license">
<property name="text">
<string/>
@ -98,6 +98,13 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_translators">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>

View File

@ -53,6 +53,7 @@ void AboutWindow::createText()
uiAbout->label_version->setText(QApplication::translate("AboutWindow", "Version %1\n(build date %2)")
.arg(QString(VERSION)).arg(QString(BUILD_DATE)));
uiAbout->label_description->setText(QApplication::translate("AboutWindow", "Qt-based graphical interface for netctl."));
uiAbout->label_translators->setText(QApplication::translate("AboutWindow", "Translators: %1").arg(QString(TRANSLATORS)));
uiAbout->label_links->setText(QApplication::translate("AboutWindow", "Links:") + QString("<br>") +
QString("<a href=\"%1\">%2</a><br>").arg(QString(HOMEPAGE)).arg(QApplication::translate("AboutWindow", "Homepage")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(REPOSITORY)).arg(QApplication::translate("AboutWindow", "Repository")) +

View File

@ -19,6 +19,7 @@
#include "ui_mainwindow.h"
#include <QDebug>
#include <QDesktopServices>
#include <QFileDialog>
#include <QFileInfo>
#include <QProcess>
@ -39,6 +40,7 @@
#include "settingswindow.h"
#include "tunnelwidget.h"
#include "tuntapwidget.h"
#include "version.h"
#include "vlanwidget.h"
#include "wirelesswidget.h"
@ -230,6 +232,7 @@ void MainWindow::createActions()
connect(ui->actionAbout, SIGNAL(triggered(bool)), aboutWin, SLOT(show()));
connect(ui->actionNetctlAuto, SIGNAL(triggered(bool)), netctlAutoWin, SLOT(showWindow()));
connect(ui->actionSettings, SIGNAL(triggered(bool)), settingsWin, SLOT(showWindow()));
connect(ui->actionReport, SIGNAL(triggered(bool)), this, SLOT(reportABug()));
connect(ui->actionQuit, SIGNAL(triggered(bool)), this, SLOT(close()));
// actions menu
@ -319,6 +322,16 @@ QMap<QString, QString> MainWindow::parseOptions(const QString options)
}
void MainWindow::reportABug()
{
if (debug) qDebug() << "[MainWindow]" << "[reportABug]";
if (QDesktopServices::openUrl(QUrl(QString(BUGTRACKER))))
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Done"));
else
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Error"));
}
// window slots
void MainWindow::setMenuActionsShown(const bool state)

View File

@ -74,6 +74,7 @@ public slots:
void setHiddenName(const QString name);
private slots:
void reportABug();
// menu update slots
void setMenuActionsShown(const bool state = true);
void updateMenuMain();

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>479</width>
<height>507</height>
<width>477</width>
<height>505</height>
</rect>
</property>
<property name="windowTitle">
@ -206,8 +206,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>96</width>
<height>26</height>
<width>445</width>
<height>349</height>
</rect>
</property>
<property name="sizePolicy">
@ -367,7 +367,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>479</width>
<width>477</width>
<height>22</height>
</rect>
</property>
@ -402,6 +402,7 @@
<property name="title">
<string>Help</string>
</property>
<addaction name="actionReport"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuMenu"/>
@ -562,12 +563,22 @@
</action>
<action name="actionAbout">
<property name="icon">
<iconset theme="help-about"/>
<iconset theme="help-about">
<normaloff/>
</iconset>
</property>
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionReport">
<property name="icon">
<iconset theme="tools-report-bug"/>
</property>
<property name="text">
<string>Report a bug</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>