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 / compat.kmm < prev    next >
Text File  |  2007-05-09  |  2KB  |  37 lines

  1. # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
  2.  
  3. # ---------- Macro Compatibility -----------------------------------------------------------------------------------
  4. #
  5. # Dependencies    : main.kmm ($KM_Version), groups.kmm (Preferences)
  6. # Resources    : -
  7. # Preferences    : -
  8. #
  9. # ------------------------------------------------------------------------------------------------------------------
  10.  
  11. # ----- PRIVATE
  12. ___migratePrefs{
  13. $___msg="";
  14. index($macroModules,";Groups;")>-1?&___checkGroups:0;
  15. $___msg==""?0:alert(sub("%1",$KM_Version,_("Your profile was created by a version prior to K-Meleon %1. The following data has been updated:"))."\n".$___msg."\n\n"._("Please restart K-Meleon."),sub("%1",$KM_Version,_("Welcome to K-Meleon %1 !")));
  16. setpref(BOOL,$macroPrefBranch."modules.compat.load",false);
  17. }
  18. $OnLoadOnce=$OnLoadOnce."___migratePrefs;";
  19.  
  20. # Groups
  21. $___groupnames="kmeleon.groupnames";
  22. $___groupbranch="kmeleon.group.";
  23. ___checkGroups{
  24. getpref(STRING,$___groupnames)==""?0:&___migrateGroups;
  25. }
  26. ___migrateGroups{
  27. $__groups=getpref(STRING,$___groupnames);
  28. getpref(STRING,$_Groups_Pref)==""?setpref(STRING,$_Groups_Pref,$__groups):$__groups="";
  29. $__groups==""?0:$___msg=$___msg."\n"._("Groups");
  30. $__groups=sub("\n","",$__groups);
  31. while($__groups) &___migrateGroupsLoop;
  32. }
  33. ___migrateGroupsLoop{
  34. $__group=substr($__groups,0,index($__groups,"\n"));
  35. setpref(STRING,$_Groups_UserPrefBranch.$__group,getpref(STRING,$___groupbranch.$__group));
  36. $__groups=sub($__group."\n","",$__groups);
  37. }