Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
0 results Searching
Select Git revision
Loading items
Show changes

Commits on Source 165

65 additional commits have been omitted to prevent performance issues.
37 files
+ 762
507
Compare changes
  • Side-by-side
  • Inline

Files

+1 −1
Original line number Diff line number Diff line
*.pro.user
build_*/
lib/qtlib/
lib/qtil/
lib/AppImageUpdate/
lib/AppImageUpdate-prebuilt/

.gitlab-ci.yml

0 → 100644
+15 −0
Original line number Diff line number Diff line
stages:
  - build

appimage:
  stage: build
  image: ubuntu:14.04
  only:
    - master
    - /^release\-.+/
  script:
    - ./scripts/package appimage
  artifacts:
    paths:
    - build_*/ocs-manager*.AppImage
    expire_in: 2 days

.travis.yml

deleted100644 → 0
+0 −15
Original line number Diff line number Diff line
dist: trusty
sudo: required
services:
  - docker

branches:
  only:
    - master

script:
  - mntdir='/mnt/ocs-manager'
  #- docker run --rm -v $(pwd):${mntdir} ubuntu:16.04 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh snap"
  #- docker run --rm -v $(pwd):${mntdir} ubuntu:16.04 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh flatpak"
  - docker run --rm -v $(pwd):${mntdir} ubuntu:17.10 /bin/bash -c "sh ${mntdir}/scripts/build-docker.sh appimage"
  - cat transfer.log
+1 −2
Original line number Diff line number Diff line
# ocs-manager

