mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 01:07:52 -06:00
CURA-5137 Rename Plugin Browser into Toolbox
This commit is contained in:
parent
f63e67dc22
commit
322fe7d61f
23 changed files with 27 additions and 26 deletions
|
@ -261,7 +261,7 @@ class CuraApplication(QtApplication):
|
||||||
"TranslateTool",
|
"TranslateTool",
|
||||||
"FileLogger",
|
"FileLogger",
|
||||||
"XmlMaterialProfile",
|
"XmlMaterialProfile",
|
||||||
"PluginBrowser",
|
"Toolbox",
|
||||||
"PrepareStage",
|
"PrepareStage",
|
||||||
"MonitorStage"
|
"MonitorStage"
|
||||||
])
|
])
|
||||||
|
|
|
@ -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()}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Plugin Browser",
|
|
||||||
"author": "Ultimaker B.V.",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"api": 4,
|
|
||||||
"description": "Find, manage and install new plugins."
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Copyright (c) 2017 Ultimaker B.V.
|
# Copyright (c) 2018 Ultimaker B.V.
|
||||||
# PluginBrowser is released under the terms of the LGPLv3 or higher.
|
# Toolbox is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from PyQt5.QtCore import QUrl, QObject, pyqtProperty, pyqtSignal, pyqtSlot
|
from PyQt5.QtCore import QUrl, QObject, pyqtProperty, pyqtSignal, pyqtSlot
|
||||||
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
|
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
|
||||||
|
@ -24,7 +24,7 @@ from cura.CuraApplication import CuraApplication
|
||||||
|
|
||||||
i18n_catalog = i18nCatalog("cura")
|
i18n_catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
class PluginBrowser(QObject, Extension):
|
class Toolbox(QObject, Extension):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
|
@ -138,6 +138,7 @@ class PluginBrowser(QObject, Extension):
|
||||||
def _createDialog(self, qml_name):
|
def _createDialog(self, qml_name):
|
||||||
Logger.log("d", "Creating dialog [%s]", qml_name)
|
Logger.log("d", "Creating dialog [%s]", qml_name)
|
||||||
path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "resources", "qml", 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})
|
dialog = Application.getInstance().createQmlComponent(path, {"manager": self})
|
||||||
return dialog
|
return dialog
|
||||||
|
|
12
plugins/Toolbox/__init__.py
Normal file
12
plugins/Toolbox/__init__.py
Normal 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()}
|
7
plugins/Toolbox/plugin.json
Normal file
7
plugins/Toolbox/plugin.json
Normal 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."
|
||||||
|
}
|
|
@ -430,7 +430,7 @@ Item
|
||||||
Action
|
Action
|
||||||
{
|
{
|
||||||
id: browsePluginsAction
|
id: browsePluginsAction
|
||||||
text: catalog.i18nc("@action:menu", "Browse plugins...")
|
text: catalog.i18nc("@action:menu", "Browse packages...")
|
||||||
iconName: "plugins_browse"
|
iconName: "plugins_browse"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ UM.MainWindow
|
||||||
Menu
|
Menu
|
||||||
{
|
{
|
||||||
id: plugin_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 }
|
MenuItem { action: Cura.Actions.browsePlugins }
|
||||||
}
|
}
|
||||||
|
@ -670,7 +670,7 @@ UM.MainWindow
|
||||||
{
|
{
|
||||||
target: Cura.Actions.browsePlugins
|
target: Cura.Actions.browsePlugins
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
curaExtensions.callExtensionMethod("Plugin Browser", "browsePlugins")
|
curaExtensions.callExtensionMethod("Toolbox", "browsePlugins")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue