Skip to content

Commit

Permalink
Release 0.2.8-1~sfos3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mentaljam committed Jul 20, 2021
2 parents 091168c + 1d502eb commit b249e3e
Show file tree
Hide file tree
Showing 35 changed files with 236 additions and 141 deletions.
3 changes: 3 additions & 0 deletions harbour-storeman.pro
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ OTHER_FILES += \
qml/pages/RepoSuggestionPage.qml \
qml/pages/CategoriesFilterPage.qml \
qml/pages/SharePage.qml \
qml/pages/IntervalPickerDialog.qml \
qml/pages/UnusedReposDialog.qml \
qml/components/AppListDelegate.qml \
qml/components/RatingBox.qml \
Expand Down Expand Up @@ -164,6 +165,8 @@ OTHER_FILES += \
qml/components/BackupLabel.qml \
qml/components/BackupOptions.qml \
qml/components/CategoriesFilterDelegate.qml \
qml/components/IntervalView.qml \
qml/components/ListViewPositionAnimation.qml \
qml/models/DevelopersModel.qml \
qml/models/TranslatorsModel.qml \
qml/models/DummyCommentsModel.qml
Expand Down
43 changes: 43 additions & 0 deletions qml/components/IntervalView.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import QtQuick 2.0
import Sailfish.Silica 1.0

SilicaListView {
id: view
snapMode: ListView.SnapToItem
clip: true
quickScrollEnabled: false

delegate: BackgroundItem {
width: view.width
height: currentIndex === index
? Theme.itemSizeLarge
: Theme.itemSizeSmall

Behavior on height { NumberAnimation {} }

onClicked: {
currentIndex = index
animation.moveTo(currentIndex)
}

Label {
text: index
anchors.centerIn: parent
color: highlighted
? Theme.highlightColor
: Theme.primaryColor
font.pixelSize: currentIndex === index
? Theme.fontSizeHuge
: Theme.fontSizeLarge

Behavior on font.pixelSize { NumberAnimation {} }
}
}

Component.onCompleted: positionViewAtIndex(currentIndex, ListView.Center)

ListViewPositionAnimation {
id: animation
target: view
}
}
16 changes: 16 additions & 0 deletions qml/components/ListViewPositionAnimation.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import QtQuick 2.0

