PageRenderTime 22ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/Program_Files/replicatorg-0025/skein_engines/skeinforge-31/skeinforge_application/skeinforge_plugins/help.py

https://github.com/sialan/autonomous-sprayer
Python | 82 lines | 37 code | 8 blank | 37 comment | 8 complexity | d5792dc8d27e32190baa0b79db226089 MD5 | raw file
  1. """
  2. This page is in the table of contents.
  3. Help has buttons and menu items to open help, blog and forum pages in your primary browser.
  4. ==Link Buttons==
  5. ===Announcements===
  6. ====Fabmetheus Blog====
  7. The skeinforge announcements blog and the place to post questions, bugs and skeinforge requests.
  8. ===Documentation===
  9. ====Index of Local Documentation====
  10. The list of the pages in the documentation folder.
  11. ====Wiki Manual====
  12. The skeinforge wiki with pictures and charts. It is the best and most readable source of skeinforge information and you are welcome to contribute.
  13. ====Skeinforge Overview====
  14. A general description of skeinforge, has answers to frequently asked questions and has many links to skeinforge, fabrication and python pages. It is also the help page of the skeinforge tool.
  15. ===Forums===
  16. ====Bits from Bytes Printing Board====
  17. Board about printing questions, problems and solutions. Most of the people on that forum use the rapman, but many of the solutions apply to any reprap.
  18. ====Bits from Bytes Software Board====
  19. Board about software, and has some skeinforge threads.
  20. ====Skeinforge Contributions Thread====
  21. Forum thread about how to contribute to skeinforge development.
  22. ====Skeinforge Settings Thread====
  23. Forum thread for people to post, download and discuss skeinforge settings.
  24. ==Settings==
  25. ===Wiki Manual Primary===
  26. Default is on.
  27. The help menu has an item for each button on the help page. Also, at the very top, it has a link to the local documentation and if there is a separate page for that tool in the wiki manual, a link to that page on the manual. If the 'Wiki Manual Primary' checkbutton is selected and there is a separate wiki manual page, the wiki page will be the primary document page, otherwise the local page will be primary. The help button (? symbol button) on the tool page will open the primary page, as will pressing <F1>. For example, if you click the the help button from the chamber tool, which has a separate page in the wiki, and 'Wiki Manual Primary' is selected, the wiki manual chamber page will be opened. Clicking F1 will also open the wiki manual chamber page.
  28. """
  29. from __future__ import absolute_import
  30. #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
  31. import __init__
  32. from fabmetheus_utilities import settings
  33. from skeinforge_application.skeinforge_utilities import skeinforge_help
  34. import os
  35. __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
  36. __date__ = '$Date: 2008/21/04 $'
  37. __license__ = 'GPL 3.0'
  38. def addToMenu( master, menu, repository, window ):
  39. "Add a tool plugin menu."
  40. path = settings.getPathInFabmetheusFromFileNameHelp( repository.fileNameHelp )
  41. capitalizedBasename = os.path.basename(path).capitalize()
  42. helpRepository = settings.getReadRepository( skeinforge_help.HelpRepository() )
  43. if repository.openWikiManualHelpPage != None and helpRepository.wikiManualPrimary.value:
  44. menu.add_command( label = 'Local ' + capitalizedBasename, command = repository.openLocalHelpPage )
  45. else:
  46. settings.addAcceleratorCommand('<F1>', repository.openLocalHelpPage, master, menu, 'Local ' + capitalizedBasename )
  47. if repository.openWikiManualHelpPage != None:
  48. if helpRepository.wikiManualPrimary.value:
  49. settings.addAcceleratorCommand('<F1>', repository.openWikiManualHelpPage, master, menu, 'Wiki Manual ' + capitalizedBasename )
  50. else:
  51. menu.add_command( label = 'Wiki Manual ' + capitalizedBasename, command = repository.openWikiManualHelpPage )
  52. menu.add_separator()
  53. settings.addMenuEntitiesToMenu( menu, helpRepository.menuEntities )
  54. def getNewRepository():
  55. "Get the repository constructor."
  56. return skeinforge_help.HelpRepository()
  57. def main():
  58. "Display the help dialog."
  59. settings.startMainLoopFromConstructor( getNewRepository() )
  60. if __name__ == "__main__":
  61. main()