Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified FusionLang_de.qm
Binary file not shown.
63 changes: 39 additions & 24 deletions FusionLang_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
</message>
<message>
<location filename="fsettingsdialog.ui" line="276"/>
<location filename="fsettingsdialog.ui" line="566"/>
<location filename="fsettingsdialog.ui" line="600"/>
<source>...</source>
<translation>...</translation>
</message>
Expand Down Expand Up @@ -203,7 +203,17 @@
<translation>...</translation>
</message>
<message>
<location filename="fsettingsdialog.ui" line="583"/>
<location filename="fsettingsdialog.ui" line="563"/>
<source>Delete Logfiles</source>
<translation>Lösche Logfiles</translation>
</message>
<message>
<location filename="fsettingsdialog.ui" line="570"/>
<source>Open Folder</source>
<translation>Öffne Log-Ordner</translation>
</message>
<message>
<location filename="fsettingsdialog.ui" line="617"/>
<source>To enable Syncing, select the Savegame-Folder in the Settings Dialog in each game, and a synced Directory here - for Example an Dropbox or OwnCloud folder.

Fusion will then keep these Directorys up to date by overriding the old data.
Expand Down Expand Up @@ -245,13 +255,13 @@ $GAMEPATH Pfad zum Spiel
$GAMEEXE Name des Ausführbaren Datei, relativ zu $GAMEPATH</translation>
</message>
<message>
<location filename="fsettingsdialog.ui" line="573"/>
<location filename="fsettingsdialog.ui" line="607"/>
<source>Local saved Backups:</source>
<translation>Anzahl Backups:</translation>
</message>
<message>
<location filename="fsettingsdialog.ui" line="553"/>
<location filename="fsettingsdialog.cpp" line="215"/>
<location filename="fsettingsdialog.ui" line="587"/>
<location filename="fsettingsdialog.cpp" line="267"/>
<source>Target-Dir</source>
<translation>Ziel-Verzeichnis</translation>
</message>
Expand Down Expand Up @@ -286,77 +296,82 @@ $GAMEEXE Name des Ausführbaren Datei, relativ zu $GAMEPATH</translation>
<translation>Launcher</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="100"/>
<location filename="fsettingsdialog.cpp" line="24"/>
<source>Logfiles</source>
<translation>Logfiles</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="152"/>
<source>Choose stylesheet</source>
<translation>Wähle Stylesheet</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="153"/>
<location filename="fsettingsdialog.cpp" line="158"/>
<location filename="fsettingsdialog.cpp" line="168"/>
<location filename="fsettingsdialog.cpp" line="205"/>
<location filename="fsettingsdialog.cpp" line="210"/>
<location filename="fsettingsdialog.cpp" line="220"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="153"/>
<location filename="fsettingsdialog.cpp" line="205"/>
<source>Please set a name.</source>
<translation>Bitte Namen angeben.</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="158"/>
<location filename="fsettingsdialog.cpp" line="210"/>
<source>Please set a path.</source>
<translation>Bitte Pfad angeben</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="168"/>
<location filename="fsettingsdialog.cpp" line="220"/>
<source>This name already exists!</source>
<translation>Dieser Name existiert bereits!</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="189"/>
<location filename="fsettingsdialog.cpp" line="241"/>
<source>Choose launcher</source>
<translation>Wähle Launcher</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="236"/>
<location filename="fsettingsdialog.cpp" line="270"/>
<location filename="fsettingsdialog.cpp" line="288"/>
<location filename="fsettingsdialog.cpp" line="322"/>
<source>Please confirm!</source>
<translation>Bitte bestätigen!</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="236"/>
<location filename="fsettingsdialog.cpp" line="288"/>
<source>If artwork is found, existing artwork will be overwritten!</source>
<translation>Wird Artwork gefunden, werden vorhandene Grafiken ersetzt!</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="256"/>
<location filename="fsettingsdialog.cpp" line="308"/>
<source>Choose the library folder</source>
<translation>Wähle einen Ordner</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="270"/>
<location filename="fsettingsdialog.cpp" line="322"/>
<source>Do you really want to remove</source>
<translation>Willst du folgenden Pfad wirklich entfernen?
</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="270"/>
<location filename="fsettingsdialog.cpp" line="322"/>
<source>The games inside won&apos;t be removed from your disk.</source>
<translation>Die Spiele im Ordner werden nicht entfernt</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="292"/>
<location filename="fsettingsdialog.cpp" line="300"/>
<location filename="fsettingsdialog.cpp" line="342"/>
<location filename="fsettingsdialog.cpp" line="350"/>
<source>Running downloads:</source>
<translation>Laufende Downloads:</translation>
</message>
<message>
<location filename="fsettingsdialog.cpp" line="294"/>
<location filename="fsettingsdialog.cpp" line="344"/>
<source>Downloads finished</source>
<translation>Downloads beendet</translation>
</message>
<message numerus="yes">
<location filename="fsettingsdialog.cpp" line="294"/>
<location filename="fsettingsdialog.cpp" line="344"/>
<source>Finished %n download(s)</source>
<translation>
<numerusform>%n Download beendet</numerusform>
Expand Down Expand Up @@ -543,7 +558,7 @@ Game</source>
<message>
<location filename="mainwindow.ui" line="232"/>
<source>LIBRARY</source>
<translation>LIBRARY</translation>
<translation type="unfinished">BIBLIOTHEK</translation>
</message>
<message>
<location filename="mainwindow.ui" line="400"/>
Expand Down
17 changes: 17 additions & 0 deletions addgamedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "ui_addgamedialog.h"
#include "fgame.h"
#include <QFileDialog>
#include <QMessageBox>
#include "fdb.h"
#include "flauncher.h"