NumberAnimation {
property var mode: ListView.Center

function moveTo(index) {
stop()
from = target.contentY
target.positionViewAtIndex(index, mode)
// FIXME: Sometimes it's not defined
to = target.contentY
start()
}

property: "contentY"
}
1 change: 1 addition & 0 deletions qml/pages/BackupsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Page {
delegate: ListItem {
id: listItem
width: parent.width
ListView.onRemove: animateRemoval(listItem)

menu: ContextMenu {
MenuItem {
Expand Down
16 changes: 9 additions & 7 deletions qml/pages/BookmarksPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import harbour.orn 1.0
import "../components"

Page {
property OrnBookmarksModel model

id: page
allowedOrientations: defaultAllowedOrientations

OrnBookmarksModel {
id: bookmarksModel
}

Connections {
target: model
target: bookmarksModel
onRowsInserted: proxyModel.sort(Qt.AscendingOrder)
}

Expand All @@ -21,7 +23,7 @@ Page {
id: proxyModel
sortRole: OrnBookmarksModel.SortRole
sortCaseSensitivity: Qt.CaseInsensitive
sourceModel: page.model
sourceModel: bookmarksModel
}

header: PageHeader {
Expand All @@ -43,7 +45,7 @@ Page {
id: menu

RefreshMenuItem {
model: page.model
model: bookmarksModel
}

MenuSearchItem {}
Expand All @@ -56,11 +58,11 @@ Page {
BusyIndicator {
size: BusyIndicatorSize.Large
anchors.centerIn: parent
running: page.model.fetching
running: bookmarksModel.fetching
}

ViewPlaceholder {
enabled: !page.model.fetching && bookmarksList.count === 0
enabled: !bookmarksModel.fetching && bookmarksList.count === 0
//% "Your bookmarked applications will be shown here"
text: qsTrId("orn-no-bookmarks")
}
Expand Down
13 changes: 2 additions & 11 deletions qml/pages/CommentsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,9 @@ Page {
}
}

NumberAnimation {
function moveTo(pos) {
stop()
from = commentsList.contentY
commentsList.positionViewAtIndex(pos, ListView.End)
// FIXME: Sometimes it's not defined
to = commentsList.contentY
start()
}

ListViewPositionAnimation {
id: moveAnimation
target: commentsList
property: "contentY"
mode: ListView.End
}
}
42 changes: 42 additions & 0 deletions qml/pages/IntervalPickerDialog.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import "../components"

Dialog {
property alias hour: hoursView.currentIndex
property alias minute: minutesView.currentIndex

id: dialog
canAccept: hour > 0 || minute >= 10

DialogHeader {
id: header
//% "At least 10 minutes"
title: qsTrId("orn-updates-check-interval-minimum")
palette.highlightColor: canAccept ? Theme.highlightColor : Theme.errorColor
}

IntervalView {
id: hoursView
anchors {
top: header.bottom
right: parent.horizontalCenter
bottom: parent.bottom
left: parent.left
bottomMargin: Theme.paddingLarge
}
model: 48
}

IntervalView {
id: minutesView
anchors {
top: header.bottom
right: parent.right
bottom: parent.bottom
left: parent.horizontalCenter
bottomMargin: Theme.paddingLarge
}
model: 60
}
}
10 changes: 2 additions & 8 deletions qml/pages/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ Page {
MainPageButton {
enabled: networkManager.connected
text: qsTrId("orn-bookmarks")
onClicked: pageStack.push(Qt.resolvedUrl("BookmarksPage.qml"), {
model: bookmarksModel
})
onClicked: pageStack.push(Qt.resolvedUrl("BookmarksPage.qml"))
}
}

Expand Down Expand Up @@ -204,11 +202,7 @@ Page {
filterRole: OrnAppsModel.VisibilityRole
}

OrnBookmarksModel {
id: bookmarksModel
}

SilicaFlickable {
SilicaFlickable {
anchors.fill: parent
contentHeight: content.height

Expand Down
11 changes: 2 additions & 9 deletions qml/pages/SettingsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,12 @@ Page {
var m = interval / 60000
var h = Math.floor(m / 60)
m -= (h * 60)
var d = pageStack.push("Sailfish.Silica.TimePickerDialog", {
var d = pageStack.push(Qt.resolvedUrl("IntervalPickerDialog.qml"), {
hour: h,
minute: m
})
d.accepted.connect(function() {
var res = (d.hour * 60 + d.minute) * 60000
if (res >= 600000) {
interval = res
} else {
//% "The interval must be at least 10 minutes"
notification.show(qsTrId("orn-updates-check-interval-invalid"),
"image://theme/icon-s-high-importance")
}
interval = (d.hour * 60 + d.minute) * 60000
})
}

Expand Down
7 changes: 7 additions & 0 deletions rpm/harbour-storeman.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
* Tue Jul 20 2021 Petr Tsymbarovich <[email protected]> 0.2.8
- Fix busy indicator on the app list page remains active after pkcon action finishes
- Allow to set the update interval up to 48 hours
- Fix backing up and restoring bookmarks
- Animate removal of backup items
- Update translations

* Tue Jun 8 2021 Petr Tsymbarovich <[email protected]> 0.2.7
- Update other transactions

Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-storeman.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: harbour-storeman
Summary: OpenRepos Client for Sailfish OS
Version: 0.2.7
Version: 0.2.8
Release: 1~sdk%{getenv:RELEASE}
Group: Qt/Qt
License: MIT
Expand Down
8 changes: 5 additions & 3 deletions src/ornbackup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,10 @@ void OrnBackup::pBackup(const QString &filePath, BackupItems items)
if (items.testFlag(BackupItem::BackupBookmarks))
{
qDebug() << "Backing up bookmarks";
const auto &intlist = OrnClient::instance()->d_func()->bookmarks;
QVariantList varlist;
qCopy(intlist.cbegin(), intlist.cend(), varlist.begin());
for (auto id : OrnClient::instance()->d_func()->bookmarks) {
varlist.push_back(id);
}
file.setValue(OrnConst::bookmarks, varlist);
}

Expand Down Expand Up @@ -272,9 +273,10 @@ void OrnBackup::pRestore(const QString &filePath)
qDebug() << "Restoring bookmarks";
this->setStatus(RestoringBookmarks);
auto client = OrnClient::instance();
auto &local_bookmarks = client->d_func()->bookmarks;
for (const auto &b : bookmarks)
{
client->d_func()->bookmarks.insert(b.toUInt());
local_bookmarks.insert(b.toUInt());
}
}

Expand Down
1 change: 1 addition & 0 deletions src/ornpm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ void OrnPmPrivate::onItemProgress(const QString &id, uint status, uint percentag
Q_Q(OrnPm);

auto name = OrnUtils::packageName(id);
finishOperation(name);

if (status == Transaction::StatusRemove)
{
Expand Down
8 changes: 4 additions & 4 deletions translations/harbour-storeman-cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -792,10 +792,6 @@
<numerusform>%n hodin</numerusform>
</translation>
</message>
<message id="orn-updates-check-interval-invalid">
<source>The interval must be at least 10 minutes</source>
<translation>Interval musí být nejméně 10 minut</translation>
</message>
<message id="orn-tag-strikeout">
<source>S</source>
<extracomment>Tag strikeout</extracomment>
Expand Down Expand Up @@ -1072,5 +1068,9 @@
<source>&lt;p&gt;There are no installed packages for the next repositories.&lt;/p&gt;&lt;p&gt;Do you want to remove them now?&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message id="orn-updates-check-interval-minimum">
<source>At least 10 minutes</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
8 changes: 4 additions & 4 deletions translations/harbour-storeman-da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,6 @@
<numerusform></numerusform>
</translation>
</message>
<message id="orn-updates-check-interval-invalid">
<source>The interval must be at least 10 minutes</source>
<translation type="unfinished"></translation>
</message>
<message id="orn-tag-strikeout">
<source>S</source>
<extracomment>Tag strikeout</extracomment>
Expand Down Expand Up @@ -1067,5 +1063,9 @@
<source>&lt;p&gt;There are no installed packages for the next repositories.&lt;/p&gt;&lt;p&gt;Do you want to remove them now?&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message id="orn-updates-check-interval-minimum">
<source>At least 10 minutes</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
8 changes: 4 additions & 4 deletions translations/harbour-storeman-de_DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,6 @@
<numerusform>%n Stunden</numerusform>
</translation>
</message>
<message id="orn-updates-check-interval-invalid">
<source>The interval must be at least 10 minutes</source>
<translation>Der Intervall muss mindestens 10 Minuten betragen</translation>
</message>
<message id="orn-tag-strikeout">
<source>S</source>
<extracomment>Tag strikeout</extracomment>
Expand Down Expand Up @@ -1067,5 +1063,9 @@
<source>&lt;p&gt;There are no installed packages for the next repositories.&lt;/p&gt;&lt;p&gt;Do you want to remove them now?&lt;/p&gt;</source>
<translation>&lt;p&gt;Es gibt keine installierten Pakete für die folgenden Quellen.&lt;/p&gt;&lt;p&gt;Möchtest du sie jetzt entfernen?&lt;/p&gt;</translation>
</message>
<message id="orn-updates-check-interval-minimum">
<source>At least 10 minutes</source>
<translation>Mindestens 10 Minuten</translation>
</message>
</context>
</TS>
8 changes: 4 additions & 4 deletions translations/harbour-storeman-el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,6 @@
<numerusform>%n ώρα(ες)</numerusform>
</translation>
</message>
<message id="orn-updates-check-interval-invalid">
<source>The interval must be at least 10 minutes</source>
<translation>Το χρονικό διάστημα πρέπει να είναι τουλάχιστον 10 λεπτών</translation>
</message>
<message id="orn-tag-strikeout">
<source>S</source>
<extracomment>Tag strikeout</extracomment>
Expand Down Expand Up @@ -1067,5 +1063,9 @@
<source>&lt;p&gt;There are no installed packages for the next repositories.&lt;/p&gt;&lt;p&gt;Do you want to remove them now?&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message id="orn-updates-check-interval-minimum">
<source>At least 10 minutes</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
Loading

0 comments on commit b249e3e

Please sign in to comment.