Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Commit

Permalink
Added pkg support.
Browse files Browse the repository at this point in the history
  • Loading branch information
codestation committed May 5, 2014
1 parent c2c61eb commit 9c7c2bc
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 44 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ qcma (0.3.2) unstable; urgency=low

* Fixed bug with PSP savedata transfer.
* Fixed multimedia folder copy from pc.
* Added pkg support.
* Fixed about dialog.

-- codestation <codestation404@gmail.com> Thu, 04 May 2014 00:00:00 -0000
Expand Down
51 changes: 31 additions & 20 deletions resources/translations/qcma_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@
<translation type="obsolete">Conectado a </translation>
</message>
<message>
<location filename="../../src/cmaclient.cpp" line="137"/>
<location filename="../../src/cmaclient.cpp" line="140"/>
<location filename="../../src/cmaclient.cpp" line="138"/>
<location filename="../../src/cmaclient.cpp" line="141"/>
<source>Connected to %1 (PS Vita)</source>
<translation>Conectado a %1 (PS Vita)</translation>
</message>
Expand Down Expand Up @@ -210,6 +210,7 @@
<location filename="../../src/forms/configwidget.ui" line="138"/>
<location filename="../../src/forms/configwidget.ui" line="173"/>
<location filename="../../src/forms/configwidget.ui" line="208"/>
<location filename="../../src/forms/configwidget.ui" line="231"/>
<source>Browse...</source>
<translation>Buscar...</translation>
</message>
Expand Down Expand Up @@ -262,95 +263,105 @@
<translation>Esta es la ubicación donde el sistema PS Vita leerá los contenidos que intente descargar.</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="222"/>
<location filename="../../src/forms/configwidget.ui" line="219"/>
<source>Packages</source>
<translation>Archivos PKG</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="247"/>
<source>Other</source>
<translation>Otros</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="230"/>
<location filename="../../src/forms/configwidget.ui" line="255"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600;&quot;&gt;Advanced settings&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600;&quot;&gt;Ajustes Avanzados&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="237"/>
<location filename="../../src/forms/configwidget.ui" line="262"/>
<source>Offline Mode</source>
<translation>Modo desconectado</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="247"/>
<location filename="../../src/forms/configwidget.ui" line="272"/>
<source>Skip metadata extraction</source>
<translation>Saltar la extracción de metadatos</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="271"/>
<location filename="../../src/forms/configwidget.ui" line="296"/>
<source>Update database automatically when files on the PC are changed</source>
<translation>Actualizar la base de datos automaticamente</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="296"/>
<location filename="../../src/forms/configwidget.ui" line="321"/>
<source>SQLite</source>
<translation>SQLite</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="306"/>
<location filename="../../src/forms/configwidget.ui" line="331"/>
<source>Skip photo scanning</source>
<translation>Omitir el escaneo de fotos</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="313"/>
<location filename="../../src/forms/configwidget.ui" line="338"/>
<source>Skip video scanning</source>
<translation>Omitir el escaneo de vídeos</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="320"/>
<location filename="../../src/forms/configwidget.ui" line="345"/>
<source>Skip music scanning</source>
<translation>Omitir el escaneo de música</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="254"/>
<location filename="../../src/forms/configwidget.ui" line="279"/>
<source>Disable USB monitoring</source>
<translation>Deshabilitar monitoreo USB</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="261"/>
<location filename="../../src/forms/configwidget.ui" line="286"/>
<source>Disable Wi-Fi monitoring</source>
<translation>Deshabilitar monitoreo WiFi</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="280"/>
<location filename="../../src/forms/configwidget.ui" line="305"/>
<source>Database backend</source>
<translation>Almacenaje de base de datos</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="291"/>
<location filename="../../src/forms/configwidget.ui" line="316"/>
<source>In Memory</source>
<translation>En memoria</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="106"/>
<location filename="../../src/forms/configwidget.cpp" line="116"/>
<source>Select the folder to be used as a photo source</source>
<translation>Seleccione el directorio a ser utilizado como origen de fotos</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="111"/>
<location filename="../../src/forms/configwidget.cpp" line="121"/>
<source>Select the folder to be used as a music source</source>
<translation>Seleccione el directorio a ser utilizado como origen de música</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="116"/>
<location filename="../../src/forms/configwidget.cpp" line="126"/>
<source>Select the folder to be used as a video source</source>
<translation>Seleccione el directorio a ser utilizado como origen de videos</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="121"/>
<location filename="../../src/forms/configwidget.cpp" line="131"/>
<source>Select the folder to be used to save PS Vita games and backups</source>
<translation>Seleccione el directorio a ser utilizado para guardar juegos y respaldos</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="126"/>
<location filename="../../src/forms/configwidget.cpp" line="136"/>
<source>Select the folder to be used to fetch software updates</source>
<translation>Seleccione el directorio a ser utilizado para extraer actualizaciones de software</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="141"/>
<source>Select the folder to be used to software packages</source>
<translation>Seleccione el directorio a ser utilizado para almacenar archivos pkg</translation>
</message>
</context>
<context>
<name>ConfirmDialog</name>
Expand Down
51 changes: 31 additions & 20 deletions resources/translations/qcma_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@
<translation type="obsolete">次のデバイスに接続しました </translation>
</message>
<message>
<location filename="../../src/cmaclient.cpp" line="137"/>
<location filename="../../src/cmaclient.cpp" line="140"/>
<location filename="../../src/cmaclient.cpp" line="138"/>
<location filename="../../src/cmaclient.cpp" line="141"/>
<source>Connected to %1 (PS Vita)</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -214,6 +214,7 @@
<location filename="../../src/forms/configwidget.ui" line="138"/>
<location filename="../../src/forms/configwidget.ui" line="173"/>
<location filename="../../src/forms/configwidget.ui" line="208"/>
<location filename="../../src/forms/configwidget.ui" line="231"/>
<source>Browse...</source>
<translation>参照...</translation>
</message>
Expand Down Expand Up @@ -266,95 +267,105 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="222"/>
<location filename="../../src/forms/configwidget.ui" line="219"/>
<source>Packages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="247"/>
<source>Other</source>
<translation>その他</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="230"/>
<location filename="../../src/forms/configwidget.ui" line="255"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600;&quot;&gt;Advanced settings&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-size:14pt; font-weight:600;&quot;&gt;詳細設定&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="237"/>
<location filename="../../src/forms/configwidget.ui" line="262"/>
<source>Offline Mode</source>
<translation>オフラインモード</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="247"/>
<location filename="../../src/forms/configwidget.ui" line="272"/>
<source>Skip metadata extraction</source>
<translation>メタデータの展開をスキップする</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="271"/>
<location filename="../../src/forms/configwidget.ui" line="296"/>
<source>Update database automatically when files on the PC are changed</source>
<translation>PCのファイルが変更された際にデータベースを自動的に更新する</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="296"/>
<location filename="../../src/forms/configwidget.ui" line="321"/>
<source>SQLite</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="306"/>
<location filename="../../src/forms/configwidget.ui" line="331"/>
<source>Skip photo scanning</source>
<translation></translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="313"/>
<location filename="../../src/forms/configwidget.ui" line="338"/>
<source>Skip video scanning</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="320"/>
<location filename="../../src/forms/configwidget.ui" line="345"/>
<source>Skip music scanning</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="254"/>
<location filename="../../src/forms/configwidget.ui" line="279"/>
<source>Disable USB monitoring</source>
<translation>USBの監視を無効にする</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="261"/>
<location filename="../../src/forms/configwidget.ui" line="286"/>
<source>Disable Wi-Fi monitoring</source>
<translation>Wi-Fiの監視を無効にする</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="280"/>
<location filename="../../src/forms/configwidget.ui" line="305"/>
<source>Database backend</source>
<translation>データベース保存</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.ui" line="291"/>
<location filename="../../src/forms/configwidget.ui" line="316"/>
<source>In Memory</source>
<translation>メモリ内</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="106"/>
<location filename="../../src/forms/configwidget.cpp" line="116"/>
<source>Select the folder to be used as a photo source</source>
<translation>フォトの参照先として使用されるフォルダを選択してください</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="111"/>
<location filename="../../src/forms/configwidget.cpp" line="121"/>
<source>Select the folder to be used as a music source</source>
<translation>ミュージックの参照先として使用されるフォルダを選択してください</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="116"/>
<location filename="../../src/forms/configwidget.cpp" line="126"/>
<source>Select the folder to be used as a video source</source>
<translation>ビデオの参照先として使用されるフォルダを選択してください</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="121"/>
<location filename="../../src/forms/configwidget.cpp" line="131"/>
<source>Select the folder to be used to save PS Vita games and backups</source>
<translation>PS Vitaのゲームとバックアップの保存に使用されるフォルダを選択してください</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="126"/>
<location filename="../../src/forms/configwidget.cpp" line="136"/>
<source>Select the folder to be used to fetch software updates</source>
<translation>ソフトウェアアップデートの取得に使用されるフォルダを選択してください</translation>
</message>
<message>
<location filename="../../src/forms/configwidget.cpp" line="141"/>
<source>Select the folder to be used to software packages</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConfirmDialog</name>
Expand Down
6 changes: 6 additions & 0 deletions src/cmarootobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ void CMARootObject::initObject(const QString &path)
metadata.dataType = App;
this->path = QDir(QDir(path).absoluteFilePath("SYSTEM")).absoluteFilePath(uuid);
num_filters = 0;
break;

