CURA-5137 Rename Plugin Browser into Toolbox

This commit is contained in:
Diego Prado Gesto 2018-03-30 14:15:00 +02:00
parent f63e67dc22
commit 322fe7d61f
23 changed files with 27 additions and 26 deletions

View file

@ -261,7 +261,7 @@ class CuraApplication(QtApplication):
"TranslateTool",
"FileLogger",
"XmlMaterialProfile",
"PluginBrowser",
"Toolbox",
"PrepareStage",
"MonitorStage"
])

View file

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

View file

@ -1,7 +0,0 @@
{
"name": "Plugin Browser",
"author": "Ultimaker B.V.",
"version": "1.0.0",
"api": 4,
"description": "Find, manage and install new plugins."
}

View file

@ -1,5 +1,5 @@
# Copyright (c) 2017 Ultimaker B.V.
# PluginBrowser is released under the terms of the LGPLv3 or higher.
# Copyright (c) 2018 Ultimaker B.V.
# Toolbox is released under the terms of the LGPLv3 or higher.
from PyQt5.QtCore import QUrl, QObject, pyqtProperty, pyqtSignal, pyqtSlot
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
@ -24,7 +24,7 @@ from cura.CuraApplication import CuraApplication
i18n_catalog = i18nCatalog("cura")
class PluginBrowser(QObject, Extension):
class Toolbox(QObject, Extension):
def __init__(self, parent=None):
super().__init__(parent)
@ -138,6 +138,7 @@ class PluginBrowser(QObject, Extension):
def _createDialog(self, qml_name):
Logger.log("d", "Creating dialog [%s]", qml_name)
path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "resources", "qml", qml_name)
Logger.log("d", "Creating dialog [%s]", path)
dialog = Application.getInstance().createQmlComponent(path, {"manager": self})
return dialog

View file

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

View file

@ -0,0 +1,7 @@
{
"name": "Toolbox",
"author": "Ultimaker B.V.",
"version": "1.0.0",
"api": 4,
"description": "Find, manage and install new cura packages."
}

View file

@ -430,7 +430,7 @@ Item
Action
{
id: browsePluginsAction
text: catalog.i18nc("@action:menu", "Browse plugins...")
text: catalog.i18nc("@action:menu", "Browse packages...")
iconName: "plugins_browse"
}

View file

@ -270,7 +270,7 @@ UM.MainWindow
Menu
{
id: plugin_menu
title: catalog.i18nc("@title:menu menubar:toplevel", "P&lugins")
title: catalog.i18nc("@title:menu menubar:toplevel", "&Toolbox")
MenuItem { action: Cura.Actions.browsePlugins }
}
@ -670,7 +670,7 @@ UM.MainWindow
{
target: Cura.Actions.browsePlugins
onTriggered: {
curaExtensions.callExtensionMethod("Plugin Browser", "browsePlugins")
curaExtensions.callExtensionMethod("Toolbox", "browsePlugins")
}
}