From 1664e65135bd91c1cfdf17182ec6e371cfb92c7f Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Thu, 10 Aug 2017 12:43:40 -0700 Subject: [PATCH] Restored icons for profile ops; cleaned up accel keys. --- src/Mod/Path/PathScripts/PathComment.py | 1 - src/Mod/Path/PathScripts/PathCompoundExtended.py | 1 - src/Mod/Path/PathScripts/PathCopy.py | 1 - src/Mod/Path/PathScripts/PathDressup.py | 1 - src/Mod/Path/PathScripts/PathDrillingGui.py | 1 - src/Mod/Path/PathScripts/PathFixture.py | 1 - src/Mod/Path/PathScripts/PathHelixGui.py | 1 - src/Mod/Path/PathScripts/PathHop.py | 1 - src/Mod/Path/PathScripts/PathInspect.py | 1 + src/Mod/Path/PathScripts/PathJob.py | 3 +-- src/Mod/Path/PathScripts/PathMillFaceGui.py | 1 - src/Mod/Path/PathScripts/PathOpGui.py | 10 ++++++---- src/Mod/Path/PathScripts/PathPlane.py | 1 - src/Mod/Path/PathScripts/PathPocketGui.py | 1 - src/Mod/Path/PathScripts/PathProfileContourGui.py | 1 - src/Mod/Path/PathScripts/PathProfileEdgesGui.py | 5 ++--- src/Mod/Path/PathScripts/PathProfileFacesGui.py | 3 +-- src/Mod/Path/PathScripts/PathSanity.py | 1 + src/Mod/Path/PathScripts/PathSimpleCopy.py | 1 - src/Mod/Path/PathScripts/PathStock.py | 1 - src/Mod/Path/PathScripts/PathStop.py | 1 - src/Mod/Path/PathScripts/PathSurface.py | 1 - src/Mod/Path/PathScripts/PathToolLenOffset.py | 1 - src/Mod/Path/PathScripts/README.md | 6 ++++++ 24 files changed, 18 insertions(+), 28 deletions(-) create mode 100644 src/Mod/Path/PathScripts/README.md diff --git a/src/Mod/Path/PathScripts/PathComment.py b/src/Mod/Path/PathScripts/PathComment.py index 83d2ec358e..e79865fc06 100644 --- a/src/Mod/Path/PathScripts/PathComment.py +++ b/src/Mod/Path/PathScripts/PathComment.py @@ -99,7 +99,6 @@ class CommandPathComment: def GetResources(self): return {'Pixmap': 'Path-Comment', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Comment", "Comment"), - 'Accel': "P, C", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Comment", "Add a Comment to your CNC program")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathCompoundExtended.py b/src/Mod/Path/PathScripts/PathCompoundExtended.py index 6131f7b57d..5d187f98a5 100644 --- a/src/Mod/Path/PathScripts/PathCompoundExtended.py +++ b/src/Mod/Path/PathScripts/PathCompoundExtended.py @@ -95,7 +95,6 @@ class CommandCompoundExtended: def GetResources(self): return {'Pixmap': 'Path-Compound', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_CompoundExtended", "Compound"), - 'Accel': "P, C", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_CompoundExtended", "Creates a Path Compound object")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathCopy.py b/src/Mod/Path/PathScripts/PathCopy.py index 17268e3201..b95b844467 100644 --- a/src/Mod/Path/PathScripts/PathCopy.py +++ b/src/Mod/Path/PathScripts/PathCopy.py @@ -78,7 +78,6 @@ class CommandPathCopy: def GetResources(self): return {'Pixmap': 'Path-Copy', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Copy", "Copy"), - 'Accel': "P, Y", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Copy", "Creates a linked copy of another path")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathDressup.py b/src/Mod/Path/PathScripts/PathDressup.py index 4efea66a82..9ba73ac067 100644 --- a/src/Mod/Path/PathScripts/PathDressup.py +++ b/src/Mod/Path/PathScripts/PathDressup.py @@ -103,7 +103,6 @@ class CommandPathDressup: def GetResources(self): return {'Pixmap': 'Path-Dressup', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Dressup", "Dress-up"), - 'Accel': "P, S", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Dressup", "Creates a Path Dress-up object from a selected path")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathDrillingGui.py b/src/Mod/Path/PathScripts/PathDrillingGui.py index 29c7e52523..4aeabf9ef5 100644 --- a/src/Mod/Path/PathScripts/PathDrillingGui.py +++ b/src/Mod/Path/PathScripts/PathDrillingGui.py @@ -97,7 +97,6 @@ PathOpGui.SetupOperation('Drilling', TaskPanelOpPage, 'Path-Drilling', QtCore.QT_TRANSLATE_NOOP("PathDrilling", "Drilling"), - "P, O", QtCore.QT_TRANSLATE_NOOP("PathDrilling", "Creates a Path Drilling object from a features of a base object")) FreeCAD.Console.PrintLog("Loading PathDrillingGui... done\n") diff --git a/src/Mod/Path/PathScripts/PathFixture.py b/src/Mod/Path/PathScripts/PathFixture.py index aecad15dd2..9dd94f3d91 100644 --- a/src/Mod/Path/PathScripts/PathFixture.py +++ b/src/Mod/Path/PathScripts/PathFixture.py @@ -112,7 +112,6 @@ class CommandPathFixture: def GetResources(self): return {'Pixmap': 'Path-Datums', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Fixture", "Fixture"), - 'Accel': "P, F", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Fixture", "Creates a Fixture Offset object")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathHelixGui.py b/src/Mod/Path/PathScripts/PathHelixGui.py index 78f88b2942..62c75f9b3e 100644 --- a/src/Mod/Path/PathScripts/PathHelixGui.py +++ b/src/Mod/Path/PathScripts/PathHelixGui.py @@ -75,7 +75,6 @@ PathOpGui.SetupOperation('Helix', TaskPanelOpPage, 'Path-Helix', QtCore.QT_TRANSLATE_NOOP("PathHelix", "Helix"), - "P, O", QtCore.QT_TRANSLATE_NOOP("PathHelix", "Creates a Path Helix object from a features of a base object")) FreeCAD.Console.PrintLog("Loading PathHelixGui... done\n") diff --git a/src/Mod/Path/PathScripts/PathHop.py b/src/Mod/Path/PathScripts/PathHop.py index 3c9dec0b9f..fd95528458 100644 --- a/src/Mod/Path/PathScripts/PathHop.py +++ b/src/Mod/Path/PathScripts/PathHop.py @@ -94,7 +94,6 @@ class CommandPathHop: def GetResources(self): return {'Pixmap': 'Path-Hop', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Hop", "Hop"), - 'Accel': "P, H", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Hop", "Creates a Path Hop object")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathInspect.py b/src/Mod/Path/PathScripts/PathInspect.py index 2b5727c81e..233335a01b 100644 --- a/src/Mod/Path/PathScripts/PathInspect.py +++ b/src/Mod/Path/PathScripts/PathInspect.py @@ -216,6 +216,7 @@ class CommandPathInspect: def GetResources(self): return {'Pixmap': 'Path-Inspect', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Inspect", "Inspect G-code"), + 'Accel': "P, I", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Inspect", "Inspects the G-code contents of a path")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathJob.py b/src/Mod/Path/PathScripts/PathJob.py index 909f5c506b..d5aa547564 100644 --- a/src/Mod/Path/PathScripts/PathJob.py +++ b/src/Mod/Path/PathScripts/PathJob.py @@ -429,7 +429,7 @@ class CommandJobCreate: def GetResources(self): return {'Pixmap': 'Path-Job', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Job"), - #'Accel': "P, J", + 'Accel': "P, J", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Creates a Path Job object")} def IsActive(self): @@ -468,7 +468,6 @@ class CommandJobExportTemplate: def GetResources(self): return {'Pixmap': 'Path-Job', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Export Template"), - #'Accel': "P, T", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Job", "Exports Path Job as a template to be used for other jobs")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathMillFaceGui.py b/src/Mod/Path/PathScripts/PathMillFaceGui.py index 9484d89d9c..6ece838b15 100644 --- a/src/Mod/Path/PathScripts/PathMillFaceGui.py +++ b/src/Mod/Path/PathScripts/PathMillFaceGui.py @@ -40,7 +40,6 @@ PathOpGui.SetupOperation('MillFace', TaskPanelOpPage, 'Path-Face', QtCore.QT_TRANSLATE_NOOP("PathFace", "Face"), - "P, O", QtCore.QT_TRANSLATE_NOOP("PathFace", "Create a Facing Operation from a model or face")) FreeCAD.Console.PrintLog("Loading PathMillFaceGui... done\n") diff --git a/src/Mod/Path/PathScripts/PathOpGui.py b/src/Mod/Path/PathScripts/PathOpGui.py index 0505cf00d6..dcee721c3d 100644 --- a/src/Mod/Path/PathScripts/PathOpGui.py +++ b/src/Mod/Path/PathScripts/PathOpGui.py @@ -562,10 +562,12 @@ class CommandPathOp: self.res = resources def GetResources(self): - return {'Pixmap': self.res.pixmap, + ress = {'Pixmap': self.res.pixmap, 'MenuText': self.res.menuText, - 'Accel': self.res.accelKey, 'ToolTip': self.res.toolTip} + if self.res.accelKey: + ress['Accel'] = self.res.accelKey + return ress def IsActive(self): if FreeCAD.ActiveDocument is not None: @@ -592,8 +594,8 @@ def SetupOperation(name, opPageClass, pixmap, menuText, - accelKey, - toolTip): + toolTip, + accelKey = None): res = CommandResources(name, objFactory, opPageClass, pixmap, menuText, accelKey, toolTip) FreeCADGui.addCommand("Path_%s" % name.replace(' ', '_'), CommandPathOp(res)) diff --git a/src/Mod/Path/PathScripts/PathPlane.py b/src/Mod/Path/PathScripts/PathPlane.py index c7ebb179ce..6fcdb95dde 100644 --- a/src/Mod/Path/PathScripts/PathPlane.py +++ b/src/Mod/Path/PathScripts/PathPlane.py @@ -108,7 +108,6 @@ class CommandPathPlane: def GetResources(self): return {'Pixmap': 'Path-Plane', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Plane", "Selection Plane"), - 'Accel': "P, P", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Plane", "Create a Selection Plane object")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathPocketGui.py b/src/Mod/Path/PathScripts/PathPocketGui.py index 04a2a57fa0..c84a6dcfee 100644 --- a/src/Mod/Path/PathScripts/PathPocketGui.py +++ b/src/Mod/Path/PathScripts/PathPocketGui.py @@ -39,7 +39,6 @@ PathOpGui.SetupOperation('Pocket', TaskPanelOpPage, 'Path-Pocket', QtCore.QT_TRANSLATE_NOOP("PathPocket", "Pocket"), - "P, O", QtCore.QT_TRANSLATE_NOOP("PathPocket", "Creates a Path Pocket object from a face or faces")) FreeCAD.Console.PrintLog("Loading PathPocketGui... done\n") diff --git a/src/Mod/Path/PathScripts/PathProfileContourGui.py b/src/Mod/Path/PathScripts/PathProfileContourGui.py index 667240e465..1900e001ed 100644 --- a/src/Mod/Path/PathScripts/PathProfileContourGui.py +++ b/src/Mod/Path/PathScripts/PathProfileContourGui.py @@ -40,7 +40,6 @@ PathOpGui.SetupOperation('Contour', TaskPanelOpPage, 'Path-Contour', QtCore.QT_TRANSLATE_NOOP("PathProfileContour", "Contour"), - "P, C", QtCore.QT_TRANSLATE_NOOP("PathProfileContour", "Creates a Contour Path for the Base Object ")) FreeCAD.Console.PrintLog("Loading PathProfileContourGui... done\n") diff --git a/src/Mod/Path/PathScripts/PathProfileEdgesGui.py b/src/Mod/Path/PathScripts/PathProfileEdgesGui.py index f7a84ce83e..b20ce684f5 100644 --- a/src/Mod/Path/PathScripts/PathProfileEdgesGui.py +++ b/src/Mod/Path/PathScripts/PathProfileEdgesGui.py @@ -37,9 +37,8 @@ class TaskPanelOpPage(PathProfileBaseGui.TaskPanelOpPage): PathOpGui.SetupOperation('Profile Edges', PathProfileEdges.Create, TaskPanelOpPage, - 'Path-Profile', + 'Path-Profile-Edges', QtCore.QT_TRANSLATE_NOOP("PathProfile", "Edge Profile"), - "P, F", - QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile based on face or faces")) + QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile based on edges")) FreeCAD.Console.PrintLog("Loading PathProfileEdgesGui... done\n") diff --git a/src/Mod/Path/PathScripts/PathProfileFacesGui.py b/src/Mod/Path/PathScripts/PathProfileFacesGui.py index cfb55fdea9..7fe661bac5 100644 --- a/src/Mod/Path/PathScripts/PathProfileFacesGui.py +++ b/src/Mod/Path/PathScripts/PathProfileFacesGui.py @@ -37,9 +37,8 @@ class TaskPanelOpPage(PathProfileBaseGui.TaskPanelOpPage): PathOpGui.SetupOperation('Profile Faces', PathProfileFaces.Create, TaskPanelOpPage, - 'Path-Profile', + 'Path-Profile-Face', QtCore.QT_TRANSLATE_NOOP("PathProfile", "Face Profile"), - "P, F", QtCore.QT_TRANSLATE_NOOP("PathProfile", "Profile based on face or faces")) FreeCAD.Console.PrintLog("Loading PathProfileFacesGui... done\n") diff --git a/src/Mod/Path/PathScripts/PathSanity.py b/src/Mod/Path/PathScripts/PathSanity.py index 3c2ed291d8..06a48bd30f 100644 --- a/src/Mod/Path/PathScripts/PathSanity.py +++ b/src/Mod/Path/PathScripts/PathSanity.py @@ -47,6 +47,7 @@ class CommandPathSanity: def GetResources(self): return {'Pixmap' : 'Path-Sanity', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Sanity","Check the Path project for common errors"), + 'Accel': "P, S", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Sanity","Check the Path Project for common errors")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathSimpleCopy.py b/src/Mod/Path/PathScripts/PathSimpleCopy.py index 8b9aabf980..34b7c42ec1 100644 --- a/src/Mod/Path/PathScripts/PathSimpleCopy.py +++ b/src/Mod/Path/PathScripts/PathSimpleCopy.py @@ -36,7 +36,6 @@ class CommandPathSimpleCopy: def GetResources(self): return {'Pixmap': 'Path-SimpleCopy', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_SimpleCopy", "Simple Copy"), - 'Accel': "P, Y", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_SimpleCopy", "Creates a non-parametric copy of another path")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathStock.py b/src/Mod/Path/PathScripts/PathStock.py index 27a7b495c1..b95be0c961 100644 --- a/src/Mod/Path/PathScripts/PathStock.py +++ b/src/Mod/Path/PathScripts/PathStock.py @@ -93,7 +93,6 @@ class CommandPathStock: def GetResources(self): return {'Pixmap': 'Path-Stock', 'MenuText': QtCore.QT_TRANSLATE_NOOP("PathStock", "Stock"), - 'Accel': "P, S", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("PathStock", "Creates a 3D object to represent raw stock to mill the part out of")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathStop.py b/src/Mod/Path/PathScripts/PathStop.py index d2365ee4f4..9939a8688a 100644 --- a/src/Mod/Path/PathScripts/PathStop.py +++ b/src/Mod/Path/PathScripts/PathStop.py @@ -104,7 +104,6 @@ class CommandPathStop: def GetResources(self): return {'Pixmap': 'Path-Stop', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Stop", "Stop"), - 'Accel': "P, C", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Stop", "Add Optional or Mandatory Stop to the program")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py index 7eec8e1895..72f2bb9056 100644 --- a/src/Mod/Path/PathScripts/PathSurface.py +++ b/src/Mod/Path/PathScripts/PathSurface.py @@ -394,7 +394,6 @@ class CommandPathSurfacing: def GetResources(self): return {'Pixmap': 'Path-3DSurface', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_Surface", "Surfacing"), - 'Accel': "P, S", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_Surface", "Creates a Path Surfacing object")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/PathToolLenOffset.py b/src/Mod/Path/PathScripts/PathToolLenOffset.py index 6f613f8005..c9d37cdcc3 100644 --- a/src/Mod/Path/PathScripts/PathToolLenOffset.py +++ b/src/Mod/Path/PathScripts/PathToolLenOffset.py @@ -121,7 +121,6 @@ class CommandPathToolLenOffset: def GetResources(self): return {'Pixmap': 'Path-LengthOffset', 'MenuText': QtCore.QT_TRANSLATE_NOOP("Path_ToolLenOffset", "Tool Length Offset"), - 'Accel': "P, T", 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Path_ToolLenOffset", "Create a Tool Length Offset object")} def IsActive(self): diff --git a/src/Mod/Path/PathScripts/README.md b/src/Mod/Path/PathScripts/README.md new file mode 100644 index 0000000000..f5b7675c9f --- /dev/null +++ b/src/Mod/Path/PathScripts/README.md @@ -0,0 +1,6 @@ +Assigned Accel Keys: +* P,I ... Launch Path Inspector +* P,J ... Create Job +* P,P ... Launch Post Processing +* P,S ... Launch Path Sanity +* P,T ... Launch Tool Library Manager