home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 September / PCWorld_2008-09_cd.bin / komunikace / kmeleon / K-Meleon1.1.3en-US.exe / macros / cfg.kmm < prev    next >
Text File  |  2007-05-09  |  3KB  |  76 lines

  1. # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
  2.  
  3. # ---------- Browser Configuration ---------------------------------------------------------------------------------
  4. #
  5. # Dependencies    : main.kmm (getExtensionHandler)
  6. # Resources    : -
  7. # Preferences    : -
  8. #
  9. # ------------------------------------------------------------------------------------------------------------------
  10.  
  11. cfg_ProfileDir{
  12. exec("explorer.exe \"".getfolder(ProfileFolder)."\"");
  13. }
  14. cfg_SettingsDir{
  15. exec("explorer.exe \"".getfolder(SettingsFolder)."\"");
  16. }
  17.  
  18. cfg_Macros{
  19. exec("explorer.exe \"".getfolder(MacroFolder)."\"");
  20. }
  21. cfg_UserMacros{
  22. exec("explorer.exe \"".getfolder(UserMacroFolder)."\"");
  23. }
  24.  
  25. cfg_Commands{
  26. $ext="txt"; &getExtensionHandler; exec(sub("%1",getfolder(RootFolder)."\\skins\\commands.txt",$cmdline));
  27. }
  28. cfg_Toolbars{
  29. $ext="cfg"; &getExtensionHandler; exec(sub("%1",getfolder(SkinFolder)."\\toolbars.cfg",$cmdline));
  30. }
  31.  
  32. cfg_Settings{
  33. $ext="cfg"; &getExtensionHandler; $__temp="\\defaults\\settings\\";
  34. $__path=getfolder(SettingsFolder)."\\".$ARG.".".$ext; $__data=readfile($__path);
  35. length($__data)==0?$__path=getfolder(RootFolder).$__temp.$ARG.".".$ext:0;
  36. exec(sub("%1",$__path,$cmdline));
  37. }
  38. cfg_UserPrefs{
  39. $ext="js";  &getSecureExtensionHandler; exec(sub("%1",getfolder(ProfileFolder)."\\".$ARG.".".$ext,$cmdline));
  40. }
  41. cfg_UserStyle{
  42. $ext="css"; &getExtensionHandler; exec(sub("%1",getfolder(ProfileFolder)."\\chrome\\".$ARG.".".$ext,$cmdline));
  43. }
  44.  
  45. # ----- PRIVATE
  46.  
  47. _cfg_BuildMenu{
  48. # edit menu
  49. $__c="Config&uration";
  50. setmenu(Preferences,popup,$__c,moz_AboutConfig);
  51. setmenu(Preferences,macro,"",moz_AboutConfig);
  52. $__m=_Config_General;
  53. setmenu($__c,inline,$__m);
  54. setmenu($__m,macro,"Browser Con&figuration",moz_AboutConfig);
  55. #setmenu($__m,macro,"&Profile Settings","cfg_UserPrefs(prefs)");
  56. setmenu($__m,macro,"&User Settings","cfg_UserPrefs(user)");
  57. $__m=_Config_Appearance;
  58. setmenu($__c,inline,$__m);
  59. setmenu($__m,macro,"User-Defined &StyleSheet","cfg_UserStyle(userContent)");
  60. setmenu($__m,macro,"&Toolbars",cfg_Toolbars);
  61. $__m=_Config_Settings;
  62. setmenu($__c,inline,$__m);
  63. setmenu($__m,macro,"A&ccelerators","cfg_Settings(accel)");
  64. setmenu($__m,macro,"M&acros","cfg_Macros");
  65. setmenu($__m,macro,"User-Defined Macr&os","cfg_UserMacros");
  66. setmenu($__m,macro,"M&enus","cfg_Settings(menus)");
  67. setmenu($__m,macro,"Co&mmands List",cfg_Commands);
  68. $__m=_Config_Folders;
  69. setmenu($__c,inline,$__m);
  70. setmenu($__m,macro,"Profile &Directory",cfg_ProfileDir);
  71. getfolder(ProfileFolder)==getfolder(SettingsFolder)?0:setmenu($__m,macro,"Settings D&irectory",cfg_SettingsDir);
  72. }
  73. $OnInit=$OnInit."_cfg_BuildMenu;";
  74.  
  75. # ------------------------------------------------------------------------------------------------------------------
  76. $macroModules=$macroModules."cfg;";