diff --git a/ProfileInterface.cpp b/ProfileInterface.cpp
index daf2eb4..b7db28f 100755
--- a/ProfileInterface.cpp
+++ b/ProfileInterface.cpp
@@ -155,7 +155,12 @@ void ProfileInterface::profileLoaded_p()
void ProfileInterface::savegameDeleted()
{
- SavegameWidget *sgdWidget = (SavegameWidget*)sender();
+ savegameDeleted_f((SavegameWidget*)sender());
+}
+
+void ProfileInterface::savegameDeleted_f(QWidget *sgdWidget_)
+{
+ SavegameWidget *sgdWidget = (SavegameWidget*)sgdWidget_;
SavegameData *savegame = sgdWidget->getSavegame();
if (sgdWidget->isSelected()) { sgdWidget->setSelected(false); }
sgdWidget->close();
@@ -165,7 +170,12 @@ void ProfileInterface::savegameDeleted()
void ProfileInterface::pictureDeleted()
{
- SnapmaticWidget *picWidget = (SnapmaticWidget*)sender();
+ pictureDeleted_f((SnapmaticWidget*)sender());
+}
+
+void ProfileInterface::pictureDeleted_f(QWidget *picWidget_)
+{
+ SnapmaticWidget *picWidget = (SnapmaticWidget*)picWidget_;
SnapmaticPicture *picture = picWidget->getPicture();
if (picWidget->isSelected()) { picWidget->setSelected(false); }
picWidget->close();
@@ -505,5 +515,37 @@ void ProfileInterface::exportSelected()
void ProfileInterface::deleteSelected()
{
-
+ if (QMessageBox::Yes == QMessageBox::warning(this, tr("Delete selected"), tr("You really want delete the selected content?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No))
+ {
+ foreach (ProfileWidget *widget, widgets.keys())
+ {
+ if (widget->isSelected())
+ {
+ if (widgets[widget] == "SnapmaticWidget")
+ {
+ SnapmaticWidget *picWidget = (SnapmaticWidget*)widget;
+ SnapmaticPicture *picture = picWidget->getPicture();
+ QString fileName = picture->getPictureFileName();
+ if (!QFile::exists(fileName) || QFile::remove(fileName))
+ {
+ pictureDeleted_f(picWidget);
+ }
+ }
+ else if (widgets[widget] == "SavegameWidget")
+ {
+ SavegameWidget *sgdWidget = (SavegameWidget*)widget;
+ SavegameData *savegame = sgdWidget->getSavegame();
+ QString fileName = savegame->getSavegameFileName();
+ if (!QFile::exists(fileName) || QFile::remove(fileName))
+ {
+ savegameDeleted_f(sgdWidget);
+ }
+ }
+ }
+ }
+ if (selectedWidgts != 0)
+ {
+ QMessageBox::warning(this, tr("Delete selected"), tr("Failed at delete all selected content"));
+ }
+ }
}
diff --git a/ProfileInterface.h b/ProfileInterface.h
index 868c916..5001be5 100755
--- a/ProfileInterface.h
+++ b/ProfileInterface.h
@@ -23,6 +23,7 @@
#include "SnapmaticWidget.h"
#include "ProfileDatabase.h"
#include "DatabaseThread.h"
+#include "SavegameWidget.h"
#include "ProfileLoader.h"
#include "ProfileWidget.h"
#include "ExportThread.h"
@@ -83,6 +84,8 @@ private:
bool importSnapmaticPicture(SnapmaticPicture *picture, QString picPath);
bool importSavegameData(SavegameData *savegame, QString sgdPath);
+ void savegameDeleted_f(QWidget *sgdWidget);
+ void pictureDeleted_f(QWidget *picWidget);
signals:
void profileLoaded();
diff --git a/lang/gta5sync_ru.ts b/lang/gta5sync_ru.ts
index b1e91c3..99e36ca 100755
--- a/lang/gta5sync_ru.ts
+++ b/lang/gta5sync_ru.ts
@@ -163,16 +163,16 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
Импортировать копию
@@ -187,118 +187,134 @@
Загрузка...
-
+
Все файлы профиля (SGTA* PGTA*)
-
+
Файлы сохранения (SGTA*)
-
+
Картинка Snapmatic (PGTA*)
-
+
Все файлы (**)
-
+
Не удалось загрузить картинку Snapmatic
-
+
Не удалось загрузить файл сохранения
-
+
Не получилось импортировать %1 из-за неправильного формата файла
-
-
+
+
Выбранный файл неверен
-
+
Не удалось имортировать копию картинки Snapmatic, т.к. файл не начинается с PGTA
-
+
Не получилось имортировать копию картинки Snapmatic, потому что не удалось его скопировать
-
+
Не получилось имортировать копию сохранения, потому что не удалось его скопировать
-
+
Не получилось имортировать копию сохранения, потому что не осталось свободных под них слотов
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/res/gta5sync_de.qm b/res/gta5sync_de.qm
index 3a8b7ee..f5d16d2 100755
Binary files a/res/gta5sync_de.qm and b/res/gta5sync_de.qm differ
diff --git a/res/gta5sync_de.ts b/res/gta5sync_de.ts
index 5f54c42..df7b213 100755
--- a/res/gta5sync_de.ts
+++ b/res/gta5sync_de.ts
@@ -198,16 +198,16 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
Kopie importieren
@@ -230,118 +230,134 @@
Lade...
-
+
Alle Profildateien (SGTA* PGTA*)
-
+
Spielstanddateien (SGTA*)
-
+
Snapmatic Bilder (PGTA*)
-
+
Alle Dateien (**)
-
+
Fehler beim Lesen vom Snapmatic Bild
-
+
Fehler beim Lesen von Spielstanddatei
-
+
Kann %1 nicht importieren weil das Dateiformat nicht gültig ist
-
-
+
+
Keine gültige Datei wurde ausgewählt
-
+
Fehlgeschlagenen beim Import vom Snapmatic Bild weil die Datei nicht mit PGTA begint
-
+
Fehlgeschlagenen beim Import vom Snapmatic Bild weil kopieren fehlgeschlagen ist
-
+
Fehlgeschlagenen beim Import vom Spielstand weil kopieren fehlgeschlagen ist
-
+
Fehlgeschlagenen beim Import vom Spielstand weil kein Spielstandslot mehr übrig ist
-
-
-
+
+
+
Auswahl exportieren
-
-
+
+
Bilder exportieren und kopieren
-
-
+
+
Bilder exportieren
-
-
+
+
Bilder kopieren
-
+
Wie sollen wir mit den Snapmatic Bilder umgehen?
-
+
Auswahl exportieren...
-
+
Initialisierung...
-
+
Exportieren fehlgeschlagen bei...\n%1
+
+
+
+
+ Auswahl löschen
+
+
+
+
+ Möchtest du wirklich den ausgewählten Inhalt löschen?
+
+
+
+
+ Fehlgeschlagen beim Löschen von alle ausgewählte Inhalte
+
-
+
Aktueller Exportiervorgang: %1