init_windowpage.m 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. /*---------------------------------------------------
  2. -----------------------------------------------------
  3. Filename: init_windowpage.m
  4. Version: 1.1
  5. Type: maki/attrib definitions
  6. Date: 08. Jul. 2006 - 17:28
  7. Author: Martin Poehlmann aka Deimos
  8. E-Mail: [email protected]
  9. Internet: www.skinconsortium.com
  10. www.martin.deimos.de.vu
  11. -----------------------------------------------------
  12. Depending Files:
  13. scripts/mcvcompcore.maki
  14. scripts/suicore.maki
  15. scripts/browser.maki
  16. scripts/fileinfo.maki
  17. -----------------------------------------------------
  18. ---------------------------------------------------*/
  19. #ifndef included
  20. #error This script can only be compiled as a #include
  21. #endif
  22. #include "gen_pageguids.m"
  23. //#define DOHIDEMCV
  24. //#define IC_COVERFLOW
  25. #define CUSTOM_PAGE_FILEINFO "{6A619628-6A91-46e3-A3F3-5C1B2D93DF4F}"
  26. Function initAttribs_windowpage();
  27. Global ConfigAttribute sui_browser_attrib, sui_eq_attrib, sui_config_attrib;
  28. Global ConfigAttribute ic_fileinfo, ic_cover_fileinfo, ic_vis, ic_vis_fileinfo, ic_hidden, ic_eq, ic_config, _plsc_ic_attrib;
  29. #ifdef IC_COVERFLOW
  30. Global ConfigAttribute _cflow_ic_attrib;
  31. #else
  32. #define _cflow_ic_attrib //
  33. #endif
  34. #ifdef DOHIDEMCV
  35. Global ConfigAttribute ic_hidden;
  36. #endif
  37. Global ConfigItem custom_page_fileinfo;
  38. #ifndef DOHIDEMCV
  39. #define ic_hidden //
  40. #endif
  41. #define CUSTOM_PAGE_INFOCOMP "{8D3829F9-5790-4c8e-9C3A-C397D3602FF9}"
  42. Class ConfigAttribute InfoLineAttribute;
  43. Global InfoLineAttribute infocomp_show_rating, infocomp_show_genre, infocomp_show_year, infocomp_show_track, infocomp_show_publisher, infocomp_show_composer, infocomp_show_albumartist, infocomp_show_format, infocomp_show_disc;
  44. Global ConfigAttribute infocomp_cycle, infocomp_nowplaying, infocomp_browser;
  45. initAttribs_windowpage()
  46. {
  47. initPages();
  48. sui_eq_attrib = custom_windows_page.newAttribute("Equalizer\tAlt+G", "0");
  49. // sui_browser_attrib = custom_windows_page.newAttribute("Web Browser\tAlt+X", "0");
  50. sui_config_attrib = custom_windows_page.newAttribute("Skin Settings\tAlt+C", "0");
  51. custom_page_fileinfo = addConfigSubMenu(optionsmenu_page, "Multi Content View", CUSTOM_PAGE_FILEINFO);
  52. ic_fileinfo = custom_page_fileinfo.newAttribute("File Info", "1");
  53. _cflow_ic_attrib = custom_page_fileinfo.newAttribute("Cover Flow", "0");
  54. ic_vis = custom_page_fileinfo.newAttribute("Visualization ", "0");
  55. _plsc_ic_attrib = custom_page_fileinfo.newAttribute("Stored Playlists", "0");
  56. ic_eq = custom_page_fileinfo.newAttribute("Equalizer", sui_eq_attrib.getData());
  57. ic_config = custom_page_fileinfo.newAttribute("Skin Settings", sui_config_attrib.getData());
  58. #ifdef DOHIDEMCV
  59. ic_hidden = custom_page_fileinfo.newAttribute("Hide Multi Content View", "0");
  60. #endif
  61. addMenuSeparator(custom_page_fileinfo);
  62. ConfigItem fileinfo_parent = addConfigSubMenu(custom_page_fileinfo, "File Info Components", CUSTOM_PAGE_INFOCOMP);
  63. ic_vis_fileinfo = fileinfo_parent.newAttribute("Visualization ", "0");
  64. ic_cover_fileinfo = fileinfo_parent.newAttribute("Album Art", "1");
  65. addMenuSeparator(fileinfo_parent);
  66. infocomp_show_track = fileinfo_parent.newAttribute("Show Track #", "1");
  67. infocomp_show_year = fileinfo_parent.newAttribute("Show Year", "1");
  68. infocomp_show_genre = fileinfo_parent.newAttribute("Show Genre", "1");
  69. infocomp_show_disc = fileinfo_parent.newAttribute("Show Disc", "1");
  70. infocomp_show_albumartist = fileinfo_parent.newAttribute("Show Album Artist", "1");
  71. infocomp_show_composer = fileinfo_parent.newAttribute("Show Composer", "1");
  72. infocomp_show_publisher = fileinfo_parent.newAttribute("Show Publisher", "1");
  73. infocomp_show_format = fileinfo_parent.newAttribute("Show Decoder", "1");
  74. infocomp_show_rating = fileinfo_parent.newAttribute("Show Song Rating", "1");
  75. addMenuSeparator(fileinfo_parent);
  76. infocomp_cycle = fileinfo_parent.newAttribute("Cycle File Info", "1");
  77. addMenuSeparator(fileinfo_parent);
  78. //infocomp_nowplaying = fileinfo_parent.newAttribute("Open Links in Now Playing", "1");
  79. //infocomp_browser = fileinfo_parent.newAttribute("Open Links in Browser", "0");
  80. }
  81. #ifdef MAIN_ATTRIBS_MGR
  82. System.onKeyDown(String key) {
  83. if (key == "alt+x")
  84. {
  85. if (sui_browser_attrib.getData() == "0") sui_browser_attrib.setData("1");
  86. else sui_browser_attrib.setData("0");
  87. complete;
  88. }
  89. /*if (key == "alt+n")
  90. {
  91. if (sui_browser_attrib.getData() == "0") sui_browser_attrib.setData("1");
  92. else sui_browser_attrib.setData("0");
  93. complete;
  94. }*/
  95. /*if (key == "alt+c")
  96. {
  97. if (sui_cover_attrib.getData() == "0") sui_cover_attrib.setData("1");
  98. else sui_cover_attrib.setData("0");
  99. complete;
  100. }*/
  101. if (key == "alt+c")
  102. {
  103. if (sui_config_attrib.getData() == "0") sui_config_attrib.setData("1");
  104. else sui_config_attrib.setData("0");
  105. complete;
  106. }
  107. if (key == "alt+g")
  108. {
  109. if (sui_eq_attrib.getData() == "0") sui_eq_attrib.setData("1");
  110. else sui_eq_attrib.setData("0");
  111. complete;
  112. }
  113. /*if (key == "ctrl+f") {
  114. navigateUrl(getPath(getPlayItemString()));
  115. complete;
  116. }*/
  117. }
  118. ic_fileinfo.onDataChanged()
  119. {
  120. //debugString("ic_fileinfo.setData(" + getData() + ")", 9);
  121. if (attribs_mychange2) return;
  122. NOOFF
  123. attribs_mychange2 = 1;
  124. ic_vis.setData("0");
  125. ic_eq.setData("0");
  126. ic_config.setData("0");
  127. _plsc_ic_attrib.setData("0");
  128. _cflow_ic_attrib.setData("0");
  129. ic_hidden.setdata("0");
  130. attribs_mychange2 = 0;
  131. }
  132. ic_vis.onDataChanged()
  133. {
  134. //debugString("ic_vis.setData(" + getData() + ")", 9);
  135. if (attribs_mychange2) return;
  136. NOOFF
  137. attribs_mychange2 = 1;
  138. ic_fileinfo.setData("0");
  139. ic_eq.setData("0");
  140. ic_config.setData("0");
  141. _plsc_ic_attrib.setData("0");
  142. _cflow_ic_attrib.setData("0");
  143. ic_hidden.setdata("0");
  144. attribs_mychange2 = 0;
  145. }
  146. ic_eq.onDataChanged()
  147. {
  148. if (!attribs_mychange)
  149. {
  150. attribs_mychange = 1;
  151. sui_eq_attrib.setData(getData());
  152. if (getData() == "1") sui_config_attrib.setData("0");
  153. attribs_mychange = 0;
  154. }
  155. //debugString("ic_vis_fileinfo.setData(" + getData() + ")", 9);
  156. if (attribs_mychange2) return;
  157. NOOFF
  158. attribs_mychange2 = 1;
  159. ic_fileinfo.setData("0");
  160. ic_vis.setData("0");
  161. ic_config.setData("0");
  162. _plsc_ic_attrib.setData("0");
  163. _cflow_ic_attrib.setData("0");
  164. ic_hidden.setdata("0");
  165. attribs_mychange2 = 0;
  166. }
  167. ic_config.onDataChanged()
  168. {
  169. if (!attribs_mychange)
  170. {
  171. attribs_mychange = 1;
  172. sui_config_attrib.setData(getData());
  173. if (getData() == "1") sui_eq_attrib.setData("0");
  174. attribs_mychange = 0;
  175. }
  176. //debugString("ic_vis_fileinfo.setData(" + getData() + ")", 9);
  177. if (attribs_mychange2) return;
  178. NOOFF
  179. attribs_mychange2 = 1;
  180. ic_fileinfo.setData("0");
  181. ic_vis.setData("0");
  182. ic_eq.setData("0");
  183. _plsc_ic_attrib.setData("0");
  184. _cflow_ic_attrib.setData("0");
  185. ic_hidden.setdata("0");
  186. attribs_mychange2 = 0;
  187. }
  188. _plsc_ic_attrib.onDataChanged()
  189. {
  190. //debugString("ic_fileinfo.setData(" + getData() + ")", 9);
  191. if (attribs_mychange2) return;
  192. NOOFF
  193. attribs_mychange2 = 1;
  194. ic_vis.setData("0");
  195. ic_eq.setData("0");
  196. ic_config.setData("0");
  197. ic_fileinfo.setData("0");
  198. _cflow_ic_attrib.setData("0");
  199. ic_hidden.setdata("0");
  200. attribs_mychange2 = 0;
  201. }
  202. #ifdef IC_COVERFLOW
  203. _cflow_ic_attrib.onDataChanged()
  204. {
  205. //debugString("ic_fileinfo.setData(" + getData() + ")", 9);
  206. if (attribs_mychange2) return;
  207. NOOFF
  208. attribs_mychange2 = 1;
  209. ic_vis.setData("0");
  210. ic_eq.setData("0");
  211. ic_config.setData("0");
  212. ic_fileinfo.setData("0");
  213. _plsc_ic_attrib.setData("0");
  214. ic_hidden.setdata("0");
  215. attribs_mychange2 = 0;
  216. }
  217. #endif
  218. #ifdef DOHIDEMCV
  219. ic_hidden.onDataChanged()
  220. {
  221. //debugString("ic_fileinfo.setData(" + getData() + ")", 9);
  222. if (attribs_mychange2) return;
  223. NOOFF
  224. attribs_mychange2 = 1;
  225. ic_vis.setData("0");
  226. ic_eq.setData("0");
  227. ic_config.setData("0");
  228. ic_fileinfo.setData("0");
  229. _plsc_ic_attrib.setdata("0");
  230. _cflow_ic_attrib.setData("0");
  231. attribs_mychange2 = 0;
  232. }
  233. #endif
  234. sui_eq_attrib.onDataChanged()
  235. {
  236. //debugString("ic_vis_fileinfo.setData(" + getData() + ")", 9);
  237. if (attribs_mychange) return;
  238. attribs_mychange = 1;
  239. if (getData() == "1")
  240. {
  241. ic_eq.setData("1");
  242. sui_config_attrib.setData("0");
  243. }
  244. else ic_fileinfo.setData("1");
  245. attribs_mychange = 0;
  246. }
  247. sui_config_attrib.onDataChanged()
  248. {
  249. //debugString("ic_vis_fileinfo.setData(" + getData() + ")", 9);
  250. if (attribs_mychange) return;
  251. attribs_mychange = 1;
  252. if (getData() == "1")
  253. {
  254. ic_config.setData("1");
  255. sui_eq_attrib.setData("0");
  256. }
  257. else ic_fileinfo.setData("1");
  258. attribs_mychange = 0;
  259. }
  260. /* infocomp_nowplaying.onDataChanged()
  261. {
  262. if (attribs_mychange) return;
  263. NOOFF
  264. attribs_mychange = 1;
  265. infocomp_browser.setData("0");
  266. attribs_mychange = 0;
  267. }
  268. infocomp_browser.onDataChanged()
  269. {
  270. if (attribs_mychange) return;
  271. NOOFF
  272. attribs_mychange = 1;
  273. infocomp_nowplaying.setData("0");
  274. attribs_mychange = 0;
  275. }
  276. */
  277. #endif