[-]
[+]
|
Changed |
_service:tar_git:harbour-advanced-camera.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/piggz/harbour-advanced-camera.git</param>
<param name="branch">master</param>
- <param name="revision">0.9.7</param>
+ <param name="revision">0.9.8</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-advanced-camera-0.9.8.tar.bz2/harbour-advanced-camera.desktop
^
|
@@ -11,3 +11,8 @@
# a different app name in German locale (de).
#Name[de]=harbour-advanced-camera
Name[ru]=Улучшенная камера
+
+[X-Sailjail]
+Permissions=Audio;Location;RemovableMedia;Pictures;Videos
+OrganizationName=uk.co.piggz
+ApplicationName=AdvancedCamera
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-advanced-camera-0.9.8.tar.bz2/qml/harbour-advanced-camera.qml
^
|
@@ -35,4 +35,12 @@
Component.onCompleted: {
loadingComplete = true;
}
+
+ onApplicationActiveChanged: {
+ if (Qt.application.state == Qt.ApplicationActive) {
+ cameraUI.camera.start();
+ } else {
+ cameraUI.camera.stop();
+ }
+ }
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-advanced-camera-0.9.8.tar.bz2/qml/pages/CameraUI.qml
^
|
@@ -21,7 +21,7 @@
property bool _loadParameters: true
property bool _recordingVideo: false
property bool _manualModeSelected: false
- readonly property int zoomStepSize: 5
+ readonly property real zoomStepSize: 0.05
property int controlsRotation: 0
property int _pictureRotation: Screen.primaryOrientation == Qt.PortraitOrientation ? 0 : 90
// Use easy device orientation values
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-advanced-camera-0.9.8.tar.bz2/src/harbour-advanced-camera.cpp
^
|
@@ -37,6 +37,10 @@
QGuiApplication *app = SailfishApp::application(argc, argv);
+ app->setOrganizationDomain("piggz.co.uk");
+ app->setOrganizationName("uk.co.piggz"); // needed for Sailjail
+ app->setApplicationName("AdvancedCamera");
+
qmlRegisterType<EffectsModel>("uk.co.piggz.harbour_advanced_camera", 1, 0, "EffectsModel");
qmlRegisterType<ExposureModel>("uk.co.piggz.harbour_advanced_camera", 1, 0, "ExposureModel");
qmlRegisterType<IsoModel>("uk.co.piggz.harbour_advanced_camera", 1, 0, "IsoModel");
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-advanced-camera-0.9.8.tar.bz2/src/storagemodel.cpp
^
|
@@ -2,6 +2,7 @@
#include <QDebug>
#include <QDir>
#include <QStandardPaths>
+#include <QStorageInfo>
Storage::Storage(const QString &name, const QString &path) :
m_name(name), m_path(path)
@@ -11,7 +12,7 @@
StorageModel::StorageModel()
{
- scan("/media/sdcard");
+ scan();
}
QHash<int, QByteArray> StorageModel::roleNames() const
@@ -46,19 +47,31 @@
}
}
-void StorageModel::scan(const QString &baseDir)
+void StorageModel::scan()
{
- qDebug() << "Scanning" << baseDir;
+ qDebug() << "Scanning storage directories";
QString homeDir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
- QDir subRoot(baseDir);
- QStringList subDirs = subRoot.entryList(QDir::AllDirs|QDir::NoDotAndDotDot); // Add QDir::Writable ?
+
beginResetModel();
m_storage.clear();
m_storage.append(Storage(tr("Internal storage"), homeDir));
- // TODO: add "Android" for /home/nemo/android_storage if it exists ?
- for (const QString &dir : subDirs) {
- m_storage.append(Storage(dir, baseDir + "/" + dir));
+
+ for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) {
+
+ QString mountPoint = storage.rootPath();
+
+ // Sailfish OS specific mount point base for SD cards!
+ if (storage.isValid() &&
+ storage.isReady() &&
+ (mountPoint.startsWith("/media") ||
+ mountPoint.startsWith("/run/media/") /* SFOS >= 2.2 */ )
+ ) {
+
+ qDebug() << "Found storage:" << mountPoint;
+ m_storage << Storage(QDir(mountPoint).dirName(), mountPoint);
+ }
}
+
endResetModel();
emit rowCountChanged();
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-advanced-camera-0.9.8.tar.bz2/src/storagemodel.h
^
|
@@ -33,7 +33,7 @@
Q_INVOKABLE QVariant getName(int index) const { return m_storage.at(index).name(); }
Q_INVOKABLE QVariant getPath(int index) const { return m_storage.at(index).path(); }
public slots:
- void scan(const QString &baseDir);
+ void scan();
private:
QList<Storage> m_storage;
|