1
0

loadattribs.m 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*---------------------------------------------------
  2. -----------------------------------------------------
  3. Filename: loadattribs.m
  4. Version: 1.2
  5. Type: maki/attrib loader
  6. Date: 29. Aug. 2006 - 23:43
  7. Author: Martin Poehlmann aka Deimos
  8. E-Mail: [email protected]
  9. Internet: www.skinconsortium.com
  10. www.martin.deimos.de.vu
  11. -----------------------------------------------------
  12. ---------------------------------------------------*/
  13. #define MAIN_ATTRIBS_MGR
  14. #define MAIN_ATTRIBS_LOADER
  15. #include <lib/std.mi>
  16. #include attribs/init_windowpage.m
  17. #include attribs/init_playlist.m
  18. #include attribs/init_Autoresize.m
  19. #include attribs/init_Vis.m
  20. #include attribs/init_appearance.m
  21. #include attribs/init_songticker.m
  22. #include attribs/init_notifier.m
  23. Global Configattribute FontRenderer, findOpenRect;
  24. Global String FontRenderer_default, findOpenRect_default;
  25. Global configAttribute skin_attrib;
  26. System.onScriptLoaded()
  27. {
  28. initAttribs_Appearance();
  29. initAttribs_Songticker();
  30. initAttribs_Autoresize();
  31. initAttribs_notifier();
  32. initAttribs_Vis();
  33. //without optionsmenu entry:
  34. initAttribs_windowpage();
  35. initAttribs_Playlist();
  36. // Add skin switcher to Appearance menu
  37. addMenuSeparator(custom_page_appearance);
  38. if (getParam() == "big")
  39. {
  40. skin_attrib = custom_page_appearance.newAttribute("Switch to Bento with Small Buttons", "0");
  41. }
  42. else
  43. {
  44. skin_attrib = custom_page_appearance.newAttribute("Switch to Bento with Big Buttons", "0");
  45. }
  46. // Turn 'find open rect' temporary off
  47. findOpenRect = config.getItemByGuid("{280876CF-48C0-40BC-8E86-73CE6BB462E5}").getAttribute("Find open rect");
  48. findOpenRect_default = findOpenRect.getData();
  49. findOpenRect.setData("0");
  50. }
  51. System.onScriptUnloading ()
  52. {
  53. findOpenRect.setData(findOpenRect_default);
  54. }
  55. findOpenRect.onDataChanged ()
  56. {
  57. if (getData() == "0") return;
  58. findOpenRect.setData("0");
  59. }
  60. global boolean passtrough;
  61. skin_attrib.onDataChanged ()
  62. {
  63. if (passtrough)
  64. {
  65. return;
  66. }
  67. passtrough = TRUE;
  68. setData("0");
  69. if (getParam() == "big") switchSkin("Bento");
  70. else switchSkin("Big Bento");
  71. passtrough = FALSE;
  72. }