diff --git a/Gui/Command.py b/CQGui/Command.py similarity index 100% rename from Gui/Command.py rename to CQGui/Command.py diff --git a/Gui/ExportCQ.py b/CQGui/ExportCQ.py similarity index 100% rename from Gui/ExportCQ.py rename to CQGui/ExportCQ.py diff --git a/Gui/ImportCQ.py b/CQGui/ImportCQ.py similarity index 91% rename from Gui/ImportCQ.py rename to CQGui/ImportCQ.py index 4e0c601..2d6fe32 100644 --- a/Gui/ImportCQ.py +++ b/CQGui/ImportCQ.py @@ -13,19 +13,19 @@ if open.__module__ == '__builtin__': def AutoExecute(): - """We should be able to pass the Gui.Commands.CadQueryExecuteScript function directly to the file_reloaded + """We should be able to pass the CQGui.Commands.CadQueryExecuteScript function directly to the file_reloaded connect function, but that causes a segfault in FreeCAD. This function is a work-around for that. This function is passed to file_reloaded signal and in turn calls the CadQueryExecuteScript.Activated function.""" try: import CadQuery.Gui.Command CadQuery.Gui.Command.CadQueryExecuteScript().Activated() except: - import Gui.Command - Gui.Command.CadQueryExecuteScript().Activated() + import CQGui.Command + CQGui.Command.CadQueryExecuteScript().Activated() def open(filename): - #All of the Gui.* calls in the Python console break after opening if we don't do this - FreeCADGui.doCommand("import FreeCADGui as Gui") + #All of the CQGui.* calls in the Python console break after opening if we don't do this + FreeCADGui.doCommand("import FreeCADGui as CQGui") # Make sure that we enforce a specific version (2.7) of the Python interpreter ver = hex(sys.hexversion) diff --git a/Gui/Resources/CadQuery.qrc b/CQGui/Resources/CadQuery.qrc similarity index 100% rename from Gui/Resources/CadQuery.qrc rename to CQGui/Resources/CadQuery.qrc diff --git a/Gui/Resources/icons/CQ_Logo.svg b/CQGui/Resources/icons/CQ_Logo.svg similarity index 100% rename from Gui/Resources/icons/CQ_Logo.svg rename to CQGui/Resources/icons/CQ_Logo.svg diff --git a/Gui/Resources/icons/CQ_Logo.svg~ b/CQGui/Resources/icons/CQ_Logo.svg~ similarity index 100% rename from Gui/Resources/icons/CQ_Logo.svg~ rename to CQGui/Resources/icons/CQ_Logo.svg~ diff --git a/Gui/__init__.py b/CQGui/__init__.py similarity index 100% rename from Gui/__init__.py rename to CQGui/__init__.py diff --git a/InitGui.py b/InitGui.py index fe829fe..c78cba1 100644 --- a/InitGui.py +++ b/InitGui.py @@ -3,12 +3,13 @@ # (c) 2014-2016 Jeremy Wright Apache 2.0 License import FreeCAD, FreeCADGui try: - from CadQuery.Gui.Command import * + from CadQuery.CQGui.Command import * except: - from Gui.Command import * + from CQGui.Command import * import CadQuery_rc class CadQueryWorkbench (Workbench): + """CadQuery workbench for FreeCAD""" """CadQuery workbench for FreeCAD""" MenuText = "CadQuery" ToolTip = "CadQuery workbench" @@ -40,9 +41,9 @@ class CadQueryWorkbench (Workbench): import os import module_locator try: - from CadQuery.Gui import ImportCQ + from CadQuery.CQGui import ImportCQ except: - from Gui import ImportCQ + from CQGui import ImportCQ module_base_path = module_locator.module_path() @@ -76,15 +77,15 @@ class CadQueryWorkbench (Workbench): # ImportCQ.open(template_path) def AutoExecute(self): - """We should be able to pass the Gui.Commands.CadQueryExecuteScript function directly to the file_reloaded + """We should be able to pass the CQGui.Commands.CadQueryExecuteScript function directly to the file_reloaded connect function, but that causes a segfault in FreeCAD. This function is a work-around for that. This function is passed to file_reloaded signal and in turn calls the CadQueryExecuteScript.Activated function.""" try: - import CadQuery.Gui.Command - CadQuery.Gui.Command.CadQueryExecuteScript().Activated() + import CadQuery.CQGui.Command + CadQuery.CQGui.Command.CadQueryExecuteScript().Activated() except: - from Gui import ImportCQ - Gui.Command.CadQueryExecuteScript().Activated() + from CQGui import ImportCQ + CQGui.Command.CadQueryExecuteScript().Activated() def Deactivated(self): diff --git a/Libs/pygments/lexers/automation.py b/Libs/pygments/lexers/automation.py index a66ceff..6237ebb 100644 --- a/Libs/pygments/lexers/automation.py +++ b/Libs/pygments/lexers/automation.py @@ -80,7 +80,7 @@ class AutohotkeyLexer(RegexLexer): r'FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|' r'FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|' r'FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|' - r'GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|' + r'GroupAdd|GroupClose|GroupDeactivate|CQGui|GuiControl|' r'GuiControlGet|Hotkey|IfEqual|IfExist|IfGreaterOrEqual|IfGreater|' r'IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|' r'IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|' diff --git a/Shared.py b/Shared.py index 00ce651..dcc20df 100644 --- a/Shared.py +++ b/Shared.py @@ -103,8 +103,6 @@ def setActiveWindowTitle(title): def populateParameterEditor(parameters): """Puts the proper controls in the script variable editor pane based on the parameters found""" - FreeCAD.Console.PrintMessage("Script Variables:\r\n") - mw = FreeCADGui.getMainWindow() # If the widget is open, we need to close it