[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,6 +2,6 @@
<service name="tar_git">
<param name="url">https://github.com/monich/sailfish-barcode.git</param>
<param name="branch">master</param>
- <param name="revision">0c3b815</param>
+ <param name="revision">136d9ec</param>
</service>
</services>
\ No newline at end of file
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-barcode-1.0.42.tar.bz2/libmc/debian/libmc-dev.install
^
|
@@ -1,3 +0,0 @@
-debian/tmp/usr/lib/libmc.so usr/lib
-include/*.h usr/include/mc
-build/libmc.pc usr/lib/pkgconfig
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-barcode-1.0.42.tar.bz2/libmc/debian/libmc.install
^
|
@@ -1 +0,0 @@
-debian/tmp/usr/lib/libmc.so.* usr/lib
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-barcode-1.0.42.tar.bz2/qml/pages/VCard.qml
^
|
@@ -1,91 +0,0 @@
-/*
-The MIT License (MIT)
-
-Copyright (c) 2018-2021 Slava Monich
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-
-import QtQuick 2.0
-import Sailfish.Silica 1.0
-import org.nemomobile.notifications 1.0
-import org.nemomobile.dbus 2.0
-//import org.nemomobile.contacts 1.0
-import harbour.barcode 1.0
-
-Item {
- id: vcard
- visible: false
-
- property alias count: model.count
- property alias content: file.content
-
- function importContact() {
- var url
- if (SystemInfo.osVersionCompare("4.0") >= 0) {
- // Newer Contacts app can't access /tmp
- importFile.content = file.content
- url = importFile.url
- } else {
- // Didn't have to litter ~/Downloads in earlier versions of Sailfish OS
- url = file.url
- }
-
- contactsDbusIface.call("importContactFile", ["" + url])
- notification.publish()
- }
-
- function contact() {
- return model.getPerson(0)
- }
-
- PeopleVCardModel {
- id: model
- source: file.fileName
- }
-
- DBusInterface {
- id: contactsDbusIface
- service: "com.jolla.contacts.ui"
- path: "/com/jolla/contacts/ui"
- iface: "com.jolla.contacts.ui"
- }
-
- Notification {
- id: notification
- //: Pop-up notification
- //% "Saved contact"
- previewBody: qsTrId("contact-notification-saved")
- expireTimeout: 2000
- }
-
- TemporaryFile {
- id: file
-
- location: TemporaryFile.Tmp
- fileTemplate: "barcodeXXXXXX.vcf"
- }
-
- TemporaryFile {
- id: importFile
-
- location: TemporaryFile.Downloads
- fileTemplate: "barcodeXXXXXX.vcf"
- }
-}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-barcode.pro
^
|
@@ -10,7 +10,7 @@
LIBS += -ldl
isEmpty(VERSION) {
- VERSION = 1.0.42
+ VERSION = 1.0.43
message("VERSION is unset, assuming $$VERSION")
}
@@ -93,6 +93,7 @@
$${HARBOUR_LIB_SRC}/HarbourMediaPlugin.cpp \
$${HARBOUR_LIB_SRC}/HarbourPluginLoader.cpp \
$${HARBOUR_LIB_SRC}/HarbourPolicyPlugin.cpp \
+ $${HARBOUR_LIB_SRC}/HarbourProcessState.cpp \
$${HARBOUR_LIB_SRC}/HarbourSelectionListModel.cpp \
$${HARBOUR_LIB_SRC}/HarbourSingleImageProvider.cpp \
$${HARBOUR_LIB_SRC}/HarbourSystem.cpp \
@@ -107,6 +108,7 @@
$${HARBOUR_LIB_INCLUDE}/HarbourMediaPlugin.h \
$${HARBOUR_LIB_INCLUDE}/HarbourPluginLoader.h \
$${HARBOUR_LIB_INCLUDE}/HarbourPolicyPlugin.h \
+ $${HARBOUR_LIB_INCLUDE}/HarbourProcessState.h \
$${HARBOUR_LIB_INCLUDE}/HarbourSelectionListModel.h \
$${HARBOUR_LIB_INCLUDE}/HarbourSingleImageProvider.h \
$${HARBOUR_LIB_INCLUDE}/HarbourSystem.h \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/harbour-lib.pro
^
|
@@ -26,11 +26,13 @@
src/HarbourBase32.cpp \
src/HarbourBase45.cpp \
src/HarbourClipboard.cpp \
+ src/HarbourColorEditorModel.cpp \
src/HarbourDisplayBlanking.cpp \
src/HarbourJson.cpp \
src/HarbourLib.cpp \
src/HarbourMce.cpp \
src/HarbourMediaPlugin.cpp \
+ src/HarbourObject.cpp \
src/HarbourOrganizeListModel.cpp \
src/HarbourPolicyPlugin.cpp \
src/HarbourProcessState.cpp \
@@ -58,11 +60,13 @@
include/HarbourBase32.h \
include/HarbourBase45.h \
include/HarbourClipboard.h \
+ include/HarbourColorEditorModel.h \
include/HarbourDebug.h \
include/HarbourDisplayBlanking.h \
include/HarbourJson.h \
include/HarbourLib.h \
include/HarbourMediaPlugin.h \
+ include/HarbourObject.h \
include/HarbourOrganizeListModel.h \
include/HarbourPolicyPlugin.h \
include/HarbourProcessState.h \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/include/HarbourAztecCodeGenerator.h
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2019 Jolla Ltd.
- * Copyright (C) 2019 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2019-2021 Jolla Ltd.
+ * Copyright (C) 2019-2021 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -11,8 +11,8 @@
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
* distribution.
* 3. Neither the names of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived
@@ -39,25 +39,42 @@
class HarbourAztecCodeGenerator : public QObject {
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+ Q_PROPERTY(int ecLevel READ ecLevel WRITE setEcLevel NOTIFY ecLevelChanged)
Q_PROPERTY(QString code READ code NOTIFY codeChanged)
Q_PROPERTY(bool running READ running NOTIFY runningChanged)
+ Q_ENUMS(ECLevel)
public:
+ enum ECLevel {
+ ECLevelDefault = -1,
+ ECLevelLowest = 5,
+ ECLevelLow = 10,
+ ECLevelMedium = 23,
+ ECLevelHigh = 36,
+ ECLevelVeryHigh = 50,
+ ECLevelHighest = 95,
+ ECLevelCount
+ };
+
HarbourAztecCodeGenerator(QObject* aParent = Q_NULLPTR);
QString text() const;
void setText(QString aValue);
+ int ecLevel() const;
+ void setEcLevel(int aValue);
+
QString code() const;
bool running() const;
- static QByteArray generate(QString aText);
+ static QByteArray generate(QString aText, int aEcLevel = ECLevelDefault);
// Callback for qmlRegisterSingletonType<HarbourAztecCodeGenerator>
static QObject* createSingleton(QQmlEngine* aEngine, QJSEngine* aScript);
Q_SIGNALS:
void textChanged();
+ void ecLevelChanged();
void codeChanged();
void runningChanged();
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/include/HarbourColorEditorModel.h
^
|
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2021 Jolla Ltd.
+ * Copyright (C) 2021 Slava Monich <slava.monich@jolla.com>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HARBOUR_COLOR_EDITOR_MODEL_H
+#define HARBOUR_COLOR_EDITOR_MODEL_H
+
+#include <QList>
+#include <QColor>
+#include <QAbstractListModel>
+
+class HarbourColorEditorModel : public QAbstractListModel
+{
+ Q_OBJECT
+ Q_PROPERTY(QStringList colors READ getColors WRITE setColors NOTIFY colorsChanged)
+ Q_PROPERTY(int dragPos READ getDragPos WRITE setDragPos NOTIFY dragPosChanged)
+ Q_ENUMS(ItemType)
+
+public:
+ enum ItemType {
+ ColorItem,
+ TrashedItem,
+ AddItem
+ };
+
+ HarbourColorEditorModel(QObject* aParent = Q_NULLPTR);
+
+ QStringList getColors() const;
+ void setColors(QStringList aColors);
+
+ int getDragPos() const;
+ void setDragPos(int pos);
+
+ Q_INVOKABLE void addColor(QColor aColor);
+ Q_INVOKABLE int indexOf(QColor aColor) const;
+
+ // QAbstractListModel
+ QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex& aParent) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex& aIndex, int aRole) const Q_DECL_OVERRIDE;
+
+Q_SIGNALS:
+ void colorsChanged();
+ void dragPosChanged();
+
+private:
+ class Private;
+ Private* iPrivate;
+};
+
+#endif // HARBOUR_COLOR_EDITOR_MODEL_H
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/include/HarbourObject.h
^
|
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2021 Jolla Ltd.
+ * Copyright (C) 2021 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * any official policies, either expressed or implied.
+ */
+
+#ifndef HARBOUR_OBJECT_H
+#define HARBOUR_OBJECT_H
+
+#include <QObject>
+#include <QList>
+#include <QQmlListProperty>
+
+// Fixes the "Cannot assign to non-existent default property" problem
+// with QtObject in QML.
+class HarbourObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QQmlListProperty<QObject> children READ children)
+ Q_CLASSINFO("DefaultProperty", "children")
+
+public:
+ HarbourObject(QObject* aParent = Q_NULLPTR);
+
+ QQmlListProperty<QObject> children();
+
+private:
+ QList<QObject*> iChidren;
+};
+
+#endif // HARBOUR_OBJECT_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/include/HarbourProcessState.h
^
|
@@ -44,6 +44,7 @@
Q_OBJECT
Q_DISABLE_COPY(HarbourProcessState)
Q_PROPERTY(bool jailedApp READ isJailedApp CONSTANT)
+ Q_PROPERTY(bool privileged READ isPrivileged CONSTANT)
public:
explicit HarbourProcessState(QObject* aParent = Q_NULLPTR);
@@ -52,6 +53,7 @@
static QObject* createSingleton(QQmlEngine* aEngine, QJSEngine* aScript);
static bool isJailedApp();
+ static bool isPrivileged();
};
#endif // HARBOUR_PROCESS_STATE_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/include/HarbourQrCodeGenerator.h
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2019 Jolla Ltd.
- * Copyright (C) 2019 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2019-2021 Jolla Ltd.
+ * Copyright (C) 2019-2021 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -39,26 +39,43 @@
class HarbourQrCodeGenerator : public QObject {
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+ Q_PROPERTY(int ecLevel READ ecLevel WRITE setEcLevel NOTIFY ecLevelChanged)
Q_PROPERTY(QString code READ code NOTIFY codeChanged)
Q_PROPERTY(QString qrcode READ code NOTIFY codeChanged)
Q_PROPERTY(bool running READ running NOTIFY runningChanged)
+ Q_ENUMS(ECLevel)
public:
+ enum ECLevel {
+ ECLevelDefault = -1,
+ ECLevelLowest = 0,
+ ECLevel_L = ECLevelLowest,
+ ECLevel_M,
+ ECLevel_Q,
+ ECLevel_H,
+ ECLevelHighest = ECLevel_H,
+ ECLevelCount
+ };
+
HarbourQrCodeGenerator(QObject* aParent = Q_NULLPTR);
QString text() const;
void setText(QString aValue);
+ ECLevel ecLevel() const;
+ void setEcLevel(int aValue);
+
QString code() const;
bool running() const;
- static QByteArray generate(QString aText);
+ static QByteArray generate(QString aText, ECLevel aEcLevel = ECLevelDefault);
// Callback for qmlRegisterSingletonType<HarbourQrCodeGenerator>
static QObject* createSingleton(QQmlEngine* aEngine, QJSEngine* aScript);
Q_SIGNALS:
void textChanged();
+ void ecLevelChanged();
void codeChanged();
void runningChanged();
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/include/HarbourSystemInfo.h
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Jolla Ltd.
- * Copyright (C) 2020 Slava Monich <slava@monich.com>
+ * Copyright (C) 2020-2021 Jolla Ltd.
+ * Copyright (C) 2020-2021 Slava Monich <slava@monich.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -61,7 +61,11 @@
QString osName() const;
QString osVersion() const;
+ Q_INVOKABLE QString packageVersion(QString aPackage);
Q_INVOKABLE int osVersionCompare(QString aVersion);
+ Q_INVOKABLE static int compareVersions(QString aVersion1, QString aVersion2);
+
+ static QString queryPackageVersion(QString aVersion);
static int osVersionCompareWith(QString aVersion);
private:
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/qml/HarbourColorEditorDialog.qml
^
|
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2021 Jolla Ltd.
+ * Copyright (C) 2021 Slava Monich <slava.monich@jolla.com>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+Dialog {
+ id: thisDialog
+
+ readonly property color selectedColor: sampleItem.color
+ property color initialColor: Theme.highlightColor
+ property string acceptText: "Add color"
+ property alias hueSliderText: hueSlider.label // "Color"
+ property alias brightnessSliderText: brightnessSlider.label // "Brightness"
+ property string hexNotationText: "Hex notation"
+
+ canAccept: hexText.acceptableInput
+ forwardNavigation: !hueItem.pressed
+ backNavigation: !hueItem.pressed
+
+ DialogHeader {
+ id: header
+
+ acceptText: forwardNavigation ?
+ (thisDialog.acceptText ? thisDialog.acceptText : defaultAcceptText) : ""
+ }
+
+ Component.onCompleted: hexText.text = initialColor.toString().substr(1)
+
+ // Otherwise width is changing with a delay, causing visible layout changes
+ onIsLandscapeChanged: width = isLandscape ? Screen.height : Screen.width
+
+ SilicaFlickable {
+ clip: true
+ interactive: !hueItem.pressed
+ anchors {
+ left: parent.left
+ right: parent.right
+ top: header.bottom
+ bottom: parent.bottom
+ }
+
+ HarbourColorHueItem {
+ id: hueItem
+
+ x: Theme.horizontalPageMargin
+ width: parent.width - 2 * x
+ anchors {
+ top: parent.top
+ bottom: toolPanel.top
+ bottomMargin: Theme.paddingSmall
+ }
+ brightness: brightnessSlider.sliderValue
+ onTapped: hueSlider.value = h
+ }
+
+ Column {
+ id: toolPanel
+
+ width: parent.width
+ anchors.bottom: parent.bottom
+
+ Slider {
+ id: hueSlider
+
+ width: parent.width
+ leftMargin: Theme.horizontalPageMargin
+ rightMargin: Theme.horizontalPageMargin
+ minimumValue: 0
+ maximumValue: 1
+ value: 1
+ label: "Color"
+ opacity: (y + parent.y >= 0) ? 1 : 0
+ onSliderValueChanged: hexText.updateText()
+ }
+
+ Slider {
+ id: brightnessSlider
+
+ width: parent.width
+ leftMargin: Theme.horizontalPageMargin
+ rightMargin: Theme.horizontalPageMargin
+ label: "Brightness"
+ minimumValue: 0
+ maximumValue: 1
+ value: 1
+ opacity: (y + parent.y >= 0) ? 1 : 0
+ onSliderValueChanged: hexText.updateText()
+ }
+
+ Item {
+ x: Theme.horizontalPageMargin
+ width: parent.width - 2 * x
+ height: hexText.height
+ Row {
+ spacing: Theme.paddingSmall
+
+ Label {
+ id: hexLabel
+
+ y: hexText.textTopMargin
+ text: "#"
+ font.pixelSize: Theme.fontSizeLarge
+ }
+
+ Item {
+ readonly property int maxWidth: toolPanel.width - 2 * Theme.horizontalPageMargin - hexLabel.width - parent.spacing - Theme.paddingLarge - sample.width
+ width: Math.min(Math.max(textLabelTemplate.implicitWidth, Theme.itemSizeHuge), maxWidth)
+ height: hexText.height
+
+ Label {
+ id: textLabelTemplate
+
+ // Same text as hexText.label
+ text: hexNotationText
+ font.pixelSize: Theme.fontSizeSmall
+ opacity: 0
+ }
+
+ TextField {
+ id: hexText
+
+ property int ignoreTextUpdates // to avoid binding loops
+ property color tmpColor
+
+ font.pixelSize: Theme.fontSizeLarge
+ width: parent.width
+ textLeftMargin: 0
+ textRightMargin: 0
+ label: hexNotationText
+ validator: RegExpValidator { regExp: /^[0-9a-fA-F]{6}$/ }
+ inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase
+ EnterKey.iconSource: "image://theme/icon-m-enter-close"
+ EnterKey.onClicked: hexText.focus = false
+
+ onTextChanged: {
+ if (!ignoreTextUpdates && acceptableInput) {
+ tmpColor = "#" + text
+ ignoreTextUpdates++
+ brightnessSlider.value = hueItem.getV(tmpColor)
+ hueSlider.value = hueItem.getH(tmpColor)
+ ignoreTextUpdates--
+ }
+ }
+
+ onActiveFocusChanged: {
+ if (!activeFocus && !acceptableInput) {
+ updateText()
+ }
+ }
+
+ function updateText() {
+ if (!ignoreTextUpdates) {
+ ignoreTextUpdates++
+ var s = hueItem.getColor(hueSlider.sliderValue).toString()
+ text = (s.length > 0 && s.charAt(0) === '#') ? s.substr(1) : s
+ ignoreTextUpdates--
+ }
+ }
+ }
+ }
+ }
+
+ MouseArea {
+ id: sample
+
+ y: Theme.paddingLarge
+ width: 2 * height
+ height: hexText.height - 2 * Theme.paddingLarge
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/qml/HarbourColorHueItem.qml
^
|
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2021 Jolla Ltd.
+ * Copyright (C) 2021 Slava Monich <slava.monich@jolla.com>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+Rectangle {
+ id: thisItem
+
+ color: "black"
+ property alias brightness: mouseArea.opacity
+ property alias pressed: mouseArea.pressed
+
+ readonly property color color0: "#ffffff" // 1.0
+ readonly property color color1: "#ff0000" // colorStop7
+ readonly property color color2: "#ff00ff" // colorStop6
+ readonly property color color3: "#0000ff" // colorStop5
+ readonly property color color4: "#00ffff" // colorStop4
+ readonly property color color5: "#00ff00" // colorStop3
+ readonly property color color6: "#ffff00" // colorStop2
+ readonly property color color7: "#ff0000" // colorStop1
+ readonly property color color8: "#ffffff" // 0.0
+
+ readonly property real colorStop1: 0.125
+ readonly property real colorStop2: 0.250
+ readonly property real colorStop3: 0.375
+ readonly property real colorStop4: 0.500
+ readonly property real colorStop5: 0.625
+ readonly property real colorStop6: 0.750
+ readonly property real colorStop7: 0.875
+ readonly property real hueLast: colorStop7
+ readonly property real hueRange: hueLast - colorStop1
+
+ signal tapped(var h)
+
+ function getColor(h) {
+ if (h < colorStop4) {
+ if (h > colorStop3) {
+ // colorStop3..colorStop4
+ return averageColor(color3, color4, (h - colorStop3)/(colorStop4 - colorStop3), brightness)
+ } else if (h > colorStop2) {
+ // colorStop2..colorStop3
+ return averageColor(color2, color3, (h - colorStop2)/(colorStop3 - colorStop2), brightness)
+ } else if (h > colorStop1) {
+ // colorStop1..colorStop2
+ return averageColor(color1, color2, (h - colorStop1)/(colorStop2 - colorStop1), brightness)
+ } else if (h > 0) {
+ // 0..colorStop1
+ return averageColor(color0, color1, h/colorStop1, brightness)
+ } else {
+ return adjustColor(color0, brightness)
+ }
+ } else {
+ if (h < colorStop5) {
+ // colorStop4..colorStop5
+ return averageColor(color4, color5, (h - colorStop4)/(colorStop5 - colorStop4), brightness)
+ } else if (h < colorStop6) {
+ // colorStop5..colorStop6
+ return averageColor(color5, color6, (h - colorStop5)/(colorStop6 - colorStop5), brightness)
+ } else if (h < colorStop7) {
+ // colorStop6..colorStop7
+ return averageColor(color6, color7, (h - colorStop6)/(colorStop7 - colorStop6), brightness)
+ } else if (h < 1) {
+ // colorStop7..1
+ return averageColor(color7, color8, (h - colorStop7)/(1 - colorStop7), brightness)
+ } else {
+ return adjustColor(color8, brightness)
+ }
+ }
+ }
+
+ function averageColor(c1,c2,h,v) {
+ return Qt.rgba((c1.r + (c2.r - c1.r) * h) * v,
+ (c1.g + (c2.g - c1.g) * h) * v,
+ (c1.b + (c2.b - c1.b) * h) * v, 1)
+ }
+
+ function adjustColor(c,v) {
+ return Qt.rgba(c.r * v, c.g * v, c.b * v, 1)
+ }
+
+ function getV(c) {
+ return Math.max(c.r, c.g, c.b)
+ }
+
+ function getH(c) {
+ var max = Math.max(c.r, c.g, c.b)
+ var min = Math.min(c.r, c.g, c.b)
+ var chroma = max - min
+ if (chroma === 0) {
+ return 0
+ } else {
+ if (max === c.r) {
+ return hueLast - (c.g - c.b)/chroma/6 * hueRange
+ } else if (max === c.g) {
+ return hueLast - (2 + (c.b - c.r)/chroma)/6 * hueRange
+ } else {
+ return hueLast - (4 + (c.r - c.g)/chroma)/6 * hueRange
+ }
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+
+ width: parent.height
+ height: parent.width
+ anchors.centerIn: parent
+ rotation: -90
+
+ ShaderEffectSource {
+ anchors.fill: parent
+ sourceItem: Rectangle {
+ width: mouseArea.width
+ height: mouseArea.height
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: color0 }
+ GradientStop { position: colorStop1; color: color1 }
+ GradientStop { position: colorStop2; color: color2 }
+ GradientStop { position: colorStop3; color: color3 }
+ GradientStop { position: colorStop4; color: color4 }
+ GradientStop { position: colorStop5; color: color5 }
+ GradientStop { position: colorStop6; color: color6 }
+ GradientStop { position: colorStop7; color: color7 }
+ GradientStop { position: 1.0; color: color8 }
+ }
+ }
+ }
+ // mouseY/height because we are rotated
+ onClicked: thisItem.tapped(mouseY/height)
+ onPositionChanged: thisItem.tapped(mouseY/height)
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/qml/HarbourColorPickerDialog.qml
^
|
@@ -0,0 +1,321 @@
+/*
+ * Copyright (C) 2021 Jolla Ltd.
+ * Copyright (C) 2021 Slava Monich <slava.monich@jolla.com>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+Dialog {
+ id: thisDialog
+
+ property color color
+ property alias colorModel: grid.model // HarbourColorEditorModel
+
+ // Localizable strings
+ property alias resetColorsMenuText: resetColorsMenuItem.text // "Reset colors"
+ property string acceptText: "Select color"
+ property string addColorAcceptText: "Add color"
+ property string addColorHueSliderText: "Color"
+ property string addColorBrightnessSliderText: "Brightness"
+ property string addColorHexNotationText: "Hex notation"
+
+ forwardNavigation: false
+
+ signal resetColors()
+
+ // Constants used by HarbourColorEditorModel
+ readonly property int itemTypeColor: 0
+ readonly property int itemTypeTrash: 1
+ readonly property int itemTypeAdd: 2
+
+ SilicaGridView {
+ id: grid
+
+ cellWidth: Math.floor(width/cellsPerRow)
+ cellHeight: cellWidth
+ anchors.fill: parent
+
+ VerticalScrollDecorator {}
+
+ PullDownMenu {
+ MenuItem {
+ id: resetColorsMenuItem
+
+ text: "Reset colors"
+ onClicked: thisDialog.resetColors()
+ }
+ }
+
+ property Item dragItem
+ property int pageHeaderHeight
+ readonly property int cellsPerRow: Math.floor(width / Theme.itemSizeHuge)
+
+ header: DialogHeader {
+ dialog: thisDialog
+ acceptText: thisDialog.acceptText
+ spacing: 0
+ Component.onCompleted: grid.pageHeaderHeight = height
+ onHeightChanged: grid.pageHeaderHeight = height
+ }
+
+ delegate: MouseArea {
+ id: colorDelegate
+
+ width: grid.cellWidth
+ height: grid.cellHeight
+
+ drag.target: dragging ? colorItem : null
+ drag.axis: Drag.XandYAxis
+
+ readonly property bool highlighted: (pressed && containsMouse)
+ readonly property bool dragging: grid.dragItem === colorDelegate
+ readonly property int index: model.index
+
+ Rectangle {
+ id: colorItem
+
+ width: grid.cellWidth
+ height: grid.cellHeight
+ color: model.color
+ scale: !colorDelegate.dragging ? 1 : isTrashed ? 0.8 : 1.1
+ opacity: isTrashed ? 0.8 : 1
+ layer.enabled: colorDelegate.highlighted || colorDelegate.dragging || scale > 1
+ layer.effect: HarbourPressEffect { source: colorItem }
+
+ readonly property bool isTrashed: model.itemType === itemTypeTrash
+ property real returnX
+ property real returnY
+ property bool snappingBack
+
+ Behavior on opacity { FadeAnimation { } }
+ Behavior on scale {
+ NumberAnimation {
+ easing.type: Easing.InQuad
+ duration: 150
+ }
+ }
+
+ Image {
+ anchors.centerIn: parent
+ source: opacity ? ("image://theme/graphic-close-app?" + deriveColor(model.color)) : ""
+ sourceSize: Qt.size(Theme.iconSizeLarge, Theme.iconSizeLarge)
+ opacity: (model.itemType === itemTypeTrash) ? 0.8 : 0
+ visible: opacity > 0
+ Behavior on opacity { FadeAnimation { } }
+
+ function deriveColor(color) {
+ var gray = 0.299 * color.r + 0.587 * color.g + 0.114 *color.b
+ var v = (gray > 0.5) ? 0 : 1
+ return Qt.rgba(v, v, v, color.a)
+ }
+ }
+
+ states: [
+ State {
+ name: "dragging"
+ when: colorDelegate.dragging
+ ParentChange {
+ target: colorItem
+ parent: grid
+ x: colorDelegate.mapToItem(grid, 0, 0).x
+ y: colorDelegate.mapToItem(grid, 0, 0).y
+ }
+ },
+ State {
+ name: "snappingBack"
+ when: !colorDelegate.dragging && colorItem.snappingBack
+ ParentChange {
+ target: colorItem
+ parent: grid
+ x: colorItem.returnX
+ y: colorItem.returnY
+ }
+ },
+ State {
+ name: "idle"
+ when: !colorDelegate.dragging && !colorItem.snappingBack
+ ParentChange {
+ target: colorItem
+ parent: colorDelegate
+ x: 0
+ y: 0
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ to: "snappingBack"
+ SequentialAnimation {
+ SmoothedAnimation {
+ properties: "x,y"
+ duration: 150
+ }
+ ScriptAction { script: colorItem.snappingBack = false }
+ }
+ },
+ Transition {
+ to: "idle"
+ ScriptAction { script: colorModel.dragPos = -1 }
+ }
+ ]
+
+ Connections {
+ target: colorDelegate.dragging ? colorItem : null
+ onXChanged: colorItem.updateDragPos()
+ onYChanged: colorItem.scrollAndUpdateDragPos()
+ }
+
+ Connections {
+ target: colorDelegate.dragging ? grid : null
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/src/HarbourAztecCodeGenerator.cpp
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2019 Jolla Ltd.
- * Copyright (C) 2019 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2019-2021 Jolla Ltd.
+ * Copyright (C) 2019-2021 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -11,8 +11,8 @@
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
* distribution.
* 3. Neither the names of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived
@@ -48,22 +48,25 @@
class HarbourAztecCodeGenerator::Task : public HarbourTask {
Q_OBJECT
public:
- Task(QThreadPool* aPool, QString aText);
+ Task(QThreadPool* aPool, QString aText, int aEcLevel);
void performTask() Q_DECL_OVERRIDE;
public:
QString iText;
QString iCode;
+ int iEcLevel;
};
-HarbourAztecCodeGenerator::Task::Task(QThreadPool* aPool, QString aText) :
+HarbourAztecCodeGenerator::Task::Task(QThreadPool* aPool, QString aText,
+ int aEcLevel) :
HarbourTask(aPool),
- iText(aText)
+ iText(aText),
+ iEcLevel(aEcLevel)
{
}
void HarbourAztecCodeGenerator::Task::performTask()
{
- QByteArray bytes(generate(iText));
+ QByteArray bytes(generate(iText, iEcLevel));
if (!bytes.isEmpty()) {
iCode = HarbourBase32::toBase32(bytes);
}
@@ -82,6 +85,10 @@
HarbourAztecCodeGenerator* parentObject() const;
void setText(QString aValue);
+ void setEcLevel(int aValue);
+ void regenerate();
+
+ static int realEcLevel(int aEcLevel);
public Q_SLOTS:
void onTaskDone();
@@ -89,6 +96,7 @@
public:
QThreadPool* iThreadPool;
Task* iTask;
+ int iEcLevel;
QString iText;
QString iCode;
};
@@ -96,7 +104,8 @@
HarbourAztecCodeGenerator::Private::Private(HarbourAztecCodeGenerator* aParent) :
QObject(aParent),
iThreadPool(new QThreadPool(this)),
- iTask(Q_NULLPTR)
+ iTask(Q_NULLPTR),
+ iEcLevel(ECLevelDefault)
{
// Serialize the tasks:
iThreadPool->setMaxThreadCount(1);
@@ -112,19 +121,45 @@
return qobject_cast<HarbourAztecCodeGenerator*>(parent());
}
+int HarbourAztecCodeGenerator::Private::realEcLevel(int aEcLevel)
+{
+ return (aEcLevel == ECLevelDefault) ? AZTEC_CORRECTION_DEFAULT :
+ (aEcLevel < ECLevelLowest) ? ECLevelLowest :
+ (aEcLevel > ECLevelHighest) ? ECLevelHighest :
+ aEcLevel;
+}
+
void HarbourAztecCodeGenerator::Private::setText(QString aText)
{
if (iText != aText) {
iText = aText;
- HarbourAztecCodeGenerator* obj = parentObject();
- const bool wasRunning = (iTask != Q_NULLPTR);
- if (iTask) iTask->release(this);
- iTask = new Task(iThreadPool, aText);
- iTask->submit(this, SLOT(onTaskDone()));
- Q_EMIT obj->textChanged();
- if (!wasRunning) {
- Q_EMIT obj->runningChanged();
+ regenerate();
+ Q_EMIT parentObject()->textChanged();
+ }
+}
+
+void HarbourAztecCodeGenerator::Private::setEcLevel(int aValue)
+{
+ const int level = (aValue == ECLevelDefault) ? ECLevelDefault : realEcLevel(aValue);
+ if (iEcLevel != level) {
+ const int prevRealLevel = realEcLevel(iEcLevel);
+ iEcLevel = level;
+ HDEBUG(level);
+ if (realEcLevel(level) != prevRealLevel) {
+ regenerate();
}
+ Q_EMIT parentObject()->ecLevelChanged();
+ }
+}
+
+void HarbourAztecCodeGenerator::Private::regenerate()
+{
+ const bool wasRunning = (iTask != Q_NULLPTR);
+ if (iTask) iTask->release(this);
+ iTask = new Task(iThreadPool, iText, iEcLevel);
+ iTask->submit(this, SLOT(onTaskDone()));
+ if (!wasRunning) {
+ Q_EMIT parentObject()->runningChanged();
}
}
@@ -169,6 +204,16 @@
iPrivate->setText(aValue);
}
+int HarbourAztecCodeGenerator::ecLevel() const
+{
+ return iPrivate->iEcLevel;
+}
+
+void HarbourAztecCodeGenerator::setEcLevel(int aValue)
+{
+ iPrivate->setEcLevel(aValue);
+}
+
QString HarbourAztecCodeGenerator::code() const
{
return iPrivate->iCode;
@@ -179,12 +224,12 @@
return iPrivate->iTask != Q_NULLPTR;
}
-QByteArray HarbourAztecCodeGenerator::generate(QString aText)
+QByteArray HarbourAztecCodeGenerator::generate(QString aText, int aEcLevel)
{
HDEBUG(aText);
QByteArray in(aText.toUtf8()), out;
AztecSymbol* aztec = aztec_encode_inv(in.constData(), in.size(),
- AZTEC_CORRECTION_DEFAULT);
+ Private::realEcLevel(aEcLevel));
if (aztec) {
const int bytesPerRow = (aztec->size + 7) / 8;
out.reserve(bytesPerRow * aztec->size);
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/src/HarbourColorEditorModel.cpp
^
|
@@ -0,0 +1,298 @@
+/*
+ * Copyright (C) 2021 Jolla Ltd.
+ * Copyright (C) 2021 Slava Monich <slava.monich@jolla.com>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "HarbourColorEditorModel.h"
+#include "HarbourDebug.h"
+
+// ==========================================================================
+// HarbourColorEditorModel::Private
+// ==========================================================================
+
+class HarbourColorEditorModel::Private
+{
+public:
+ enum ModelRole {
+ ColorRole = Qt::UserRole,
+ ItemTypeRole
+ };
+
+ Private();
+
+ bool resetDragPos();
+ QStringList getColors() const;
+ QList<QColor> makeColors(const QStringList& aColors, bool* aChanged) const;
+ QVariant data(int aRow, ModelRole aRole) const;
+
+public:
+ int iDragPos;
+ int iDragStartPos;
+ QList<QColor> iColors;
+ const QColor iAddColor;
+};
+
+HarbourColorEditorModel::Private::Private() :
+ iDragPos(-1),
+ iDragStartPos(-1),
+ iAddColor(0, 0, 0, 0)
+{
+}
+
+bool HarbourColorEditorModel::Private::resetDragPos()
+{
+ if (iDragPos >= 0) {
+ iDragPos = -1;
+ iDragStartPos = -1;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+QStringList HarbourColorEditorModel::Private::getColors() const
+{
+ const int n = iColors.count();
+ QStringList colors;
+ colors.reserve(n);
+ for (int i = 0; i < n; i++) {
+ colors.append(iColors.at(i).name());
+ }
+ return colors;
+}
+
+QList<QColor> HarbourColorEditorModel::Private::makeColors(const QStringList& aColors, bool* aChanged) const
+{
+ const int n = aColors.count();
+ *aChanged = iColors.count() != n;
+ QList<QColor> newColors;
+ newColors.reserve(n);
+ for (int i = 0; i < n; i++) {
+ const QColor c(aColors.at(i));
+ newColors.append(c);
+ if (!*aChanged && iColors.at(i) != c) {
+ *aChanged = true;
+ }
+ }
+ return newColors;
+}
+
+QVariant HarbourColorEditorModel::Private::data(int aRow, ModelRole aRole) const
+{
+ const int n = iColors.count();
+ if (aRow >= 0 && aRow <= n) {
+ switch (aRole) {
+ case ColorRole:
+ if (iDragPos >= 0) {
+ if (aRow == iDragPos) {
+ // This includes the item dragged outside
+ return iColors.at(iDragStartPos);
+ } else {
+ if (iDragPos == n && aRow == (n - 1)) {
+ // When item is dragged outside, it becomes
+ // the last one and shifts the "add" item.
+ return iAddColor;
+ } else if (aRow >= iDragStartPos && aRow < iDragPos) {
+ return iColors.at(aRow + 1);
+ } else if (aRow > iDragPos && aRow <= iDragStartPos) {
+ return iColors.at(aRow - 1);
+ }
+ }
+ }
+ return (aRow == n) ? iAddColor : iColors.at(aRow);
+ case ItemTypeRole:
+ if (iDragPos == n) {
+ // Item is dragged outside
+ return (aRow == n) ? TrashedItem :
+ (aRow == (n - 1)) ? AddItem : ColorItem;
+ } else {
+ return (aRow == n) ? AddItem : ColorItem;
+ }
+ }
+ }
+ return QVariant();
+}
+
+// ==========================================================================
+// HarbourColorEditorModel::Private
+// ==========================================================================
+
+HarbourColorEditorModel::HarbourColorEditorModel(QObject* aParent) :
+ QAbstractListModel(aParent),
+ iPrivate(new Private)
+{
+}
+
+QHash<int,QByteArray> HarbourColorEditorModel::roleNames() const
+{
+ QHash<int,QByteArray> roles;
+ roles.insert(Private::ColorRole, "color");
+ roles.insert(Private::ItemTypeRole, "itemType");
+ return roles;
+}
+
+int HarbourColorEditorModel::rowCount(const QModelIndex&) const
+{
+ return iPrivate->iColors.count() + 1;
+}
+
+QVariant HarbourColorEditorModel::data(const QModelIndex& aIndex, int aRole) const
+{
+ return iPrivate->data(aIndex.row(), (Private::ModelRole)aRole);
+}
+
+QStringList HarbourColorEditorModel::getColors() const
+{
+ return iPrivate->getColors();
+}
+
+void HarbourColorEditorModel::setColors(QStringList aColors)
+{
+ bool changed;
+ const QList<QColor> prevColors(iPrivate->iColors);
+ const QList<QColor> newColors(iPrivate->makeColors(aColors, &changed));
+ if (changed) {
+ const int prevCount = prevColors.count();
+ const int newCount = newColors.count();
+ const QVector<int> colorRole(1, Private::ColorRole);
+ if (newCount < prevCount) {
+ beginRemoveRows(QModelIndex(), newCount + 1, prevCount);
+ iPrivate->iColors = newColors;
+ endRemoveRows();
+ } else if (newCount > prevCount) {
+ beginInsertRows(QModelIndex(), prevCount + 1, newCount);
+ iPrivate->iColors = newColors;
+ endInsertRows();
+ } else {
+ iPrivate->iColors = newColors;
+ }
+ // Change the colors
+ int rangeStart = -1;
+ const int n = qMin(prevCount, newCount);
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/src/HarbourObject.cpp
^
|
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2021 Jolla Ltd.
+ * Copyright (C) 2021 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of the BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * any official policies, either expressed or implied.
+ */
+
+#include "HarbourObject.h"
+
+HarbourObject::HarbourObject(QObject* aParent) :
+ QObject(aParent)
+{
+}
+
+QQmlListProperty<QObject> HarbourObject::children()
+{
+ return QQmlListProperty<QObject>(this, iChidren);
+}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/src/HarbourPluginLoader.cpp
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2017-2020 Jolla Ltd.
- * Copyright (C) 2017-2020 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2017-2021 Jolla Ltd.
+ * Copyright (C) 2017-2021 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -78,6 +78,24 @@
// sym,ret,name,args
#define QMLTYPE_FUNCTIONS(f) \
+ f("_ZN12QQmlMetaType7qmlTypeERK7QStringii", \
+ QQmlType*, qmlType, (QString const&, int, int)) \
+ f("_ZNK8QQmlType23propertyValueSourceCastEv", \
+ int, propertyValueSourceCast, (QQmlType*)) \
+ f("_ZNK8QQmlType10createSizeEv", \
+ int, createSize, (QQmlType*)) \
+ f("_ZNK8QQmlType10metaObjectEv", \
+ const QMetaObject*, metaObject, (QQmlType*)) \
+ f("_ZNK8QQmlType16parserStatusCastEv", \
+ int, parserStatusCast, (QQmlType*)) \
+ f("_ZNK8QQmlType28propertyValueInterceptorCastEv", \
+ int, propertyValueInterceptorCast, (QQmlType*)) \
+ f("_ZNK8QQmlType6typeIdEv", \
+ int, typeId, (QQmlType*)) \
+ f("_ZNK8QQmlType14createFunctionEv", \
+ QQmlType::CreateFunc, createFunction, (QQmlType*)) \
+ f("_ZNK8QQmlType11qListTypeIdEv", \
+ int, qListTypeId, (QQmlType*)) \
f("_ZNK8QQmlType26attachedPropertiesFunctionEv", \
QQmlAttachedPropertiesFunc, AttachedPropertiesFunctionProc,(QQmlType*)) \
f("_ZNK8QQmlType22attachedPropertiesTypeEv", \
@@ -100,8 +118,8 @@
int parserStatusCast() const;
int propertyValueSourceCast() const;
int propertyValueInterceptorCast() const;
- QQmlAttachedPropertiesFunc attachedPropertiesFunction(QQmlEnginePrivate *engine) const;
- const QMetaObject *attachedPropertiesType(QQmlEnginePrivate *engine) const;
+ // attachedPropertiesFunction
+ // attachedPropertiesType
};
// PRIVATE QT API!
@@ -219,8 +237,10 @@
HarbourPluginLoader::Private::qmlType(
QString aName)
{
- QString fullName(iModule + '/' + aName);
- QQmlType* type = QQmlMetaType::qmlType(fullName, iMajor, iMinor);
+ const QString fullName(iModule + '/' + aName);
+ QQmlType* type = gLibQt5Qml.iSym.fn.qmlType ?
+ gLibQt5Qml.iSym.fn.qmlType(fullName, iMajor, iMinor) :
+ Q_NULLPTR;
if (!type) {
HWARN("Failed to load" << fullName);
}
@@ -259,7 +279,15 @@
int aMajor,
int aMinor)
{
- if (aType && iEngine) {
+ if (aType && iEngine &&
+ gLibQt5Qml.iSym.fn.typeId &&
+ gLibQt5Qml.iSym.fn.qListTypeId &&
+ gLibQt5Qml.iSym.fn.createSize &&
+ gLibQt5Qml.iSym.fn.createFunction &&
+ gLibQt5Qml.iSym.fn.metaObject &&
+ gLibQt5Qml.iSym.fn.parserStatusCast &&
+ gLibQt5Qml.iSym.fn.propertyValueSourceCast &&
+ gLibQt5Qml.iSym.fn.propertyValueInterceptorCast) {
// Get around the ABI break in Qt 5.6
QQmlAttachedPropertiesFunc attachedPropertiesFunction =
gLibQt5Qml.iSym.fn.AttachedPropertiesFunctionProc ?
@@ -275,21 +303,21 @@
NULL;
QQmlPrivate::RegisterType type = {
0, // int version;
- aType->typeId(), // int typeId;
- aType->qListTypeId(), // int listId;
- aType->createSize(), // int objectSize;
- aType->createFunction(), // void (*create)(void *);
+ gLibQt5Qml.iSym.fn.typeId(aType), // int typeId;
+ gLibQt5Qml.iSym.fn.qListTypeId(aType), // int listId;
+ gLibQt5Qml.iSym.fn.createSize(aType), // int objectSize;
+ gLibQt5Qml.iSym.fn.createFunction(aType), // void (*create)(void *);
QString(), // QString noCreationReason;
aModule, // const char *uri;
aMajor, // int versionMajor;
aMinor, // int versionMinor;
aQmlName, // const char *elementName;
- aType->metaObject(), // const QMetaObject *metaObject;
+ gLibQt5Qml.iSym.fn.metaObject(aType), // const QMetaObject *metaObject;
attachedPropertiesFunction,
attachedPropertiesMetaObject,
- aType->parserStatusCast(), // int parserStatusCast;
- aType->propertyValueSourceCast(), // int valueSourceCast;
- aType->propertyValueInterceptorCast(), // int valueInterceptorCast;
+ gLibQt5Qml.iSym.fn.parserStatusCast(aType), // int parserStatusCast;
+ gLibQt5Qml.iSym.fn.propertyValueSourceCast(aType), // int valueSourceCast;
+ gLibQt5Qml.iSym.fn.propertyValueInterceptorCast(aType), // int valueInterceptorCast;
Q_NULLPTR, // QObject *(*extensionObjectCreate)(QObject *);
Q_NULLPTR, // const QMetaObject *extensionMetaObject;
Q_NULLPTR, // QQmlCustomParser *customParser;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/src/HarbourProcessState.cpp
^
|
@@ -35,6 +35,8 @@
#include "HarbourDebug.h"
#include <unistd.h>
+#include <grp.h>
+#include <sys/types.h>
HarbourProcessState::HarbourProcessState(QObject* aParent) :
QObject(aParent)
@@ -56,13 +58,42 @@
// We could additionally check that /proc contains only our and
// parent pids, if ppid check becomes not reliable enough.
if (processJailed < 0) {
- if (getppid() == 1) {
- HWARN("We are jailed!");
- processJailed = 1;
- } else{
- HDEBUG("Cool, we are free!");
- processJailed = 0;
+ bool simulate = false;
+ const char* var = "HARBOUR_JAIL_STATE";
+ processJailed = QString(qgetenv(var)).toInt(&simulate);
+ if (!simulate || processJailed < 0) {
+ if (getppid() == 1) {
+ HWARN("We are jailed!");
+ processJailed = 1;
+ } else{
+ HDEBUG("Cool, we are free!");
+ processJailed = 0;
+ }
+ } else {
+ HWARN(var << processJailed);
}
}
return processJailed > 0;
}
+
+bool HarbourProcessState::isPrivileged()
+{
+ static gid_t privilegedGid = 0;
+
+ if (!privilegedGid) {
+ const struct group* gr = getgrnam("privileged");
+
+ if (gr) {
+ privilegedGid = gr->gr_gid;
+ HDEBUG("privileged =" << privilegedGid);
+ }
+ }
+ const gid_t egid = getegid();
+ if (egid == privilegedGid) {
+ HDEBUG("Yes, we are privileged :)");
+ return true;
+ } else {
+ HDEBUG("Oops, we are not privileged :(");
+ return false;
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/src/HarbourQrCodeGenerator.cpp
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2019 Jolla Ltd.
- * Copyright (C) 2019 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2019-2021 Jolla Ltd.
+ * Copyright (C) 2019-2021 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -11,8 +11,8 @@
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
* distribution.
* 3. Neither the names of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived
@@ -45,25 +45,31 @@
// HarbourQrCodeGenerator::Task
// ==========================================================================
-class HarbourQrCodeGenerator::Task : public HarbourTask {
+class HarbourQrCodeGenerator::Task : public HarbourTask
+{
Q_OBJECT
+
public:
- Task(QThreadPool* aPool, QString aText);
+ Task(QThreadPool* aPool, QString aText, ECLevel aEcLevel);
void performTask() Q_DECL_OVERRIDE;
+
public:
QString iText;
QString iCode;
+ ECLevel iEcLevel;
};
-HarbourQrCodeGenerator::Task::Task(QThreadPool* aPool, QString aText) :
+HarbourQrCodeGenerator::Task::Task(QThreadPool* aPool, QString aText,
+ ECLevel aEcLevel) :
HarbourTask(aPool),
- iText(aText)
+ iText(aText),
+ iEcLevel(aEcLevel)
{
}
void HarbourQrCodeGenerator::Task::performTask()
{
- QByteArray bytes(generate(iText));
+ QByteArray bytes(generate(iText, iEcLevel));
if (!bytes.isEmpty()) {
iCode = HarbourBase32::toBase32(bytes);
}
@@ -73,7 +79,8 @@
// HarbourQrCodeGenerator::Private
// ==========================================================================
-class HarbourQrCodeGenerator::Private : public QObject {
+class HarbourQrCodeGenerator::Private : public QObject
+{
Q_OBJECT
public:
@@ -82,6 +89,10 @@
HarbourQrCodeGenerator* parentObject() const;
void setText(QString aValue);
+ void setEcLevel(int aValue);
+ void regenerate();
+
+ static QRecLevel realEcLevel(ECLevel aEcLevel);
public Q_SLOTS:
void onTaskDone();
@@ -89,6 +100,7 @@
public:
QThreadPool* iThreadPool;
Task* iTask;
+ ECLevel iEcLevel;
QString iText;
QString iCode;
};
@@ -96,7 +108,8 @@
HarbourQrCodeGenerator::Private::Private(HarbourQrCodeGenerator* aParent) :
QObject(aParent),
iThreadPool(new QThreadPool(this)),
- iTask(Q_NULLPTR)
+ iTask(Q_NULLPTR),
+ iEcLevel(ECLevelDefault)
{
// Serialize the tasks:
iThreadPool->setMaxThreadCount(1);
@@ -104,6 +117,7 @@
HarbourQrCodeGenerator::Private::~Private()
{
+ if (iTask) iTask->release();
iThreadPool->waitForDone();
}
@@ -112,19 +126,52 @@
return qobject_cast<HarbourQrCodeGenerator*>(parent());
}
+QRecLevel HarbourQrCodeGenerator::Private::realEcLevel(ECLevel aEcLevel)
+{
+ switch (aEcLevel) {
+ case ECLevel_L: return QR_ECLEVEL_L;
+ case ECLevel_M: return QR_ECLEVEL_M;
+ case ECLevel_Q: return QR_ECLEVEL_Q;
+ case ECLevel_H: return QR_ECLEVEL_H;
+ case ECLevelDefault:
+ case ECLevelCount:
+ break;
+ }
+ return QR_ECLEVEL_M; // default
+}
+
void HarbourQrCodeGenerator::Private::setText(QString aText)
{
if (iText != aText) {
iText = aText;
- HarbourQrCodeGenerator* obj = parentObject();
- const bool wasRunning = (iTask != Q_NULLPTR);
- if (iTask) iTask->release(this);
- iTask = new Task(iThreadPool, aText);
- iTask->submit(this, SLOT(onTaskDone()));
- Q_EMIT obj->textChanged();
- if (!wasRunning) {
- Q_EMIT obj->runningChanged();
+ regenerate();
+ Q_EMIT parentObject()->textChanged();
+ }
+}
+
+void HarbourQrCodeGenerator::Private::setEcLevel(int aValue)
+{
+ const ECLevel level = (aValue < ECLevelDefault) ? ECLevelDefault :
+ (aValue > ECLevelHighest) ? ECLevelHighest : (ECLevel)aValue;
+ if (iEcLevel != level) {
+ const QRecLevel prevRealLevel = realEcLevel(iEcLevel);
+ iEcLevel = level;
+ if (realEcLevel(level) != prevRealLevel) {
+ regenerate();
}
+ Q_EMIT parentObject()->ecLevelChanged();
+ }
+}
+
+void HarbourQrCodeGenerator::Private::regenerate()
+{
+ HarbourQrCodeGenerator* obj = parentObject();
+ const bool wasRunning = (iTask != Q_NULLPTR);
+ if (iTask) iTask->release();
+ iTask = new Task(iThreadPool, iText, iEcLevel);
+ iTask->submit(this, SLOT(onTaskDone()));
+ if (!wasRunning) {
+ Q_EMIT obj->runningChanged();
}
}
@@ -156,7 +203,7 @@
// Callback for qmlRegisterSingletonType<HarbourQrCodeGenerator>
QObject* HarbourQrCodeGenerator::createSingleton(QQmlEngine* aEngine, QJSEngine*)
{
- return new HarbourQrCodeGenerator(aEngine);
+ return new HarbourQrCodeGenerator(); // Singleton doesn't need a parent
}
QString HarbourQrCodeGenerator::text() const
@@ -169,6 +216,16 @@
iPrivate->setText(aValue);
}
+HarbourQrCodeGenerator::ECLevel HarbourQrCodeGenerator::ecLevel() const
+{
+ return iPrivate->iEcLevel;
+}
+
+void HarbourQrCodeGenerator::setEcLevel(int aValue)
+{
+ iPrivate->setEcLevel(aValue);
+}
+
QString HarbourQrCodeGenerator::code() const
{
return iPrivate->iCode;
@@ -179,10 +236,11 @@
return iPrivate->iTask != Q_NULLPTR;
}
-QByteArray HarbourQrCodeGenerator::generate(QString aText)
+QByteArray HarbourQrCodeGenerator::generate(QString aText, ECLevel aEcLevel)
{
QByteArray in(aText.toUtf8()), out;
- QRcode* code = QRcode_encodeString(in.constData(), 0, QR_ECLEVEL_M, QR_MODE_8, true);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/harbour-lib/src/HarbourSystemInfo.cpp
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2020 Jolla Ltd.
- * Copyright (C) 2020 Slava Monich <slava@monich.com>
+ * Copyright (C) 2020-2021 Jolla Ltd.
+ * Copyright (C) 2020-2021 Slava Monich <slava@monich.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -44,6 +44,12 @@
#include <QFile>
#include <QTextStream>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
// ==========================================================================
// HarbourSystemInfo::Private
// ==========================================================================
@@ -63,10 +69,13 @@
static int compareVersions(const QVector<uint> aVersion1, const QVector<uint> aVersion2);
static int compareVersions(const QVector<uint> aVersion1, const QString aVersion2);
+ QString getPackageVersion(QString aPackage);
+
public:
QString iName;
QString iVersion;
QVector<uint> iParsedVersion;
+ QMap<QString,QString> iPackageVersions;
};
const QString HarbourSystemInfo::Private::NAME("NAME");
@@ -159,6 +168,21 @@
return compareVersions(aVersion1, Private::parseVersion(aVersion2));
}
+QString HarbourSystemInfo::Private::getPackageVersion(QString aPackage)
+{
+ QString version;
+ if (!aPackage.isEmpty()) {
+ version = iPackageVersions.value(aPackage);
+ if (version.isEmpty()) {
+ version = HarbourSystemInfo::queryPackageVersion(aPackage);
+ if (!version.isEmpty()) {
+ iPackageVersions.insert(aPackage, version);
+ }
+ }
+ }
+ return version;
+}
+
// ==========================================================================
// HarbourSystemInfo
// ==========================================================================
@@ -192,6 +216,11 @@
return iPrivate->iVersion;
}
+QString HarbourSystemInfo::packageVersion(QString aPackage)
+{
+ return iPrivate->getPackageVersion(aPackage);
+}
+
int HarbourSystemInfo::osVersionCompare(QString aVersion)
{
return Private::compareVersions(iPrivate->iParsedVersion, aVersion);
@@ -203,3 +232,52 @@
const QString os(Private::parseOsRelease(keys).value(Private::VERSION_ID));
return Private::compareVersions(Private::parseVersion(os), aVersion);
}
+
+int HarbourSystemInfo::compareVersions(QString aVersion1, QString aVersion2)
+{
+ return Private::compareVersions(Private::parseVersion(aVersion1),
+ Private::parseVersion(aVersion2));
+}
+
+QString HarbourSystemInfo::queryPackageVersion(QString aPackage)
+{
+ QString version;
+ int fds[2];
+ if (pipe(fds) == 0) {
+ pid_t pid = fork();
+ if (!pid) {
+ const QByteArray package(aPackage.toLatin1());
+ const char* argv[6];
+ argv[0] = "rpm";
+ argv[1] = "-q";
+ argv[2] = "--qf";
+ argv[3] = "%{version}";
+ argv[4] = package.constData();
+ argv[5] = NULL;
+ while ((dup2(fds[1], STDOUT_FILENO) == -1) && (errno == EINTR));
+ execvp(argv[0], (char**)argv);
+ abort();
+ }
+ close(fds[1]);
+
+ // There shouldn't be much output
+ QByteArray out;
+ const int chunk = 16;
+ ssize_t n = 0;
+ do {
+ const int size = out.size();
+ out.resize(size + chunk);
+ while ((n = read(fds[0], out.data() + size, chunk)) == -1 && (errno == EINTR));
+ out.resize(size + qMax(n, (ssize_t)0));
+ } while (n > 0);
+
+ // Parse the version
+ if (out.size() > 0) {
+ version = QString::fromLatin1(out);
+ HDEBUG(qPrintable(aPackage) << qPrintable(version));
+ }
+ waitpid(pid, NULL, 0);
+ close(fds[0]);
+ }
+ return version;
+}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/.gitignore
^
|
@@ -5,6 +5,7 @@
debian/*.log
debian/*.substvars
debian/*.debhelper
+debian/*.install
debian/files
debian/libmc-dev
debian/libmc
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/LICENSE
^
|
@@ -0,0 +1,33 @@
+Copyright (C) 2020-2021 by Slava Monich <slava@monich.com>
+
+You may use this file under the terms of the BSD license as follows:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Neither the names of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation
+are those of the authors and should not be interpreted as representing
+any official policies, either expressed or implied.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/Makefile
^
|
@@ -21,7 +21,7 @@
VERSION_MAJOR = 1
VERSION_MINOR = 0
-VERSION_RELEASE = 1
+VERSION_RELEASE = 3
# Version for pkg-config
PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
@@ -76,10 +76,7 @@
RELEASE_FLAGS =
COVERAGE_FLAGS = -g
-ifndef KEEP_SYMBOLS
-KEEP_SYMBOLS = 0
-endif
-
+KEEP_SYMBOLS ?= 0
ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
endif
@@ -155,6 +152,7 @@
rm -fr debian/libmc debian/libmc-dev
rm -f documentation.list debian/files debian/*.substvars
rm -f debian/*.debhelper.log debian/*.debhelper debian/*~
+ rm -f debian/*install
make -C unit clean
test:
@@ -204,8 +202,19 @@
$(AR) rc $@ $?
ranlib $@
+#
+# LIBDIR usually gets substituted with arch specific dir.
+# It's relative in deb build and can be whatever in rpm build.
+#
+
+LIBDIR ?= usr/lib
+ABS_LIBDIR := $(shell echo /$(LIBDIR) | sed -r 's|/+|/|g')
+
$(PKGCONFIG): $(LIB_NAME).pc.in Makefile
- sed -e 's/\[version\]/'$(PCVERSION)/g $< > $@
+ sed -e 's|@version@|$(PCVERSION)|g' -e 's|@libdir@|$(ABS_LIBDIR)|g' $< > $@
+
+debian/%.install: debian/%.install.in
+ sed 's|@LIBDIR@|$(LIBDIR)|g' $< > $@
#
# Install
@@ -215,9 +224,9 @@
INSTALL_DIRS = $(INSTALL) -d
INSTALL_FILES = $(INSTALL) -m 644
-INSTALL_LIB_DIR = $(DESTDIR)/usr/lib
+INSTALL_LIB_DIR = $(DESTDIR)$(ABS_LIBDIR)
INSTALL_INCLUDE_DIR = $(DESTDIR)/usr/include/$(NAME)
-INSTALL_PKGCONFIG_DIR = $(DESTDIR)/usr/lib/pkgconfig
+INSTALL_PKGCONFIG_DIR = $(DESTDIR)$(ABS_LIBDIR)/pkgconfig
install: $(INSTALL_LIB_DIR)
$(INSTALL_FILES) $(RELEASE_SO) $(INSTALL_LIB_DIR)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/debian/changelog
^
|
@@ -1,3 +1,15 @@
+libmc (1.0.3) unstable; urgency=low
+
+ * Fixed lib install path
+
+ -- Slava Monich <slava@monich.com> Sat, 30 Oct 2021 18:27:59 +0300
+
+libmc (1.0.2) unstable; urgency=low
+
+ * Respect arch specific lib dir
+
+ -- Slava Monich <slava@monich.com> Sun, 14 Jun 2020 23:56:42 +0300
+
libmc (1.0.1) unstable; urgency=low
* Allow unescaped ':' in URL blocks
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/debian/control
^
|
@@ -2,7 +2,7 @@
Section: libs
Priority: optional
Maintainer: Slava Monich <slava@monich.com>
-Build-Depends: debhelper (>= 7), libglib2.0-dev (>= 2.0)
+Build-Depends: debhelper (>= 8.1.3), libglib2.0-dev (>= 2.0)
Standards-Version: 3.8.4
Package: libmc
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/debian/copyright
^
|
@@ -1,4 +1,4 @@
-Copyright (C) 2020 by Slava Monich <slava@monich.com>
+Copyright (C) 2020-2021 by Slava Monich <slava@monich.com>
You may use this file under the terms of the BSD license as follows:
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/debian/libmc-dev.install.in
^
|
@@ -0,0 +1,3 @@
+debian/tmp/@LIBDIR@/libmc.so @LIBDIR@
+debian/tmp/@LIBDIR@/pkgconfig/libmc.pc @LIBDIR@/pkgconfig
+debian/tmp/usr/include/* usr/include
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/debian/libmc.install.in
^
|
@@ -0,0 +1 @@
+debian/tmp/@LIBDIR@/libmc.so.* @LIBDIR@
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/debian/rules
^
|
@@ -4,8 +4,13 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+LIBDIR=usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+override_dh_auto_build:
+ dh_auto_build -- LIBDIR=$(LIBDIR) release pkgconfig debian/libmc.install debian/libmc-dev.install
+
override_dh_auto_install:
- dh_auto_install -- install-dev
+ dh_auto_install -- LIBDIR=$(LIBDIR) install-dev
%:
dh $@
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/libmc.pc.in
^
|
@@ -1,10 +1,10 @@
name=mc
-libdir=/usr/lib
+libdir=@libdir@
includedir=/usr/include
Name: libmc
Description: Library for parsing mobile codes
-Version: [version]
+Version: @version@
Requires.private: glib-2.0
Libs: -L${libdir} -l${name}
Cflags: -I${includedir} -I${includedir}/${name}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/rpm/libmc.spec
^
|
@@ -1,11 +1,13 @@
Name: libmc
-Version: 1.0.1
+Version: 1.0.3
Release: 0
+
Summary: Library for parsing mobile codes
-Group: Development/Libraries
License: BSD
URL: https://github.com/monich/libmc
Source: %{name}-%{version}.tar.bz2
+
+BuildRequires: pkgconfig
BuildRequires: pkgconfig(glib-2.0)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -16,7 +18,6 @@
%package devel
Summary: Development library for %{name}
Requires: %{name} = %{version}
-Requires: pkgconfig
%description devel
This package contains the development library for %{name}.
@@ -25,11 +26,11 @@
%setup -q
%build
-make KEEP_SYMBOLS=1 release pkgconfig
+make %{_smp_mflags} LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig
%install
rm -rf %{buildroot}
-make install-dev DESTDIR=%{buildroot}
+make LIBDIR=%{_libdir} DESTDIR=%{buildroot} install-dev
%check
make test
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/src/mc_mecard.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2020 by Slava Monich <slava@monich.com>
+ * Copyright (C) 2020-2021 by Slava Monich <slava@monich.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -149,17 +149,14 @@
}
}
} else {
- /* Single occasion */
+ /* Single occasion (and it must be there) */
for (i = 0; i < rec->n_prop; i++) {
const McProperty* prop = rec->prop + i;
- if (prop->values && !strcmp(name, prop->name)) {
- gsize len = g_strv_length((char**)prop->values);
-
- if (len > 0) {
- fields->field[k] = prop->values;
- break;
- }
+ if (prop->values && prop->values[0] &&
+ !strcmp(name, prop->name)) {
+ fields->field[k] = prop->values;
+ break;
}
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/libmc/src/mc_record.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2020 by Slava Monich <slava@monich.com>
+ * Copyright (C) 2020-2021 by Slava Monich <slava@monich.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -152,7 +152,7 @@
}
/*
- * Identifier = 1*(ALPHA / DIGIT / "-")
+ * Identifier = 1*(ALPHA / DIGIT / "-")
* Property-Name = 1*(ALPHA / DIGIT / "-")
*/
static
@@ -322,7 +322,7 @@
blk->ptr++;
continue;
}
- /* no break */
+ /* fallthrough */
case ',': case ';': case ':':
/*
* As a special case, allow unescaped ':' in URL blocks.
|
[-]
[+]
|
Added |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/qml/components/VCard.qml
^
|
@@ -0,0 +1,115 @@
+/*
+The MIT License (MIT)
+
+Copyright (c) 2018-2021 Slava Monich
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import org.nemomobile.notifications 1.0
+import org.nemomobile.dbus 2.0
+//import org.nemomobile.contacts 1.0
+import harbour.barcode 1.0
+
+Item {
+ id: vcard
+ visible: false
+
+ property alias count: model.count
+ property alias content: file.content
+
+ function importContact() {
+ var url
+ if (SystemInfo.osVersionCompare("4.0") >= 0) {
+ // Newer Contacts app can't access /tmp
+ importFile.content = file.content
+ url = importFile.url
+ } else {
+ // Didn't have to litter ~/Downloads in earlier versions of Sailfish OS
+ url = file.url
+ }
+
+ contactsDbusIface.call("importContactFile", ["" + url],
+ function(result) {
+ //: Pop-up notification
+ //% "Contact saved"
+ notification.previewBody = qsTrId("contact-notification-saved")
+ notification.publish()
+ },
+ function(error, message) {
+ console.log(error)
+ // org.freedesktop.DBus.Error.ServiceUnknown convers both D-Bus API break
+ // and sandboxing. The rest (e.g. org.freedesktop.DBus.Error.NoReply) is
+ // considerd to be a success
+ if (error === "org.freedesktop.DBus.Error.ServiceUnknown") {
+ if (ProcessState.jailedApp) {
+ //: Pop-up notification
+ //% "Failed to save the contact (blocked by sandboxing?)"
+ notification.previewBody = qsTrId("contact-notification-failed_jailed")
+ } else {
+ //: Pop-up notification
+ //% "Failed to save the contact"
+ notification.previewBody = qsTrId("contact-notification-failed")
+ }
+ } else {
+ //: Pop-up notification
+ //% "Contact saved (or at least we tried)"
+ notification.previewBody = qsTrId("contact-notification-maybe_saved")
+ }
+ notification.publish()
+ })
+ }
+
+ function contact() {
+ return model.getPerson(0)
+ }
+
+ PeopleVCardModel {
+ id: model
+ source: file.fileName
+ }
+
+ DBusInterface {
+ id: contactsDbusIface
+ service: "com.jolla.contacts.ui"
+ path: "/com/jolla/contacts/ui"
+ iface: "com.jolla.contacts.ui"
+ }
+
+ Notification {
+ id: notification
+ expireTimeout: 2000
+ }
+
+ TemporaryFile {
+ id: file
+
+ location: TemporaryFile.Tmp
+ fileTemplate: "barcodeXXXXXX.vcf"
+ }
+
+ TemporaryFile {
+ id: importFile
+
+ location: TemporaryFile.Downloads
+ fileTemplate: "barcodeXXXXXX.vcf"
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/qml/pages/CodeItem.qml
^
|
@@ -64,7 +64,7 @@
onIsVCardChanged: {
if (isVCard && !vcard) {
- var component = Qt.createComponent("VCard.qml");
+ var component = Qt.createComponent("../components/VCard.qml");
if (component.status === Component.Ready) {
vcard = component.createObject(codeItem, {
content: meCardConverter.vcard ? meCardConverter.vcard : normalizedText
@@ -213,8 +213,8 @@
allowedOrientations: window.allowedOrientations,
contact: codeItem.vcard.contact(),
//: Pulley menu item (saves contact)
- //% "Save"
- saveText: qsTrId("contact-menu-save")
+ //% "Save contact"
+ saveText: qsTrId("contact-menu-save_contact")
}).saveContact.connect(function() {
pageStack.pop()
codeItem.vcard.importContact()
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/qml/pages/ScanPage.qml
^
|
@@ -616,7 +616,7 @@
sourceSize: Qt.size(Theme.iconSizeMedium, Theme.iconSizeMedium)
rotation: isLandscape ? 90 : 0
}
- opacity: scanningGalleryImage ? 0.0 : 1.0
+ opacity: (scanningGalleryImage || !viewFinderContainer.canSwitchResolutions)? 0.0 : 1.0
visible: opacity > 0.0
Behavior on opacity { FadeAnimation { } }
onClicked: AppSettings.wideMode = !AppSettings.wideMode
@@ -698,7 +698,7 @@
if (vcard) {
vcard.content = vcardText
} else {
- var component = Qt.createComponent("VCard.qml")
+ var component = Qt.createComponent("../components/VCard.qml")
if (component.status === Component.Ready) {
vcard = component.createObject(scanPage, { content: vcardText })
}
@@ -789,8 +789,8 @@
allowedOrientations: window.allowedOrientations,
contact: clickableResult.vcard.contact(),
//: Pulley menu item (saves contact)
- //% "Save"
- saveText: qsTrId("contact-menu-save")
+ //% "Save contact"
+ saveText: qsTrId("contact-menu-save_contact")
}).saveContact.connect(function() {
pageStack.pop()
clickableResult.vcard.importContact()
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/src/harbour-barcode.cpp
^
|
@@ -38,6 +38,7 @@
#include "HarbourDebug.h"
#include "HarbourDisplayBlanking.h"
+#include "HarbourProcessState.h"
#include "HarbourSelectionListModel.h"
#include "HarbourSingleImageProvider.h"
#include "HarbourTemporaryFile.h"
@@ -68,6 +69,7 @@
qmlRegisterType<HarbourDisplayBlanking>(uri, v1, v2, "DisplayBlanking");
qmlRegisterType<HarbourTemporaryFile>(uri, v1, v2, "TemporaryFile");
qmlRegisterSingletonType<HarbourSystemInfo>(uri, v1, v2, "SystemInfo", HarbourSystemInfo::createSingleton);
+ qmlRegisterSingletonType<HarbourProcessState>(uri, v1, v2, "ProcessState", HarbourProcessState::createSingleton);
qmlRegisterType<BarcodeScanner>(uri, v1, v2, "BarcodeScanner");
qmlRegisterType<DGCertModel>(uri, v1, v2, "DGCertModel");
qmlRegisterType<DGCertRecognizer>(uri, v1, v2, "DGCertRecognizer");
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-cs.ts
^
|
@@ -301,15 +301,30 @@
<extracomment>Status label</extracomment>
<translation type="unfinished">Potíže se sítí</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Uložit</translation>
+ <translation type="unfinished">Uložit kontakt</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Kontakt uložen</translation>
+ <translation type="unfinished">Kontakt uložen</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kontakt uložen (pravděpodobně)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Uložení kontaktu se nezdařilo</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Uložení kontaktu se nezdařilo (pískoviště?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-da.ts
^
|
@@ -299,15 +299,30 @@
<extracomment>Status label</extracomment>
<translation type="unfinished">Der er problemer med netværket</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Gem</translation>
+ <translation type="unfinished">Gem kontakt</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Kontakten er gemt</translation>
+ <translation type="unfinished">Kontakt gemmes</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kontakt gemmes (vi prøvede i det mindste)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kunne ikke gemme kontakten</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kunne ikke gemme kontakten (blokeret af sandboxing?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-de.ts
^
|
@@ -299,15 +299,30 @@
<extracomment>Status label</extracomment>
<translation>Netzwerkproblem</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Speichern</translation>
+ <translation type="unfinished">Kontakt speichern</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Kontakt wurde gespeichert</translation>
+ <translation type="unfinished">Kontakt wurde gespeichert</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kontakt wurde gespeichert (zumindest haben wir es versucht)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Der Kontakt konnte nicht gespeichert werden</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Der Kontakt konnte nicht gespeichert werden (durch Sandboxing blockiert?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-es.ts
^
|
@@ -299,15 +299,30 @@
<extracomment>Status label</extracomment>
<translation type="unfinished">Problema con la red</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Guardar</translation>
+ <translation type="unfinished">Guardar contacto</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Contacto guardado</translation>
+ <translation type="unfinished">Contacto guardado</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Contacto guardado (al menos lo intentamos)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">No se pudo guardar el contacto</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">No se pudo guardar el contacto (¿bloqueado por la zona de pruebas?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-fr.ts
^
|
@@ -299,15 +299,30 @@
<extracomment>Status label</extracomment>
<translation type="unfinished">Problème de réseau</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Enregistrer</translation>
+ <translation type="unfinished">Enregistrer le contact</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Contact enregistré</translation>
+ <translation type="unfinished">Le contact est enregistré</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Le contact est enregistré (ou du moins nous avons essayé)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Échec de l'enregistrement du contact</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Échec de l'enregistrement du contact (bloqué par le sandbox?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-hu.ts
^
|
@@ -297,15 +297,30 @@
<extracomment>Status label</extracomment>
<translation>Probléma a hálózattal</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Mentés</translation>
+ <translation type="unfinished"></translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Névjegy mentve</translation>
+ <translation type="unfinished">Névjegy mentve</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Névjegy mentve (legalább megpróbáltuk)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Névjegy nem lehetett megmenteni</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Névjegy nem lehetett megmenteni (a homokozó által blokkolt?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-it.ts
^
|
@@ -299,15 +299,30 @@
<extracomment>Status label</extracomment>
<translation type="unfinished">Problema di rete</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Salva</translation>
+ <translation type="unfinished">Salva contatto</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Contatto salvato</translation>
+ <translation type="unfinished">Il contatto è salvato</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Il contatto è salvato (almeno ci siamo provati)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Il contatto non può essere salvato</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Il contatto non può essere salvato (bloccato da sandbox?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-pl.ts
^
|
@@ -301,15 +301,30 @@
<extracomment>Status label</extracomment>
<translation>Błąd sieci</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Zapisz</translation>
+ <translation type="unfinished">Zapisz kontakt</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Zapisane kontakty</translation>
+ <translation type="unfinished">Kontakt zapisany</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kontakt zapisany (najprawdopodobniej)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Nie udało się zapisać kontaktu</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Nie udało się zapisać kontaktu (piaskownica?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-pt.ts
^
|
@@ -299,15 +299,30 @@
<extracomment>Status label</extracomment>
<translation>Problema com a rede</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Guardar</translation>
+ <translation type="unfinished">Salvar contato</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Contacto guardado</translation>
+ <translation type="unfinished">O contato é salvo</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">O contato é salvo (pelo menos tentamos)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Contato não pôde ser salvo</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">O contato não pôde ser salvo (bloqueado pela caixa de areia?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-ru.ts
^
|
@@ -301,16 +301,31 @@
<extracomment>Status label</extracomment>
<translation>Не удалось связаться с сервером</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Сохранить</translation>
+ <translation>Сохранить контакт</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
<translation>Контакт сохранен</translation>
</message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Контакт сохранен (но это не точно)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Не удалось сохранить контакт</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Не удалось сохранить контакт (не в песочнице ли мы?)</translation>
+ </message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
<extracomment>Pop-up notification</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-sk.ts
^
|
@@ -249,7 +249,7 @@
<message id="button-eu_covid_cert">
<source>COVID Certificate</source>
<extracomment>Button text</extracomment>
- <translation type="unfinished">Covid certifikát</translation>
+ <translation>Certifikát COVID</translation>
</message>
<message id="button-open_link">
<source>Open link</source>
@@ -301,16 +301,31 @@
<extracomment>Status label</extracomment>
<translation>Chyba siete</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Uložiť</translation>
+ <translation>Uložiť kontakt</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
<translation>Kontakt bol uložený</translation>
</message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Kontakt bol uložený (aspoň sme sa snažili)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Uloženie kontaktu zlyhalo</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Nepodarilo sa uložiť kontakt (zablokovaný sandboxom?)</translation>
+ </message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
<extracomment>Pop-up notification</extracomment>
@@ -354,12 +369,12 @@
<message id="hint-covid_certificate">
<source>Show EU digital COVID certificate</source>
<extracomment>Hint label</extracomment>
- <translation type="unfinished">Zobraziť digitálny COVID preukaz EÚ</translation>
+ <translation>Zobraziť digitálny COVID preukaz EÚ</translation>
</message>
<message id="hint-add_to_calendar">
<source>Add event to calendar</source>
<extracomment>Hint label</extracomment>
- <translation type="unfinished">Pridajte udalosť do kalendára</translation>
+ <translation>Pridať pripomienku do kalendára</translation>
</message>
<message id="settings-display-section">
<source>Display</source>
@@ -444,7 +459,7 @@
<message id="gallery-empty">
<source>No images found in the gallery</source>
<extracomment>Placeholder text</extracomment>
- <translation type="unfinished">V galérii nie je žiaden obrázok</translation>
+ <translation>V galérii nie je žiaden obrázok</translation>
</message>
<message id="gallery-thumbnail-error">
<source>Error</source>
@@ -464,197 +479,197 @@
<message id="dgcert-schema_version">
<source>Schema version %1</source>
<extracomment>Page description</extracomment>
- <translation type="unfinished">Verzia schémy %1</translation>
+ <translation>Verzia schémy %1</translation>
</message>
<message id="dgcert-common-issuer">
<source>Issuer</source>
<extracomment>Detail label (common field)</extracomment>
- <translation type="unfinished">Vydavateľ</translation>
+ <translation>Vydavateľ</translation>
</message>
<message id="dgcert-common-issue_date">
<source>Issue date</source>
<extracomment>Detail label (common field)</extracomment>
- <translation type="unfinished">Datum vydání</translation>
+ <translation>Dátum vydania</translation>
</message>
<message id="dgcert-common-expiration_date">
<source>Expiration date</source>
<extracomment>Detail label (common field)</extracomment>
- <translation type="unfinished">Dátum spotreby</translation>
+ <translation>Dátum platnosti</translation>
</message>
<message id="dgcert-personal-name">
<source>Name</source>
<extracomment>Detail label (personal details)</extracomment>
- <translation type="unfinished">Názov</translation>
+ <translation>Meno</translation>
</message>
<message id="dgcert-personal-standardized_name">
<source>Standardized name</source>
<extracomment>Detail label (personal details)</extracomment>
- <translation type="unfinished">Štandardizovaný názov</translation>
+ <translation>Priezvisko</translation>
</message>
<message id="dgcert-personal-date_of_birth">
<source>Date of birth</source>
<extracomment>Detail label (personal details)</extracomment>
- <translation type="unfinished">Dátum narodenia</translation>
+ <translation>Dátum narodenia</translation>
</message>
<message id="dgcert-signature_disclaimer">
<source>The signature is not checked and therefore the validity of the certificate is not guaranteed.</source>
<extracomment>Disclaimer</extracomment>
- <translation type="unfinished">Digitálny podpis nie je overený, takže nie je zaručená presnosť informácií.</translation>
+ <translation>Digitálny podpis nie je overený a preto nie je zaručená platnosť certifikátu.</translation>
</message>
<message id="dgcert-vaccination-header">
<source>Vaccination certificate</source>
<extracomment>Section header</extracomment>
- <translation type="unfinished">Očkovací preukaz</translation>
+ <translation>Očkovací preukaz</translation>
</message>
<message id="dgcert-vaccination-tg">
<source>Disease or agent targeted</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Infekcia</translation>
+ <translation>Infekcia</translation>
</message>
<message id="dgcert-vaccination-vp">
<source>Type of the vaccine</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Typ vakcíny</translation>
+ <translation>Typ očkovacej látky</translation>
</message>
<message id="dgcert-vaccination-mp">
<source>Vaccine product</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Vakcína</translation>
+ <translation>Očkovacia látka</translation>
</message>
<message id="dgcert-vaccination-ma">
<source>Vaccine manufacturer</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Výrobca</translation>
+ <translation>Výrobca očkovacej látky</translation>
</message>
<message id="dgcert-vaccination-dn_sd">
<source>Number of doses</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Počet dávok</translation>
+ <translation>Počet dávok</translation>
</message>
<message id="dgcert-vaccination-dt">
<source>Date of vaccination</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Dátum očkovania</translation>
+ <translation>Dátum očkovania</translation>
</message>
<message id="dgcert-vaccination-co">
<source>Country of vaccination</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Krajina očkovania</translation>
+ <translation>Krajina očkovania</translation>
</message>
<message id="dgcert-vaccination-is">
<source>Certificate issuer</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Vydávajúca organizácia</translation>
+ <translation>Vydávajúca organizácia</translation>
</message>
<message id="dgcert-vaccination-ci">
<source>Unique certificate identifier</source>
<extracomment>Detail label (vaccination group)</extracomment>
- <translation type="unfinished">Jedinečný identifikátor certifikátu</translation>
+ <translation>Jedinečný identifikátor certifikátu</translation>
</message>
<message id="dgcert-test-header">
<source>Test certificate</source>
<extracomment>Section header</extracomment>
- <translation type="unfinished">Osvedčenie o skúške</translation>
+ <translation>Osvedčenie o skúške</translation>
</message>
<message id="dgcert-test-tg">
<source>Disease or agent</source>
<extracomment>Detail label (test group)</extracomment>
- <translation type="unfinished">Infekcia</translation>
+ <translation>Infekcia</translation>
</message>
<message id="dgcert-test-tt">
<source>The type of test</source>
<extracomment>Detail label (test group)</extracomment>
- <translation type="unfinished">Typ skúšky</translation>
+ <translation>Typ testu</translation>
</message>
<message id="dgcert-test-nm">
<source>Test name</source>
<extracomment>Detail label (test group)</extracomment>
- <translation type="unfinished">Test</translation>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-sv.ts
^
|
@@ -299,15 +299,30 @@
<extracomment>Status label</extracomment>
<translation>Nätverksproblem</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Spara</translation>
+ <translation type="unfinished">Spara kontakt</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Kontakt sparad</translation>
+ <translation type="unfinished">Kontakt sparad</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kontakt sparad (åtminstone försökte vi)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kontakten kunde inte sparas</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">Kontakten kunde inte sparas (blockerad av sandlåda?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-zh_CN.ts
^
|
@@ -297,15 +297,30 @@
<extracomment>Status label</extracomment>
<translation>网络出错</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>保存</translation>
+ <translation type="unfinished">保存联系人</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>联系人已保存</translation>
+ <translation type="unfinished">联系人已保存</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">联系被保存(至少我们尝试)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">无法保存联系人</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">无法保存联系人(由沙箱阻止?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode-zh_TW.ts
^
|
@@ -297,15 +297,30 @@
<extracomment>Status label</extracomment>
<translation type="unfinished">發生網路錯誤</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>儲存</translation>
+ <translation type="unfinished">保存聯繫人</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>已儲存聯絡人</translation>
+ <translation type="unfinished">聯繫人已保存</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">聯繫被保存(至少我們嘗試)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">無法保存聯繫人</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation type="unfinished">未能保存聯繫人(由沙箱阻止?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.43.tar.bz2/translations/harbour-barcode.ts
^
|
@@ -299,15 +299,30 @@
<extracomment>Status label</extracomment>
<translation>Network error</translation>
</message>
- <message id="contact-menu-save">
- <source>Save</source>
+ <message id="contact-menu-save_contact">
+ <source>Save contact</source>
<extracomment>Pulley menu item (saves contact)</extracomment>
- <translation>Save</translation>
+ <translation>Save contact</translation>
</message>
<message id="contact-notification-saved">
- <source>Saved contact</source>
+ <source>Contact saved</source>
<extracomment>Pop-up notification</extracomment>
- <translation>Saved contact</translation>
+ <translation>Contact saved</translation>
+ </message>
+ <message id="contact-notification-maybe_saved">
+ <source>Contact saved (or at least we tried)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Contact saved (or at least we tried)</translation>
+ </message>
+ <message id="contact-notification-failed">
+ <source>Failed to save the contact</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Failed to save the contact</translation>
+ </message>
+ <message id="contact-notification-failed_jailed">
+ <source>Failed to save the contact (blocked by sandboxing?)</source>
+ <extracomment>Pop-up notification</extracomment>
+ <translation>Failed to save the contact (blocked by sandboxing?)</translation>
</message>
<message id="notification-copied_to_clipboard">
<source>Copied to clipboard</source>
@@ -552,7 +567,7 @@
<message id="dgcert-test-header">
<source>Test certificate</source>
<extracomment>Section header</extracomment>
- <translation>Section header</translation>
+ <translation>Test certificate</translation>
</message>
<message id="dgcert-test-tg">
<source>Disease or agent</source>
|