Expand Down Expand Up @@ -56,6 +57,22 @@ void AddGameDialog::on_chooseGameExecutableButton_clicked()
void AddGameDialog::on_buttonBox_accepted()
{
game.setName(ui->gameNameEdit->text());

if(game.getName().length() <= 0) {
QMessageBox::warning(this, "Please fill all fields!", "You have to fill the name-field!", QMessageBox::Ok);
return;
}

if(game.getExe().length() <= 0) {
QMessageBox::warning(this, "Please fill all fields!", "You have to set an executable!", QMessageBox::Ok);
return;
}

if(game.getPath().length() <= 0) {
QMessageBox::warning(this, "Please fill all fields!", "You have to set a path!", QMessageBox::Ok);
return;
}

game.setCommand(ui->gameCommandEdit->text());
game.setArgs(QStringList(ui->gameArgsEdit->text()));
game.setType(Executable);
Expand Down
55 changes: 52 additions & 3 deletions fsettingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ FSettingsDialog::FSettingsDialog(FDB *db, QWidget *parent) :
ui->listWidget->addItem(tr("Artwork"));
ui->listWidget->addItem(tr("Watched Folders"));
ui->listWidget->addItem(tr("Launchers"));
ui->listWidget->addItem(tr("Logfiles"));
// ui->listWidget->addItem(tr("Savegame-Sync"));
ui->listWidget->setCurrentRow(0);

Expand All @@ -40,7 +41,7 @@ FSettingsDialog::FSettingsDialog(FDB *db, QWidget *parent) :
ui->cb_int_language->setCurrentIndex(idx);
#endif

//##########################
//=================================
//WatchedFolders
QList<FWatchedFolder> tmpList = db->getWatchedFoldersList();
ui->lw_Folder_FolderList->clear();
Expand All @@ -50,13 +51,13 @@ FSettingsDialog::FSettingsDialog(FDB *db, QWidget *parent) :
ui->lw_Folder_FolderList->addItem(tmpList[i].getDirectory().absolutePath());
}

//##########################
//=================================
// LAUNCHERS

loadLaunchers();


