Ability to lock switching between s3 and imgur and use s3 only
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "uploadstorageconfig.h"
|
||||
#include "src/tools/storage/imgstorages.h"
|
||||
#include "src/tools/storage/storagemanager.h"
|
||||
#include "src/utils/confighandler.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
@@ -46,6 +47,13 @@ UploadStorageConfig::UploadStorageConfig(QWidget* parent)
|
||||
ConfigHandler().setUploadStorage(SCREENSHOT_STORAGE_TYPE_S3);
|
||||
});
|
||||
|
||||
StorageManager storageManager;
|
||||
if (storageManager.storageLocked()) {
|
||||
ConfigHandler().setUploadStorage(storageManager.storageDefault());
|
||||
storageImgUr->setDisabled(true);
|
||||
storageImgS3->setDisabled(true);
|
||||
}
|
||||
|
||||
// set current storage radiobutton active
|
||||
if (ConfigHandler().uploadStorage() == SCREENSHOT_STORAGE_TYPE_IMGUR) {
|
||||
storageImgUr->setChecked(true);
|
||||
|
||||
Reference in New Issue
Block a user