Browse Source

Remove ChangeLog plugin

CURA-6436
CURA-6447
Lipu Fei 6 years ago
parent
commit
3794c8f75e

+ 0 - 65
plugins/ChangeLogPlugin/ChangeLog.py

@@ -1,65 +0,0 @@
-# Copyright (c) 2019 Ultimaker B.V.
-# Cura is released under the terms of the LGPLv3 or higher.
-
-import os.path
-
-from PyQt5.QtCore import QObject
-
-from UM.i18n import i18nCatalog
-from UM.Extension import Extension
-from UM.Application import Application
-from UM.PluginRegistry import PluginRegistry
-from UM.Version import Version
-
-catalog = i18nCatalog("cura")
-
-
-class ChangeLog(Extension, QObject):
-    def __init__(self, parent = None):
-        QObject.__init__(self, parent)
-        Extension.__init__(self)
-        self._changelog_window = None
-        self._changelog_context = None
-        version_string = Application.getInstance().getVersion()
-        if version_string is not "master":
-            self._current_app_version = Version(version_string)
-        else:
-            self._current_app_version = None
-
-        Application.getInstance().engineCreatedSignal.connect(self._onEngineCreated)
-        Application.getInstance().getPreferences().addPreference("general/latest_version_changelog_shown", "2.0.0") #First version of CURA with uranium
-        self.setMenuName(catalog.i18nc("@item:inmenu", "Changelog"))
-        self.addMenuItem(catalog.i18nc("@item:inmenu", "Show Changelog"), self.showChangelog)
-
-    def _onEngineCreated(self):
-        if not self._current_app_version:
-            return #We're on dev branch.
-
-        if Application.getInstance().getPreferences().getValue("general/latest_version_changelog_shown") == "master":
-            latest_version_shown = Version("0.0.0")
-        else:
-            latest_version_shown = Version(Application.getInstance().getPreferences().getValue("general/latest_version_changelog_shown"))
-
-        Application.getInstance().getPreferences().setValue("general/latest_version_changelog_shown", Application.getInstance().getVersion())
-
-        # Do not show the changelog when there is no global container stack
-        # This implies we are running Cura for the first time.
-        if not Application.getInstance().getGlobalContainerStack():
-            return
-
-        if self._current_app_version > latest_version_shown:
-            self.showChangelog()
-
-    def showChangelog(self):
-        if not self._changelog_window:
-            self.createChangelogWindow()
-
-        self._changelog_window.show()
-
-    def hideChangelog(self):
-        if self._changelog_window:
-            self._changelog_window.hide()
-
-    def createChangelogWindow(self):
-        path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "ChangeLog.qml")
-        self._changelog_window = Application.getInstance().createQmlComponent(path, {"manager": self})

+ 0 - 43
plugins/ChangeLogPlugin/ChangeLog.qml

@@ -1,43 +0,0 @@
-// Copyright (c) 2015 Ultimaker B.V.
-// Cura is released under the terms of the LGPLv3 or higher.
-
-import QtQuick 2.1
-import QtQuick.Controls 1.3
-import QtQuick.Layouts 1.1
-import QtQuick.Window 2.1
-
-import UM 1.3 as UM
-import Cura 1.0 as Cura
-
-
-UM.Dialog
-{
-    id: base
-    minimumWidth: (UM.Theme.getSize("modal_window_minimum").width * 0.75) | 0
-    minimumHeight: (UM.Theme.getSize("modal_window_minimum").height * 0.75) | 0
-    width: minimumWidth
-    height: minimumHeight
-    title: catalog.i18nc("@label", "Changelog")
-
-    TextArea
-    {
-        anchors.fill: parent
-        text: CuraApplication.getTextManager().getChangeLogText()
-        readOnly: true;
-        textFormat: TextEdit.RichText
-    }
-
-    rightButtons: [
-        Button
-        {
-            UM.I18nCatalog
-            {
-                id: catalog
-                name: "cura"
-            }
-
-            text: catalog.i18nc("@action:button", "Close")
-            onClicked: base.hide()
-        }
-    ]
-}

+ 0 - 11
plugins/ChangeLogPlugin/__init__.py

@@ -1,11 +0,0 @@
-# Copyright (c) 2015 Ultimaker B.V.
-# Cura is released under the terms of the LGPLv3 or higher.
-
-from . import ChangeLog
-
-
-def getMetaData():
-    return {}
-
-def register(app):
-    return {"extension": ChangeLog.ChangeLog()}

+ 0 - 8
plugins/ChangeLogPlugin/plugin.json

@@ -1,8 +0,0 @@
-{
-    "name": "Changelog",
-    "author": "Ultimaker B.V.",
-    "version": "1.0.1",
-    "description": "Shows changes since latest checked version.",
-    "api": "6.0",
-    "i18n-catalog": "cura"
-}

+ 0 - 17
resources/bundled_packages/cura.json

@@ -33,23 +33,6 @@
             }
         }
     },
-    "ChangeLogPlugin": {
-        "package_info": {
-            "package_id": "ChangeLogPlugin",
-            "package_type": "plugin",
-            "display_name": "Change Log",
-            "description": "Shows changes since latest checked version.",
-            "package_version": "1.0.1",
-            "sdk_version": "6.0.0",
-            "website": "https://ultimaker.com",
-            "author": {
-                "author_id": "UltimakerPackages",
-                "display_name": "Ultimaker B.V.",
-                "email": "plugins@ultimaker.com",
-                "website": "https://ultimaker.com"
-            }
-        }
-    },
     "CuraDrive": {
         "package_info": {
             "package_id": "CuraDrive",