//##########################
//=================================
//Savegame-Sync
ui->le_sync_path->setText(db->getTextPref("sync_target", ""));
ui->sb_sync_backups->setValue(db->getIntPref("sync_No_of_Backups", 0));
Expand All @@ -66,6 +67,47 @@ FSettingsDialog::FSettingsDialog(FDB *db, QWidget *parent) :
ui->cb_gen_useTrayIcon->setChecked(db->getBoolPref("useTrayIcon", true));


//=================================
// Log-Files
loadLogfiles();

}

void FSettingsDialog::loadLogfiles() {
ui->lw_log_logfiles->clear();

QDir logDir = LibFusion::getWorkingDir().absolutePath() + QDir::separator() + "Logs";
QStringList logfiles = logDir.entryList();
for(QString log : logfiles) {
if(log.length()>3) //do skip "." and ".." and other wrong stuff
ui->lw_log_logfiles->addItem(log);
}


}

void FSettingsDialog::on_pb_log_openFolder_clicked()
{

QDir logDir = LibFusion::getWorkingDir().absolutePath() + QDir::separator() + "Logs";
QDesktopServices::openUrl(logDir.absolutePath());
}

void FSettingsDialog::on_pb_log_clear_clicked()
{
if(QMessageBox::question(this, "Please Confirm", "Do you really want to delete all Logfiles?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
return;

QDir logDir = LibFusion::getWorkingDir().absolutePath() + QDir::separator() + "Logs";
QStringList logfiles = logDir.entryList();
for(QString log : logfiles) {
if(log.length()>3) //do skip "." and ".." and other wrong stuff
{
QFile::remove(logDir.absolutePath() + "/" + log); // logfile(logDir + "/" + log);
}
}

loadLogfiles();
}

FSettingsDialog::~FSettingsDialog()
Expand Down Expand Up @@ -98,6 +140,13 @@ void FSettingsDialog::on_listWidget_currentRowChanged(int i)
ui->settingPages->setCurrentIndex(i);
}

void FSettingsDialog::on_lw_log_logfiles_itemDoubleClicked(QListWidgetItem *item)
{
QDir logDir = LibFusion::getWorkingDir().absolutePath() + QDir::separator() + "Logs";
QString filename = item->text();
QDesktopServices::openUrl(logDir.absolutePath() + "/" + filename);
}

void FSettingsDialog::on_pb_selectStylesheet_clicked()
{
QString stylesheetFile = QFileDialog::getOpenFileName(this, tr("Choose stylesheet"), QDir::homePath(), "*.qss");
Expand Down
5 changes: 5 additions & 0 deletions fsettingsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ class FSettingsDialog : public QDialog
FLauncher *selectedLauncher;
void loadLaunchers();
void updateLauncher();
void loadLogfiles();
private slots:
void on_pb_log_openFolder_clicked();
void on_pb_log_clear_clicked();

void on_listWidget_currentRowChanged(int i);
void on_lw_log_logfiles_itemDoubleClicked(QListWidgetItem * item);

void on_pb_selectStylesheet_clicked();
void on_pb_ResetStylesheet_clicked();
Expand Down
36 changes: 35 additions & 1 deletion fsettingsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="currentIndex">
<number>2</number>
<number>6</number>
</property>
<widget class="QWidget" name="General">
<layout class="QVBoxLayout" name="verticalLayout_2">
Expand Down Expand Up @@ -539,6 +539,40 @@ $GAMEEXE The path to the executable, relative to $GAMEPATH</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="Logfiles">
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QListWidget" name="lw_log_logfiles"/>
</item>
<item row="4" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="pb_log_clear">
<property name="text">
<string>Delete Logfiles</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_log_openFolder">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="gameSync">
<layout class="QGridLayout" name="gridLayout_4">
<item row="2" column="1">
Expand Down
2 changes: 1 addition & 1 deletion mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
<item>
<widget class="QLabel" name="lbl_lastPlayed">
<property name="text">
<string>lbl_lastPlayed</string>
<string/>
</property>
</widget>
</item>
Expand Down