[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/black-sheep-dev/harbour-sailhub.git</param>
<param name="branch"></param>
- <param name="revision">5ad8ef1</param>
+ <param name="revision">0.1.3-1</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub-0.1.3.tar.bz2/README.md
^
|
@@ -10,10 +10,6 @@
The development is in an early state at the moment.
Lot of functionality is missing.
-## Version compatibility
-Starting with Version 0.1.0 the application needs at least SailfishOS 4.2.
-If you use an older version of SailfishOS use app version 0.0.35 instead.
-
## Authentication with Personal Access Token
To authenticate with GitHub API a personal access token is necessary. You can create one in developer settings on GitHub profile settings page.
@@ -22,7 +18,7 @@
## Dependencies (EMOJI)
This package depends on an emoji pack I released on OpenRepos using the emojis from [Twitter Emoji](https://twemoji.twitter.com/) project.
-## DBus Interface
+## DBus Interface (not with Sailjail)
### Add Star
You can implement an option to add a star to a GitHub repository via a DBus interface inside your own app. SailHub must be installed on the user device for this to work. You need to provide username of the owner and the repository name.
@@ -87,7 +83,7 @@
- Sponsoring / Funding
- Change user profile status
- Subscription (Repository / Issue / Pull Request)
-- Add star via DBus call to use in own apps
+- Add star via DBus call to use in own apps (not with Sailjail)
## Administrative Features
|
[-]
[+]
|
Added |
_service:tar_git:harbour-sailhub-0.1.3.tar.bz2/data/org.nubecula.sailhub.service
^
|
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.nubecula.sailhub
+Exec=sailjail -p harbour-sailhub.desktop /usr/bin/harbour-sailhub
+Path=/
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub-0.1.3.tar.bz2/harbour-sailhub-open-url.desktop
^
|
@@ -3,15 +3,12 @@
X-Nemo-Application-Type=silica-qt5
Icon=harbour-sailhub
Name=SailHub
-NotShowIn=X-MeeGo;
+
MimeType=x-url-handler/github.com;
X-Maemo-Service=org.nubecula.sailhub
X-Maemo-Object-Path=/
X-Maemo-Method=org.nubecula.sailhub.openUrl
+
+NotShowIn=X-MeeGo;
Hidden=true
-[X-Sailjail]
-OrganizationName=org.nubecula
-ApplicationName=sailhub
-Permissions=Internet
-ExecDBus=/usr/bin/harbour-sailhub -prestart
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub-0.1.3.tar.bz2/harbour-sailhub.desktop
^
|
@@ -1,7 +1,8 @@
[Desktop Entry]
Type=Application
+X-Nemo-Application-Type=silica-qt5
Icon=harbour-sailhub
-Exec=sailjail -p harbour-sailhub.desktop /usr/bin/harbour-sailhub
+Exec=harbour-sailhub
Name=SailHub
[X-Sailjail]
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub-0.1.3.tar.bz2/harbour-sailhub.pro
^
|
@@ -1,5 +1,5 @@
# VERSION
-VERSION = 0.1.2
+VERSION = 0.1.3
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
# The name of your application
@@ -9,11 +9,10 @@
QT += dbus
CONFIG += link_pkgconfig sailfishapp
-PKGCONFIG += nemonotifications-qt5
+PKGCONFIG += nemonotifications-qt5 keepalive
include(extern/sailfishos-utils/compressor/compressor.pri)
-LIBS += -L../../lib -lkeepalive
SOURCES += src/harbour-sailhub.cpp \
src/api/apiinterface.cpp \
@@ -272,6 +271,11 @@
INSTALLS += twemoji
+dbus.files = data/org.nubecula.sailhub.service
+dbus.path = $$INSTALL_ROOT/usr/share/dbus-1/services
+
+INSTALLS += dbus
+
openUrl.files = harbour-sailhub-open-url.desktop
openUrl.path = $$INSTALL_ROOT/usr/share/applications
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub-0.1.3.tar.bz2/qml/pages/AboutPage.qml
^
|
@@ -14,7 +14,7 @@
service: "org.nubecula.sailhub"
iface: "org.nubecula.sailhub"
- path: "/org/nubecula/sailhub"
+ path: "/"
}
SilicaFlickable {
@@ -183,7 +183,7 @@
Button {
//visible: sailHubInterface.status === DBusInterface.Available
text: qsTr("Give star")
- onClicked: sailHubInterface.call("addStar", ["black-sheep-dev", Qt.application.name])
+ onClicked: sailHubInterface.call("addStar", ["black-sheep-dev", "harbour-sailhub"])
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub-0.1.3.tar.bz2/src/sailhub.cpp
^
|
@@ -4,6 +4,7 @@
#include <QDebug>
#endif
+#include <QDir>
#include <QFile>
#include <QProcess>
#include <QSettings>
@@ -15,6 +16,8 @@
SailHub::SailHub(QObject *parent) :
QObject(parent)
{
+ initializeOpenWith();
+
readSettings();
connect(m_api, &ApiInterface::notificationsAvailable, this, &SailHub::onNotificationsAvailable);
@@ -268,6 +271,70 @@
emit newNotificationsAvailable();
}
+void SailHub::initializeOpenWith()
+{
+ const QStringList sailfishOSVersion = QSysInfo::productVersion().split(".");
+ int sailfishOSMajorVersion = sailfishOSVersion.value(0).toInt();
+ int sailfishOSMinorVersion = sailfishOSVersion.value(1).toInt();
+
+ if (sailfishOSMajorVersion >= 4 && sailfishOSMinorVersion >= 3) {
+ return;
+ }
+
+ const QString applicationsLocation(QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation));
+
+ const QString desktopFilePath = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + "/harbour-sailhub-open-url.desktop";
+ QFile desktopFile(desktopFilePath);
+ if (desktopFile.exists()) {
+ qDebug() << "Piepmatz open-with file existing, removing...";
+ desktopFile.remove();
+ QProcess::startDetached("update-desktop-database " + applicationsLocation);
+ }
+ qDebug() << "Creating Open-With file at " << desktopFile.fileName();
+ if (desktopFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ QTextStream fileOut(&desktopFile);
+ fileOut.setCodec("UTF-8");
+ fileOut << QStringLiteral("[Desktop Entry]").toUtf8() << "\n";
+ fileOut << QStringLiteral("Type=Application").toUtf8() << "\n";
+ fileOut << QStringLiteral("Name=SailHub").toUtf8() << "\n";
+ fileOut << QStringLiteral("Icon=harbour-sailhub").toUtf8() << "\n";
+ fileOut << QStringLiteral("NotShowIn=X-MeeGo;").toUtf8() << "\n";
+ if (sailfishOSMajorVersion < 4 || ( sailfishOSMajorVersion == 4 && sailfishOSMinorVersion < 1 )) {
+ fileOut << QStringLiteral("MimeType=text/html;x-scheme-handler/http;x-scheme-handler/https;").toUtf8() << "\n";
+ } else {
+ fileOut << QStringLiteral("MimeType=x-url-handler/github.com;").toUtf8() << "\n";
+ }
+ fileOut << QStringLiteral("X-Maemo-Service=org.nubecula.sailhub").toUtf8() << "\n";
+ fileOut << QStringLiteral("X-Maemo-Method=org.nubecula.sailhub.openUrl").toUtf8() << "\n";
+ fileOut << QStringLiteral("Hidden=true;").toUtf8() << "\n";
+ fileOut.flush();
+ desktopFile.close();
+ QProcess::startDetached("update-desktop-database " + QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation));
+ }
+
+ const QString dbusPathName = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/dbus-1/services";
+ QDir dbusPath(dbusPathName);
+ if (!dbusPath.exists()) {
+ qDebug() << "Creating D-Bus directory " << dbusPathName;
+ dbusPath.mkpath(dbusPathName);
+ }
+ const QString dbusServiceFileName = dbusPathName + "/org.nubecula.sailhub.service";
+ QFile dbusServiceFile(dbusServiceFileName);
+ if (!dbusServiceFile.exists()) {
+ qDebug() << "Creating D-Bus service file at " << dbusServiceFile.fileName();
+ if (dbusServiceFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ QTextStream fileOut(&dbusServiceFile);
+ fileOut.setCodec("UTF-8");
+ fileOut << QStringLiteral("[D-BUS Service]").toUtf8() << "\n";
+ fileOut << QStringLiteral("Name=org.nubecula.sailhub").toUtf8() << "\n";
+ fileOut << QStringLiteral("Exec=/usr/bin/invoker -s --type=silica-qt5 /usr/bin/harbour-sailhub").toUtf8() << "\n";
+ fileOut << QStringLiteral("Path=/").toUtf8() << "\n";
+ fileOut.flush();
+ dbusServiceFile.close();
+ }
+ }
+}
+
void SailHub::readSettings()
{
QString path = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/org.nubecula/sailhub/sailhub.conf";
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub-0.1.3.tar.bz2/src/sailhub.h
^
|
@@ -61,6 +61,8 @@
OneHour
};
+ void initializeOpenWith();
+
// settings
void readSettings();
void writeSettings();
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-sailhub.yaml
^
|
@@ -1,6 +1,6 @@
Name: harbour-sailhub
Summary: SailHub
-Version: 0.1.2
+Version: 0.1.3
Release: 1
# The contents of the Group field should be one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
@@ -19,7 +19,15 @@
Type: desktop-application
Categories:
- Development
+ Custom:
+ Repo: https://github.com/black-sheep-dev/harbour-sailhub/
Icon: https://raw.githubusercontent.com/black-sheep-dev/harbour-sailhub/main/icons/harbour-sailhub.svg
+ Screenshots:
+ - https://github.com/black-sheep-dev/harbour-sailhub/raw/metadata/screenshot1.png
+ - https://github.com/black-sheep-dev/harbour-sailhub/raw/metadata/screenshot2.png
+ - https://github.com/black-sheep-dev/harbour-sailhub/raw/metadata/screenshot3.png
+ - https://github.com/black-sheep-dev/harbour-sailhub/raw/metadata/screenshot4.png
+ - https://github.com/black-sheep-dev/harbour-sailhub/raw/metadata/screenshot5.png
Url:
Donation: https://www.paypal.com/paypalme/nubecula/1
%endif
@@ -54,6 +62,7 @@
- '%{_datadir}/applications/%{name}.desktop'
- '%{_datadir}/applications/%{name}-open-url.desktop'
- '%{_datadir}/icons/hicolor/*/apps/%{name}.png'
+ - '%{_datadir}/dbus-1/services/org.nubecula.sailhub.service'
# For more information about yaml and what's supported in Sailfish OS
# build system, please see https://wiki.merproject.org/wiki/Spectacle
|