[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Build Status](https://travis-ci.org/opendesktop/ocs-manager.svg?branch=master)](https://travis-ci.org/opendesktop/ocs-manager)

A tool to handle item installation from OCS provider, file management, and apply themes.

Copyright: 2017, Opendesktop.org
Copyright: 2017-2019, Opendesktop.org

License: GPL-3+
+3 −1
Original line number Diff line number Diff line
@@ -29,10 +29,11 @@ RESOURCES += $${PWD}/configs/configs.qrc

INCLUDEPATH += $${PWD}/src

unix:!ios:!android {
contains(DEFINES, APP_DESKTOP) {
    QT += dbus

    HEADERS += \
        $${PWD}/src/updaters/appimageupdater.h \
        $${PWD}/src/desktopthemes/kdetheme.h \
        $${PWD}/src/desktopthemes/gnometheme.h \
        $${PWD}/src/desktopthemes/xfcetheme.h \
@@ -40,6 +41,7 @@ unix:!ios:!android {
        $${PWD}/src/desktopthemes/matetheme.h

    SOURCES += \
        $${PWD}/src/updaters/appimageupdater.cpp \
        $${PWD}/src/desktopthemes/kdetheme.cpp \
        $${PWD}/src/desktopthemes/gnometheme.cpp \
        $${PWD}/src/desktopthemes/xfcetheme.cpp \
Original line number Diff line number Diff line
{
    "id": "ocs-manager",
    "name": "ocs-manager",
    "version": "0.5.0",
    "version": "0.8.1",
    "organization": "Opendesktop.org",
    "domain": "org.opendesktop.ocs-manager",
    "icon": ":/desktop/ocs-manager.svg",
@@ -9,5 +9,5 @@
    "license": "GPL-3+",
    "author": "Opendesktop.org",
    "contact": "contact@opendesktop.org",
    "homepage": "https://github.com/opendesktop/ocs-manager"
    "homepage": "https://git.opendesktop.org/akiraohgaki/ocs-manager"
}
Original line number Diff line number Diff line
{
    "bin": {
        "name": "Softwares",
        "destination": "$HOME/.local/bin",
        "name": "Software",
        "destination": "",
        "xdg_destination": "$HOME/.local/bin",
        "generic_destination": "$APP_DATA/bin"
    },
    "downloads": {
        "name": "Downloads",
        "destination": "$XDG_DOWNLOAD_DIR",
        "destination": "",
        "xdg_destination": "$XDG_DOWNLOAD_DIR",
        "generic_destination": "$APP_DATA/downloads"
    },
    "documents": {
        "name": "Documents",
        "destination": "$XDG_DOCUMENTS_DIR",
        "destination": "",
        "xdg_destination": "$XDG_DOCUMENTS_DIR",
        "generic_destination": "$APP_DATA/documents"
    },
    "pictures": {
        "name": "Pictures",
        "destination": "$XDG_PICTURES_DIR",
        "destination": "",
        "xdg_destination": "$XDG_PICTURES_DIR",
        "generic_destination": "$APP_DATA/pictures"
    },
    "music": {
        "name": "Music",
        "destination": "$XDG_MUSIC_DIR",
        "destination": "",
        "xdg_destination": "$XDG_MUSIC_DIR",
        "generic_destination": "$APP_DATA/music"
    },
    "videos": {
        "name": "Videos",
        "destination": "$XDG_VIDEOS_DIR",
        "destination": "",
        "xdg_destination": "$XDG_VIDEOS_DIR",
        "generic_destination": "$APP_DATA/videos"
    },
    "wallpapers": {
        "name": "Wallpapers",
        "destination": "$XDG_DATA_HOME/wallpapers",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/wallpapers",
        "generic_destination": "$APP_DATA/wallpapers"
    },
    "fonts": {
        "name": "Fonts",
        "destination": "$HOME/.fonts",
        "destination": "",
        "xdg_destination": "$HOME/.fonts",
        "generic_destination": "$APP_DATA/fonts"
    },
    "cursors": {
        "name": "Cursors",
        "destination": "$HOME/.icons",
        "destination": "",
        "xdg_destination": "$HOME/.icons",
        "generic_destination": "$APP_DATA/cursors"
    },
    "icons": {
        "name": "Icons",
        "destination": "$XDG_DATA_HOME/icons",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/icons",
        "generic_destination": "$APP_DATA/icons"
    },
    "emoticons": {
        "name": "Emoticons",
        "destination": "$XDG_DATA_HOME/emoticons",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/emoticons",
        "generic_destination": "$APP_DATA/emoticons"
    },
    "themes": {
        "name": "Desktop Themes",
        "destination": "$HOME/.themes",
        "destination": "",
        "xdg_destination": "$HOME/.themes",
        "generic_destination": "$APP_DATA/themes"
    },
    "emerald_themes": {
        "name": "Emerald Themes",
        "destination": "$HOME/.emerald/themes",
        "destination": "",
        "xdg_destination": "$HOME/.emerald/themes",
        "generic_destination": "$APP_DATA/emerald_themes"
    },
    "enlightenment_themes": {
        "name": "Enlightenment Themes",
        "destination": "$HOME/.e/e/themes",
        "destination": "",
        "xdg_destination": "$HOME/.e/e/themes",
        "generic_destination": "$APP_DATA/enlightenment_themes"
    },
    "enlightenment_backgrounds": {
        "name": "Enlightenment Backgrounds",
        "destination": "$HOME/.e/e/backgrounds",
        "destination": "",
        "xdg_destination": "$HOME/.e/e/backgrounds",
        "generic_destination": "$APP_DATA/enlightenment_backgrounds"
    },
    "fluxbox_styles": {
        "name": "Fluxbox Styles",
        "destination": "$HOME/.fluxbox/styles",
        "destination": "",
        "xdg_destination": "$HOME/.fluxbox/styles",
        "generic_destination": "$APP_DATA/fluxbox_styles"
    },
    "pekwm_themes": {
        "name": "PekWM Themes",
        "destination": "$HOME/.pekwm/themes",
        "destination": "",
        "xdg_destination": "$HOME/.pekwm/themes",
        "generic_destination": "$APP_DATA/pekwm_themes"
    },
    "icewm_themes": {
        "name": "IceWM Themes",
        "destination": "$HOME/.icewm/themes",
        "destination": "",
        "xdg_destination": "$HOME/.icewm/themes",
        "generic_destination": "$APP_DATA/icewm_themes"
    },
    "plasma_plasmoids": {
        "name": "Plasma Plasmoids",
        "destination": "$XDG_DATA_HOME/plasma/plasmoids",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/plasma/plasmoids",
        "generic_destination": "$APP_DATA/plasma_plasmoids"
    },
    "plasma_look_and_feel": {
        "name": "Plasma Look and Feel",
        "destination": "$XDG_DATA_HOME/plasma/look-and-feel",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/plasma/look-and-feel",
        "generic_destination": "$APP_DATA/plasma_look_and_feel"
    },
    "plasma_desktopthemes": {
        "name": "Plasma Desktop Themes",
        "destination": "$XDG_DATA_HOME/plasma/desktoptheme",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/plasma/desktoptheme",
        "generic_destination": "$APP_DATA/plasma_desktopthemes"
    },
    "kwin_effects": {
        "name": "KWin Effects",
        "destination": "$XDG_DATA_HOME/kwin/effects",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/kwin/effects",
        "generic_destination": "$APP_DATA/kwin_effects"
    },
    "kwin_scripts": {
        "name": "KWin Scripts",
        "destination": "$XDG_DATA_HOME/kwin/scripts",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/kwin/scripts",
        "generic_destination": "$APP_DATA/kwin_scripts"
    },
    "kwin_tabbox": {
        "name": "KWin Window Switcher",
        "destination": "$XDG_DATA_HOME/kwin/tabbox",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/kwin/tabbox",
        "generic_destination": "$APP_DATA/kwin_tabbox"
    },
    "aurorae_themes": {
        "name": "Aurorae Themes",
        "destination": "$XDG_DATA_HOME/aurorae/themes",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/aurorae/themes",
        "generic_destination": "$APP_DATA/aurorae_themes"
    },
    "dekorator_themes": {
        "name": "deKorator Themes",
        "destination": "$XDG_DATA_HOME/deKorator/themes",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/deKorator/themes",
        "generic_destination": "$APP_DATA/dekorator_themes"
    },
    "qtcurve": {
        "name": "QtCurve Themes",
        "destination": "$XDG_DATA_HOME/QtCurve",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/QtCurve",
        "generic_destination": "$APP_DATA/qtcurve"
    },
    "color_schemes": {
        "name": "KDE Color Schemes",
        "destination": "$XDG_DATA_HOME/color-schemes",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/color-schemes",
        "generic_destination": "$APP_DATA/color_schemes"
    },
    "gnome_shell_extensions": {
        "name": "Gnome Shell Extensions",
        "destination": "$XDG_DATA_HOME/gnome-shell/extensions",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/gnome-shell/extensions",
        "generic_destination": "$APP_DATA/gnome_shell_extensions"
    },
    "cinnamon_applets": {
        "name": "Cinnamon Applets",
        "destination": "$XDG_DATA_HOME/cinnamon/applets",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/cinnamon/applets",
        "generic_destination": "$APP_DATA/cinnamon_applets"
    },
    "cinnamon_desklets": {
        "name": "Cinnamon Desklets",
        "destination": "$XDG_DATA_HOME/cinnamon/desklets",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/cinnamon/desklets",
        "generic_destination": "$APP_DATA/cinnamon_desklets"
    },
    "cinnamon_extensions": {
        "name": "Cinnamon Extensions",
        "destination": "$XDG_DATA_HOME/cinnamon/extensions",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/cinnamon/extensions",
        "generic_destination": "$APP_DATA/cinnamon_extensions"
    },
    "nautilus_scripts": {
        "name": "Nautilus Scripts",
        "destination": "$XDG_DATA_HOME/nautilus/scripts",
        "destination": "",
        "xdg_destination": "$XDG_DATA_HOME/nautilus/scripts",
        "generic_destination": "$APP_DATA/nautilus_scripts"
    },
    "amarok_scripts": {
        "name": "Amarok Scripts",
        "destination": "$KDEHOME/share/apps/amarok/scripts",
        "destination": "",
        "xdg_destination": "$KDEHOME/share/apps/amarok/scripts",
        "generic_destination": "$APP_DATA/amarok_scripts"
    },
    "yakuake_skins": {
        "name": "Yakuake Skins",
        "destination": "$KDEHOME/share/apps/yakuake/skins",
        "destination": "",
        "xdg_destination": "$KDEHOME/share/apps/yakuake/skins",
        "generic_destination": "$APP_DATA/yakuake_skins"
    },
    "cairo_clock_themes": {
        "name": "Cairo-Clock Themes",
        "destination": "$HOME/.cairo-clock/themes",
        "destination": "",
        "xdg_destination": "$HOME/.cairo-clock/themes",
        "generic_destination": "$APP_DATA/cairo_clock_themes"
    },
    "books": {
        "name": "Books",
        "destination": "$APP_DATA/books",
        "destination": "",
        "xdg_destination": "$APP_DATA/books",
        "generic_destination": "$APP_DATA/books"
    },
    "comics": {
        "name": "Comics",
        "destination": "$APP_DATA/comics",
        "destination": "",
        "xdg_destination": "$APP_DATA/comics",
        "generic_destination": "$APP_DATA/comics"
    }
}
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ bool KdeTheme::applyAsCursor() const
        << "c.writeEntry('cursorTheme', '" + themeName_ + "');";

    if (evaluateScript(script)) {
        QProcess::startDetached("sh -c \"echo 'Xcursor.theme: " + themeName_ + "' | xrdb -merge\"");

        auto setLaunchEnv = QDBusMessage::createMethodCall("org.kde.klauncher5", "/KLauncher", "org.kde.KLauncher", "setLaunchEnv");
        setLaunchEnv.setArguments(QVariantList() << QVariant(QString("XCURSOR_THEME")) << QVariant(themeName_));
        QDBusConnection::sessionBus().call(setLaunchEnv);
@@ -67,6 +69,10 @@ bool KdeTheme::applyAsCursor() const
        notifyChange.setArguments(QVariantList() << QVariant(qint32(5)) << QVariant(qint32(0)));
        QDBusConnection::sessionBus().send(notifyChange);

        QProcess::startDetached("kwin --replace");
        QProcess::startDetached("kquitapp5 plasmashell");
        QProcess::startDetached("sh -c \"XCURSOR_THEME='" + themeName_ + "' kstart5 plasmashell\"");

        return true;
    }
    return false;
Original line number Diff line number Diff line
@@ -3,15 +3,15 @@
#include <QStringList>
#include <QStandardPaths>

#include "qtlib_dir.h"
#include "qtil_dir.h"

ConfigHandler::ConfigHandler(QObject *parent)
    : QObject(parent)
{
    appConfig_ = qtlib::Config(":/configs");
    appConfig_ = Qtil::Config(":/configs");
    importAppConfigApplication();
    importAppConfigInstallTypes();
    usrConfig_ = qtlib::Config(qtlib::Dir::genericConfigPath() + "/" + getAppConfigApplication()["id"].toString());
    usrConfig_ = Qtil::Config(Qtil::Dir::genericConfigPath() + "/" + getAppConfigApplication()["id"].toString());
}

QJsonObject ConfigHandler::getAppConfigApplication() const
@@ -207,8 +207,15 @@ void ConfigHandler::importAppConfigInstallTypes()
    auto installTypes = appConfig_.get("install_types");
    for (const auto &key : installTypes.keys()) {
        auto installtype = installTypes[key].toObject();
        installtype["destination"] = convertPathString(installtype["destination"].toString());
        installtype["generic_destination"] = convertPathString(installtype["generic_destination"].toString());
        auto xdgDestination = convertPathString(installtype["xdg_destination"].toString());
        auto genericDestination = convertPathString(installtype["generic_destination"].toString());
        installtype["xdg_destination"] = xdgDestination;
        installtype["generic_destination"] = genericDestination;
#ifdef APP_DESKTOP
        installtype["destination"] = xdgDestination;
#else
        installtype["destination"] = genericDestination;
#endif
        installTypes[key] = installtype;
    }
    auto installTypesAlias = appConfig_.get("install_types_alias");
@@ -229,7 +236,7 @@ QString ConfigHandler::convertPathString(const QString &path) const
{
    auto newPath = path;
    if (newPath.contains("$HOME")) {
        newPath.replace("$HOME", qtlib::Dir::homePath());
        newPath.replace("$HOME", Qtil::Dir::homePath());
    }
    else if (newPath.contains("$XDG_DOCUMENTS_DIR")) {
        newPath.replace("$XDG_DOCUMENTS_DIR", QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
@@ -247,13 +254,13 @@ QString ConfigHandler::convertPathString(const QString &path) const
        newPath.replace("$XDG_VIDEOS_DIR", QStandardPaths::writableLocation(QStandardPaths::MoviesLocation));
    }
    else if (newPath.contains("$XDG_DATA_HOME")) {
        newPath.replace("$XDG_DATA_HOME", qtlib::Dir::genericDataPath());
        newPath.replace("$XDG_DATA_HOME", Qtil::Dir::genericDataPath());
    }
    else if (newPath.contains("$KDEHOME")) {
        newPath.replace("$KDEHOME", qtlib::Dir::kdehomePath());
        newPath.replace("$KDEHOME", Qtil::Dir::kdehomePath());
    }
    else if (newPath.contains("$APP_DATA")) {
        newPath.replace("$APP_DATA", qtlib::Dir::genericDataPath() + "/" + getAppConfigApplication()["id"].toString());
        newPath.replace("$APP_DATA", Qtil::Dir::genericDataPath() + "/" + getAppConfigApplication()["id"].toString());
    }
    return newPath;
}
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
#include <QObject>
#include <QJsonObject>

#include "qtlib_config.h"
#include "qtil_config.h"

class ConfigHandler : public QObject
{
@@ -42,8 +42,8 @@ private:
    void importAppConfigInstallTypes();
    QString convertPathString(const QString &path) const;

    qtlib::Config appConfig_;
    qtlib::Config usrConfig_;
    Qtil::Config appConfig_;
    Qtil::Config usrConfig_;
    QJsonObject appConfigApplication_;
    QJsonObject appConfigInstallTypes_;
};
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

#include <QStringList>

#ifdef QTLIB_UNIX
#ifdef APP_DESKTOP
#include <QFileInfo>

#include "desktopthemes/kdetheme.h"
@@ -98,7 +98,7 @@ bool DesktopThemeHandler::isApplicableType(const QString &installType) const

bool DesktopThemeHandler::applyTheme(const QString &path, const QString &installType) const
{
#ifdef QTLIB_UNIX
#ifdef APP_DESKTOP
    if (QFileInfo::exists(path) && isApplicableType(installType)) {
        auto desktop = desktopEnvironment();

Original line number Diff line number Diff line
@@ -6,14 +6,16 @@
#include <QFileInfo>
#include <QDateTime>

#ifdef QTLIB_UNIX
#include <QProcess>
#ifdef APP_DESKTOP
#include <QStringList>
#include <QDir>
#include <QDirIterator>
#endif

#include "qtlib_dir.h"
#include "qtlib_file.h"
#include "qtlib_networkresource.h"
#include "qtlib_package.h"
#include "qtil_dir.h"
#include "qtil_file.h"
#include "qtil_networkresource.h"
#include "qtil_package.h"

#include "handlers/confighandler.h"

@@ -67,9 +69,9 @@ void ItemHandler::getItem(const QString &command, const QString &url, const QStr
    itemMetadataSet[itemKey] = metadata;
    setMetadataSet(itemMetadataSet);