- show current image in gallery was not working so removed.
- move launch gallery from menu to the toolbar.
Also cleaned up the C++ code.
path = /
interface = com.nokia.maemo.meegotouch.GalleryInterface
dest = com.nokia.Gallery
-method = camera-roll:showCameraRoll|show-media:showMediaInFullScreen
+method = camera-roll:showCameraRoll
[share]
enabled = true
// TODO: qrc:/qml/PostCaptureView.qml:104:5: QML CameraToolBar: Binding loop detected for property "height"
// TODO: try to reload the preview thumbnail when the picture becomes available
+// TODO: prevent flicking to this view while preview animation is running
Item {
id: postCaptureView
opacity: 0.8
property bool show: deleteDialog.isOpen || deleteDialog.isOpening ||
- hideTimer.running || menu.isOpen || menu.isOpening ||
+ hideTimer.running ||
(view.currentItem && view.currentItem.error) && !view.currentItem.playing
Behavior on anchors.bottomMargin {
}
CameraToolIcon {
- iconId: cameraTheme.menuIconId
+ iconId: cameraTheme.galleryIconId
onClicked: {
- menu.open()
+ launchGallery()
restartTimer()
}
}
}
}
- CameraMenu {
- id: menu
- onStatusChanged: restartTimer()
-
- actions: [
- CameraMenuAction {
- text: qsTr("Captures in gallery")
- onClicked: launchGallery()
- },
- CameraMenuAction {
- // TODO: this is not working...
- text: qsTr("View in gallery")
- enabled: available
- onClicked: showInGallery()
- }
- ]
- }
-
Rectangle {
opacity: toolBar.opacity
anchors.top: parent.top
}
}
- function showInGallery() {
- if (!available) {
- return
- }
-
- if (!gallery.show(view.currentItem.itemUrl)) {
- showError(qsTr("Failed to launch gallery"))
- }
- }
-
function deleteCurrentItem() {
if (!available) {
return
+++ /dev/null
-// -*- qml -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-import QtQuick 1.1
-import com.nokia.meego 1.1
-
-Menu {
- id: menu
-
- property bool isOpen: status == DialogStatus.Open
- property bool isOpening: status == DialogStatus.Opening
-
- property list<CameraMenuAction> actions
-
- MenuLayout {
- Repeater {
- model: menu.actions
- delegate: MenuItem {
- text: modelData.text
- enabled: modelData.enabled
- onClicked: modelData.clicked()
- }
- }
- }
-}
+++ /dev/null
-// -*- qml -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-import QtQuick 1.1
-import com.nokia.meego 1.1
-
-QtObject {
- property string text
- property bool enabled: true
- signal clicked
-}
property string shareIconId: "icon-m-toolbar-share-white"
property string favoriteMarkIconId: "icon-m-toolbar-favorite-mark-white"
property string favoriteUnmarkIconId: "icon-m-toolbar-favorite-unmark-white"
- property string menuIconId: "icon-m-toolbar-view-menu-white"
+ property string galleryIconId: "icon-m-camera-roll"
property string flashAutoIconId: "icon-m-camera-flash-auto"
property string flashOnIconId: "icon-m-camera-flash-always"
<file>CameraWindow.qml</file>
<file>CameraInfoBanner.qml</file>
<file>CameraButtonStyle.qml</file>
- <file>CameraMenu.qml</file>
- <file>CameraMenuAction.qml</file>
<file>FullScreenThumbnail.qml</file>
<file>CameraPositionSource.qml</file>
<file>CameraPage.qml</file>
}
-bool GalleryHelper::show(const QUrl& path) {
- // TODO: this is not working and I don't know why.
- QStringList args;
- args << path.toLocalFile();
-
- QVariant var(args);
-
- return asyncCall("show-media", var);
-}
-
bool GalleryHelper::launch() {
return asyncCall("camera-roll");
}
GalleryHelper(QObject *parent = 0);
~GalleryHelper();
- Q_INVOKABLE bool show(const QUrl& path);
Q_INVOKABLE bool launch();
};