diff --git a/UserInterface.cpp b/UserInterface.cpp index 08309c5..100a660 100644 --- a/UserInterface.cpp +++ b/UserInterface.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -47,15 +46,22 @@ #include #include +#ifdef GTA5SYNC_DONATE +#ifdef GTA5SYNC_DONATE_ADDRESSES +#include +#include +#endif +#endif + #ifdef GTA5SYNC_MOTD UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, DatabaseThread *threadDB, MessageThread *threadMessage, QWidget *parent) : QMainWindow(parent), profileDB(profileDB), crewDB(crewDB), threadDB(threadDB), threadMessage(threadMessage), ui(new Ui::UserInterface) - #else +#else UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, DatabaseThread *threadDB, QWidget *parent) : QMainWindow(parent), profileDB(profileDB), crewDB(crewDB), threadDB(threadDB), ui(new Ui::UserInterface) - #endif +#endif { ui->setupUi(this); contentMode = 0; @@ -163,6 +169,9 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D else if (QIcon::hasThemeIcon("taxes-finances")) { donateAction->setIcon(QIcon::fromTheme("taxes-finances")); } + else { + donateAction->setIcon(QIcon(":/img/donate.svgz")); + } ui->menuHelp->insertAction(ui->actionAbout_gta5sync, donateAction); QObject::connect(donateAction, &QAction::triggered, this, [=](){ QDialog *donateDialog = new QDialog(this); @@ -174,7 +183,7 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D #endif QVBoxLayout *donateLayout = new QVBoxLayout; donateDialog->setLayout(donateLayout); - QLabel *methodsLabel = new QLabel(QString("%1").arg(tr("Donation methods")), this); + QLabel *methodsLabel = new QLabel(QString("%1").arg(tr("Donation methods").toHtmlEscaped()), this); methodsLabel->setWordWrap(true); donateLayout->addWidget(methodsLabel); const QStringList addressList = QString::fromUtf8(GTA5SYNC_DONATE_ADDRESSES).split(','); @@ -192,14 +201,17 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D currencyLabel->setPixmap(QIcon(iconPath).pixmap(QSize(32, 32))); addressLayout->addWidget(currencyLabel); } - else { - QLabel *currencyLabel = new QLabel(QString("%1").arg(currency.toUpper()), this); - addressLayout->addWidget(currencyLabel); - } + QLabel *currencyLabel = new QLabel(currency, this); + currencyLabel->setTextFormat(Qt::PlainText); + QFont currencyFont = QFontDatabase::systemFont(QFontDatabase::FixedFont); + currencyFont.setWeight(QFont::Bold); + currencyFont.setCapitalization(QFont::AllUppercase); + currencyLabel->setFont(currencyFont); + addressLayout->addWidget(currencyLabel); QLabel *addressLabel = new QLabel(address, this); addressLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - addressLabel->setTextFormat(Qt::PlainText); addressLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); + addressLabel->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); addressLabel->setWordWrap(true); addressLayout->addWidget(addressLabel); QPushButton *addressButton = new QPushButton(tr("Copy"), this); @@ -210,6 +222,7 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D donateLayout->addLayout(addressLayout); } } + donateLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)); QHBoxLayout *buttonLayout = new QHBoxLayout; buttonLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum)); QPushButton *closeButton = new QPushButton(donateDialog); diff --git a/res/donate.qrc b/res/donate.qrc index 8d652ab..c55ed1a 100644 --- a/res/donate.qrc +++ b/res/donate.qrc @@ -6,4 +6,7 @@ xmr.svgz zec.svgz + + donate.svgz + diff --git a/res/donate.svgz b/res/donate.svgz new file mode 100644 index 0000000..7419da7 Binary files /dev/null and b/res/donate.svgz differ diff --git a/res/gta5sync.ts b/res/gta5sync.ts index a4ea808..ccaafa2 100644 --- a/res/gta5sync.ts +++ b/res/gta5sync.ts @@ -1341,7 +1341,7 @@ Press 1 for Default View - + All files (**) @@ -1386,26 +1386,26 @@ Press 1 for Default View - + GTA V Export (*.g5e) - + Savegames files (SGTA*) - + Snapmatic pictures (PGTA*) - + No valid file is selected @@ -1424,13 +1424,13 @@ Press 1 for Default View - + Failed to read Snapmatic picture - + Failed to read Savegame file @@ -1640,7 +1640,7 @@ Press 1 for Default View - + All profile files (*.g5e SGTA* PGTA*) @@ -2259,7 +2259,7 @@ Press 1 for Default View UserInterface - + %2 - %1 @@ -2291,8 +2291,8 @@ Press 1 for Default View - - + + &Close @@ -2328,8 +2328,8 @@ Press 1 for Default View - - + + &About %1 @@ -2385,15 +2385,15 @@ Press 1 for Default View - + Select &GTA V Folder... - - + + Select GTA V Folder... @@ -2450,53 +2450,53 @@ Press 1 for Default View - - - + + + Select Profile - - + + &Donate - + Donate - + Donation methods - + Copy - + Open File... - - - - + + + + Open File - + Can't open %1 because of not valid file format - + %1 - Messages diff --git a/res/gta5sync_de.ts b/res/gta5sync_de.ts index 3eea13d..3220946 100644 --- a/res/gta5sync_de.ts +++ b/res/gta5sync_de.ts @@ -1379,13 +1379,13 @@ Drücke 1 für Standardmodus - + Savegames files (SGTA*) Spielstanddateien (SGTA*) - + Snapmatic pictures (PGTA*) Snapmatic Bilder (PGTA*) @@ -1405,7 +1405,7 @@ Drücke 1 für Standardmodus - + All files (**) Alle Dateien (**) @@ -1426,13 +1426,13 @@ Drücke 1 für Standardmodus - + Failed to read Snapmatic picture Fehler beim Lesen vom Snapmatic Bild - + Failed to read Savegame file Fehler beim Lesen von Spielstanddatei @@ -1473,7 +1473,7 @@ Drücke 1 für Standardmodus - + No valid file is selected Keine gültige Datei wurde ausgewählt @@ -1677,13 +1677,13 @@ Drücke 1 für Standardmodus Exportiere Datei %1 von %2 Dateien - + All profile files (*.g5e SGTA* PGTA*) Alle Profildateien (*.g5e SGTA* PGTA*) - + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -2410,7 +2410,7 @@ Drücke 1 für Standardmodus - + Select &GTA V Folder... Wähle &GTA V Ordner... @@ -2426,8 +2426,8 @@ Drücke 1 für Standardmodus - - + + &Close S&chließen @@ -2462,74 +2462,74 @@ Drücke 1 für Standardmodus Dateien &importieren... - - - + + + Select Profile Profil auswählen - - + + Select GTA V Folder... Wähle GTA V Ordner... - + Open File... Datei öffnen... - + %2 - %1 %2 - %1 - - + + &About %1 &Über %1 - - + + &Donate Spen&den - + Donate Spenden - + Donation methods Spendenmethoden - + Copy Kopieren - - - - + + + + Open File Datei öffnen - + Can't open %1 because of not valid file format Kann nicht %1 öffnen weil Dateiformat nicht gültig ist - + %1 - Messages %1 - Nachrichten diff --git a/res/gta5sync_en_US.ts b/res/gta5sync_en_US.ts index 93ca28d..dffa057 100644 --- a/res/gta5sync_en_US.ts +++ b/res/gta5sync_en_US.ts @@ -1357,19 +1357,19 @@ Press 1 for Default View - + GTA V Export (*.g5e) - + Savegames files (SGTA*) - + Snapmatic pictures (PGTA*) @@ -1384,14 +1384,14 @@ Press 1 for Default View - + All files (**) - + No valid file is selected @@ -1410,13 +1410,13 @@ Press 1 for Default View - + Failed to read Snapmatic picture - + Failed to read Savegame file @@ -1640,7 +1640,7 @@ Press 1 for Default View - + All profile files (*.g5e SGTA* PGTA*) @@ -2259,7 +2259,7 @@ Press 1 for Default View UserInterface - + %2 - %1 @@ -2291,8 +2291,8 @@ Press 1 for Default View - - + + &Close @@ -2323,8 +2323,8 @@ Press 1 for Default View - - + + &About %1 @@ -2380,15 +2380,15 @@ Press 1 for Default View - + Select &GTA V Folder... - - + + Select GTA V Folder... @@ -2436,53 +2436,53 @@ Press 1 for Default View - - - + + + Select Profile - - + + &Donate - + Donate - + Donation methods - + Copy - + Open File... - - - - + + + + Open File - + Can't open %1 because of not valid file format - + %1 - Messages diff --git a/res/gta5sync_fr.ts b/res/gta5sync_fr.ts index 2b8df9e..a8a2274 100644 --- a/res/gta5sync_fr.ts +++ b/res/gta5sync_fr.ts @@ -1391,13 +1391,13 @@ Appuyer sur 1 pour le mode par défaut - + Savegames files (SGTA*) Fichiers de sauvegarde GTA (SGTA*) - + Snapmatic pictures (PGTA*) Photos Snapmatic (PGTA*) @@ -1412,7 +1412,7 @@ Appuyer sur 1 pour le mode par défaut - + All files (**) Tous les fichiers (**) @@ -1434,7 +1434,7 @@ Appuyer sur 1 pour le mode par défaut - + No valid file is selected Fichier invalide @@ -1445,13 +1445,13 @@ Appuyer sur 1 pour le mode par défaut - + Failed to read Snapmatic picture Impossible d'ouvrir la photo Snapmatic - + Failed to read Savegame file Impossible de lire le fichier de sauvegarde @@ -1679,13 +1679,13 @@ Appuyer sur 1 pour le mode par défaut Supprimer la sélection ? - + All profile files (*.g5e SGTA* PGTA*) Tous les fichiers de profil (*.g5e SGTA* PGTA*) - + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -2349,8 +2349,8 @@ Appuyer sur 1 pour le mode par défaut - - + + &Close Fer&mer @@ -2426,15 +2426,15 @@ Appuyer sur 1 pour le mode par défaut - + Select &GTA V Folder... Modifier l'emplacement de &GTA V... - - + + Select GTA V Folder... Modifier l'emplacement de GTA V... @@ -2488,42 +2488,42 @@ Appuyer sur 1 pour le mode par défaut - + %2 - %1 %2 - %1 - - + + &About %1 &À propos de %1 - - - + + + Select Profile Sélectionner un profil - - + + &Donate - + Donate - + Donation methods - + Copy Copier @@ -2532,25 +2532,25 @@ Appuyer sur 1 pour le mode par défaut &Copier - + Open File... Ouvrir... - - - - + + + + Open File Ouvrir - + Can't open %1 because of not valid file format Impossible d'ouvrir %1, format invalide - + %1 - Messages %1 - Nouvelles diff --git a/res/gta5sync_ko.ts b/res/gta5sync_ko.ts index b3687a1..1a28e35 100644 --- a/res/gta5sync_ko.ts +++ b/res/gta5sync_ko.ts @@ -1393,7 +1393,7 @@ Press 1 for Default View - + All files (**) 모든 파일 (**) @@ -1438,26 +1438,26 @@ Press 1 for Default View - + GTA V Export (*.g5e) GTA V로 내보내기 (*.g5e) - + Savegames files (SGTA*) 세이브 파일 (SGTA*) - + Snapmatic pictures (PGTA*) 스냅매틱 이미지 (PGTA*) - + No valid file is selected 올바른 파일이 선택되지 않았습니다. @@ -1478,13 +1478,13 @@ Press 1 for Default View - + Failed to read Snapmatic picture 스냅매틱 이미지를 읽지 못했습니다. - + Failed to read Savegame file 세이브 파일을 읽지 못했습니다. @@ -1703,7 +1703,7 @@ Press 1 for Default View 제목 변경 - + All profile files (*.g5e SGTA* PGTA*) 모든 프로필 파일 (*.g5e SGTA* PGTA*) @@ -2344,7 +2344,7 @@ Press 1 for Default View UserInterface - + %2 - %1 %2 - %1 @@ -2377,8 +2377,8 @@ Press 1 for Default View - - + + &Close 닫기(&C) @@ -2414,8 +2414,8 @@ Press 1 for Default View - - + + &About %1 %1 정보(&A) @@ -2471,15 +2471,15 @@ Press 1 for Default View - + Select &GTA V Folder... GTA V 폴더 선택(&G) - - + + Select GTA V Folder... GTA V 폴더 선택 @@ -2536,30 +2536,30 @@ Press 1 for Default View 인게임 숨기기 - - - + + + Select Profile 프로필 선택 - - + + &Donate - + Donate - + Donation methods - + Copy 복사 @@ -2568,25 +2568,25 @@ Press 1 for Default View 복사(&C) - + Open File... 파일 열기... - - - - + + + + Open File 파일 열기 - + Can't open %1 because of not valid file format 올바른 파일 형식이 아니므로 %1을 열 수 없습니다. - + %1 - Messages %1 - 뉴스 diff --git a/res/gta5sync_ru.ts b/res/gta5sync_ru.ts index efa7ff8..b60e65f 100644 --- a/res/gta5sync_ru.ts +++ b/res/gta5sync_ru.ts @@ -1391,13 +1391,13 @@ Press 1 for Default View - + Savegames files (SGTA*) Файлы сохранения (SGTA*) - + Snapmatic pictures (PGTA*) Картинка Snapmatic (PGTA*) @@ -1405,7 +1405,7 @@ Press 1 for Default View - + All files (**) Все файлы (**) @@ -1426,20 +1426,20 @@ Press 1 for Default View - + Failed to read Snapmatic picture Не удалось загрузить картинку Snapmatic - + Failed to read Savegame file Не удалось загрузить файл сохранения - + No valid file is selected Выбранный файл неверен @@ -1692,13 +1692,13 @@ Press 1 for Default View Экспортируется файл %1 из %2 - + All profile files (*.g5e SGTA* PGTA*) Все файлы профиля (*.g5e SGTA* PGTA*) - + GTA V Export (*.g5e) GTA V Export (*.g5e) @@ -2392,7 +2392,7 @@ Press 1 for Default View - + Select &GTA V Folder... Выбрать &папку GTA V... @@ -2436,8 +2436,8 @@ Press 1 for Default View - - + + &Close &Закрыть @@ -2477,46 +2477,46 @@ Press 1 for Default View &Открыть файл... - - - + + + Select Profile Выбор профиля - - + + Select GTA V Folder... Выбрать папку GTA V... - + %2 - %1 %2 - %1 - - + + &About %1 &О программе %1 - - + + &Donate - + Donate - + Donation methods @@ -2525,30 +2525,30 @@ Press 1 for Default View &Копировать - + Copy Копировать - + Open File... Открыть файл... - - - - + + + + Open File Открыть файл - + Can't open %1 because of not valid file format Не удалось открыть %1 из-за неверного формата файла - + %1 - Messages %1 - Новости diff --git a/res/gta5sync_uk.ts b/res/gta5sync_uk.ts index 5131e43..ea3530a 100644 --- a/res/gta5sync_uk.ts +++ b/res/gta5sync_uk.ts @@ -1383,7 +1383,7 @@ Press 1 for Default View - + All files (**) Усі файли (**) @@ -1428,26 +1428,26 @@ Press 1 for Default View - + GTA V Export (*.g5e) GTA V Export (*.g5e) - + Savegames files (SGTA*) Файли збереження гри (SGTA*) - + Snapmatic pictures (PGTA*) Snapmatic зображення (PGTA*) - + No valid file is selected Вибрані недійсні файли @@ -1468,13 +1468,13 @@ Press 1 for Default View - + Failed to read Snapmatic picture Не вдалося прочитати Snapmatic картинку - + Failed to read Savegame file Не вдалося прочитати файл збереження гри @@ -1688,7 +1688,7 @@ Press 1 for Default View Змінити назву - + All profile files (*.g5e SGTA* PGTA*) Усі файли зображень (*.g5e SGTA* PGTA*) @@ -2325,7 +2325,7 @@ Press 1 for Default View UserInterface - + %2 - %1 %2 - %1 @@ -2357,8 +2357,8 @@ Press 1 for Default View - - + + &Close &Закрити @@ -2394,8 +2394,8 @@ Press 1 for Default View - - + + &About %1 &Про %1 @@ -2451,15 +2451,15 @@ Press 1 for Default View - + Select &GTA V Folder... Вибрати &GTA V теку... - - + + Select GTA V Folder... Вибрати GTA V теку... @@ -2516,30 +2516,30 @@ Press 1 for Default View Сховати у грі - - - + + + Select Profile Вибрати профіль - - + + &Donate - + Donate - + Donation methods - + Copy Копіювати @@ -2548,25 +2548,25 @@ Press 1 for Default View &Копіювати - + Open File... Відкрити файл... - - - - + + + + Open File Відкрити файл - + Can't open %1 because of not valid file format Неможливо відкрити %1 через невідомий формат файлу - + %1 - Messages %1 - Новини diff --git a/res/gta5sync_zh_TW.ts b/res/gta5sync_zh_TW.ts index 3972ac1..9860653 100644 --- a/res/gta5sync_zh_TW.ts +++ b/res/gta5sync_zh_TW.ts @@ -1377,7 +1377,7 @@ Press 1 for Default View - + All files (**) 所有檔案 (**) @@ -1422,26 +1422,26 @@ Press 1 for Default View - + GTA V Export (*.g5e) GTA V Export (*.g5e) - + Savegames files (SGTA*) 遊戲存檔 (SGTA*) - + Snapmatic pictures (PGTA*) Snapmatic 圖片 (PGTA*) - + No valid file is selected 沒有選擇有效的檔案 @@ -1460,13 +1460,13 @@ Press 1 for Default View - + Failed to read Snapmatic picture 無法讀取 Snapmatic 圖片 - + Failed to read Savegame file 無法讀取遊戲存檔 @@ -1678,7 +1678,7 @@ Press 1 for Default View 更改標題 - + All profile files (*.g5e SGTA* PGTA*) 所有設定檔檔案 (*.g5e SGTA* PGTA*) @@ -2306,7 +2306,7 @@ Press 1 for Default View UserInterface - + %2 - %1 %2 - %1 @@ -2338,8 +2338,8 @@ Press 1 for Default View - - + + &Close 關閉(&C) @@ -2375,8 +2375,8 @@ Press 1 for Default View - - + + &About %1 關於 %1(&A) @@ -2432,15 +2432,15 @@ Press 1 for Default View - + Select &GTA V Folder... 選擇 GTA V 資料夾(&G)... - - + + Select GTA V Folder... 選擇 GTA V 資料夾... @@ -2497,30 +2497,30 @@ Press 1 for Default View 在遊戲中隱藏 - - - + + + Select Profile 選擇設定檔 - - + + &Donate 贊助(&D) - + Donate 贊助 - + Donation methods 贊助方式 - + Copy 複製 @@ -2529,25 +2529,25 @@ Press 1 for Default View 複製(&C) - + Open File... 開啟檔案... - - - - + + + + Open File 開啟檔案 - + Can't open %1 because of not valid file format 格式無效,無法開啟 %1 - + %1 - Messages %1 - 新聞