case VITA_OHFI_PACKAGE:
metadata.dataType = Package;
this->path = path;
num_filters = 0;
}

// create the backup directories
Expand Down
16 changes: 16 additions & 0 deletions src/forms/configwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ void ConfigWidget::connectSignals()
mapper->setMapping(ui->videoBtn, BTN_VIDEO);
mapper->setMapping(ui->appBtn, BTN_APPS);
mapper->setMapping(ui->urlBtn, BTN_URL);
mapper->setMapping(ui->pkgBtn, BTN_PKG);
connect(ui->photoBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->musicBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->videoBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->appBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->urlBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(ui->pkgBtn, SIGNAL(clicked()), mapper, SLOT(map()));
connect(mapper, SIGNAL(mapped(int)), this, SLOT(browseBtnPressed(int)));
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
Expand All @@ -68,17 +70,25 @@ void ConfigWidget::setDefaultData()
QSettings settings;
defaultdir = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
ui->photoPath->setText(QDir::toNativeSeparators(settings.value("photoPath", defaultdir).toString()));

defaultdir = QStandardPaths::writableLocation(QStandardPaths::MusicLocation);
ui->musicPath->setText(QDir::toNativeSeparators(settings.value("musicPath", defaultdir).toString()));

defaultdir = QStandardPaths::writableLocation(QStandardPaths::MoviesLocation);
ui->videoPath->setText(QDir::toNativeSeparators(settings.value("videoPath", defaultdir).toString()));

defaultdir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
defaultdir.append(QDir::separator()).append("PS Vita");
ui->appPath->setText(QDir::toNativeSeparators(settings.value("appsPath", defaultdir).toString()));

defaultdir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
defaultdir.append(QDir::separator()).append("PSV Updates");
ui->urlPath->setText(QDir::toNativeSeparators(settings.value("urlPath", defaultdir).toString()));

defaultdir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
defaultdir.append(QDir::separator()).append("PSV Packages");
ui->pkgPath->setText(QDir::toNativeSeparators(settings.value("pkgPath", defaultdir).toString()));

ui->offlineCheck->setChecked(settings.value("offlineMode", true).toBool());
ui->metadataCheck->setChecked(settings.value("skipMetadata", false).toBool());
ui->usbCheck->setChecked(settings.value("disableUSB", false).toBool());
Expand Down Expand Up @@ -126,6 +136,11 @@ void ConfigWidget::browseBtnPressed(int btn)
msg = tr("Select the folder to be used to fetch software updates");
break;

case BTN_PKG:
lineedit = ui->pkgPath;
msg = tr("Select the folder to be used to software packages");
break;

default:
return;
}
Expand Down Expand Up @@ -155,6 +170,7 @@ void ConfigWidget::accept()
savePath(settings, ui->videoPath, "videoPath");
savePath(settings, ui->appPath, "appsPath");
savePath(settings, ui->urlPath, "urlPath");
savePath(settings, ui->pkgPath, "pkgPath");
settings.setValue("offlineMode", ui->offlineCheck->isChecked());
settings.setValue("skipMetadata", ui->metadataCheck->isChecked());
settings.setValue("disableUSB", ui->usbCheck->isChecked());
Expand Down
2 changes: 1 addition & 1 deletion src/forms/configwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ConfigWidget : public QDialog
~ConfigWidget();

private:
enum browse_buttons {BTN_PHOTO, BTN_MUSIC, BTN_VIDEO, BTN_APPS, BTN_URL};
enum browse_buttons {BTN_PHOTO, BTN_MUSIC, BTN_VIDEO, BTN_APPS, BTN_URL, BTN_PKG};

void connectSignals();
void setDefaultData();
Expand Down
Loading

0 comments on commit 9c7c2bc

Please sign in to comment.