Commit d733eb81 authored by sumpfralle's avatar sumpfralle

integrated "help" links in the "help" menu -> URLs of wiki pages


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@420 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 0fd20d22
Version 0.3.0 - UNRELEASED Version 0.3.0 - UNRELEASED
* added basic support for importing DXF contour files * added basic support for importing DXF contour files
* added basic support for engravings * added basic support for engravings
* integrated "help" links pointing to the wiki
* allow non-square profiles for the support grid * allow non-square profiles for the support grid
* fixed PushCutter * fixed PushCutter
......
...@@ -37,6 +37,7 @@ import pycam.Physics.ode_physics ...@@ -37,6 +37,7 @@ import pycam.Physics.ode_physics
# this requires ODE - we import it later, if necessary # this requires ODE - we import it later, if necessary
#import pycam.Simulation.ODEBlocks #import pycam.Simulation.ODEBlocks
import gtk import gtk
import webbrowser
import ConfigParser import ConfigParser
import math import math
import time import time
...@@ -53,6 +54,8 @@ if DATA_DIR_ENVIRON_KEY in os.environ: ...@@ -53,6 +54,8 @@ if DATA_DIR_ENVIRON_KEY in os.environ:
GTKBUILD_FILE = "pycam-project.ui" GTKBUILD_FILE = "pycam-project.ui"
GTKMENU_FILE = "menubar.xml" GTKMENU_FILE = "menubar.xml"
HELP_WIKI_URL = "http://sourceforge.net/apps/mediawiki/pycam/index.php?title=%s"
FILTER_GCODE = ("GCode files", ("*.ngc", "*.nc", "*.gc", "*.gcode")) FILTER_GCODE = ("GCode files", ("*.ngc", "*.nc", "*.gc", "*.gcode"))
FILTER_MODEL = (("STL models", "*.stl"), ("DXF contours", "*.dxf")) FILTER_MODEL = (("STL models", "*.stl"), ("DXF contours", "*.dxf"))
FILTER_CONFIG = ("Config files", "*.conf") FILTER_CONFIG = ("Config files", "*.conf")
...@@ -164,7 +167,21 @@ class ProjectGui: ...@@ -164,7 +167,21 @@ class ProjectGui:
("ExportEMCToolDefinition", self.export_emc_tools, None, None), ("ExportEMCToolDefinition", self.export_emc_tools, None, None),
("Quit", self.destroy, None, "<Control>q"), ("Quit", self.destroy, None, "<Control>q"),
("GeneralSettings", self.toggle_preferences_window, None, "<Control>p"), ("GeneralSettings", self.toggle_preferences_window, None, "<Control>p"),
("Toggle3DView", self.toggle_3d_view, None, "<Control>v")): ("Toggle3DView", self.toggle_3d_view, None, "<Control>v"),
("HelpIntroduction", self.show_help, "Introduction", "F1"),
("HelpSupportedFormats", self.show_help, "SupportedFormats", None),
("HelpModelTransformations", self.show_help, "ModelTransformations", None),
("HelpToolTypes", self.show_help, "ToolTypes", None),
("HelpProcessSettings", self.show_help, "ProcessSettings", None),
("HelpBoundsSettings", self.show_help, "BoundsSettings", None),
("HelpTaskSetup", self.show_help, "TaskSetup", None),
("HelpGCodeExport", self.show_help, "GCodeExport", None),
("HelpSimulation", self.show_help, "Simulation", None),
("HelpCommandLine", self.show_help, "CommandLine", None),
("ProjectWebsite", self.show_help, "http://sourceforge.net/projects/pycam", None),
("Forum", self.show_help, "http://sourceforge.net/projects/pycam/forums", None),
("BugTracker", self.show_help, "http://sourceforge.net/tracker/?group_id=237831&atid=1104176", None),
("FeatureRequest", self.show_help, "http://sourceforge.net/tracker/?group_id=237831&atid=1104179", None)):
item = self.gui.get_object(objname) item = self.gui.get_object(objname)
if objname == "Toggle3DView": if objname == "Toggle3DView":
action = "toggled" action = "toggled"
...@@ -531,6 +548,13 @@ class ProjectGui: ...@@ -531,6 +548,13 @@ class ProjectGui:
return result return result
return gui_activity_guard_wrapper return gui_activity_guard_wrapper
def show_help(self, widget=None, page="Main_Page"):
if not page.startswith("http"):
url = HELP_WIKI_URL % page
else:
url = page
webbrowser.open(url)
def update_view(self, widget=None, data=None): def update_view(self, widget=None, data=None):
if self.view3d and self.view3d.is_visible and not self.no_dialog: if self.view3d and self.view3d.is_visible and not self.no_dialog:
if data: if data:
......
...@@ -20,6 +20,24 @@ ...@@ -20,6 +20,24 @@
</menu> </menu>
<menu action="WindowMenu"> <menu action="WindowMenu">
<menuitem action="Toggle3DView"/> <menuitem action="Toggle3DView"/>
</menu>
<menu action="HelpMenu">
<menuitem action="HelpIntroduction"/>
<menuitem action="HelpSupportedFormats"/>
<menuitem action="HelpModelTransformations"/>
<menuitem action="HelpGCodeExport"/>
<menuitem action="HelpSimulation"/>
<menuitem action="HelpCommandLine"/>
<separator />
<menuitem action="HelpToolTypes"/>
<menuitem action="HelpProcessSettings"/>
<menuitem action="HelpBoundsSettings"/>
<menuitem action="HelpTaskSetup"/>
<separator />
<menuitem action="ProjectWebsite"/>
<menuitem action="Forum"/>
<menuitem action="FeatureRequest"/>
<menuitem action="BugTracker"/>
<separator /> <separator />
<menuitem action="About"/> <menuitem action="About"/>
</menu> </menu>
......
...@@ -5216,4 +5216,49 @@ Any selected group of dimensions will be scaled accordingly.</property> ...@@ -5216,4 +5216,49 @@ Any selected group of dimensions will be scaled accordingly.</property>
<object class="GtkAdjustment" id="EngraveOffsetValue"> <object class="GtkAdjustment" id="EngraveOffsetValue">
<property name="upper">1000</property> <property name="upper">1000</property>
</object> </object>
<object class="GtkAction" id="HelpMenu">
<property name="label">_Help</property>
</object>
<object class="GtkAction" id="HelpIntroduction">
<property name="label">_Introduction</property>
</object>
<object class="GtkAction" id="HelpSupportedFormats">
<property name="label">Supported _Formats</property>
</object>
<object class="GtkAction" id="HelpModelTransformations">
<property name="label">_Model Transformations</property>
</object>
<object class="GtkAction" id="HelpToolTypes">
<property name="label">T_ool Types</property>
</object>
<object class="GtkAction" id="HelpProcessSettings">
<property name="label">_Process Settings</property>
</object>
<object class="GtkAction" id="HelpBoundsSettings">
<property name="label">_Bounds Settings</property>
</object>
<object class="GtkAction" id="HelpTaskSetup">
<property name="label">_Task Setup</property>
</object>
<object class="GtkAction" id="HelpGCodeExport">
<property name="label">_GCode Export</property>
</object>
<object class="GtkAction" id="HelpSimulation">
<property name="label">_Simulation</property>
</object>
<object class="GtkAction" id="HelpCommandLine">
<property name="label">_Command Line Usage</property>
</object>
<object class="GtkAction" id="ProjectWebsite">
<property name="label">Project _Website</property>
</object>
<object class="GtkAction" id="Forum">
<property name="label">Forum</property>
</object>
<object class="GtkAction" id="BugTracker">
<property name="label">Report a Bug</property>
</object>
<object class="GtkAction" id="FeatureRequest">
<property name="label">Request a Feature</property>
</object>
</interface> </interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment