Get rid of VideoSettingsDialog.js
authorMohammed Sameer <msameer@foolab.org>
Wed, 13 Feb 2013 22:31:31 +0000 (00:31 +0200)
committerMohammed Sameer <msameer@foolab.org>
Wed, 13 Feb 2013 22:31:31 +0000 (00:31 +0200)
It has only one function and can be inlined in the QML file

qml/VideoResolutionSettings.qml
qml/VideoSettingsDialog.js [deleted file]
qml/qml.qrc

index ebd8c3b..eb762ae 100644 (file)
@@ -22,7 +22,6 @@
 
 import QtQuick 1.1
 import com.nokia.meego 1.1
-import "VideoSettingsDialog.js" as Util
 
 Column {
         spacing: 10
@@ -49,7 +48,14 @@ Column {
                         delegate: Button {
                                 text: resolutions.name(resolutionName, resolution);
                                 checked: settings.videoResolution == resolutionName;
-                                onClicked: Util.setResolution(resolutionName);
+                                onClicked: {
+                                        if (!cam.idle) {
+                                                showError(qsTr("Camera is busy saving."));
+                                                return;
+                                        }
+
+                                        settings.videoResolution = resolutionName;
+                                }
                         }
                 }
         }
diff --git a/qml/VideoSettingsDialog.js b/qml/VideoSettingsDialog.js
deleted file mode 100644 (file)
index b578345..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- js -*-
-
-/*!
- * This file is part of CameraPlus.
- *
- * Copyright (C) 2012 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
- */
-
-function setResolution(resolution) {
-    if (!cam.idle) {
-        showError(qsTr("Camera is busy saving."));
-        return;
-    }
-
-    settings.videoResolution = resolution;
-}
index 1456a0b..74017fb 100644 (file)
@@ -41,7 +41,6 @@
        <file>ImageSettingsDialog.js</file>
        <file>ImageResolutionSettings.qml</file>
        <file>VideoSettingsDialog.qml</file>
-       <file>VideoSettingsDialog.js</file>
        <file>VideoResolutionSettings.qml</file>
     </qresource>
 </RCC>