Add button to show Syncthing releases/downloads in launcher
This commit is contained in:
parent
1ccac1e145
commit
9fc96a847a
|
@ -0,0 +1,12 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#eff0f1;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g transform="translate(1,1)">
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none" d="M 8 3 L 8 9 L 9 9 L 9 4 L 13 4 L 13 9 L 14 9 L 14 3 L 13 3 L 9 3 L 8 3 z M 5.7929688 10 L 5 10.816406 L 11 17 L 17 10.816406 L 16.207031 10 L 11 15.367188 L 5.7929688 10 z M 4 17 L 4 19 L 5 19 L 17 19 L 18 19 L 18 17 L 17 17 L 17 18 L 5 18 L 5 17 L 4 17 z " class="ColorScheme-Text"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 641 B |
|
@ -16,5 +16,6 @@
|
|||
<file>icons/hicolor/scalable/places/folder-download.svg</file>
|
||||
<file>icons/hicolor/scalable/emblems/8/emblem-error.svg</file>
|
||||
<file>icons/hicolor/scalable/actions/appointment-new.svg</file>
|
||||
<file>icons/hicolor/scalable/actions/download.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <qtutilities/misc/dialogutils.h>
|
||||
#endif
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QFileDialog>
|
||||
#include <QHostAddress>
|
||||
#include <QMessageBox>
|
||||
|
@ -937,6 +938,13 @@ QWidget *LauncherOptionPage::setupWidget()
|
|||
QIcon::fromTheme(QStringLiteral("edit-undo"), QIcon(QStringLiteral(":/icons/hicolor/scalable/actions/edit-paste.svg"))));
|
||||
connect(m_restoreArgsAction, &QAction::triggered, this, &LauncherOptionPage::restoreDefaultArguments);
|
||||
ui()->argumentsLineEdit->addCustomAction(m_restoreArgsAction);
|
||||
m_syncthingDownloadAction = new QAction(ui()->syncthingPathSelection);
|
||||
m_syncthingDownloadAction->setText(tr("Show Syncthing releases/downloads"));
|
||||
m_syncthingDownloadAction->setIcon(
|
||||
QIcon::fromTheme(QStringLiteral("download"), QIcon(QStringLiteral(":/icons/hicolor/scalable/actions/download.svg"))));
|
||||
connect(m_syncthingDownloadAction, &QAction::triggered,
|
||||
[] { QDesktopServices::openUrl(QUrl(QStringLiteral("https://github.com/syncthing/syncthing/releases"))); });
|
||||
ui()->syncthingPathSelection->lineEdit()->addCustomAction(m_syncthingDownloadAction);
|
||||
ui()->configDirPathSelection->provideCustomFileMode(QFileDialog::Directory);
|
||||
ui()->dataDirPathSelection->provideCustomFileMode(QFileDialog::Directory);
|
||||
}
|
||||
|
|
|
@ -134,6 +134,7 @@ private:
|
|||
Data::SyncthingProcess *const m_process;
|
||||
Data::SyncthingLauncher *const m_launcher;
|
||||
QAction *m_restoreArgsAction;
|
||||
QAction *m_syncthingDownloadAction;
|
||||
bool m_kill;
|
||||
QString m_tool, m_toolName, m_windowTitle;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue