diff --git a/flameshot.pro b/flameshot.pro index f397fcfd..11b7b0c7 100644 --- a/flameshot.pro +++ b/flameshot.pro @@ -87,6 +87,7 @@ SOURCES += src/main.cpp \ src/config/filepathconfiguration.cpp \ src/config/setshortcutwidget.cpp \ src/config/shortcutswidget.cpp \ + src/tools/storage/storagemanager.cpp \ src/utils/configshortcuts.cpp \ src/widgets/historywidget.cpp \ src/utils/configenterprise.cpp \ @@ -128,11 +129,11 @@ SOURCES += src/main.cpp \ src/cli/commandargument.cpp \ src/utils/screenshotsaver.cpp \ src/tools/storage/imguploader.cpp \ - src/tools/storage/imguruploadertool.cpp \ - src/tools/storage/imguruploader.cpp \ - src/tools/storage/imgs3uploadertool.cpp \ - src/tools/storage/imgs3uploader.cpp \ - src/tools/storage/imgs3settings.cpp \ + src/tools/storage/imgur/imguruploadertool.cpp \ + src/tools/storage/imgur/imguruploader.cpp \ + src/tools/storage/s3/imgs3uploadertool.cpp \ + src/tools/storage/s3/imgs3uploader.cpp \ + src/tools/storage/s3/imgs3settings.cpp \ src/widgets/loadspinner.cpp \ src/widgets/imagelabel.cpp \ src/widgets/notificationwidget.cpp \ @@ -171,6 +172,8 @@ HEADERS += src/widgets/capture/buttonhandler.h \ src/config/filepathconfiguration.h \ src/config/setshortcutwidget.h \ src/config/shortcutswidget.h \ + src/tools/storage/imgstorages.h \ + src/tools/storage/storagemanager.h \ src/utils/configshortcuts.h \ src/widgets/historywidget.h \ src/utils/configenterprise.h \ @@ -212,11 +215,11 @@ HEADERS += src/widgets/capture/buttonhandler.h \ src/cli/commandargument.h \ src/utils/screenshotsaver.h \ src/tools/storage/imguploader.h \ - src/tools/storage/imguruploadertool.h \ - src/tools/storage/imguruploader.h \ - src/tools/storage/imgs3uploader.h \ - src/tools/storage/imgs3uploadertool.h \ - src/tools/storage/imgs3settings.h \ + src/tools/storage/imgur/imguruploadertool.h \ + src/tools/storage/imgur/imguruploader.h \ + src/tools/storage/s3/imgs3uploader.h \ + src/tools/storage/s3/imgs3uploadertool.h \ + src/tools/storage/s3/imgs3settings.h \ src/widgets/loadspinner.h \ src/widgets/imagelabel.h \ src/widgets/notificationwidget.h \ diff --git a/src/config/configwindow.cpp b/src/config/configwindow.cpp index 26cbea4e..c3c2aa14 100644 --- a/src/config/configwindow.cpp +++ b/src/config/configwindow.cpp @@ -16,32 +16,35 @@ // along with Flameshot. If not, see . #include "configwindow.h" -#include "src/utils/colorutils.h" -#include "src/utils/confighandler.h" -#include "src/utils/pathinfo.h" -#include "src/widgets/capture/capturebutton.h" -#include "src/config/geneneralconf.h" #include "src/config/filenameeditor.h" #include "src/config/filepathconfiguration.h" +#include "src/config/geneneralconf.h" #include "src/config/shortcutswidget.h" #include "src/config/strftimechooserwidget.h" #include "src/config/visualseditor.h" +#include "src/utils/colorutils.h" +#include "src/utils/confighandler.h" #include "src/utils/globalvalues.h" -#include -#include -#include -#include +#include "src/utils/pathinfo.h" +#include "src/widgets/capture/capturebutton.h" #include +#include +#include +#include +#include // ConfigWindow contains the menus where you can configure the application -ConfigWindow::ConfigWindow(QWidget *parent) : QTabWidget(parent) { +ConfigWindow::ConfigWindow(QWidget* parent) + : QTabWidget(parent) +{ setAttribute(Qt::WA_DeleteOnClose); - setMinimumSize(GlobalValues::buttonBaseSize() * 14, GlobalValues::buttonBaseSize() * 12); + setMinimumSize(GlobalValues::buttonBaseSize() * 14, + GlobalValues::buttonBaseSize() * 12); setWindowIcon(QIcon(":img/app/flameshot.svg")); setWindowTitle(tr("Configuration")); - auto changedSlot = [this](QString s){ + auto changedSlot = [this](QString s) { QStringList files = m_configWatcher->files(); if (!files.contains(s)) { this->m_configWatcher->addPath(s); @@ -50,50 +53,50 @@ ConfigWindow::ConfigWindow(QWidget *parent) : QTabWidget(parent) { }; m_configWatcher = new QFileSystemWatcher(this); m_configWatcher->addPath(ConfigHandler().configFilePath()); - connect(m_configWatcher, &QFileSystemWatcher::fileChanged, - this, changedSlot); + connect( + m_configWatcher, &QFileSystemWatcher::fileChanged, this, changedSlot); QColor background = this->palette().background().color(); bool isDark = ColorUtils::colorIsDark(background); - QString modifier = isDark ? PathInfo::whiteIconPath() : - PathInfo::blackIconPath(); + QString modifier = + isDark ? PathInfo::whiteIconPath() : PathInfo::blackIconPath(); // visuals m_visuals = new VisualsEditor(); - addTab(m_visuals, QIcon(modifier + "graphics.svg"), - tr("Interface")); + addTab(m_visuals, QIcon(modifier + "graphics.svg"), tr("Interface")); // filename m_filenameEditor = new FileNameEditor(); - addTab(m_filenameEditor, QIcon(modifier + "name_edition.svg"), + addTab(m_filenameEditor, + QIcon(modifier + "name_edition.svg"), tr("Filename Editor")); // general m_generalConfig = new GeneneralConf(); - addTab(m_generalConfig, QIcon(modifier + "config.svg"), - tr("General")); + addTab(m_generalConfig, QIcon(modifier + "config.svg"), tr("General")); // shortcuts m_shortcuts = new ShortcutsWidget(); - addTab(m_shortcuts, QIcon(modifier + "shortcut.svg"), - tr("Shortcuts")); - - // filepath - m_filePathConfiguration = new FilePathConfiguration(); - addTab(m_filePathConfiguration, QIcon(modifier + "filepath.svg"), - tr("Path Default")); + addTab(m_shortcuts, QIcon(modifier + "shortcut.svg"), tr("Shortcuts")); // connect update sigslots - connect(this, &ConfigWindow::updateChildren, - m_filenameEditor, &FileNameEditor::updateComponents); - connect(this, &ConfigWindow::updateChildren, - m_visuals, &VisualsEditor::updateComponents); - connect(this, &ConfigWindow::updateChildren, - m_generalConfig, &GeneneralConf::updateComponents); + connect(this, + &ConfigWindow::updateChildren, + m_filenameEditor, + &FileNameEditor::updateComponents); + connect(this, + &ConfigWindow::updateChildren, + m_visuals, + &VisualsEditor::updateComponents); + connect(this, + &ConfigWindow::updateChildren, + m_generalConfig, + &GeneneralConf::updateComponents); } -void ConfigWindow::keyPressEvent(QKeyEvent *e) { +void ConfigWindow::keyPressEvent(QKeyEvent* e) +{ if (e->key() == Qt::Key_Escape) { - close(); + close(); } } diff --git a/src/config/configwindow.h b/src/config/configwindow.h index 7bdc36be..088e363d 100644 --- a/src/config/configwindow.h +++ b/src/config/configwindow.h @@ -26,22 +26,22 @@ class GeneneralConf; class QFileSystemWatcher; class VisualsEditor; -class ConfigWindow : public QTabWidget { +class ConfigWindow : public QTabWidget +{ Q_OBJECT public: - explicit ConfigWindow(QWidget *parent = nullptr); + explicit ConfigWindow(QWidget* parent = nullptr); signals: void updateChildren(); protected: - void keyPressEvent(QKeyEvent *); + void keyPressEvent(QKeyEvent*); private: - FileNameEditor *m_filenameEditor; - FilePathConfiguration *m_filePathConfiguration; - ShortcutsWidget *m_shortcuts; - GeneneralConf *m_generalConfig; - VisualsEditor *m_visuals; - QFileSystemWatcher *m_configWatcher; + FileNameEditor* m_filenameEditor; + ShortcutsWidget* m_shortcuts; + GeneneralConf* m_generalConfig; + VisualsEditor* m_visuals; + QFileSystemWatcher* m_configWatcher; }; diff --git a/src/config/geneneralconf.cpp b/src/config/geneneralconf.cpp index 0732d631..58e55687 100644 --- a/src/config/geneneralconf.cpp +++ b/src/config/geneneralconf.cpp @@ -16,20 +16,24 @@ // along with Flameshot. If not, see . #include "geneneralconf.h" -#include "src/utils/confighandler.h" -#include "src/utils/confighandler.h" +#include "filepathconfiguration.h" #include "src/core/controller.h" -#include -#include +#include "src/tools/storage/imgstorages.h" +#include "src/utils/confighandler.h" #include -#include -#include -#include #include -#include +#include #include +#include +#include +#include +#include +#include +#include -GeneneralConf::GeneneralConf(QWidget *parent) : QWidget(parent) { +GeneneralConf::GeneneralConf(QWidget* parent) + : QWidget(parent) +{ m_layout = new QVBoxLayout(this); m_layout->setAlignment(Qt::AlignTop); initShowHelp(); @@ -40,19 +44,23 @@ GeneneralConf::GeneneralConf(QWidget *parent) : QWidget(parent) { initCloseAfterCapture(); initCopyAndCloseAfterUpload(); initCopyPathAfterSave(); + initUploadStorage(); + initFilePathConfiguration(); // this has to be at the end initConfingButtons(); updateComponents(); } -void GeneneralConf::updateComponents() { +void GeneneralConf::updateComponents() +{ ConfigHandler config; m_helpMessage->setChecked(config.showHelpValue()); m_sysNotifications->setChecked(config.desktopNotificationValue()); m_autostart->setChecked(config.startupLaunchValue()); m_closeAfterCapture->setChecked(config.closeAfterScreenshotValue()); - m_copyAndCloseAfterUpload->setChecked(config.copyAndCloseAfterUploadEnabled()); + m_copyAndCloseAfterUpload->setChecked( + config.copyAndCloseAfterUploadEnabled()); m_copyPathAfterSave->setChecked(config.copyPathAfterSaveEnabled()); #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) @@ -60,15 +68,18 @@ void GeneneralConf::updateComponents() { #endif } -void GeneneralConf::showHelpChanged(bool checked) { +void GeneneralConf::showHelpChanged(bool checked) +{ ConfigHandler().setShowHelp(checked); } -void GeneneralConf::showDesktopNotificationChanged(bool checked) { +void GeneneralConf::showDesktopNotificationChanged(bool checked) +{ ConfigHandler().setDesktopNotification(checked); } -void GeneneralConf::showTrayIconChanged(bool checked) { +void GeneneralConf::showTrayIconChanged(bool checked) +{ auto controller = Controller::getInstance(); if (checked) { controller->enableTrayIcon(); @@ -77,25 +88,29 @@ void GeneneralConf::showTrayIconChanged(bool checked) { } } -void GeneneralConf::autostartChanged(bool checked) { +void GeneneralConf::autostartChanged(bool checked) +{ ConfigHandler().setStartupLaunch(checked); } -void GeneneralConf::showStartupLaunchMessageChanged(bool checked) { +void GeneneralConf::showStartupLaunchMessageChanged(bool checked) +{ ConfigHandler().setShowStartupLaunchMessage(checked); } -void GeneneralConf::closeAfterCaptureChanged(bool checked) { +void GeneneralConf::closeAfterCaptureChanged(bool checked) +{ ConfigHandler().setCloseAfterScreenshot(checked); } -void GeneneralConf::importConfiguration() { +void GeneneralConf::importConfiguration() +{ QString fileName = QFileDialog::getOpenFileName(this, tr("Import")); if (fileName.isEmpty()) { return; } QFile file(fileName); - QTextCodec *codec = QTextCodec::codecForLocale(); + QTextCodec* codec = QTextCodec::codecForLocale(); if (!file.open(QFile::ReadOnly)) { QMessageBox::about(this, tr("Error"), tr("Unable to read file.")); return; @@ -105,16 +120,17 @@ void GeneneralConf::importConfiguration() { QFile config(ConfigHandler().configFilePath()); if (!config.open(QFile::WriteOnly)) { - QMessageBox::about(this, tr("Error"), tr("Unable to write file.")); - return; + QMessageBox::about(this, tr("Error"), tr("Unable to write file.")); + return; } config.write(codec->fromUnicode(text)); config.close(); } -void GeneneralConf::exportFileConfiguration() { - QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), - QStringLiteral("flameshot.conf")); +void GeneneralConf::exportFileConfiguration() +{ + QString fileName = QFileDialog::getSaveFileName( + this, tr("Save File"), QStringLiteral("flameshot.conf")); // Cancel button if (fileName.isNull()) { @@ -131,45 +147,52 @@ void GeneneralConf::exportFileConfiguration() { } } -void GeneneralConf::resetConfiguration() { +void GeneneralConf::resetConfiguration() +{ QMessageBox::StandardButton reply; reply = QMessageBox::question( - this, tr("Confirm Reset"), - tr("Are you sure you want to reset the configuration?"), - QMessageBox::Yes | QMessageBox::No); + this, + tr("Confirm Reset"), + tr("Are you sure you want to reset the configuration?"), + QMessageBox::Yes | QMessageBox::No); if (reply == QMessageBox::Yes) { ConfigHandler().setDefaults(); } } - -void GeneneralConf::initShowHelp() { +void GeneneralConf::initShowHelp() +{ m_helpMessage = new QCheckBox(tr("Show help message"), this); ConfigHandler config; bool checked = config.showHelpValue(); m_helpMessage->setChecked(checked); m_helpMessage->setToolTip(tr("Show the help message at the beginning " - "in the capture mode.")); + "in the capture mode.")); m_layout->addWidget(m_helpMessage); - connect(m_helpMessage, &QCheckBox::clicked, this, + connect(m_helpMessage, + &QCheckBox::clicked, + this, &GeneneralConf::showHelpChanged); } -void GeneneralConf::initShowDesktopNotification() { - m_sysNotifications = - new QCheckBox(tr("Show desktop notifications"), this); +void GeneneralConf::initShowDesktopNotification() +{ + m_sysNotifications = new QCheckBox(tr("Show desktop notifications"), this); ConfigHandler config; bool checked = config.desktopNotificationValue(); m_sysNotifications->setChecked(checked); m_sysNotifications->setToolTip(tr("Show desktop notifications")); m_layout->addWidget(m_sysNotifications); - connect(m_sysNotifications, &QCheckBox::clicked, this, + connect(m_sysNotifications, + &QCheckBox::clicked, + this, &GeneneralConf::showDesktopNotificationChanged); } -void GeneneralConf::initShowTrayIcon() { +void GeneneralConf::initShowTrayIcon() +{ #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) m_showTray = new QCheckBox(tr("Show tray icon"), this); ConfigHandler config; @@ -178,36 +201,46 @@ void GeneneralConf::initShowTrayIcon() { m_showTray->setToolTip(tr("Show the systemtray icon")); m_layout->addWidget(m_showTray); - connect(m_showTray, &QCheckBox::stateChanged, this, + connect(m_showTray, + &QCheckBox::stateChanged, + this, &GeneneralConf::showTrayIconChanged); #endif } -void GeneneralConf::initConfingButtons() { - QHBoxLayout *buttonLayout = new QHBoxLayout(); +void GeneneralConf::initConfingButtons() +{ + QHBoxLayout* buttonLayout = new QHBoxLayout(); m_layout->addStretch(); - QGroupBox *box = new QGroupBox(tr("Configuration File")); + QGroupBox* box = new QGroupBox(tr("Configuration File")); box->setFlat(true); box->setLayout(buttonLayout); m_layout->addWidget(box); m_exportButton = new QPushButton(tr("Export")); buttonLayout->addWidget(m_exportButton); - connect(m_exportButton, &QPushButton::clicked, this, + connect(m_exportButton, + &QPushButton::clicked, + this, &GeneneralConf::exportFileConfiguration); m_importButton = new QPushButton(tr("Import")); buttonLayout->addWidget(m_importButton); - connect(m_importButton, &QPushButton::clicked, this, + connect(m_importButton, + &QPushButton::clicked, + this, &GeneneralConf::importConfiguration); m_resetButton = new QPushButton(tr("Reset")); buttonLayout->addWidget(m_resetButton); - connect(m_resetButton, &QPushButton::clicked, this, + connect(m_resetButton, + &QPushButton::clicked, + this, &GeneneralConf::resetConfiguration); } -void GeneneralConf::initAutostart() { +void GeneneralConf::initAutostart() +{ m_autostart = new QCheckBox(tr("Launch at startup"), this); ConfigHandler config; bool checked = config.startupLaunchValue(); @@ -215,12 +248,14 @@ void GeneneralConf::initAutostart() { m_autostart->setToolTip(tr("Launch Flameshot")); m_layout->addWidget(m_autostart); - connect(m_autostart, &QCheckBox::clicked, this, - &GeneneralConf::autostartChanged); + connect( + m_autostart, &QCheckBox::clicked, this, &GeneneralConf::autostartChanged); } -void GeneneralConf::initShowStartupLaunchMessage() { - m_showStartupLaunchMessage = new QCheckBox(tr("Show welcome message on launch"), this); +void GeneneralConf::initShowStartupLaunchMessage() +{ + m_showStartupLaunchMessage = + new QCheckBox(tr("Show welcome message on launch"), this); ConfigHandler config; bool checked = config.showStartupLaunchMessage(); m_showStartupLaunchMessage->setChecked(checked); @@ -232,23 +267,31 @@ void GeneneralConf::initShowStartupLaunchMessage() { }); } -void GeneneralConf::initCloseAfterCapture() { - m_closeAfterCapture = new QCheckBox(tr("Close application after capture"), this); +void GeneneralConf::initCloseAfterCapture() +{ + m_closeAfterCapture = + new QCheckBox(tr("Close application after capture"), this); ConfigHandler config; bool checked = config.closeAfterScreenshotValue(); m_closeAfterCapture->setChecked(checked); m_closeAfterCapture->setToolTip(tr("Close after taking a screenshot")); m_layout->addWidget(m_closeAfterCapture); - connect(m_closeAfterCapture, &QCheckBox::clicked, this, + connect(m_closeAfterCapture, + &QCheckBox::clicked, + this, &GeneneralConf::closeAfterCaptureChanged); } -void GeneneralConf::initCopyAndCloseAfterUpload() { - m_copyAndCloseAfterUpload = new QCheckBox(tr("Copy URL after upload"), this); +void GeneneralConf::initCopyAndCloseAfterUpload() +{ + m_copyAndCloseAfterUpload = + new QCheckBox(tr("Copy URL after upload"), this); ConfigHandler config; - m_copyAndCloseAfterUpload->setChecked(config.copyAndCloseAfterUploadEnabled()); - m_copyAndCloseAfterUpload->setToolTip(tr("Copy URL and close window after upload")); + m_copyAndCloseAfterUpload->setChecked( + config.copyAndCloseAfterUploadEnabled()); + m_copyAndCloseAfterUpload->setToolTip( + tr("Copy URL and close window after upload")); m_layout->addWidget(m_copyAndCloseAfterUpload); connect(m_copyAndCloseAfterUpload, &QCheckBox::clicked, [](bool checked) { @@ -256,7 +299,8 @@ void GeneneralConf::initCopyAndCloseAfterUpload() { }); } -void GeneneralConf::initCopyPathAfterSave() { +void GeneneralConf::initCopyPathAfterSave() +{ m_copyPathAfterSave = new QCheckBox(tr("Copy file path after save"), this); ConfigHandler config; m_copyPathAfterSave->setChecked(config.copyPathAfterSaveEnabled()); @@ -266,3 +310,44 @@ void GeneneralConf::initCopyPathAfterSave() { ConfigHandler().setCopyPathAfterSaveEnabled(checked); }); } + +void GeneneralConf::initUploadStorage() +{ + QGroupBox* groupBox = new QGroupBox(tr("Upload storage")); + + // TODO - remove dependency injection (s3 & imgur) + // imgur + QRadioButton* storageImgUr = new QRadioButton(tr("Imgur storage")); + connect(storageImgUr, &QCheckBox::clicked, [](bool checked) { + ConfigHandler().setUploadStorage(SCREENSHOT_STORAGE_TYPE_IMGUR); + }); + + // s3 + QRadioButton* storageImgS3 = new QRadioButton( + tr("S3 storage (require config.ini file with s3 credentials)")); + connect(storageImgS3, &QCheckBox::clicked, [](bool checked) { + ConfigHandler().setUploadStorage(SCREENSHOT_STORAGE_TYPE_S3); + }); + + // set current storage radiobutton active + if (ConfigHandler().uploadStorage() == SCREENSHOT_STORAGE_TYPE_IMGUR) { + storageImgUr->setChecked(true); + + } else { + storageImgS3->setChecked(true); + } + + // draw configuration options for uploadStorage + QVBoxLayout* vbox = new QVBoxLayout; + vbox->addWidget(storageImgUr); + vbox->addWidget(storageImgS3); + vbox->addStretch(1); + groupBox->setLayout(vbox); + m_layout->addWidget(groupBox); +} + +void GeneneralConf::initFilePathConfiguration() +{ + m_filePathConfiguration = new FilePathConfiguration(); + m_layout->addWidget(m_filePathConfiguration); +} diff --git a/src/config/geneneralconf.h b/src/config/geneneralconf.h index e387a750..e5d881f7 100644 --- a/src/config/geneneralconf.h +++ b/src/config/geneneralconf.h @@ -22,39 +22,42 @@ class QVBoxLayout; class QCheckBox; class QPushButton; +class FilePathConfiguration; -class GeneneralConf : public QWidget { +class GeneneralConf : public QWidget +{ Q_OBJECT public: - explicit GeneneralConf(QWidget *parent = nullptr); + explicit GeneneralConf(QWidget* parent = nullptr); public slots: void updateComponents(); private slots: - void showHelpChanged(bool checked); - void showDesktopNotificationChanged(bool checked); - void showTrayIconChanged(bool checked); - void autostartChanged(bool checked); - void showStartupLaunchMessageChanged(bool checked); - void closeAfterCaptureChanged(bool checked); - void importConfiguration(); - void exportFileConfiguration(); - void resetConfiguration(); + void showHelpChanged(bool checked); + void showDesktopNotificationChanged(bool checked); + void showTrayIconChanged(bool checked); + void autostartChanged(bool checked); + void showStartupLaunchMessageChanged(bool checked); + void closeAfterCaptureChanged(bool checked); + void importConfiguration(); + void exportFileConfiguration(); + void resetConfiguration(); private: - QVBoxLayout *m_layout; - QCheckBox *m_sysNotifications; - QCheckBox *m_showTray; - QCheckBox *m_helpMessage; - QCheckBox *m_autostart; - QCheckBox *m_showStartupLaunchMessage; - QCheckBox *m_closeAfterCapture; - QCheckBox *m_copyAndCloseAfterUpload; - QCheckBox *m_copyPathAfterSave; - QPushButton *m_importButton; - QPushButton *m_exportButton; - QPushButton *m_resetButton; + QVBoxLayout* m_layout; + QCheckBox* m_sysNotifications; + QCheckBox* m_showTray; + QCheckBox* m_helpMessage; + QCheckBox* m_autostart; + QCheckBox* m_showStartupLaunchMessage; + QCheckBox* m_closeAfterCapture; + QCheckBox* m_copyAndCloseAfterUpload; + QCheckBox* m_copyPathAfterSave; + QPushButton* m_importButton; + QPushButton* m_exportButton; + QPushButton* m_resetButton; + FilePathConfiguration* m_filePathConfiguration; void initShowHelp(); void initShowDesktopNotification(); @@ -65,4 +68,6 @@ private: void initCloseAfterCapture(); void initCopyAndCloseAfterUpload(); void initCopyPathAfterSave(); + void initUploadStorage(); + void initFilePathConfiguration(); }; diff --git a/src/tools/storage/imgstorages.h b/src/tools/storage/imgstorages.h new file mode 100644 index 00000000..ad7822f7 --- /dev/null +++ b/src/tools/storage/imgstorages.h @@ -0,0 +1,8 @@ +#ifndef IMGSTORAGES_H +#define IMGSTORAGES_H + +#define SCREENSHOT_STORAGE_TYPE_LOCAL "" +#define SCREENSHOT_STORAGE_TYPE_S3 "s3" +#define SCREENSHOT_STORAGE_TYPE_IMGUR "imgur" + +#endif // IMGSTORAGES_H diff --git a/src/tools/storage/imguploader.cpp b/src/tools/storage/imguploader.cpp index c696fdec..1e2b160a 100644 --- a/src/tools/storage/imguploader.cpp +++ b/src/tools/storage/imguploader.cpp @@ -85,23 +85,6 @@ void ImgUploader::init(const QString& title, const QString& label) setAttribute(Qt::WA_DeleteOnClose); } -void ImgUploader::removeImagePreview() -{ - // remove local file - History history; - QString packedFileName = history.packFileName( - SCREENSHOT_STORAGE_TYPE_S3, m_deleteToken, m_storageImageName); - QString fullFileName = history.path() + packedFileName; - - QFile file(fullFileName); - if (file.exists()) { - file.remove(); - } - m_deleteToken.clear(); - m_storageImageName.clear(); - resultStatus = true; -} - void ImgUploader::openURL() { bool successful = QDesktopServices::openUrl(imageUrl()); diff --git a/src/tools/storage/imguploader.h b/src/tools/storage/imguploader.h index 2337d363..5369f183 100644 --- a/src/tools/storage/imguploader.h +++ b/src/tools/storage/imguploader.h @@ -17,9 +17,8 @@ #pragma once -#define S3_API_IMG_PATH "v2/image/" - -#include "imgs3settings.h" +#include "imgstorages.h" +#include "s3/imgs3settings.h" #include #include @@ -53,7 +52,6 @@ protected: void onUploadOk(); void hideSpinner(); void setInfoLabelText(const QString&); - void removeImagePreview(); void showNotificationMessage(const QString&); public slots: diff --git a/src/tools/storage/imguruploader.cpp b/src/tools/storage/imgur/imguruploader.cpp similarity index 84% rename from src/tools/storage/imguruploader.cpp rename to src/tools/storage/imgur/imguruploader.cpp index afadbbfa..02bff6d8 100644 --- a/src/tools/storage/imguruploader.cpp +++ b/src/tools/storage/imgur/imguruploader.cpp @@ -18,6 +18,7 @@ #include "imguruploader.h" #include "src/utils/confighandler.h" #include "src/utils/filenamehandler.h" +#include "src/utils/history.h" #include "src/utils/systemnotification.h" #include "src/widgets/imagelabel.h" #include "src/widgets/loadspinner.h" @@ -61,9 +62,26 @@ void ImgurUploader::handleReply(QNetworkReply* reply) QJsonObject json = response.object(); QJsonObject data = json[QStringLiteral("data")].toObject(); setImageUrl(data[QStringLiteral("link")].toString()); + m_deleteToken = data[QStringLiteral("deletehash")].toString(); + m_deleteImageURL.setUrl( - QStringLiteral("https://imgur.com/delete/%1") - .arg(data[QStringLiteral("deletehash")].toString())); + QStringLiteral("https://imgur.com/delete/%1").arg(m_deleteToken)); + + // save history + QString imageName = imageUrl().toString(); + int lastSlash = imageName.lastIndexOf("/"); + if (lastSlash >= 0) { + imageName = imageName.mid(lastSlash + 1); + } + m_storageImageName = imageName; + + // save image to history + History history; + imageName = history.packFileName( + SCREENSHOT_STORAGE_TYPE_IMGUR, m_deleteToken, imageName); + history.save(pixmap(), imageName); + resultStatus = true; + if (ConfigHandler().copyAndCloseAfterUploadEnabled()) { QApplication::clipboard()->setText(imageUrl().toString()); SystemNotification().sendMessage( diff --git a/src/tools/storage/imguruploader.h b/src/tools/storage/imgur/imguruploader.h similarity index 96% rename from src/tools/storage/imguruploader.h rename to src/tools/storage/imgur/imguruploader.h index f2987457..89145011 100644 --- a/src/tools/storage/imguruploader.h +++ b/src/tools/storage/imgur/imguruploader.h @@ -17,7 +17,7 @@ #pragma once -#include "imguploader.h" +#include "../imguploader.h" #include #include @@ -40,7 +40,6 @@ public: private slots: void handleReply(QNetworkReply* reply); - // void openDeleteURL(); protected slots: void deleteImageOnStorage(); diff --git a/src/tools/storage/imguruploadertool.cpp b/src/tools/storage/imgur/imguruploadertool.cpp similarity index 100% rename from src/tools/storage/imguruploadertool.cpp rename to src/tools/storage/imgur/imguruploadertool.cpp diff --git a/src/tools/storage/imguruploadertool.h b/src/tools/storage/imgur/imguruploadertool.h similarity index 79% rename from src/tools/storage/imguruploadertool.h rename to src/tools/storage/imgur/imguruploadertool.h index b2d3066b..8ce93082 100644 --- a/src/tools/storage/imguruploadertool.h +++ b/src/tools/storage/imgur/imguruploadertool.h @@ -19,25 +19,26 @@ #include "src/tools/abstractactiontool.h" -class ImgurUploaderTool : public AbstractActionTool { +class ImgurUploaderTool : public AbstractActionTool +{ Q_OBJECT public: - explicit ImgurUploaderTool(QObject *parent = nullptr); + explicit ImgurUploaderTool(QObject* parent = nullptr); bool closeOnButtonPressed() const; - QIcon icon(const QColor &background, bool inEditor) const override; + QIcon icon(const QColor& background, bool inEditor) const override; QString name() const override; static QString nameID(); QString description() const override; QWidget* widget() override; - CaptureTool* copy(QObject *parent = nullptr) override; + CaptureTool* copy(QObject* parent = nullptr) override; void setCapture(const QPixmap&); public slots: - void pressed(const CaptureContext &context) override; + void pressed(const CaptureContext& context) override; private: QPixmap capture; diff --git a/src/tools/storage/imgs3settings.cpp b/src/tools/storage/s3/imgs3settings.cpp similarity index 52% rename from src/tools/storage/imgs3settings.cpp rename to src/tools/storage/s3/imgs3settings.cpp index 41695aee..fcf23ec0 100644 --- a/src/tools/storage/imgs3settings.cpp +++ b/src/tools/storage/s3/imgs3settings.cpp @@ -7,28 +7,38 @@ ImgS3Settings::ImgS3Settings() m_configEnterprise = new ConfigEnterprise(); // get s3 credentials - QSettings *settings = m_configEnterprise->settings(); + QSettings* settings = m_configEnterprise->settings(); settings->beginGroup("S3"); m_credsUrl = settings->value("S3_CREDS_URL").toString(); - m_credsUrl = m_credsUrl + ((m_credsUrl.length() > 0 && m_credsUrl[m_credsUrl.length() - 1] == '/') ? "" : "/") + S3_API_IMG_PATH; + m_credsUrl = + m_credsUrl + + ((m_credsUrl.length() > 0 && m_credsUrl[m_credsUrl.length() - 1] == '/') + ? "" + : "/") + + S3_API_IMG_PATH; m_xApiKey = settings->value("S3_X_API_KEY").toString(); m_url = settings->value("S3_URL").toString(); - m_url = m_url + ((m_url.length() > 0 && m_url[m_url.length() - 1] == '/') ? "" : "/"); + m_url = + m_url + + ((m_url.length() > 0 && m_url[m_url.length() - 1] == '/') ? "" : "/"); settings->endGroup(); } -const QString &ImgS3Settings::credsUrl() { +const QString& ImgS3Settings::credsUrl() +{ return m_credsUrl; } -const QString &ImgS3Settings::xApiKey() { +const QString& ImgS3Settings::xApiKey() +{ return m_xApiKey; } -const QString &ImgS3Settings::url() { +const QString& ImgS3Settings::url() +{ return m_url; } diff --git a/src/tools/storage/imgs3settings.h b/src/tools/storage/s3/imgs3settings.h similarity index 68% rename from src/tools/storage/imgs3settings.h rename to src/tools/storage/s3/imgs3settings.h index d44b79e2..c4b8689b 100644 --- a/src/tools/storage/imgs3settings.h +++ b/src/tools/storage/s3/imgs3settings.h @@ -3,7 +3,6 @@ #define S3_API_IMG_PATH "v2/image/" - #include class ConfigEnterprise; @@ -13,12 +12,12 @@ class ImgS3Settings public: ImgS3Settings(); - const QString &credsUrl(); - const QString &xApiKey(); - const QString &url(); + const QString& credsUrl(); + const QString& xApiKey(); + const QString& url(); private: - ConfigEnterprise *m_configEnterprise; + ConfigEnterprise* m_configEnterprise; QString m_credsUrl; QString m_xApiKey; QString m_url; diff --git a/src/tools/storage/imgs3uploader.cpp b/src/tools/storage/s3/imgs3uploader.cpp similarity index 96% rename from src/tools/storage/imgs3uploader.cpp rename to src/tools/storage/s3/imgs3uploader.cpp index 0a90afb7..09b53795 100644 --- a/src/tools/storage/imgs3uploader.cpp +++ b/src/tools/storage/s3/imgs3uploader.cpp @@ -188,6 +188,8 @@ void ImgS3Uploader::handleReplyUpload(QNetworkReply* reply) imageName = imageName.mid(lastSlash + 1); } m_storageImageName = imageName; + + // save image to history History history; imageName = history.packFileName( SCREENSHOT_STORAGE_TYPE_S3, m_deleteToken, imageName); @@ -375,3 +377,20 @@ void ImgS3Uploader::upload() } m_NetworkAMGetCreds->get(requestCreds); } + +void ImgS3Uploader::removeImagePreview() +{ + // remove local file + History history; + QString packedFileName = history.packFileName( + SCREENSHOT_STORAGE_TYPE_S3, m_deleteToken, m_storageImageName); + QString fullFileName = history.path() + packedFileName; + + QFile file(fullFileName); + if (file.exists()) { + file.remove(); + } + m_deleteToken.clear(); + m_storageImageName.clear(); + resultStatus = true; +} diff --git a/src/tools/storage/imgs3uploader.h b/src/tools/storage/s3/imgs3uploader.h similarity index 97% rename from src/tools/storage/imgs3uploader.h rename to src/tools/storage/s3/imgs3uploader.h index 6e8267e9..3168bf29 100644 --- a/src/tools/storage/imgs3uploader.h +++ b/src/tools/storage/s3/imgs3uploader.h @@ -19,8 +19,8 @@ #define S3_API_IMG_PATH "v2/image/" +#include "../imguploader.h" #include "imgs3settings.h" -#include "imguploader.h" #include #include @@ -53,6 +53,7 @@ private slots: private: void init(const QString& title, const QString& label); void uploadToS3(QJsonDocument& response); + void removeImagePreview(); QNetworkProxy* initProxy(); void clearProxy(); diff --git a/src/tools/storage/imgs3uploadertool.cpp b/src/tools/storage/s3/imgs3uploadertool.cpp similarity index 100% rename from src/tools/storage/imgs3uploadertool.cpp rename to src/tools/storage/s3/imgs3uploadertool.cpp diff --git a/src/tools/storage/imgs3uploadertool.h b/src/tools/storage/s3/imgs3uploadertool.h similarity index 76% rename from src/tools/storage/imgs3uploadertool.h rename to src/tools/storage/s3/imgs3uploadertool.h index 8b1846ce..4d5bdbc9 100644 --- a/src/tools/storage/imgs3uploadertool.h +++ b/src/tools/storage/s3/imgs3uploadertool.h @@ -19,25 +19,26 @@ #include "src/tools/abstractactiontool.h" -class ImgS3UploaderTool : public AbstractActionTool { +class ImgS3UploaderTool : public AbstractActionTool +{ Q_OBJECT public: - explicit ImgS3UploaderTool(QObject *parent = nullptr); + explicit ImgS3UploaderTool(QObject* parent = nullptr); bool closeOnButtonPressed() const; - QIcon icon(const QColor &background, bool inEditor) const override; + QIcon icon(const QColor& background, bool inEditor) const override; QString name() const override; static QString nameID(); QString description() const override; QWidget* widget() override; - CaptureTool* copy(QObject *parent = nullptr) override; - void setCapture(const QPixmap &pixmap); + CaptureTool* copy(QObject* parent = nullptr) override; + void setCapture(const QPixmap& pixmap); public slots: - void pressed(const CaptureContext &context) override; + void pressed(const CaptureContext& context) override; private: QPixmap capture; diff --git a/src/tools/storage/storagemanager.cpp b/src/tools/storage/storagemanager.cpp new file mode 100644 index 00000000..d8231650 --- /dev/null +++ b/src/tools/storage/storagemanager.cpp @@ -0,0 +1,33 @@ +#include "storagemanager.h" +#include "imguploader.h" +#include "imgur/imguruploader.h" +#include "imgur/imguruploadertool.h" +#include "s3/imgs3uploader.h" +#include "s3/imgs3uploadertool.h" +#include "src/tools/storage/s3/imgs3settings.h" +#include "src/tools/capturetool.h" + +#include + +StorageManager::StorageManager() {} + +CaptureTool* StorageManager::imgUploaderTool(const QString& imgUploaderType, + QObject* parent) +{ + if (imgUploaderType == SCREENSHOT_STORAGE_TYPE_S3) { + return new ImgS3UploaderTool(parent); + } else if (imgUploaderType == SCREENSHOT_STORAGE_TYPE_IMGUR) { + return new ImgurUploaderTool(parent); + } + return nullptr; +} + +const QString& StorageManager::storageUrl(const QString& imgUploaderType) { + if (imgUploaderType == SCREENSHOT_STORAGE_TYPE_S3) { + ImgS3Settings s3Settings; + m_qstr = s3Settings.url(); + } else if (imgUploaderType == SCREENSHOT_STORAGE_TYPE_IMGUR) { + m_qstr = "https://i.imgur.com/"; + } + return m_qstr; +} diff --git a/src/tools/storage/storagemanager.h b/src/tools/storage/storagemanager.h new file mode 100644 index 00000000..4d1c4a7d --- /dev/null +++ b/src/tools/storage/storagemanager.h @@ -0,0 +1,25 @@ +#ifndef STORAGEMANAGER_H +#define STORAGEMANAGER_H + +#include +#include + +class QObject; +class ImgUploader; +class CaptureTool; + +class StorageManager +{ +public: + explicit StorageManager(); + + CaptureTool* imgUploaderTool(const QString& imgUploaderType, + QObject* parent = nullptr); + const QString& storageUrl(const QString& imgUploaderType); + +// class members +private: + QString m_qstr; +}; + +#endif // STORAGEMANAGER_H diff --git a/src/tools/toolfactory.cpp b/src/tools/toolfactory.cpp index 8a216411..682e81b1 100644 --- a/src/tools/toolfactory.cpp +++ b/src/tools/toolfactory.cpp @@ -32,8 +32,8 @@ #include "save/savetool.h" #include "selection/selectiontool.h" #include "sizeindicator/sizeindicatortool.h" -#include "storage/imgs3uploadertool.h" -#include "storage/imguruploadertool.h" +#include "src/utils/confighandler.h" +#include "storage/storagemanager.h" #include "text/texttool.h" #include "undo/undotool.h" @@ -44,6 +44,8 @@ ToolFactory::ToolFactory(QObject* parent) CaptureTool* ToolFactory::CreateTool(CaptureButton::ButtonType t, QObject* parent) { + StorageManager storageManager; + CaptureTool* tool; switch (t) { case CaptureButton::TYPE_ARROW: @@ -59,8 +61,8 @@ CaptureTool* ToolFactory::CreateTool(CaptureButton::ButtonType t, tool = new ExitTool(parent); break; case CaptureButton::TYPE_IMAGEUPLOADER: - tool = new ImgurUploaderTool(parent); - // tool = new ImgS3UploaderTool(parent); + tool = storageManager.imgUploaderTool( + ConfigHandler().uploadStorage(), parent); break; case CaptureButton::TYPE_DRAWER: tool = new LineTool(parent); diff --git a/src/utils/confighandler.cpp b/src/utils/confighandler.cpp index 849289a1..c9836247 100644 --- a/src/utils/confighandler.cpp +++ b/src/utils/confighandler.cpp @@ -17,92 +17,82 @@ #include "confighandler.h" #include "src/tools/capturetool.h" +#include "src/tools/storage/imgstorages.h" #include "src/utils/configshortcuts.h" -#include -#include -#include #include +#include +#include #include +#include -ConfigHandler::ConfigHandler(){ +ConfigHandler::ConfigHandler() +{ m_settings.setDefaultFormat(QSettings::IniFormat); } -QVector ConfigHandler::getButtons() { +QVector ConfigHandler::getButtons() +{ QVector buttons; if (m_settings.contains(QStringLiteral("buttons"))) { // TODO: remove toList in v1.0 - QVector buttonsInt = - m_settings.value(QStringLiteral("buttons")).value >().toVector(); + QVector buttonsInt = m_settings.value(QStringLiteral("buttons")) + .value>() + .toVector(); bool modified = normalizeButtons(buttonsInt); if (modified) { - m_settings.setValue(QStringLiteral("buttons"), QVariant::fromValue(buttonsInt.toList())); + m_settings.setValue(QStringLiteral("buttons"), + QVariant::fromValue(buttonsInt.toList())); } buttons = fromIntToButton(buttonsInt); } else { // Default tools - buttons << CaptureButton::TYPE_PENCIL - << CaptureButton::TYPE_DRAWER - << CaptureButton::TYPE_ARROW - << CaptureButton::TYPE_SELECTION - << CaptureButton::TYPE_RECTANGLE - << CaptureButton::TYPE_CIRCLE - << CaptureButton::TYPE_MARKER - << CaptureButton::TYPE_BLUR + buttons << CaptureButton::TYPE_PENCIL << CaptureButton::TYPE_DRAWER + << CaptureButton::TYPE_ARROW << CaptureButton::TYPE_SELECTION + << CaptureButton::TYPE_RECTANGLE << CaptureButton::TYPE_CIRCLE + << CaptureButton::TYPE_MARKER << CaptureButton::TYPE_BLUR << CaptureButton::TYPE_SELECTIONINDICATOR - << CaptureButton::TYPE_MOVESELECTION - << CaptureButton::TYPE_UNDO - << CaptureButton::TYPE_REDO - << CaptureButton::TYPE_COPY - << CaptureButton::TYPE_SAVE - << CaptureButton::TYPE_EXIT + << CaptureButton::TYPE_MOVESELECTION << CaptureButton::TYPE_UNDO + << CaptureButton::TYPE_REDO << CaptureButton::TYPE_COPY + << CaptureButton::TYPE_SAVE << CaptureButton::TYPE_EXIT << CaptureButton::TYPE_IMAGEUPLOADER #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) << CaptureButton::TYPE_OPEN_APP #endif - << CaptureButton::TYPE_PIN - << CaptureButton::TYPE_TEXT; + << CaptureButton::TYPE_PIN << CaptureButton::TYPE_TEXT; } using bt = CaptureButton::ButtonType; - std::sort(buttons.begin(), buttons.end(), [](bt a, bt b){ + std::sort(buttons.begin(), buttons.end(), [](bt a, bt b) { return CaptureButton::getPriorityByButton(a) < - CaptureButton::getPriorityByButton(b); + CaptureButton::getPriorityByButton(b); }); return buttons; } -void ConfigHandler::setButtons(const QVector &buttons) { +void ConfigHandler::setButtons( + const QVector& buttons) +{ QVector l = fromButtonToInt(buttons); normalizeButtons(l); // TODO: remove toList in v1.0 - m_settings.setValue(QStringLiteral("buttons"), QVariant::fromValue(l.toList())); + m_settings.setValue(QStringLiteral("buttons"), + QVariant::fromValue(l.toList())); } -QVector ConfigHandler::getUserColors() { +QVector ConfigHandler::getUserColors() +{ QVector colors; - const QVector &defaultColors = { - Qt::white, - Qt::red, - Qt::green, - Qt::blue, - Qt::black, - Qt::darkRed, - Qt::darkGreen, - Qt::darkBlue, - Qt::darkGray, - Qt::cyan, - Qt::magenta, - Qt::yellow, - Qt::lightGray, - Qt::darkCyan, - Qt::darkMagenta, - Qt::darkYellow, + const QVector& defaultColors = { + Qt::white, Qt::red, Qt::green, Qt::blue, + Qt::black, Qt::darkRed, Qt::darkGreen, Qt::darkBlue, + Qt::darkGray, Qt::cyan, Qt::magenta, Qt::yellow, + Qt::lightGray, Qt::darkCyan, Qt::darkMagenta, Qt::darkYellow, QColor() }; if (m_settings.contains(QStringLiteral("userColors"))) { - for (const QString &hex : m_settings.value(QStringLiteral("userColors")).toStringList()) { + for (const QString& hex : + m_settings.value(QStringLiteral("userColors")).toStringList()) { if (QColor::isValidColor(hex)) { colors.append(QColor(hex)); } @@ -118,40 +108,49 @@ QVector ConfigHandler::getUserColors() { return colors; } -void ConfigHandler::setUserColors(const QVector &l) { +void ConfigHandler::setUserColors(const QVector& l) +{ QStringList hexColors; - for (const QColor &color : l) { + for (const QColor& color : l) { hexColors.append(color.name()); } - m_settings.setValue(QStringLiteral("userColors"), QVariant::fromValue(hexColors)); + m_settings.setValue(QStringLiteral("userColors"), + QVariant::fromValue(hexColors)); } -QString ConfigHandler::savePathValue() { - QString savePath = m_settings.value(QStringLiteral("savePathFixed")).toString(); - if( savePath.isEmpty() ) { +QString ConfigHandler::savePathValue() +{ + QString savePath = + m_settings.value(QStringLiteral("savePathFixed")).toString(); + if (savePath.isEmpty()) { savePath = m_settings.value(QStringLiteral("savePath")).toString(); } return savePath; } -void ConfigHandler::setSavePath(const QString &savePath) { - QString savePathFixed = m_settings.value(QStringLiteral("savePathFixed")).toString(); - if( savePathFixed.isEmpty() ) { +void ConfigHandler::setSavePath(const QString& savePath) +{ + QString savePathFixed = + m_settings.value(QStringLiteral("savePathFixed")).toString(); + if (savePathFixed.isEmpty()) { m_settings.setValue(QStringLiteral("savePath"), savePath); } } -QString ConfigHandler::savePathFixed() { +QString ConfigHandler::savePathFixed() +{ return m_settings.value(QStringLiteral("savePathFixed")).toString(); } -void ConfigHandler::setSavePathFixed(const QString &savePathFixed) { +void ConfigHandler::setSavePathFixed(const QString& savePathFixed) +{ m_settings.setValue(QStringLiteral("savePathFixed"), savePathFixed); } -QColor ConfigHandler::uiMainColorValue() { +QColor ConfigHandler::uiMainColorValue() +{ QColor res = QColor(116, 0, 150); if (m_settings.contains(QStringLiteral("uiColor"))) { @@ -164,15 +163,18 @@ QColor ConfigHandler::uiMainColorValue() { return res; } -void ConfigHandler::setUIMainColor(const QColor &c) { +void ConfigHandler::setUIMainColor(const QColor& c) +{ m_settings.setValue(QStringLiteral("uiColor"), c.name()); } -QColor ConfigHandler::uiContrastColorValue() { +QColor ConfigHandler::uiContrastColorValue() +{ QColor res = QColor(39, 0, 50); if (m_settings.contains(QStringLiteral("contastUiColor"))) { - QString hex = m_settings.value(QStringLiteral("contastUiColor")).toString(); + QString hex = + m_settings.value(QStringLiteral("contastUiColor")).toString(); if (QColor::isValidColor(hex)) { res = QColor(hex); @@ -182,11 +184,13 @@ QColor ConfigHandler::uiContrastColorValue() { return res; } -void ConfigHandler::setUIContrastColor(const QColor &c) { +void ConfigHandler::setUIContrastColor(const QColor& c) +{ m_settings.setValue(QStringLiteral("contastUiColor"), c.name()); } -QColor ConfigHandler::drawColorValue() { +QColor ConfigHandler::drawColorValue() +{ QColor res(Qt::red); if (m_settings.contains(QStringLiteral("drawColor"))) { @@ -200,11 +204,13 @@ QColor ConfigHandler::drawColorValue() { return res; } -void ConfigHandler::setDrawColor(const QColor &c) { +void ConfigHandler::setDrawColor(const QColor& c) +{ m_settings.setValue(QStringLiteral("drawColor"), c.name()); } -bool ConfigHandler::showHelpValue() { +bool ConfigHandler::showHelpValue() +{ bool res = true; if (m_settings.contains(QStringLiteral("showHelp"))) { res = m_settings.value(QStringLiteral("showHelp")).toBool(); @@ -212,31 +218,39 @@ bool ConfigHandler::showHelpValue() { return res; } -void ConfigHandler::setShowHelp(const bool showHelp) { +void ConfigHandler::setShowHelp(const bool showHelp) +{ m_settings.setValue(QStringLiteral("showHelp"), showHelp); } -bool ConfigHandler::desktopNotificationValue() { +bool ConfigHandler::desktopNotificationValue() +{ bool res = true; if (m_settings.contains(QStringLiteral("showDesktopNotification"))) { - res = m_settings.value(QStringLiteral("showDesktopNotification")).toBool(); + res = + m_settings.value(QStringLiteral("showDesktopNotification")).toBool(); } return res; } -void ConfigHandler::setDesktopNotification(const bool showDesktopNotification) { - m_settings.setValue(QStringLiteral("showDesktopNotification"), showDesktopNotification); +void ConfigHandler::setDesktopNotification(const bool showDesktopNotification) +{ + m_settings.setValue(QStringLiteral("showDesktopNotification"), + showDesktopNotification); } -QString ConfigHandler::filenamePatternValue() { +QString ConfigHandler::filenamePatternValue() +{ return m_settings.value(QStringLiteral("filenamePattern")).toString(); } -void ConfigHandler::setFilenamePattern(const QString &pattern) { +void ConfigHandler::setFilenamePattern(const QString& pattern) +{ return m_settings.setValue(QStringLiteral("filenamePattern"), pattern); } -bool ConfigHandler::disabledTrayIconValue() { +bool ConfigHandler::disabledTrayIconValue() +{ bool res = false; if (m_settings.contains(QStringLiteral("disabledTrayIcon"))) { res = m_settings.value(QStringLiteral("disabledTrayIcon")).toBool(); @@ -244,11 +258,13 @@ bool ConfigHandler::disabledTrayIconValue() { return res; } -void ConfigHandler::setDisabledTrayIcon(const bool disabledTrayIcon) { +void ConfigHandler::setDisabledTrayIcon(const bool disabledTrayIcon) +{ m_settings.setValue(QStringLiteral("disabledTrayIcon"), disabledTrayIcon); } -int ConfigHandler::drawThicknessValue() { +int ConfigHandler::drawThicknessValue() +{ int res = 0; if (m_settings.contains(QStringLiteral("drawThickness"))) { res = m_settings.value(QStringLiteral("drawThickness")).toInt(); @@ -256,19 +272,23 @@ int ConfigHandler::drawThicknessValue() { return res; } -void ConfigHandler::setdrawThickness(const int thickness) { +void ConfigHandler::setdrawThickness(const int thickness) +{ m_settings.setValue(QStringLiteral("drawThickness"), thickness); } -bool ConfigHandler::keepOpenAppLauncherValue() { +bool ConfigHandler::keepOpenAppLauncherValue() +{ return m_settings.value(QStringLiteral("keepOpenAppLauncher")).toBool(); } -void ConfigHandler::setKeepOpenAppLauncher(const bool keepOpen) { +void ConfigHandler::setKeepOpenAppLauncher(const bool keepOpen) +{ m_settings.setValue(QStringLiteral("keepOpenAppLauncher"), keepOpen); } -bool ConfigHandler::startupLaunchValue() { +bool ConfigHandler::startupLaunchValue() +{ bool res = false; if (m_settings.contains(QStringLiteral("startupLaunch"))) { @@ -282,7 +302,8 @@ bool ConfigHandler::startupLaunchValue() { return res; } -bool ConfigHandler::verifyLaunchFile() { +bool ConfigHandler::verifyLaunchFile() +{ bool res = false; #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) @@ -290,15 +311,16 @@ bool ConfigHandler::verifyLaunchFile() { res = QFile(path).exists(); #elif defined(Q_OS_WIN) QSettings bootUpSettings( - "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", - QSettings::NativeFormat); + "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", + QSettings::NativeFormat); res = bootUpSettings.value("Flameshot").toString() == - QDir::toNativeSeparators(QCoreApplication::applicationFilePath()); + QDir::toNativeSeparators(QCoreApplication::applicationFilePath()); #endif return res; } -void ConfigHandler::setStartupLaunch(const bool start) { +void ConfigHandler::setStartupLaunch(const bool start) +{ #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) QString path = QDir::homePath() + "/.config/autostart/"; QDir autostartDir(path); @@ -319,15 +341,16 @@ void ConfigHandler::setStartupLaunch(const bool start) { } #elif defined(Q_OS_WIN) QSettings bootUpSettings( - "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", - QSettings::NativeFormat); + "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", + QSettings::NativeFormat); // set workdir for flameshot on startup QSettings bootUpPath( - "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths", - QSettings::NativeFormat); + "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App " + "Paths", + QSettings::NativeFormat); if (start) { QString app_path = - QDir::toNativeSeparators(QCoreApplication::applicationFilePath()); + QDir::toNativeSeparators(QCoreApplication::applicationFilePath()); bootUpSettings.setValue("Flameshot", app_path); // set application workdir @@ -347,18 +370,24 @@ void ConfigHandler::setStartupLaunch(const bool start) { m_settings.setValue(QStringLiteral("startupLaunch"), start); } -bool ConfigHandler::showStartupLaunchMessage() { +bool ConfigHandler::showStartupLaunchMessage() +{ if (!m_settings.contains(QStringLiteral("showStartupLaunchMessage"))) { m_settings.setValue(QStringLiteral("showStartupLaunchMessage"), true); } - return m_settings.value(QStringLiteral("showStartupLaunchMessage")).toBool(); + return m_settings.value(QStringLiteral("showStartupLaunchMessage")) + .toBool(); } -void ConfigHandler::setShowStartupLaunchMessage(const bool showStartupLaunchMessage){ - m_settings.setValue(QStringLiteral("showStartupLaunchMessage"), showStartupLaunchMessage); +void ConfigHandler::setShowStartupLaunchMessage( + const bool showStartupLaunchMessage) +{ + m_settings.setValue(QStringLiteral("showStartupLaunchMessage"), + showStartupLaunchMessage); } -int ConfigHandler::contrastOpacityValue() { +int ConfigHandler::contrastOpacityValue() +{ int opacity = 190; if (m_settings.contains(QStringLiteral("contrastOpacity"))) { opacity = m_settings.value(QStringLiteral("contrastOpacity")).toInt(); @@ -367,31 +396,38 @@ int ConfigHandler::contrastOpacityValue() { return opacity; } -void ConfigHandler::setContrastOpacity(const int transparency) { +void ConfigHandler::setContrastOpacity(const int transparency) +{ m_settings.setValue(QStringLiteral("contrastOpacity"), transparency); } -bool ConfigHandler::closeAfterScreenshotValue() { +bool ConfigHandler::closeAfterScreenshotValue() +{ return m_settings.value(QStringLiteral("closeAfterScreenshot")).toBool(); } -void ConfigHandler::setCloseAfterScreenshot(const bool close) { +void ConfigHandler::setCloseAfterScreenshot(const bool close) +{ m_settings.setValue(QStringLiteral("closeAfterScreenshot"), close); } -bool ConfigHandler::copyAndCloseAfterUploadEnabled() { +bool ConfigHandler::copyAndCloseAfterUploadEnabled() +{ bool res = true; if (m_settings.contains(QStringLiteral("copyAndCloseAfterUpload"))) { - res = m_settings.value(QStringLiteral("copyAndCloseAfterUpload")).toBool(); + res = + m_settings.value(QStringLiteral("copyAndCloseAfterUpload")).toBool(); } return res; } -void ConfigHandler::setCopyAndCloseAfterUploadEnabled(const bool value) { +void ConfigHandler::setCopyAndCloseAfterUploadEnabled(const bool value) +{ m_settings.setValue(QStringLiteral("copyAndCloseAfterUpload"), value); } -bool ConfigHandler::copyPathAfterSaveEnabled() { +bool ConfigHandler::copyPathAfterSaveEnabled() +{ bool res = false; if (m_settings.contains(QStringLiteral("copyPathAfterSave"))) { res = m_settings.value(QStringLiteral("copyPathAfterSave")).toBool(); @@ -399,32 +435,53 @@ bool ConfigHandler::copyPathAfterSaveEnabled() { return res; } -void ConfigHandler::setCopyPathAfterSaveEnabled(const bool value) { +void ConfigHandler::setCopyPathAfterSaveEnabled(const bool value) +{ m_settings.setValue(QStringLiteral("copyPathAfterSave"), value); } -void ConfigHandler::setDefaults() { +void ConfigHandler::setUploadStorage(const QString& uploadStorage) +{ + m_settings.setValue(QStringLiteral("uploadStorage"), uploadStorage); +} + +const QString& ConfigHandler::uploadStorage() +{ + m_strRes = m_settings.value(QStringLiteral("uploadStorage")).toString(); + if (m_strRes.isEmpty()) { + m_strRes = SCREENSHOT_STORAGE_TYPE_IMGUR; + setUploadStorage(m_strRes); + } + return m_strRes; +} + +void ConfigHandler::setDefaults() +{ m_settings.clear(); } -void ConfigHandler::setAllTheButtons() { +void ConfigHandler::setAllTheButtons() +{ QVector buttons; auto listTypes = CaptureButton::getIterableButtonTypes(); - for (const CaptureButton::ButtonType t: listTypes) { + for (const CaptureButton::ButtonType t : listTypes) { buttons << static_cast(t); } // TODO: remove toList in v1.0 - m_settings.setValue(QStringLiteral("buttons"), QVariant::fromValue(buttons.toList())); + m_settings.setValue(QStringLiteral("buttons"), + QVariant::fromValue(buttons.toList())); } -QString ConfigHandler::configFilePath() const { +QString ConfigHandler::configFilePath() const +{ return m_settings.fileName(); } -bool ConfigHandler::normalizeButtons(QVector &buttons) { +bool ConfigHandler::normalizeButtons(QVector& buttons) +{ auto listTypes = CaptureButton::getIterableButtonTypes(); QVector listTypesInt; - for(auto i: listTypes) + for (auto i : listTypes) listTypesInt << static_cast(i); bool hasChanged = false; @@ -438,32 +495,34 @@ bool ConfigHandler::normalizeButtons(QVector &buttons) { } QVector ConfigHandler::fromIntToButton( - const QVector &l) + const QVector& l) { QVector buttons; - for (auto const i: l) + for (auto const i : l) buttons << static_cast(i); return buttons; } QVector ConfigHandler::fromButtonToInt( - const QVector &l) + const QVector& l) { QVector buttons; - for (auto const i: l) + for (auto const i : l) buttons << static_cast(i); return buttons; } -QVector ConfigHandler::shortcuts() { +QVector ConfigHandler::shortcuts() +{ ConfigShortcuts configShortcuts; m_shortcuts = configShortcuts.captureShortcutsDefault(getButtons()); return m_shortcuts; } -void ConfigHandler::setShortcutsDefault() { +void ConfigHandler::setShortcutsDefault() +{ ConfigShortcuts configShortcuts; - for (auto shortcutItem: shortcuts()) { + for (auto shortcutItem : shortcuts()) { QString shortcutName = shortcutItem.at(0); QString shortcutDescription = shortcutItem.at(1); QString shortcutValueDefault = shortcutItem.at(2); @@ -471,49 +530,48 @@ void ConfigHandler::setShortcutsDefault() { QString shortcutValue = shortcut(shortcutName); QKeySequence ks = QKeySequence(); - if(shortcutValue.isNull()) { + if (shortcutValue.isNull()) { ks = QKeySequence(shortcutValueDefault); if (!setShortcut(shortcutName, ks.toString())) { shortcutValue = shortcutValueDefault; } } - m_shortcuts << (QStringList() - << shortcutName - << shortcutDescription - << shortcutValue); + m_shortcuts << (QStringList() << shortcutName << shortcutDescription + << shortcutValue); } } -bool ConfigHandler::setShortcut(const QString& shortcutName, const QString& shortutValue) { +bool ConfigHandler::setShortcut(const QString& shortcutName, + const QString& shortutValue) +{ bool error = false; m_settings.beginGroup("Shortcuts"); QVector reservedShortcuts; - reservedShortcuts << QKeySequence(Qt::Key_Backspace) << QKeySequence(Qt::Key_Escape); - if(shortutValue.isEmpty()){ + reservedShortcuts << QKeySequence(Qt::Key_Backspace) + << QKeySequence(Qt::Key_Escape); + if (shortutValue.isEmpty()) { m_settings.setValue(shortcutName, ""); - } - else if (reservedShortcuts.contains(QKeySequence(shortutValue))) { + } else if (reservedShortcuts.contains(QKeySequence(shortutValue))) { // do not allow to set reserved shortcuts error = true; - } - else { + } else { // Make no difference for Return and Enter keys QString shortcutItem = shortutValue; - if(shortcutItem == "Enter") { + if (shortcutItem == "Enter") { shortcutItem = QKeySequence(Qt::Key_Return).toString(); } // do not allow to set overlapped shortcuts foreach (auto currentShortcutName, m_settings.allKeys()) { - if(m_settings.value(currentShortcutName) == shortcutItem) { + if (m_settings.value(currentShortcutName) == shortcutItem) { m_settings.setValue(shortcutName, ""); error = true; break; } } - if(!error) { + if (!error) { m_settings.setValue(shortcutName, shortcutItem); } } @@ -521,7 +579,8 @@ bool ConfigHandler::setShortcut(const QString& shortcutName, const QString& shor return !error; } -const QString& ConfigHandler::shortcut(const QString& shortcutName) { +const QString& ConfigHandler::shortcut(const QString& shortcutName) +{ m_settings.beginGroup("Shortcuts"); m_strRes = m_settings.value(shortcutName).toString(); m_settings.endGroup(); diff --git a/src/utils/confighandler.h b/src/utils/confighandler.h index 58367610..f720d16d 100644 --- a/src/utils/confighandler.h +++ b/src/utils/confighandler.h @@ -18,34 +18,35 @@ #pragma once #include "src/widgets/capture/capturebutton.h" -#include -#include #include +#include +#include -class ConfigHandler : public QObject { +class ConfigHandler : public QObject +{ public: explicit ConfigHandler(); QVector getButtons(); - void setButtons(const QVector &); + void setButtons(const QVector&); QVector getUserColors(); - void setUserColors(const QVector &); + void setUserColors(const QVector&); QString savePathValue(); - void setSavePath(const QString &); + void setSavePath(const QString&); QString savePathFixed(); - void setSavePathFixed(const QString &); + void setSavePathFixed(const QString&); QColor uiMainColorValue(); - void setUIMainColor(const QColor &); + void setUIMainColor(const QColor&); QColor uiContrastColorValue(); - void setUIContrastColor(const QColor &); + void setUIContrastColor(const QColor&); QColor drawColorValue(); - void setDrawColor(const QColor &); + void setDrawColor(const QColor&); bool showHelpValue(); void setShowHelp(const bool); @@ -54,7 +55,7 @@ public: void setDesktopNotification(const bool); QString filenamePatternValue(); - void setFilenamePattern(const QString &); + void setFilenamePattern(const QString&); bool disabledTrayIconValue(); void setDisabledTrayIcon(const bool); @@ -84,6 +85,9 @@ public: bool copyPathAfterSaveEnabled(); void setCopyPathAfterSaveEnabled(const bool); + void setUploadStorage(const QString&); + const QString& uploadStorage(); + void setDefaults(); void setAllTheButtons(); @@ -99,8 +103,8 @@ private: QSettings m_settings; QVector m_shortcuts; - bool normalizeButtons(QVector &); + bool normalizeButtons(QVector&); - QVector fromIntToButton(const QVector &l); - QVector fromButtonToInt(const QVector &l); + QVector fromIntToButton(const QVector& l); + QVector fromButtonToInt(const QVector& l); }; diff --git a/src/utils/history.cpp b/src/utils/history.cpp index d3a4ba33..f5ce6ae6 100644 --- a/src/utils/history.cpp +++ b/src/utils/history.cpp @@ -4,7 +4,6 @@ #include #include - History::History() { // Get cache history path @@ -21,27 +20,32 @@ History::History() dir.mkpath("."); } -const QString &History::path() { +const QString& History::path() +{ return m_historyPath; } -void History::save(const QPixmap &pixmap, const QString &fileName) { +void History::save(const QPixmap& pixmap, const QString& fileName) +{ QFile file(path() + fileName); file.open(QIODevice::WriteOnly); pixmap.save(&file, "PNG"); history(); } -const QList &History::history() { +const QList& History::history() +{ QDir directory(path()); - QStringList images = directory.entryList(QStringList() << "*.png" << "*.PNG", QDir::Files, QDir::Time); + QStringList images = directory.entryList(QStringList() << "*.png" + << "*.PNG", + QDir::Files, + QDir::Time); int cnt = 0; m_thumbs.clear(); - foreach(QString fileName, images) { - if(++cnt <= HISTORY_MAX_SIZE) { + foreach (QString fileName, images) { + if (++cnt <= HISTORY_MAX_SIZE) { m_thumbs.append(fileName); - } - else { + } else { QFile file(path() + fileName); file.remove(); } @@ -49,42 +53,46 @@ const QList &History::history() { return m_thumbs; } -const HISTORY_FILE_NAME &History::unpackFileName(const QString &fileNamePacked) { +const HISTORY_FILE_NAME& History::unpackFileName(const QString& fileNamePacked) +{ int nPathIndex = fileNamePacked.lastIndexOf("/"); QStringList unpackedFileName; - if(nPathIndex == -1) { + if (nPathIndex == -1) { unpackedFileName = fileNamePacked.split("-"); } else { unpackedFileName = fileNamePacked.mid(nPathIndex + 1).split("-"); } switch (unpackedFileName.length()) { - case 3: - m_unpackedFileName.file = unpackedFileName[2]; - m_unpackedFileName.token = unpackedFileName[1]; - m_unpackedFileName.type = unpackedFileName[0]; - break; - case 2: - m_unpackedFileName.file = unpackedFileName[1]; - m_unpackedFileName.token = ""; - m_unpackedFileName.type = unpackedFileName[0]; - break; - default: - m_unpackedFileName.file = unpackedFileName[0]; - m_unpackedFileName.token = ""; - m_unpackedFileName.type = SCREENSHOT_STORAGE_TYPE_LOCAL; - break; + case 3: + m_unpackedFileName.file = unpackedFileName[2]; + m_unpackedFileName.token = unpackedFileName[1]; + m_unpackedFileName.type = unpackedFileName[0]; + break; + case 2: + m_unpackedFileName.file = unpackedFileName[1]; + m_unpackedFileName.token = ""; + m_unpackedFileName.type = unpackedFileName[0]; + break; + default: + m_unpackedFileName.file = unpackedFileName[0]; + m_unpackedFileName.token = ""; + m_unpackedFileName.type = ""; + break; } return m_unpackedFileName; } -const QString &History::packFileName(const QString &storageType, const QString &deleteToken, const QString &fileName) { +const QString& History::packFileName(const QString& storageType, + const QString& deleteToken, + const QString& fileName) +{ m_packedFileName = fileName; - if(storageType.length() > 0) { - if(deleteToken.length() > 0) { - m_packedFileName = storageType + "-" + deleteToken + "-" + m_packedFileName; - } - else { + if (storageType.length() > 0) { + if (deleteToken.length() > 0) { + m_packedFileName = + storageType + "-" + deleteToken + "-" + m_packedFileName; + } else { m_packedFileName = storageType + "-" + m_packedFileName; } } diff --git a/src/utils/history.h b/src/utils/history.h index fc111615..a4569175 100644 --- a/src/utils/history.h +++ b/src/utils/history.h @@ -4,15 +4,11 @@ #define HISTORY_MAX_SIZE 25 #include -#include #include +#include - -#define SCREENSHOT_STORAGE_TYPE_LOCAL "" -#define SCREENSHOT_STORAGE_TYPE_S3 "s3" -#define SCREENSHOT_STORAGE_TYPE_IMGUR "imgur" - -struct HISTORY_FILE_NAME { +struct HISTORY_FILE_NAME +{ QString file; QString token; QString type; @@ -23,12 +19,12 @@ class History public: History(); - void save(const QPixmap &, const QString &); - const QList &history(); - const QString &path(); + void save(const QPixmap&, const QString&); + const QList& history(); + const QString& path(); - const HISTORY_FILE_NAME &unpackFileName(const QString &); - const QString &packFileName(const QString &, const QString &, const QString &); + const HISTORY_FILE_NAME& unpackFileName(const QString&); + const QString& packFileName(const QString&, const QString&, const QString&); private: QString m_historyPath; diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index 4c45363f..21214f24 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -25,8 +25,7 @@ #include "capturewidget.h" #include "src/core/controller.h" -#include "src/tools/storage/imgs3uploadertool.h" -#include "src/tools/storage/imguruploadertool.h" +#include "src/tools/storage/storagemanager.h" #include "src/tools/toolfactory.h" #include "src/utils/colorutils.h" #include "src/utils/globalvalues.h" @@ -1048,8 +1047,9 @@ void CaptureWidget::childLeave() void CaptureWidget::uploadScreenshot() { - // m_activeTool = new ImgS3UploaderTool(); - m_activeTool = new ImgurUploaderTool(); + StorageManager storageManager; + m_activeTool = + storageManager.imgUploaderTool(ConfigHandler().uploadStorage()); m_activeTool->setCapture(pixmap()); handleButtonSignal(CaptureTool::REQ_ADD_EXTERNAL_WIDGETS); close(); diff --git a/src/widgets/historywidget.cpp b/src/widgets/historywidget.cpp index fbfd61de..85048111 100644 --- a/src/widgets/historywidget.cpp +++ b/src/widgets/historywidget.cpp @@ -1,5 +1,7 @@ #include "historywidget.h" -#include "src/tools/storage/imgs3uploader.h" +#include "src/tools/storage/storagemanager.h" +#include "src/tools/storage/imguploader.h" +#include "src/tools/storage/s3/imgs3uploader.h" #include "src/utils/history.h" #include "src/widgets/notificationwidget.h" #include @@ -77,7 +79,10 @@ void HistoryWidget::addLine(const QString& path, const QString& fileName) History history; HISTORY_FILE_NAME unpackFileName = history.unpackFileName(fileName); - QString url = m_s3Settings.url() + unpackFileName.file; + QString url; + + StorageManager storageManager; + url = storageManager.storageUrl(unpackFileName.type) + unpackFileName.file; // load pixmap QPixmap pixmap; @@ -132,16 +137,25 @@ void HistoryWidget::addLine(const QString& path, const QString& fileName) buttonDelete->setIcon(QIcon(":/img/material/black/delete.svg")); buttonDelete->setMinimumHeight(HISTORYPIXMAP_MAX_PREVIEW_HEIGHT); connect(buttonDelete, &QPushButton::clicked, this, [=]() { - if (unpackFileName.token.length() > 0) { - removeItem(phbl, unpackFileName.file, unpackFileName.token); - } else { - // for compatibility with previous versions and to be able to remove - // previous screenshots - QFile file(fullFileName); - if (file.exists()) { - file.remove(); + // TODO - remove dependency injection (s3 & imgur) + if (unpackFileName.type.compare(SCREENSHOT_STORAGE_TYPE_S3) == 0) { + if (unpackFileName.token.length() > 0) { + ImgS3Uploader* uploader = new ImgS3Uploader(); + removeItem( + uploader, phbl, unpackFileName.file, unpackFileName.token); + } else { + // for compatibility with previous versions and to be able to + // remove previous screenshots + removeCacheFile(fullFileName); + removeLayoutItem(phbl); } - removeLocalItem(phbl); + } else if (unpackFileName.type.compare(SCREENSHOT_STORAGE_TYPE_IMGUR) == + 0) { + QDesktopServices::openUrl( + QUrl(QStringLiteral("https://imgur.com/delete/%1") + .arg(unpackFileName.token))); + removeCacheFile(fullFileName); + removeLayoutItem(phbl); } }); @@ -162,23 +176,23 @@ void HistoryWidget::addLine(const QString& path, const QString& fileName) m_pVBox->addLayout(phbl); } -void HistoryWidget::removeItem(QLayout* pl, - const QString& s3FileName, +void HistoryWidget::removeItem(ImgUploader* imgUploader, + QLayout* pl, + const QString& fileName, const QString& deleteToken) { - ImgS3Uploader* uploader = new ImgS3Uploader(); hide(); - uploader->show(); - uploader->deleteResource(s3FileName, deleteToken); - connect(uploader, &QWidget::destroyed, this, [=]() { - if (uploader->resultStatus) { - removeLocalItem(pl); + imgUploader->show(); + imgUploader->deleteResource(fileName, deleteToken); + connect(imgUploader, &QWidget::destroyed, this, [=]() { + if (imgUploader->resultStatus) { + removeLayoutItem(pl); } show(); }); } -void HistoryWidget::removeLocalItem(QLayout* pl) +void HistoryWidget::removeLayoutItem(QLayout* pl) { // remove current row or refresh list while (pl->count() > 0) { @@ -194,3 +208,12 @@ void HistoryWidget::removeLocalItem(QLayout* pl) setEmptyMessage(); } } + +void HistoryWidget::removeCacheFile(const QString& fullFileName) +{ + // premove history preview + QFile file(fullFileName); + if (file.exists()) { + file.remove(); + } +} diff --git a/src/widgets/historywidget.h b/src/widgets/historywidget.h index e0242c64..0d88098a 100644 --- a/src/widgets/historywidget.h +++ b/src/widgets/historywidget.h @@ -4,7 +4,6 @@ #define HISTORYPIXMAP_MAX_PREVIEW_WIDTH 160 #define HISTORYPIXMAP_MAX_PREVIEW_HEIGHT 90 -#include "src/tools/storage/imgs3settings.h" #include #include #include @@ -13,6 +12,7 @@ class QLayout; class QVBoxLayout; class NotificationWidget; +class ImgUploader; class HistoryWidget : public QDialog { @@ -25,14 +25,15 @@ signals: private: void loadHistory(); void addLine(const QString&, const QString&); - void removeItem(QLayout* pl, + void setEmptyMessage(); + void removeItem(ImgUploader* imgUploader, + QLayout* pl, const QString& s3FileName, const QString& deleteToken); - void removeLocalItem(QLayout* pl); - void setEmptyMessage(); + void removeLayoutItem(QLayout* pl); + void removeCacheFile(const QString& fullFileName); private: - ImgS3Settings m_s3Settings; QVBoxLayout* m_pVBox; NotificationWidget* m_notification; }; diff --git a/translations/Internationalization_ca.ts b/translations/Internationalization_ca.ts index 9f5b77ec..adcebf6b 100644 --- a/translations/Internationalization_ca.ts +++ b/translations/Internationalization_ca.ts @@ -125,13 +125,13 @@ CaptureWidget - + Unable to capture screen Impossible capturar la pantalla Imposible capturar la pantalla - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -156,32 +156,27 @@ Press Space to open the side panel. ConfigWindow - + Configuration Configuració - + Interface Interfície - + Filename Editor Editor de noms - + Shortcuts - - Path Default - - - - + General General @@ -332,152 +327,167 @@ Press Space to open the side panel. GeneneralConf - + Show help message Mostra el missatge d'ajuda - + Show the help message at the beginning in the capture mode. Mostra el missatge d'ajuda en iniciar el mode de captura. - - + + Show desktop notifications Mostra les notificacions d'escriptori - + Show tray icon Mostra la icona en la barra de tasques - + Show the systemtray icon Mostra la icona en la barra de tasques - - + + Import Importar - - - + + + Error Error - + Unable to read file. Impossible llegir el fitxer. - - + + Unable to write file. Impossible escriure al fitxer. - + Save File Guardar Arxiu - + Confirm Reset Confirmar Reset - + Are you sure you want to reset the configuration? Esteu segur que voleu reiniciar la configuració? - + Configuration File Fitxer de Configuració - + Export Exportar - + Reset Reset - + Launch at startup Llançament a l'inici - - + + Launch Flameshot - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL Copia l'URL - + URL copied to clipboard. L'URL s'ha copiat al porta-retalls. - + Open in browser @@ -485,42 +495,42 @@ Press Space to open the side panel. ImgS3Uploader - + Uploading Image S'està pujant la imatge - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -541,17 +551,17 @@ Press Space to open the side panel. No es pot obrir l'URL. - + URL copied to clipboard. L'URL s'ha copiat al porta-retalls. - + Deleting image... - + Remove screenshot from history? @@ -563,12 +573,12 @@ Press Space to open the side panel. ImgS3UploaderTool - + Image Uploader Puja la imatge - + Upload the selection to S3 bucket @@ -592,42 +602,42 @@ Press Space to open the side panel. - + Unable to open the URL. No es pot obrir l'URL. - + URL copied to clipboard. L'URL s'ha copiat al porta-retalls. - + Screenshot copied to clipboard. La captura s'ha copiat al porta-retalls. - + Deleting image... - + Copy URL Copia l'URL - + Open URL Obri l'URL - + Delete image - + Image to Clipboard. Imatge al porta-retalls. @@ -635,61 +645,49 @@ Press Space to open the side panel. ImgurUploader - + Upload to Imgur Puja a Imgur - Uploading Image - S'està pujant la imatge + S'està pujant la imatge - Copy URL - Copia l'URL + Copia l'URL - Open URL - Obri l'URL + Obri l'URL - Image to Clipboard. - Imatge al porta-retalls. + Imatge al porta-retalls. - - + Unable to open the URL. No es pot obrir l'URL. - URL copied to clipboard. - L'URL s'ha copiat al porta-retalls. + L'URL s'ha copiat al porta-retalls. - Screenshot copied to clipboard. - La captura s'ha copiat al porta-retalls. - - - - Delete image - + La captura s'ha copiat al porta-retalls. ImgurUploaderTool - + Image Uploader Puja la imatge - + Upload the selection to Imgur Puja la selecció a Imgur @@ -887,7 +885,7 @@ Press Space to open the side panel. - + URL copied to clipboard. L'URL s'ha copiat al porta-retalls. diff --git a/translations/Internationalization_de_DE.ts b/translations/Internationalization_de_DE.ts index a85e764c..34518205 100644 --- a/translations/Internationalization_de_DE.ts +++ b/translations/Internationalization_de_DE.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Bereich kann nicht erfasst werden - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. ConfigWindow - + Configuration Einstellungen - + Interface Benutzeroberfläche - + Filename Editor Dateinamen Editor - + Shortcuts - - Path Default - - - - + General Allgemein @@ -335,152 +330,167 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. GeneneralConf - - + + Import Importieren - - - + + + Error Fehler - + Unable to read file. Datei kann nicht gelesen werden. - - + + Unable to write file. Datei kann nicht geschrieben werden. - + Save File Datei speichern - + Confirm Reset Zurücksetzen bestätigen - + Are you sure you want to reset the configuration? Sind Sie sicher, dass sie die Konfiguration zurücksetzen wollen? - + Show help message Hilfetext anzeigen - + Show the help message at the beginning in the capture mode. Hilfetext am Start der Auswahl anzeigen. - - + + Show desktop notifications Zeige Desktopbenachrichtigungen - + Show tray icon Zeige Taskleistensymbol - + Show the systemtray icon Zeigt das Taskleistensymbol - + Configuration File Konfigurationsdatei - + Export Exportieren - + Reset Zurücksetzen - + Launch at startup Automatisch starten - - + + Launch Flameshot Starte Flameshot - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL URL kopieren - + URL copied to clipboard. URL kopiert. - + Open in browser @@ -488,42 +498,42 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. ImgS3Uploader - + Uploading Image Bild hochladen - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -548,17 +558,17 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. Kann URL nicht öffnen. - + URL copied to clipboard. URL kopiert. - + Deleting image... - + Remove screenshot from history? @@ -570,12 +580,12 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. ImgS3UploaderTool - + Image Uploader Bild hochladen - + Upload the selection to S3 bucket @@ -599,42 +609,42 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. - + Unable to open the URL. Kann URL nicht öffnen. - + URL copied to clipboard. URL kopiert. - + Screenshot copied to clipboard. Bildschirmaufnahme in Zwischenablage kopiert. - + Deleting image... - + Copy URL URL kopieren - + Open URL URL öffnen - + Delete image Bild löschen - + Image to Clipboard. Bild in Zwischenablage. @@ -642,61 +652,53 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. ImgurUploader - + Upload to Imgur Zu Imgur hochladen - Uploading Image - Bild hochladen + Bild hochladen - Copy URL - URL kopieren + URL kopieren - Open URL - URL öffnen + URL öffnen - Delete image - Bild löschen + Bild löschen - Image to Clipboard. - Bild in Zwischenablage. + Bild in Zwischenablage. - - + Unable to open the URL. Kann URL nicht öffnen. - URL copied to clipboard. - URL kopiert. + URL kopiert. - Screenshot copied to clipboard. - Bildschirmaufnahme in Zwischenablage kopiert. + Bildschirmaufnahme in Zwischenablage kopiert. ImgurUploaderTool - + Image Uploader Bild hochladen - + Upload the selection to Imgur Auswahl zu Imgur hochladen @@ -902,7 +904,7 @@ Drücke die Leertaste um das Seitenmenü zu öffnen. Kein Schreibzugriff auf - + URL copied to clipboard. URL kopiert. diff --git a/translations/Internationalization_es.ts b/translations/Internationalization_es.ts index 388a61c5..76d981fa 100644 --- a/translations/Internationalization_es.ts +++ b/translations/Internationalization_es.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Imposible capturar la pantalla - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Presiona Espacio para abrir el panel lateral. ConfigWindow - + Configuration Configuración - + Interface Interfaz - + Filename Editor Editor de Nombre - + Shortcuts - - Path Default - - - - + General General @@ -335,152 +330,167 @@ Presiona Espacio para abrir el panel lateral. GeneneralConf - - + + Import Importar - - - + + + Error Error - + Unable to read file. Imposible leer el archivo. - - + + Unable to write file. Imposible escribir el archivo. - + Save File Guardar Archivo - + Confirm Reset Confirmar Reset - + Are you sure you want to reset the configuration? ¿Estás seguro de que quieres reiniciar la configuración? - + Show help message Mostrar mensaje de ayuda - + Show the help message at the beginning in the capture mode. Muestra el mensaje de ayuda al iniciar el modo de captura. - - + + Show desktop notifications Mostrar notificaciones del escritorio - + Show tray icon Mostrar icono en la barra de tareas - + Show the systemtray icon Mostrar el icono en la barra de tareas - + Configuration File Archivo de Configuración - + Export Exportar - + Reset Reset - + Launch at startup Lanzar en el arranque - - + + Launch Flameshot Lanzar Flameshot - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL Copiar URL - + URL copied to clipboard. URL copiada al portapapeles. - + Open in browser @@ -488,42 +498,42 @@ Presiona Espacio para abrir el panel lateral. ImgS3Uploader - + Uploading Image Subiendo Imagen - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -548,17 +558,17 @@ Presiona Espacio para abrir el panel lateral. No puede abrir la URL. - + URL copied to clipboard. URL copiada al portapapeles. - + Deleting image... - + Remove screenshot from history? @@ -570,12 +580,12 @@ Presiona Espacio para abrir el panel lateral. ImgS3UploaderTool - + Image Uploader Subir Imagen - + Upload the selection to S3 bucket @@ -599,42 +609,42 @@ Presiona Espacio para abrir el panel lateral. - + Unable to open the URL. No puede abrir la URL. - + URL copied to clipboard. URL copiada al portapapeles. - + Screenshot copied to clipboard. Captura copiada al portapapeles. - + Deleting image... - + Copy URL Copiar URL - + Open URL Abrir URL - + Delete image Borrar imagen - + Image to Clipboard. Imagen al Portapapeles. @@ -642,61 +652,53 @@ Presiona Espacio para abrir el panel lateral. ImgurUploader - + Upload to Imgur Subir a Imgur - Uploading Image - Subiendo Imagen + Subiendo Imagen - Copy URL - Copiar URL + Copiar URL - Open URL - Abrir URL + Abrir URL - Delete image - Borrar imagen + Borrar imagen - Image to Clipboard. - Imagen al Portapapeles. + Imagen al Portapapeles. - - + Unable to open the URL. No puede abrir la URL. - URL copied to clipboard. - URL copiada al portapapeles. + URL copiada al portapapeles. - Screenshot copied to clipboard. - Captura copiada al portapapeles. + Captura copiada al portapapeles. ImgurUploaderTool - + Image Uploader Subir Imagen - + Upload the selection to Imgur Sube la selección a Imgur @@ -898,7 +900,7 @@ Presiona Espacio para abrir el panel lateral. Imposible escribir en - + URL copied to clipboard. URL copiada al portapapeles. diff --git a/translations/Internationalization_fr.ts b/translations/Internationalization_fr.ts index da6bf5bb..ede9c812 100644 --- a/translations/Internationalization_fr.ts +++ b/translations/Internationalization_fr.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Imposible de capturer l'écran - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Appuyer sur Espace pour ouvrir le panneau latéral. ConfigWindow - + Configuration Configuration - + Interface Interface - + Filename Editor Editeur de Noms - + Shortcuts - - Path Default - - - - + General Général @@ -335,152 +330,167 @@ Appuyer sur Espace pour ouvrir le panneau latéral. GeneneralConf - - + + Import Importer - - - + + + Error Erreur - + Unable to read file. Impossible de lire le fichier. - - + + Unable to write file. Impossible d'écrire le fichier. - + Save File Sauvegarder le fichier - + Confirm Reset Confirmer la Réinitialisation - + Are you sure you want to reset the configuration? Êtes-vous sûr de vouloir réinitialiser la configuration ? - + Show help message Montrer le message d'aide - + Show the help message at the beginning in the capture mode. Afficher ce message au lancement du mode capture. - - + + Show desktop notifications Afficher les notifications du bureau - + Show tray icon Afficher les icones de la barre d'état - + Show the systemtray icon Afficher l'icône dans la barre de tâches - + Configuration File Fichier de Configuration - + Export Exporter - + Reset Réinitialiser - + Launch at startup Lancer au démarrage - - + + Launch Flameshot Démarrer Flameshot - + Show welcome message on launch - + Close application after capture Fermer après une capture - + Close after taking a screenshot Fermer l'application après une capture d'écran - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL Copier l'URL - + URL copied to clipboard. URL copiée dans le Presse-papier. - + Open in browser @@ -488,42 +498,42 @@ Appuyer sur Espace pour ouvrir le panneau latéral. ImgS3Uploader - + Uploading Image Mise en ligne de l'image - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -544,17 +554,17 @@ Appuyer sur Espace pour ouvrir le panneau latéral. Impossible d'ouvrir l'URL. - + URL copied to clipboard. URL copiée dans le Presse-papier. - + Deleting image... - + Remove screenshot from history? @@ -566,12 +576,12 @@ Appuyer sur Espace pour ouvrir le panneau latéral. ImgS3UploaderTool - + Image Uploader Mise en ligne d'images - + Upload the selection to S3 bucket @@ -595,42 +605,42 @@ Appuyer sur Espace pour ouvrir le panneau latéral. - + Unable to open the URL. Impossible d'ouvrir l'URL. - + URL copied to clipboard. URL copiée dans le Presse-papier. - + Screenshot copied to clipboard. Capture d'écran copiée dans le Presse-papier. - + Deleting image... - + Copy URL Copier l'URL - + Open URL Ouvrir l'URL - + Delete image - + Image to Clipboard. Image dans le Presse-papier. @@ -638,61 +648,49 @@ Appuyer sur Espace pour ouvrir le panneau latéral. ImgurUploader - + Upload to Imgur Mettre en ligne vers Imgur - Uploading Image - Mise en ligne de l'image + Mise en ligne de l'image - Copy URL - Copier l'URL + Copier l'URL - Open URL - Ouvrir l'URL + Ouvrir l'URL - - Delete image - - - - Image to Clipboard. - Image dans le Presse-papier. + Image dans le Presse-papier. - - + Unable to open the URL. Impossible d'ouvrir l'URL. - URL copied to clipboard. - URL copiée dans le Presse-papier. + URL copiée dans le Presse-papier. - Screenshot copied to clipboard. - Capture d'écran copiée dans le Presse-papier. + Capture d'écran copiée dans le Presse-papier. ImgurUploaderTool - + Image Uploader Mise en ligne d'images - + Upload the selection to Imgur Mettre en ligne la sélection vers Imgur @@ -890,7 +888,7 @@ Appuyer sur Espace pour ouvrir le panneau latéral. Imposible d'écrire par dessus - + URL copied to clipboard. URL copiée dans le Presse-papier. diff --git a/translations/Internationalization_hu.ts b/translations/Internationalization_hu.ts index aa4e4023..054c02d7 100644 --- a/translations/Internationalization_hu.ts +++ b/translations/Internationalization_hu.ts @@ -154,10 +154,6 @@ Press Space to open the side panel. General Általános - - Path Default - - Shortcuts @@ -393,6 +389,18 @@ Press Space to open the side panel. Copy file path after save + + Upload storage + + + + Imgur storage + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget @@ -550,19 +558,19 @@ Press Space to open the side panel. Uploading Image - Kép felötlése + Kép felötlése Copy URL - URL másolása + URL másolása Open URL - URL megnyitása + URL megnyitása Image to Clipboard. - Kép a vágolapra. + Kép a vágolapra. Unable to open the URL. @@ -570,15 +578,11 @@ Press Space to open the side panel. URL copied to clipboard. - URL másolva a vágólapra. + URL másolva a vágólapra. Screenshot copied to clipboard. - Képernyőmentés másolva a vágólapra. - - - Delete image - + Képernyőmentés másolva a vágólapra. diff --git a/translations/Internationalization_ja.ts b/translations/Internationalization_ja.ts index e7690956..96698057 100644 --- a/translations/Internationalization_ja.ts +++ b/translations/Internationalization_ja.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen 画面をキャプチャーできません - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Enter を押すと画面をキャプチャー。 ConfigWindow - + Configuration 設定 - + Interface インターフェース - + Filename Editor ファイル名エディター - + Shortcuts - - Path Default - - - - + General 全般 @@ -335,152 +330,167 @@ Enter を押すと画面をキャプチャー。 GeneneralConf - + Show help message ヘルプメッセージを表示する - + Show the help message at the beginning in the capture mode. キャプチャーモード開始時にヘルプメッセージを表示する。 - - + + Show desktop notifications デスクトップの通知を表示する - + Show tray icon トレイアイコンを表示する - + Show the systemtray icon システムトレイアイコンを表示する - - + + Import インポート - - - + + + Error エラー - + Unable to read file. ファイルを読み込めません。 - - + + Unable to write file. ファイルに書き込めません。 - + Save File ファイルを保存 - + Confirm Reset リセットの確認 - + Are you sure you want to reset the configuration? 設定をリセットしてもよろしいですか? - + Configuration File 設定ファイル - + Export エクスポート - + Reset リセット - + Launch at startup スタートアップ時に起動する - - + + Launch Flameshot Flameshot を起動する - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL URL をコピー - + URL copied to clipboard. URL をクリップボードにコピーしました。 - + Open in browser @@ -488,42 +498,42 @@ Enter を押すと画面をキャプチャー。 ImgS3Uploader - + Uploading Image 画像をアップロード中 - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -548,17 +558,17 @@ Enter を押すと画面をキャプチャー。 URL を開けません。 - + URL copied to clipboard. URL をクリップボードにコピーしました。 - + Deleting image... - + Remove screenshot from history? @@ -570,12 +580,12 @@ Enter を押すと画面をキャプチャー。 ImgS3UploaderTool - + Image Uploader 画像アップローダー - + Upload the selection to S3 bucket @@ -599,42 +609,42 @@ Enter を押すと画面をキャプチャー。 - + Unable to open the URL. URL を開けません。 - + URL copied to clipboard. URL をクリップボードにコピーしました。 - + Screenshot copied to clipboard. スクリーンショットをクリップボードにコピーしました。 - + Deleting image... - + Copy URL URL をコピー - + Open URL URL を開く - + Delete image 画像を削除 - + Image to Clipboard. 画像をクリップボードへ。 @@ -642,61 +652,53 @@ Enter を押すと画面をキャプチャー。 ImgurUploader - + Upload to Imgur Imgur にアップロード - Uploading Image - 画像をアップロード中 + 画像をアップロード中 - Copy URL - URL をコピー + URL をコピー - Open URL - URL を開く + URL を開く - Delete image - 画像を削除 + 画像を削除 - Image to Clipboard. - 画像をクリップボードへ。 + 画像をクリップボードへ。 - - + Unable to open the URL. URL を開けません。 - URL copied to clipboard. - URL をクリップボードにコピーしました。 + URL をクリップボードにコピーしました。 - Screenshot copied to clipboard. - スクリーンショットをクリップボードにコピーしました。 + スクリーンショットをクリップボードにコピーしました。 ImgurUploaderTool - + Image Uploader 画像アップローダー - + Upload the selection to Imgur Imgur に選択範囲をアップロードする @@ -894,7 +896,7 @@ Enter を押すと画面をキャプチャー。 書き込めません: - + URL copied to clipboard. URL をクリップボードにコピーしました。 diff --git a/translations/Internationalization_ka.ts b/translations/Internationalization_ka.ts index 5c002f0e..f3dfd655 100644 --- a/translations/Internationalization_ka.ts +++ b/translations/Internationalization_ka.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen ეკრანის გადაღება ვერ მოხერხდა - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -155,32 +155,27 @@ Press Space to open the side panel. ConfigWindow - + Configuration პარამეტრები - + Interface ინტერფეისი - + Filename Editor ფაილის სახელის რედაქტორი - + Shortcuts - - Path Default - - - - + General ზოგადი @@ -331,152 +326,167 @@ Press Space to open the side panel. GeneneralConf - - + + Import იმპორტირება - - - + + + Error შეცდომა - + Unable to read file. ფაილის წაკითხვა ვერ მოხერხდა. - - + + Unable to write file. ფაილის ჩაწერა ვერ მოხერხდა. - + Save File ფაილის შენახვა - + Confirm Reset განულების დადასტურება - + Are you sure you want to reset the configuration? დარწმუნებული ხართ, რომ გსურთ პარამეტრების განულება? - + Show help message დახმარების შეტყობინების ნახვა - + Show the help message at the beginning in the capture mode. დახმარების შეტყობინების ნახვა გადაღების რეჟიმის დაწყებისას. - - + + Show desktop notifications ცნობების ჩვენება სამუშაო მაგიდაზე - + Show tray icon ხატულის ჩვენება სისტემურ პანელზე - + Show the systemtray icon ხატულის ჩვენება სისტემურ პანელზე - + Configuration File პარამეტრების ფაილი - + Export ექსპორტირება - + Reset განულება - + Launch at startup გაშვება სისტემის ჩატვირთვისას - - + + Launch Flameshot - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL URL-ის კოპირება - + URL copied to clipboard. URL დაკოპირდა გაცვლის ბუფერში. - + Open in browser @@ -484,42 +494,42 @@ Press Space to open the side panel. ImgS3Uploader - + Uploading Image სურათის ატვირთვა - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -540,17 +550,17 @@ Press Space to open the side panel. URL-ის გახსნა ვერ მოხერხდა. - + URL copied to clipboard. URL დაკოპირდა გაცვლის ბუფერში. - + Deleting image... - + Remove screenshot from history? @@ -562,12 +572,12 @@ Press Space to open the side panel. ImgS3UploaderTool - + Image Uploader სურათის ამტვირთველი - + Upload the selection to S3 bucket @@ -591,42 +601,42 @@ Press Space to open the side panel. - + Unable to open the URL. URL-ის გახსნა ვერ მოხერხდა. - + URL copied to clipboard. URL დაკოპირდა გაცვლის ბუფერში. - + Screenshot copied to clipboard. სურათი დაკოპირდა გაცვლის ბუფერში. - + Deleting image... - + Copy URL URL-ის კოპირება - + Open URL URL-ის გახსნა - + Delete image - + Image to Clipboard. სურათის გაცვლის ბუფერში გაგზავნა @@ -634,61 +644,49 @@ Press Space to open the side panel. ImgurUploader - + Upload to Imgur Imgur-ზე ატვირთვა - Uploading Image - სურათის ატვირთვა + სურათის ატვირთვა - Copy URL - URL-ის კოპირება + URL-ის კოპირება - Open URL - URL-ის გახსნა + URL-ის გახსნა - - Delete image - - - - Image to Clipboard. - სურათის გაცვლის ბუფერში გაგზავნა + სურათის გაცვლის ბუფერში გაგზავნა - - + Unable to open the URL. URL-ის გახსნა ვერ მოხერხდა. - URL copied to clipboard. - URL დაკოპირდა გაცვლის ბუფერში. + URL დაკოპირდა გაცვლის ბუფერში. - Screenshot copied to clipboard. - სურათი დაკოპირდა გაცვლის ბუფერში. + სურათი დაკოპირდა გაცვლის ბუფერში. ImgurUploaderTool - + Image Uploader სურათის ამტვირთველი - + Upload the selection to Imgur შერჩეულის Imgur-ზე ატვირთვა @@ -886,7 +884,7 @@ Press Space to open the side panel. შემდეგ მისამართზე ჩაწერა ვერ მოხერხდა: - + URL copied to clipboard. URL დაკოპირდა გაცვლის ბუფერში. diff --git a/translations/Internationalization_nl.ts b/translations/Internationalization_nl.ts index 05adeaee..284e7f70 100644 --- a/translations/Internationalization_nl.ts +++ b/translations/Internationalization_nl.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Kan scherm niet vastleggen - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Druk op spatie om het zijpaneel te openen. ConfigWindow - + Configuration Configuratie - + Interface Uiterlijk - + Filename Editor Bestandsnaambewerker - + Shortcuts - - Path Default - - - - + General Algemeen @@ -335,152 +330,167 @@ Druk op spatie om het zijpaneel te openen. GeneneralConf - - + + Import Importeren - - - + + + Error Fout - + Unable to read file. Kan bestand niet uitlezen. - - + + Unable to write file. Kan bestand niet wegschrijven. - + Save File Bestand opslaan - + Confirm Reset Herstellen bevestigen - + Are you sure you want to reset the configuration? Weet je zeker dat je de standwaardwaarden van de configuratie wilt herstellen? - + Show help message Uitleg tonen - + Show the help message at the beginning in the capture mode. Toont een bericht met uitleg bij het openen van de vastlegmodus. - - + + Show desktop notifications Bureaubladmeldingen tonen - + Show tray icon Systeemvakpictogram tonen - + Show the systemtray icon Toont het systeemvakpictogram - + Configuration File Configuratiebestand - + Export Exporteren - + Reset Standaardwaarden - + Launch at startup Automatisch opstarten - - + + Launch Flameshot Flameshot openen - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL URL kopiëren - + URL copied to clipboard. URL gekopieerd naar klembord. - + Open in browser @@ -488,42 +498,42 @@ Druk op spatie om het zijpaneel te openen. ImgS3Uploader - + Uploading Image Bezig met uploaden van afbeelding... - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -548,17 +558,17 @@ Druk op spatie om het zijpaneel te openen. Kan URL niet openen. - + URL copied to clipboard. URL gekopieerd naar klembord. - + Deleting image... - + Remove screenshot from history? @@ -570,12 +580,12 @@ Druk op spatie om het zijpaneel te openen. ImgS3UploaderTool - + Image Uploader Afbeeldingsuploader - + Upload the selection to S3 bucket @@ -599,42 +609,42 @@ Druk op spatie om het zijpaneel te openen. - + Unable to open the URL. Kan URL niet openen. - + URL copied to clipboard. URL gekopieerd naar klembord. - + Screenshot copied to clipboard. Schermafdruk gekopieerd naar klembord. - + Deleting image... - + Copy URL URL kopiëren - + Open URL URL openen - + Delete image Afbeelding verwijderen - + Image to Clipboard. Afbeelding naar klembord. @@ -642,61 +652,53 @@ Druk op spatie om het zijpaneel te openen. ImgurUploader - + Upload to Imgur Uploaden naar Imgur - Uploading Image - Bezig met uploaden van afbeelding... + Bezig met uploaden van afbeelding... - Copy URL - URL kopiëren + URL kopiëren - Open URL - URL openen + URL openen - Delete image - Afbeelding verwijderen + Afbeelding verwijderen - Image to Clipboard. - Afbeelding naar klembord. + Afbeelding naar klembord. - - + Unable to open the URL. Kan URL niet openen. - URL copied to clipboard. - URL gekopieerd naar klembord. + URL gekopieerd naar klembord. - Screenshot copied to clipboard. - Schermafdruk gekopieerd naar klembord. + Schermafdruk gekopieerd naar klembord. ImgurUploaderTool - + Image Uploader Afbeeldingsuploader - + Upload the selection to Imgur Upload de selectie naar Imgur @@ -898,7 +900,7 @@ Druk op spatie om het zijpaneel te openen. Kan niet wegschrijven naar - + URL copied to clipboard. URL gekopieerd naar klembord. diff --git a/translations/Internationalization_pl.ts b/translations/Internationalization_pl.ts index e0a44a60..d7bd9fd4 100644 --- a/translations/Internationalization_pl.ts +++ b/translations/Internationalization_pl.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Nie można przechwycić ekranu - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -158,32 +158,27 @@ Spacja, aby pokazać panel boczny. ConfigWindow - + Configuration Konfiguracja - + Interface Interfejs - + Filename Editor Edytor nazw plików - + Shortcuts - - Path Default - - - - + General Ogólne @@ -334,152 +329,167 @@ Spacja, aby pokazać panel boczny. GeneneralConf - - + + Import Import - - - + + + Error Błąd - + Unable to read file. Nie można odczytać pliku. - - + + Unable to write file. Nie można zapisać pliku. - + Save File Zapisz plik - + Confirm Reset Potwierdź Reset - + Are you sure you want to reset the configuration? Czy na pewno chcesz zresetować konfigurację? - + Show help message Pokaż podpowiedzi - + Show the help message at the beginning in the capture mode. Pokaż podpowiedzi na początku trybu przechwytywania. - - + + Show desktop notifications Pokaż powiadomienia ekranowe - + Show tray icon Pokaż ikonę w trayu - + Show the systemtray icon Pokaż ikonę w zasobniku systemowym - + Configuration File Plik konfiguracyjny - + Export Export - + Reset Reset - + Launch at startup Uruchom podczas startu - - + + Launch Flameshot Uruchom Flameshot - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL Kopiuj URL - + URL copied to clipboard. URL skopiowany do schowka. - + Open in browser @@ -487,42 +497,42 @@ Spacja, aby pokazać panel boczny. ImgS3Uploader - + Uploading Image Wysyłanie obrazka - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -547,17 +557,17 @@ Spacja, aby pokazać panel boczny. Nie można otworzyć adresu URL. - + URL copied to clipboard. URL skopiowany do schowka. - + Deleting image... - + Remove screenshot from history? @@ -569,12 +579,12 @@ Spacja, aby pokazać panel boczny. ImgS3UploaderTool - + Image Uploader Uploader obrazów - + Upload the selection to S3 bucket @@ -598,42 +608,42 @@ Spacja, aby pokazać panel boczny. - + Unable to open the URL. Nie można otworzyć adresu URL. - + URL copied to clipboard. URL skopiowany do schowka. - + Screenshot copied to clipboard. Zrzut ekranu skopiowany do schowka. - + Deleting image... - + Copy URL Kopiuj URL - + Open URL Otwórz URL - + Delete image Usuń obrazek - + Image to Clipboard. Obrazek do schowka. @@ -641,61 +651,53 @@ Spacja, aby pokazać panel boczny. ImgurUploader - + Upload to Imgur Wyślij do Imgur - Uploading Image - Wysyłanie obrazka + Wysyłanie obrazka - Copy URL - Kopiuj URL + Kopiuj URL - Open URL - Otwórz URL + Otwórz URL - Delete image - Usuń obrazek + Usuń obrazek - Image to Clipboard. - Obrazek do schowka. + Obrazek do schowka. - - + Unable to open the URL. Nie można otworzyć adresu URL. - URL copied to clipboard. - URL skopiowany do schowka. + URL skopiowany do schowka. - Screenshot copied to clipboard. - Zrzut ekranu skopiowany do schowka. + Zrzut ekranu skopiowany do schowka. ImgurUploaderTool - + Image Uploader Uploader obrazów - + Upload the selection to Imgur Wyślij zaznaczenie do Imgur @@ -893,7 +895,7 @@ Spacja, aby pokazać panel boczny. Nie można zapisać w - + URL copied to clipboard. URL skopiowany do schowka. diff --git a/translations/Internationalization_pt_br.ts b/translations/Internationalization_pt_br.ts index 0239a92b..5e7cac62 100644 --- a/translations/Internationalization_pt_br.ts +++ b/translations/Internationalization_pt_br.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Não foi possível capturar a tela - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Pressione espaço abrir o painel lateral. ConfigWindow - + Configuration Configuração - + Interface Interface - + Filename Editor Editor de nome de arquivo - + Shortcuts - - Path Default - - - - + General Geral @@ -335,152 +330,167 @@ Pressione espaço abrir o painel lateral. GeneneralConf - - + + Import Importar - - - + + + Error Erro - + Unable to read file. Não foi possível ler o arquivo. - - + + Unable to write file. Não foi possível escrever no arquivo. - + Save File Salvar Arquivo - + Confirm Reset Confirmar Reset - + Are you sure you want to reset the configuration? Tem certeza que deseja resetar a configuração? - + Show help message Mostrar mensagem de ajuda - + Show the help message at the beginning in the capture mode. Mostrar mensagem de ajuda no início do modo de captura. - - + + Show desktop notifications Mostrar notificações de Desktop - + Show tray icon Mostrar ícone de tray - + Show the systemtray icon Mosrar ícone na barra de aplicações - + Configuration File Arquivo de Configurações - + Export Exportar - + Reset Reset - + Launch at startup Iniciar junto com o sistema - - + + Launch Flameshot Iniciar Flameshot - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL Copiar URL - + URL copied to clipboard. URL copiada para o clipboard. - + Open in browser @@ -488,42 +498,42 @@ Pressione espaço abrir o painel lateral. ImgS3Uploader - + Uploading Image Upando Imagem - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -548,17 +558,17 @@ Pressione espaço abrir o painel lateral. Não foi possível abrir a URL. - + URL copied to clipboard. URL copiada para o clipboard. - + Deleting image... - + Remove screenshot from history? @@ -570,12 +580,12 @@ Pressione espaço abrir o painel lateral. ImgS3UploaderTool - + Image Uploader Uploader de imagens - + Upload the selection to S3 bucket @@ -599,42 +609,42 @@ Pressione espaço abrir o painel lateral. - + Unable to open the URL. Não foi possível abrir a URL. - + URL copied to clipboard. URL copiada para o clipboard. - + Screenshot copied to clipboard. Screenshot copiada para o clipboard. - + Deleting image... - + Copy URL Copiar URL - + Open URL Abrir URL - + Delete image Deletar imagem - + Image to Clipboard. Imagem no Clipboard. @@ -642,61 +652,53 @@ Pressione espaço abrir o painel lateral. ImgurUploader - + Upload to Imgur Upload no Imgur - Uploading Image - Upando Imagem + Upando Imagem - Copy URL - Copiar URL + Copiar URL - Open URL - Abrir URL + Abrir URL - Delete image - Deletar imagem + Deletar imagem - Image to Clipboard. - Imagem no Clipboard. + Imagem no Clipboard. - - + Unable to open the URL. Não foi possível abrir a URL. - URL copied to clipboard. - URL copiada para o clipboard. + URL copiada para o clipboard. - Screenshot copied to clipboard. - Screenshot copiada para o clipboard. + Screenshot copiada para o clipboard. ImgurUploaderTool - + Image Uploader Uploader de imagens - + Upload the selection to Imgur Upa a seleção no Imgur @@ -894,7 +896,7 @@ Pressione espaço abrir o painel lateral. Não foi possível escrever em - + URL copied to clipboard. URL copiada para o clipboard. diff --git a/translations/Internationalization_ru.ts b/translations/Internationalization_ru.ts index 097e5d7c..fba7380c 100644 --- a/translations/Internationalization_ru.ts +++ b/translations/Internationalization_ru.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Не удалось захватить экран - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,31 @@ Press Space to open the side panel. ConfigWindow - + Configuration Настройка - + Interface Интерфейс - + Filename Editor Редактор имен файлов - + Shortcuts Горячие клавиши - Path Default - Путь + Путь - + General Общие @@ -343,127 +342,142 @@ Press Space to open the side panel. GeneneralConf - - + + Import Импорт - - - + + + Error Ошибка - + Unable to read file. Не удалось прочитать файл. - - + + Unable to write file. Не удалось записать файл. - + Save File Сохранить файл - + Confirm Reset Подтвердить сброс - + Are you sure you want to reset the configuration? Вы действительно хотите сбросить настройки? - + Show help message Показывать справочное сообщение - + Show the help message at the beginning in the capture mode. Показывать справочное сообщение перед началом захвата экрана. - - + + Show desktop notifications Показывать уведомления - + Show tray icon Показывать значок в трее - + Show the systemtray icon Показать значок в системном трее - + Configuration File Файл конфигурации - + Export Экспорт - + Reset Сброс - + Launch at startup Запускать при старте системы - - + + Launch Flameshot Запустить Flameshot - + Show welcome message on launch Показывать приветствие при запуске - + Close application after capture Закрыть приложение после захвата - + Close after taking a screenshot Закрыть после получения скриншота - + Copy URL after upload Скопировать URL после загрузки - + Copy URL and close window after upload Скопировать URL после загрузки и закрыть окно - - + + Copy file path after save Копировать путь к сохраненному файлу + + + Upload storage + Хранилище скриншотов + + + + Imgur storage + Хранилище Imgur + + + + S3 storage (require config.ini file with s3 credentials) + Хранилище S3 (необходим файл config.ini с параметрами доступа) + HistoryWidget @@ -476,27 +490,27 @@ Press Space to open the side panel. История скриншотов пустая - + Latest Uploads Последние загрузки - + Screenshots history is empty История скриншотов пуста - + Copy URL Скопировать URL - + URL copied to clipboard. URL скопирован в буфер обмена. - + Open in browser Открыть в браузере @@ -508,17 +522,17 @@ Press Space to open the side panel. Загрузить на S3 - + Uploading Image Загрузка изображения - + Upload image to S3 Загрузить на S3 - + Delete image from S3 Удалить скриншот с S3 @@ -527,12 +541,12 @@ Press Space to open the side panel. Удалить скриншот - + Remove screenshot from history? Удалить скриншот из истории? - + S3 Creds URL is not found in your configuration file Параметры доступов к S3 не найдены в конфигурационном файле @@ -557,32 +571,32 @@ Press Space to open the side panel. Не удалось открыть URL. - + URL copied to clipboard. URL скопирован в буфер обмена. - + Deleting image... Удаление скриншота... - + Unable to remove screenshot from the remote storage. Невозможно удалить снимок экрана из удаленного хранилища. - + Network error Ошибка сети - + Possibly it doesn't exist anymore Возможно, его больше не существует - + Do you want to remove screenshot from local history anyway? Вы все равно хотите удалить скриншот из локальной истории? @@ -594,12 +608,12 @@ Press Space to open the side panel. ImgS3UploaderTool - + Image Uploader Отправка изображений - + Upload the selection to S3 bucket Загрузить выделение на S3 @@ -627,42 +641,42 @@ Press Space to open the side panel. Загрузить изображение - + Unable to open the URL. Не удалось открыть URL. - + URL copied to clipboard. URL скопирован в буфер обмена. - + Screenshot copied to clipboard. Снимок скопирован в буфер обмена. - + Deleting image... Удаление скриншота... - + Copy URL Скопировать URL - + Open URL Открыть URL - + Delete image Удалить изображение - + Image to Clipboard. Изображение в буфер обмена. @@ -670,61 +684,53 @@ Press Space to open the side panel. ImgurUploader - + Upload to Imgur Загрузить в Imgur - Uploading Image - Загрузка изображения + Загрузка изображения - Copy URL - Скопировать URL + Скопировать URL - Open URL - Открыть URL + Открыть URL - Delete image - Удалить изображение + Удалить изображение - Image to Clipboard. - Изображение в буфер обмена. + Изображение в буфер обмена. - - + Unable to open the URL. Не удалось открыть URL. - URL copied to clipboard. - URL скопирован в буфер обмена. + URL скопирован в буфер обмена. - Screenshot copied to clipboard. - Снимок скопирован в буфер обмена. + Снимок скопирован в буфер обмена. ImgurUploaderTool - + Image Uploader Отправка изображений - + Upload the selection to Imgur Загрузить выделение на Imgur @@ -938,7 +944,7 @@ Press Space to open the side panel. Не удалось сохранить - + URL copied to clipboard. URL скопирован в буфер обмена. diff --git a/translations/Internationalization_sk.ts b/translations/Internationalization_sk.ts index f33aa6e0..3004419f 100644 --- a/translations/Internationalization_sk.ts +++ b/translations/Internationalization_sk.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Nepodarilo sa zachytiť obrazovku - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Stlačte medzerník pre otvorenie postranného panelu. ConfigWindow - + Configuration Konfigurácia - + Interface Interfejs - + Filename Editor Editor názvov súborov - + Shortcuts - - Path Default - - - - + General Všeobecné @@ -335,152 +330,167 @@ Stlačte medzerník pre otvorenie postranného panelu. GeneneralConf - - + + Import Importovať - - - + + + Error Chyba - + Unable to read file. Zlyhalo čítanie súboru. - - + + Unable to write file. Zlyhal zápis do súboru. - + Save File Uložiť súbor - + Confirm Reset Potvrdiť Reset - + Are you sure you want to reset the configuration? Naozaj si želáte resetovať aktuálnu konfiguráciu? - + Show help message Zobraziť nápovedu - + Show the help message at the beginning in the capture mode. Zobraziť nápovedu na začiatku počas režimu zachytávania obrazovky. - - + + Show desktop notifications Zobraziť systémové upozornenia - + Show tray icon Zobraziť stavovú ikonu - + Show the systemtray icon Zobraziť ikonu v stavovej oblasti - + Configuration File Súbor s konfiguráciou - + Export Exportovať - + Reset Resetovať - + Launch at startup Spúšťať pri štarte - - + + Launch Flameshot Spustiť Flameshot - + Show welcome message on launch - + Close application after capture Zavrieť po vytvorení snímky - + Close after taking a screenshot Zatvoriť po vytvorení snímky obrazovky - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL Kopírovať URL - + URL copied to clipboard. URL skopírovaná do schránky. - + Open in browser @@ -488,42 +498,42 @@ Stlačte medzerník pre otvorenie postranného panelu. ImgS3Uploader - + Uploading Image Nahrávam obrázok - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -548,17 +558,17 @@ Stlačte medzerník pre otvorenie postranného panelu. Nepodarilo sa otvoriť URL. - + URL copied to clipboard. URL skopírovaná do schránky. - + Deleting image... - + Remove screenshot from history? @@ -570,12 +580,12 @@ Stlačte medzerník pre otvorenie postranného panelu. ImgS3UploaderTool - + Image Uploader Uploader obrázkov - + Upload the selection to S3 bucket @@ -599,42 +609,42 @@ Stlačte medzerník pre otvorenie postranného panelu. - + Unable to open the URL. Nepodarilo sa otvoriť URL. - + URL copied to clipboard. URL skopírovaná do schránky. - + Screenshot copied to clipboard. Snímka obrazovky bola skopírovaná do schránky. - + Deleting image... - + Copy URL Kopírovať URL - + Open URL Otvoriť URL - + Delete image Vymazať obrázok - + Image to Clipboard. Obrázok do schránky. @@ -642,61 +652,53 @@ Stlačte medzerník pre otvorenie postranného panelu. ImgurUploader - + Upload to Imgur Nahrať na Imgur - Uploading Image - Nahrávam obrázok + Nahrávam obrázok - Copy URL - Kopírovať URL + Kopírovať URL - Open URL - Otvoriť URL + Otvoriť URL - Delete image - Vymazať obrázok + Vymazať obrázok - Image to Clipboard. - Obrázok do schránky. + Obrázok do schránky. - - + Unable to open the URL. Nepodarilo sa otvoriť URL. - URL copied to clipboard. - URL skopírovaná do schránky. + URL skopírovaná do schránky. - Screenshot copied to clipboard. - Snímka obrazovky bola skopírovaná do schránky. + Snímka obrazovky bola skopírovaná do schránky. ImgurUploaderTool - + Image Uploader Uploader obrázkov - + Upload the selection to Imgur Nahrať výber na Imgur @@ -902,7 +904,7 @@ Stlačte medzerník pre otvorenie postranného panelu. Chyba pri ukladaní - + URL copied to clipboard. URL skopírovaná do schránky. diff --git a/translations/Internationalization_sr.ts b/translations/Internationalization_sr.ts index 92f99f8a..b243f85f 100644 --- a/translations/Internationalization_sr.ts +++ b/translations/Internationalization_sr.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Нисам успео да снимим екран - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Press Space to open the side panel. ConfigWindow - + Configuration Подешавања - + Interface Изглед - + Filename Editor Избор имена датотеке - + Shortcuts - - Path Default - - - - + General Опште @@ -335,152 +330,167 @@ Press Space to open the side panel. GeneneralConf - - + + Import Увоз - - - + + + Error Грешка - + Unable to read file. Нисам успео да прочитам датотеку. - - + + Unable to write file. Нисам успео да сачувам датотеку. - + Save File Сачувај датотеку - + Confirm Reset Потврда поништавања - + Are you sure you want to reset the configuration? Да ли сте сигурни да желите да поништите сва прилагођена подешавања? - + Show help message Приказуј поруку са упутством - + Show the help message at the beginning in the capture mode. Приказуј поруку са кратким упутством на почетку снимања екрана. - - + + Show desktop notifications Користи системска обавештења - + Show tray icon Иконица на системској полици - + Show the systemtray icon Приказуј иконицу на системској полици - + Configuration File Датотека са подешавањима - + Export Извоз - + Reset Поништи - + Launch at startup Покрени на почетку - - + + Launch Flameshot Покрени Flameshot - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL Запамти интернет адресу - + URL copied to clipboard. Интернет адреса је сачувана у привременој меморији. - + Open in browser @@ -488,42 +498,42 @@ Press Space to open the side panel. ImgS3Uploader - + Uploading Image Објављујем слику - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -548,17 +558,17 @@ Press Space to open the side panel. Нисам успео да посетим интернет адресу. - + URL copied to clipboard. Интернет адреса је сачувана у привременој меморији. - + Deleting image... - + Remove screenshot from history? @@ -570,12 +580,12 @@ Press Space to open the side panel. ImgS3UploaderTool - + Image Uploader Објављивање слике - + Upload the selection to S3 bucket @@ -599,42 +609,42 @@ Press Space to open the side panel. - + Unable to open the URL. Нисам успео да посетим интернет адресу. - + URL copied to clipboard. Интернет адреса је сачувана у привременој меморији. - + Screenshot copied to clipboard. Слика је сачувана у привременој меморији. - + Deleting image... - + Copy URL Запамти интернет адресу - + Open URL Посети интернет адресу - + Delete image Избриши слику - + Image to Clipboard. Сачувај у привремену меморију. @@ -642,61 +652,53 @@ Press Space to open the side panel. ImgurUploader - + Upload to Imgur Објави на Imgur - Uploading Image - Објављујем слику + Објављујем слику - Copy URL - Запамти интернет адресу + Запамти интернет адресу - Open URL - Посети интернет адресу + Посети интернет адресу - Delete image - Избриши слику + Избриши слику - Image to Clipboard. - Сачувај у привремену меморију. + Сачувај у привремену меморију. - - + Unable to open the URL. Нисам успео да посетим интернет адресу. - URL copied to clipboard. - Интернет адреса је сачувана у привременој меморији. + Интернет адреса је сачувана у привременој меморији. - Screenshot copied to clipboard. - Слика је сачувана у привременој меморији. + Слика је сачувана у привременој меморији. ImgurUploaderTool - + Image Uploader Објављивање слике - + Upload the selection to Imgur Објави избор на Imgur сајту @@ -894,7 +896,7 @@ Press Space to open the side panel. Нисам успео са сачувам - + URL copied to clipboard. Интернет адреса је сачувана у привременој меморији. diff --git a/translations/Internationalization_tr.ts b/translations/Internationalization_tr.ts index 99876eb0..07dbd013 100644 --- a/translations/Internationalization_tr.ts +++ b/translations/Internationalization_tr.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Ekran resmi alınamadı - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,27 @@ Yan paneli açmak için Boşluk tuşuna basın. ConfigWindow - + Configuration Ayarlar - + Interface Arayüz - + Filename Editor Dosya Adı Düzenleyici - + Shortcuts - - Path Default - - - - + General Genel @@ -335,152 +330,167 @@ Yan paneli açmak için Boşluk tuşuna basın. GeneneralConf - - + + Import Dışa aktar - - - + + + Error Hata - + Unable to read file. Dosya okunamıyor. - - + + Unable to write file. Dosya yazılamıyor. - + Save File Dosyayı Kaydet - + Confirm Reset Sıfırlamayı Onayla - + Are you sure you want to reset the configuration? Ayarları sıfırlamak istediğinizden emin misiniz? - + Show help message Yardım mesajını göster - + Show the help message at the beginning in the capture mode. Yakalama modunda başında yardım mesajını gösterin. - - + + Show desktop notifications Masaüstü bildirimlerini göster - + Show tray icon Tepsi simgesini göster - + Show the systemtray icon Sistem tepsisi simgesini göster - + Configuration File Yapılandırma Dosyası - + Export Dışa aktar - + Reset Sıfırla - + Launch at startup Başlangıçta başlatın - - + + Launch Flameshot Flameshot'ı başlat - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL URL Kopyala - + URL copied to clipboard. URL panoya kopyalandı. - + Open in browser @@ -488,42 +498,42 @@ Yan paneli açmak için Boşluk tuşuna basın. ImgS3Uploader - + Uploading Image Resim Yükleniyor - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -548,17 +558,17 @@ Yan paneli açmak için Boşluk tuşuna basın. URL açılamıyor. - + URL copied to clipboard. URL panoya kopyalandı. - + Deleting image... - + Remove screenshot from history? @@ -570,12 +580,12 @@ Yan paneli açmak için Boşluk tuşuna basın. ImgS3UploaderTool - + Image Uploader Resim Yükleme Aracı - + Upload the selection to S3 bucket @@ -599,42 +609,42 @@ Yan paneli açmak için Boşluk tuşuna basın. - + Unable to open the URL. URL açılamıyor. - + URL copied to clipboard. URL panoya kopyalandı. - + Screenshot copied to clipboard. Ekran görüntüsü panoya kopyalandı. - + Deleting image... - + Copy URL URL Kopyala - + Open URL URL Aç - + Delete image Resmi sil - + Image to Clipboard. Resim Pano'ya. @@ -642,61 +652,53 @@ Yan paneli açmak için Boşluk tuşuna basın. ImgurUploader - + Upload to Imgur Imgur'a yükle - Uploading Image - Resim Yükleniyor + Resim Yükleniyor - Copy URL - URL Kopyala + URL Kopyala - Open URL - URL Aç + URL Aç - Delete image - Resmi sil + Resmi sil - Image to Clipboard. - Resim Pano'ya. + Resim Pano'ya. - - + Unable to open the URL. URL açılamıyor. - URL copied to clipboard. - URL panoya kopyalandı. + URL panoya kopyalandı. - Screenshot copied to clipboard. - Ekran görüntüsü panoya kopyalandı. + Ekran görüntüsü panoya kopyalandı. ImgurUploaderTool - + Image Uploader Resim Yükleme Aracı - + Upload the selection to Imgur Seçimi Imgur'a yükler @@ -894,7 +896,7 @@ Yan paneli açmak için Boşluk tuşuna basın. Yazma mümkün değil - + URL copied to clipboard. URL panoya kopyalandı. diff --git a/translations/Internationalization_uk.ts b/translations/Internationalization_uk.ts index aedaefa8..761adb7a 100644 --- a/translations/Internationalization_uk.ts +++ b/translations/Internationalization_uk.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen Не вдалось захопити екран - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -159,32 +159,31 @@ Press Space to open the side panel. ConfigWindow - + Configuration Налаштування - + Interface Інтерфейс - + Filename Editor Редактор імені файлів - + Shortcuts Гарячі клавіші - Path Default - Шлях + Шлях - + General Загальне @@ -343,127 +342,142 @@ Press Space to open the side panel. GeneneralConf - - + + Import Імпорт - - - + + + Error Помилка - + Unable to read file. Не вдалось прочитати файл. - - + + Unable to write file. Не вдалось записати файл. - + Save File Зберегти файл - + Confirm Reset Підтвердити скидання - + Are you sure you want to reset the configuration? Ви дійсно хочете скинути налаштування? - + Show help message Показувати повідомлення довідки - + Show the help message at the beginning in the capture mode. Показувати повідомлення довідки на початку режиму захоплення. - - + + Show desktop notifications Показувати повідомлення - + Show tray icon Показувати значок на панелі - + Show the systemtray icon Показувати значок на панелі повідомленнь - + Configuration File Файл налаштувань - + Export Експорт - + Reset Скинути - + Launch at startup Запускати при старті системи - - + + Launch Flameshot Запускати Flameshot - + Show welcome message on launch Показувати привітання при запуску - + Close application after capture Закрити прогрму після захвату - + Close after taking a screenshot Закрити програму після отримання скріншоту - + Copy URL after upload Копіювати URL після завантаження - + Copy URL and close window after upload Копіювати URL та закрити вікно після завантаження - - + + Copy file path after save Копіювати шлях до збереженного файлу + + + Upload storage + Cховище скріншотів + + + + Imgur storage + Сховище Imgur + + + + S3 storage (require config.ini file with s3 credentials) + Сховище S3 (потрібен файл config.ini із параметрами доступу) + HistoryWidget @@ -476,27 +490,27 @@ Press Space to open the side panel. Історія скріншотів пуста - + Latest Uploads Останні завантаження - + Screenshots history is empty Історія скріншотів пуста - + Copy URL Скопіювати URL - + URL copied to clipboard. URL скопійовано до буферу обміну. - + Open in browser Відкрити у браузері @@ -508,17 +522,17 @@ Press Space to open the side panel. Вивантажити на S3 - + Uploading Image Вивантаження зображення - + Upload image to S3 Завантажити на S3 - + Delete image from S3 Видалити скріншот з S3 @@ -527,12 +541,12 @@ Press Space to open the side panel. Видалити скіншот - + Remove screenshot from history? Видалити скріншот із історії? - + S3 Creds URL is not found in your configuration file Параметри доступів до S3 не знайдені у конфігураціонному файлі @@ -557,32 +571,32 @@ Press Space to open the side panel. Не вдалось відкрити URL. - + URL copied to clipboard. URL скопійовано до буферу обміну. - + Deleting image... Видалення скріншоту... - + Unable to remove screenshot from the remote storage. Не вдалося видалити скріншот із віддаленого сховища. - + Network error Помилка мережі - + Possibly it doesn't exist anymore Можливо, його більше не існує - + Do you want to remove screenshot from local history anyway? Ви все одно хочете видалити скріншот із локальної історії? @@ -594,12 +608,12 @@ Press Space to open the side panel. ImgS3UploaderTool - + Image Uploader Вивантаження зображень - + Upload the selection to S3 bucket Вивантажити виділення на S3 @@ -627,42 +641,42 @@ Press Space to open the side panel. Вивантажити зображення - + Unable to open the URL. Не вдалось відкрити URL. - + URL copied to clipboard. URL скопійовано до буферу обміну. - + Screenshot copied to clipboard. Знімок скопійовано до буферу обміну. - + Deleting image... Видалення скріншоту... - + Copy URL Скопіювати URL - + Open URL Відкрити URL - + Delete image Видалити зображення - + Image to Clipboard. Зображення до буферу обміну. @@ -670,61 +684,53 @@ Press Space to open the side panel. ImgurUploader - + Upload to Imgur Вивантажити до Imgur - Uploading Image - Вивантаження зображення + Вивантаження зображення - Copy URL - Скопіювати URL + Скопіювати URL - Open URL - Відкрити URL + Відкрити URL - Delete image - Видалити зображення + Видалити зображення - Image to Clipboard. - Зображення до буферу обміну. + Зображення до буферу обміну. - - + Unable to open the URL. Не вдалось відкрити URL. - URL copied to clipboard. - URL скопійовано до буферу обміну. + URL скопійовано до буферу обміну. - Screenshot copied to clipboard. - Знімок скопійовано до буферу обміну. + Знімок скопійовано до буферу обміну. ImgurUploaderTool - + Image Uploader Вивантаження зображень - + Upload the selection to Imgur Вивантажити вибране до Imgur @@ -938,7 +944,7 @@ Press Space to open the side panel. Не вдалось зберегти - + URL copied to clipboard. URL скопійовано до буферу обміну. diff --git a/translations/Internationalization_zh_CN.ts b/translations/Internationalization_zh_CN.ts index a20d9c3d..1916eaa7 100644 --- a/translations/Internationalization_zh_CN.ts +++ b/translations/Internationalization_zh_CN.ts @@ -125,13 +125,13 @@ CaptureWidget - + Unable to capture screen 无法捕获屏幕 无法捕获屏幕 - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -160,32 +160,27 @@ Press Space to open the side panel. ConfigWindow - + Configuration 配置 - + Interface 界面 - + Filename Editor 文件名编辑器 - + Shortcuts - - Path Default - - - - + General 常规 @@ -336,152 +331,167 @@ Press Space to open the side panel. GeneneralConf - + Show help message 显示帮助文档 - + Show the help message at the beginning in the capture mode. 在捕获之前显示帮助信息。 - - + + Show desktop notifications 显示桌面通知 - + Show tray icon 显示托盘图标 - + Show the systemtray icon 显示任务栏图标 - - + + Import 导入 - - - + + + Error 错误 - + Unable to read file. 无法读取文件。 - - + + Unable to write file. 无法写入文件。 - + Save File 保存到文件 - + Confirm Reset 确定重置 - + Are you sure you want to reset the configuration? 你确定你想要重置配置? - + Configuration File 配置文件 - + Export 导出 - + Reset 重置 - + Launch at startup 开机时启动 - - + + Launch Flameshot 启动 Flameshot - + Show welcome message on launch - + Close application after capture 捕获后关闭 - + Close after taking a screenshot 获取屏幕截图后关闭 - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL 复制链接 - + URL copied to clipboard. 复制链接到剪贴板。 - + Open in browser @@ -489,42 +499,42 @@ Press Space to open the side panel. ImgS3Uploader - + Uploading Image 正在上传 - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -549,17 +559,17 @@ Press Space to open the side panel. 无法打开此链接。 - + URL copied to clipboard. 复制链接到剪贴板。 - + Deleting image... - + Remove screenshot from history? @@ -571,12 +581,12 @@ Press Space to open the side panel. ImgS3UploaderTool - + Image Uploader 上传图片 - + Upload the selection to S3 bucket @@ -600,42 +610,42 @@ Press Space to open the side panel. - + Unable to open the URL. 无法打开此链接。 - + URL copied to clipboard. 复制链接到剪贴板。 - + Screenshot copied to clipboard. 截图复制到剪贴板。 - + Deleting image... - + Copy URL 复制链接 - + Open URL 打开链接 - + Delete image 删除图像 - + Image to Clipboard. 保存文件到剪贴板。 @@ -643,61 +653,53 @@ Press Space to open the side panel. ImgurUploader - + Upload to Imgur 上传到Imgur - Uploading Image - 正在上传 + 正在上传 - Copy URL - 复制链接 + 复制链接 - Open URL - 打开链接 + 打开链接 - Delete image - 删除图像 + 删除图像 - Image to Clipboard. - 保存文件到剪贴板。 + 保存文件到剪贴板。 - - + Unable to open the URL. 无法打开此链接。 - URL copied to clipboard. - 复制链接到剪贴板。 + 复制链接到剪贴板。 - Screenshot copied to clipboard. - 截图复制到剪贴板。 + 截图复制到剪贴板。 ImgurUploaderTool - + Image Uploader 上传图片 - + Upload the selection to Imgur 上传选择到 Imgur @@ -903,7 +905,7 @@ Press Space to open the side panel. 无法写入 - + URL copied to clipboard. 复制链接到剪贴板。 diff --git a/translations/Internationalization_zh_TW.ts b/translations/Internationalization_zh_TW.ts index e4b51abd..96cd338a 100644 --- a/translations/Internationalization_zh_TW.ts +++ b/translations/Internationalization_zh_TW.ts @@ -125,12 +125,12 @@ CaptureWidget - + Unable to capture screen 無法擷取螢幕 - + Select an area with the mouse, or press Esc to exit. Press Enter to capture the screen. Press Right Click to show the color picker. @@ -155,32 +155,27 @@ Press Space to open the side panel. ConfigWindow - + Configuration 設定 - + Interface 介面 - + Filename Editor 檔案名稱編輯器 - + Shortcuts - - Path Default - - - - + General 一般 @@ -331,152 +326,167 @@ Press Space to open the side panel. GeneneralConf - + Show help message 顯示説明資訊 - + Show the help message at the beginning in the capture mode. 在擷取之前顯示説明資訊 - - + + Show desktop notifications 顯示桌面通知 - + Show tray icon 顯示託盤圖示 - + Show the systemtray icon 顯示工作列圖示 - - + + Import 匯入 - - - + + + Error 錯誤 - + Unable to read file. 無法讀取檔案 - - + + Unable to write file. 無法寫入檔案 - + Save File 存檔 - + Confirm Reset 確認重設 - + Are you sure you want to reset the configuration? 你確定你想要重設? - + Configuration File 設定檔 - + Export 匯出 - + Reset 重設 - + Launch at startup 自動啟動 - - + + Launch Flameshot - + Show welcome message on launch - + Close application after capture - + Close after taking a screenshot - + Copy URL after upload - + Copy URL and close window after upload - - + + Copy file path after save + + + Upload storage + + + + + Imgur storage + + + + + S3 storage (require config.ini file with s3 credentials) + + HistoryWidget - + Latest Uploads - + Screenshots history is empty - + Copy URL 複製連結 - + URL copied to clipboard. 連結已複製到剪貼簿 - + Open in browser @@ -484,42 +494,42 @@ Press Space to open the side panel. ImgS3Uploader - + Uploading Image 正在上傳 - + Upload image to S3 - + Delete image from S3 - + Unable to remove screenshot from the remote storage. - + Network error - + Possibly it doesn't exist anymore - + Do you want to remove screenshot from local history anyway? - + S3 Creds URL is not found in your configuration file @@ -540,17 +550,17 @@ Press Space to open the side panel. 無法打開此連結 - + URL copied to clipboard. 連結已複製到剪貼簿 - + Deleting image... - + Remove screenshot from history? @@ -562,12 +572,12 @@ Press Space to open the side panel. ImgS3UploaderTool - + Image Uploader 上傳圖片 - + Upload the selection to S3 bucket @@ -591,42 +601,42 @@ Press Space to open the side panel. - + Unable to open the URL. 無法打開此連結 - + URL copied to clipboard. 連結已複製到剪貼簿 - + Screenshot copied to clipboard. 截圖已複製到剪貼簿 - + Deleting image... - + Copy URL 複製連結 - + Open URL 打開連結 - + Delete image - + Image to Clipboard. 將檔案複製到剪貼簿 @@ -634,61 +644,49 @@ Press Space to open the side panel. ImgurUploader - + Upload to Imgur 上傳到 Imgur - Uploading Image - 正在上傳 + 正在上傳 - Copy URL - 複製連結 + 複製連結 - Open URL - 打開連結 + 打開連結 - - Delete image - - - - Image to Clipboard. - 將檔案複製到剪貼簿 + 將檔案複製到剪貼簿 - - + Unable to open the URL. 無法打開此連結 - URL copied to clipboard. - 連結已複製到剪貼簿 + 連結已複製到剪貼簿 - Screenshot copied to clipboard. - 截圖已複製到剪貼簿 + 截圖已複製到剪貼簿 ImgurUploaderTool - + Image Uploader 上傳圖片 - + Upload the selection to Imgur 上傳到 Imgur @@ -886,7 +884,7 @@ Press Space to open the side panel. 無法寫入 - + URL copied to clipboard. 連結已複製到剪貼簿