aboutsummaryrefslogtreecommitdiff
path: root/Src/resources/skins/Bento/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Src/resources/skins/Bento/scripts')
-rw-r--r--Src/resources/skins/Bento/scripts/mcvcore.m487
-rw-r--r--Src/resources/skins/Bento/scripts/mcvcore.makibin0 -> 21656 bytes
-rw-r--r--Src/resources/skins/Bento/scripts/mcvcore/load_handles.m131
-rw-r--r--Src/resources/skins/Bento/scripts/mcvcore/show_hide.m916
-rw-r--r--Src/resources/skins/Bento/scripts/playlistpro.m426
-rw-r--r--Src/resources/skins/Bento/scripts/playlistpro.makibin0 -> 12601 bytes
-rw-r--r--Src/resources/skins/Bento/scripts/pledit.m619
-rw-r--r--Src/resources/skins/Bento/scripts/pledit.makibin0 -> 13283 bytes
-rw-r--r--Src/resources/skins/Bento/scripts/workingdir.m1
9 files changed, 2580 insertions, 0 deletions
diff --git a/Src/resources/skins/Bento/scripts/mcvcore.m b/Src/resources/skins/Bento/scripts/mcvcore.m
new file mode 100644
index 00000000..1d3feed4
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/mcvcore.m
@@ -0,0 +1,487 @@
+/*---------------------------------------------------
+-----------------------------------------------------
+Filename: mcvcore.m
+Version: 4.5
+
+Type: maki
+Date: 13. Aug. 2007 - 11:22
+Author: Martin Poehlmann aka Deimos
+E-Mail: martin@skinconsortium.com
+Internet: www.skinconsortium.com
+ www.martin.deimos.de.vu
+
+Note: This script is based on drawer.m
+ from Winamp Modern, but extended to
+ 5 components presets!
+ Like in drawer.m I warn everybody not
+ to modify this script, cause it can be
+ harmed very fast! And you don't want
+ a buggy winamp skin, want you?
+
+ Since script version 3.1
+ (onesie build #022)
+ the script is devided into subscripts
+ for better debugging.
+-----------------------------------------------------
+---------------------------------------------------*/
+
+#include <lib/std.mi>
+
+//define DEBUG
+#define FILE_NAME "infocompcore.m"
+#include <lib/com/debug.m>
+
+#include workingdir.m
+
+#define BIG_BENTO_WORKINGDIR 1
+
+#ifdef BIG_BENTO_WORKINGDIR
+#include ../../Big Bento/scripts/attribs/init_windowpage.m
+#include ../../Big Bento/scripts/attribs/init_vis.m
+#include ../../Big Bento/scripts/attribs/init_appearance.m
+#else
+#include ../../__codename_onesie/scripts/attribs/init_windowpage.m
+#include ../../__codename_onesie/scripts/attribs/init_vis.m
+#include ../../__codename_onesie/scripts/attribs/init_appearance.m
+#endif
+
+#define VIS_GUID "{0000000A-000C-0010-FF7B-01014263450C}"
+
+#ifndef DOHIDEMCV
+#define updateSaving //
+#endif
+
+//define FIT_W2_COMP fit(sui_fi, 159, 0, 2, 0, -162, 1, 76, 0)
+#define FIT_W2_COMP fit(sui_fi, 180, 0, 2, 0, -183, 1, 76, 0)
+//define FIT_W_COMP fit(sui_fi, 81, 0, 2, 0, -84, 1, 76, 0)
+#define FIT_W_COMP fit(sui_fi, 92, 0, 2, 0, -95, 1, 76, 0)
+#define FIT_WO_COMP fit(sui_fi, 4, 0, 2, 0, -7, 1, 76, 0)
+
+Global Boolean bypasscancel;
+Global Timer callbackTimer, tempDisable;
+
+#define CURR_COMP plsc
+#include ../../Big Bento/scripts/mcvcore/defs.m
+
+#ifdef IC_COVERFLOW
+#undef CURR_COMP
+#define CURR_COMP cflow
+#include mcvcore/defs.m
+#endif
+
+Function fit (group g, int x, int rx, int y, int ry, int w, int rw, int h, int rh);
+
+Function switchToIcOnly();
+Function switchToCover();
+Function switchToVisCover();
+Function switchToVis();
+Function switchToEQ();
+Function switchToCfg();
+Function switchToVis_Full();
+Function updateFileInfo();
+
+Function hideFi();
+Function showFi();
+Function hideCover();
+Function showCover();
+Function hideVis();
+Function showVis();
+Function hideVis_Full();
+Function showVis_Full();
+Function hideEq();
+Function showEq();
+Function hideCfg();
+Function showCfg();
+Function openIC();
+Function closeIC();
+Function openLC();
+Function closeLC();
+#ifdef DOHIDEMCV
+Function hideMCV();
+#endif
+
+Function onHideFi();
+Function onShowFi();
+Function onHideCover();
+Function onShowCover();
+Function onHideVis();
+Function onShowVis();
+Function onHideVis_Full();
+Function onShowVis_Full();
+Function onHideEq();
+Function onShowEq();
+Function onHideCfg();
+Function onShowCfg();
+Function onCloseIC();
+Function onOpenIC();
+Function onhideMCV();
+
+Function dc_hideFi();
+Function dc_showFi();
+Function dc_showEq();
+Function dc_hideEq();
+Function dc_showCfg();
+Function dc_hideCfg();
+Function dc_hideCover();
+Function dc_showCover();
+Function dc_hideVis();
+Function dc_showVis();
+Function dc_hideVis_Full();
+Function dc_showVis_Full();
+
+Function updateFooter();
+
+Function ProcessMenuResult (int a);
+
+#ifdef DOHIDEMCV
+function updateSaving (int l);
+#endif
+
+Global Group sg, sui_cover, sui_vis_full, sui_vis, sui_fi, sui_eq, sui_cfg, g_footer, g_visbtns;
+Global WindowHolder sui_vis_wdh, sui_vis_full_wdh;
+Global Layout main;
+Global Boolean callback_showing_vis, callback_hiding_vis, callback_showing_vis_full, callback_hiding_vis_full, callback_showing_cover, callback_hiding_cover, callback_showing_fi, callback_hiding_fi, callback_hiding_eq, callback_showing_eq, callback_hiding_cfg, callback_showing_cfg;
+Global Boolean showing_vis, hiding_vis, showing_vis_full, hiding_vis_full, showing_cover, hiding_cover, hiding_fi, showing_fi, showing_eq, hiding_eq, showing_cfg, hiding_cfg;
+Global Boolean Mychange;
+Global Boolean prevent_vis = 1;
+Global Frame dualwnd, mainframe;
+Global GuiObject footerGrid, sendToBtn;
+
+Global Popupmenu compMenu;
+//Global Button compChoose, nowPlayingBtn, webSearchBtn;
+Global Button compChoose;
+Global Boolean startup_done;
+Global Int substract = 0;
+
+#ifdef DOHIDEMCV
+Global Int last_menu_sel;
+#endif
+
+// script loading/unloading goes here
+#include mcvcore/load_handles.m
+
+// showing and hiding the components
+#include mcvcore/show_hide.m
+
+#ifdef BIG_BENTO_WORKINGDIR
+// open / hiding components not caused by button clicks
+#include ../../Big Bento/scripts/mcvcore/external_handles.m
+#else
+// open / hiding components not caused by button clicks
+#include ../../__codename_onesie/scripts/mcvcore/external_handles.m
+#endif
+
+/* Switching menu */
+compChoose.onRightButtonUp(int x, int y)
+{
+ complete;
+}
+
+compChoose.onRightClick () {
+ compChoose.onLeftClick ();
+}
+
+compChoose.onLeftClick ()
+{
+ compMenu = new Popupmenu;
+ popupmenu fiSub = new Popupmenu;
+ compMenu.addCommand("File Info", 1, ic_fileinfo.getData() == "1", 0);
+#ifdef IC_COVERFLOW
+ compMenu.addCommand("Cover Flow", 7, _cflow_ic_attrib.getData() == "1", 0);
+#endif
+ // System.isSafeMode() is not recognized by mc.exe
+ // if(!System.isSafeMode())
+ // {
+ compMenu.addCommand("Visualization", 2, ic_vis.getData() == "1", 0);
+ // }
+ compMenu.addCommand("Stored Playlists", 3, _plsc_ic_attrib.getData() == "1", 0);
+ compMenu.addCommand("Equalizer", 4, ic_eq.getData() == "1", 0);
+ compMenu.addCommand("Skin Settings", 5, ic_config.getData() == "1", 0);
+#ifdef DOHIDEMCV
+ compMenu.addCommand("Hide Multi Content View", 6, ic_hidden.getData() == "1", 0);
+#endif
+ compMenu.addSeparator();
+ compMenu.addSubmenu(fiSub, "File Info Components");
+
+ // System.isSafeMode() is not recognized by mc.exe
+ // if(!System.isSafeMode())
+ // {
+ fiSub.addCommand("Visualization", 12, ic_vis_fileinfo.getData() == "1", 0);
+ // }
+ fiSub.addCommand("Album Art", 11, ic_cover_fileinfo.getData() == "1", 0);
+ fiSub.addSeparator();
+ fiSub.addCommand("Show Track #", 24, infocomp_show_track.getData() == "1", 0);
+ fiSub.addCommand("Show Year", 21, infocomp_show_year.getData() == "1", 0);
+ fiSub.addCommand("Show Genre", 22, infocomp_show_genre.getData() == "1", 0);
+ fiSub.addCommand("Show Disc", 28, infocomp_show_disc.getData() == "1", 0);
+ fiSub.addCommand("Show Album Artist", 25, infocomp_show_albumartist.getData() == "1", 0);
+ fiSub.addCommand("Show Composer", 26, infocomp_show_composer.getData() == "1", 0);
+ fiSub.addCommand("Show Publisher", 23, infocomp_show_publisher.getData() == "1", 0);
+ fiSub.addCommand("Show Decoder", 27, infocomp_show_format.getData() == "1", 0);
+ fiSub.addCommand("Show Song Rating", 20, infocomp_show_rating.getData() == "1", 0);
+ fiSub.addSeparator();
+ fiSub.addCommand("Cycle File Info", 30, infocomp_cycle.getData() == "1", 0);
+ fiSub.addSeparator();
+ //fiSub.addCommand("Open Links in Now Playing", 40, infocomp_nowplaying.getData() == "1", 0);
+ //fiSub.addCommand("Open Links in Browser", 41, infocomp_browser.getData() == "1", 0);
+
+ ProcessMenuResult (compMenu.popAtXY(clientToScreenX(compChoose.getLeft()), clientToScreenY(compChoose.getTop() + compChoose.getHeight())));
+ delete compMenu;
+ delete fiSub;
+ complete;
+}
+
+ProcessMenuResult (int a)
+{
+ if (a < 1) return;
+ if (a == 1)
+ {
+ ic_fileinfo.setData("1");
+ }
+ else if (a == 2)
+ {
+ ic_vis.setData("1");
+ }
+ else if (a == 3)
+ {
+ _plsc_ic_attrib.setData("1");
+ }
+#ifdef IC_COVERFLOW
+ else if (a == 7)
+ {
+ _cflow_ic_attrib.setData("1");
+ }
+#endif
+ else if (a == 4)
+ {
+ ic_eq.setData("1");
+ }
+ else if (a == 5)
+ {
+ ic_config.setData("1");
+ }
+#ifdef DOHIDEMCV
+ else if (a == 6)
+ {
+ ic_hidden.setData("1");
+ }
+#endif
+ else if (a == 11)
+ {
+ toggleAttrib(ic_cover_fileinfo);
+ }
+ else if (a == 12)
+ {
+ toggleAttrib(ic_vis_fileinfo);
+ }
+ else if (a == 20)
+ {
+ toggleAttrib(infocomp_show_rating);
+ }
+ else if (a == 21)
+ {
+ toggleAttrib(infocomp_show_year);
+ }
+ else if (a == 22)
+ {
+ toggleAttrib(infocomp_show_genre);
+ }
+ else if (a == 23)
+ {
+ toggleAttrib(infocomp_show_publisher);
+ }
+ else if (a == 24)
+ {
+ toggleAttrib(infocomp_show_track);
+ }
+ else if (a == 25)
+ {
+ toggleAttrib(infocomp_show_albumartist);
+ }
+ else if (a == 26)
+ {
+ toggleAttrib(infocomp_show_composer);
+ }
+ else if (a == 27)
+ {
+ toggleAttrib(infocomp_show_format);
+ }
+ else if (a == 28)
+ {
+ toggleAttrib(infocomp_show_disc);
+ }
+ else if (a == 30)
+ {
+ toggleAttrib(infocomp_cycle);
+ }
+/* else if (a == 40)
+ {
+ toggleAttrib(infocomp_nowplaying);
+ }
+ else if (a == 41)
+ {
+ toggleAttrib(infocomp_browser);
+ }
+*/
+}
+
+// Hiding footer buttons (for file info view)
+
+/* artist_info_buttons_attrib.onDataChanged ()
+{
+
+ updateFooter ();
+}
+*/
+
+g_footer.onResize (int x, int y, int w, int h)
+{
+ if (substract == 1)
+ w += stringToInteger(dualwnd.getXmlParam("maxwidth")) + 101;
+ else if (substract == 2)
+ w += stringToInteger(dualwnd.getXmlParam("maxwidth")) + 135;
+ else if (substract == 3)
+ w += stringToInteger(dualwnd.getXmlParam("maxwidth")) + 66;
+
+/* if (artist_info_buttons_attrib.getData() == "1")
+ {
+ if (w < 117) footerGrid.hide();
+ else footerGrid.show();
+
+ if (w < 97) nowPlayingBtn.hide();
+ else nowPlayingBtn.show();
+
+ if (w < 74) webSearchBtn.hide();
+ else webSearchBtn.show();
+ }
+ else
+ {
+ if (w < 70) footerGrid.hide();
+ else footerGrid.show();
+ nowPlayingBtn.hide();
+ webSearchBtn.hide();
+ }
+*/
+ if (w < 50) sendToBtn.hide();
+ else sendToBtn.show();
+
+ if (w < 26) compChoose.hide();
+ else compChoose.show();
+}
+
+updateFooter ()
+{
+ g_footer.onResize (0, 0, g_footer.getWidth(), 0);
+}
+
+#ifdef DOHIDEMCV
+// Switching back from no comp
+
+sg.onResize (int x, int y, int w, int h)
+{
+
+ if (ic_hidden.getData() == "0" || last_menu_sel == 0 || w == 0)// && dualwnd.getXmlParam("from") == "left")
+ {
+ return;
+ }
+ ProcessMenuResult (getPrivateInt(getSkinName(), "MCV last sel", 1));
+}
+
+// save last pos
+
+updateSaving (int l)
+{
+ if (last_menu_sel == l)
+ {
+ return;
+ }
+ if (last_menu_sel != 0) setPrivateInt(getSkinName(), "MCV last sel", last_menu_sel);
+ last_menu_sel = l;
+}
+#endif
+
+/** OSD */
+/*
+Global boolean mouse_is_over = FALSE;
+
+osd_trigger.onEnterArea ()
+{
+ //setXmlParam("ghost", "1");
+}
+
+osd_trigger.onMouseMove (int x, int y)
+{
+ if (!isMouseOverRect() && mouse_is_over)
+ {
+ mouse_is_over = 0;
+ component c = sui_vis_full.findObject("vis");
+ c.sendAction("setregion", "vis.normal.region", 0, 0, 0, 0);
+ c = sui_vis.findObject("vis");
+ c.sendAction("setregion", "vis.normal.region", 0, 0, 0, 0);
+ }
+ else if (isMouseOverRect() && !mouse_is_over)
+ {
+ mouse_is_over = 1;
+ component c = sui_vis_full.findObject("vis");
+ c.sendAction("setregion", "vis.button.region", 0, 0, 0, 0);
+ c = sui_vis.findObject("vis");
+ c.sendAction("setregion", "vis.button.region", 0, 0, 0, 0);
+ }
+}
+
+osd_trigger.onLeaveArea ()
+{
+ component c = sui_vis_full.findObject("vis");
+ c.sendAction("setregion", "vis.normal.region", 0, 0, 0, 0);
+}*/
+
+/** Calls after comp is shown */
+
+onCloseIC() {}
+onOpenIC() {}
+
+onShowCover() {}
+
+onHideCover() {}
+
+onShowFi() {}
+
+onHideFi() {}
+
+onShowEq() {}
+
+onHideEq() {}
+
+onShowCfg() {}
+
+onHideCfg() {}
+
+onShowVis()
+{
+ g_visbtns.show();
+}
+onHideVis()
+{
+ g_visbtns.hide();
+}
+
+onShowVis_Full() {}
+
+onHideVis_Full() {}
+
+#ifdef DOHIDEMCV
+onhideMCV() {}
+#endif
+
+fit (group g, int x, int rx, int y, int ry, int w, int rw, int h, int rh)
+{
+ if (!g) return;
+ g.setXmlParam("x", integerToString(x));
+ g.setXmlParam("y", integerToString(y));
+ g.setXmlParam("w", integerToString(w));
+ g.setXmlParam("h", integerToString(h));
+ g.setXmlParam("relatx", integerToString(rx));
+ g.setXmlParam("relaty", integerToString(ry));
+ g.setXmlParam("relatw", integerToString(rw));
+ g.setXmlParam("relath", integerToString(rh));
+} \ No newline at end of file
diff --git a/Src/resources/skins/Bento/scripts/mcvcore.maki b/Src/resources/skins/Bento/scripts/mcvcore.maki
new file mode 100644
index 00000000..336e7252
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/mcvcore.maki
Binary files differ
diff --git a/Src/resources/skins/Bento/scripts/mcvcore/load_handles.m b/Src/resources/skins/Bento/scripts/mcvcore/load_handles.m
new file mode 100644
index 00000000..607c2901
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/mcvcore/load_handles.m
@@ -0,0 +1,131 @@
+/*---------------------------------------------------
+-----------------------------------------------------
+Filename: load_handles.m
+Version: 1.0
+
+Type: maki
+Date: 28. Dez. 2006 - 08:40
+Author: Martin Poehlmann aka Deimos
+E-Mail: martin@skinconsortium.com
+Internet: www.skinconsortium.com
+ www.martin.deimos.de.vu
+-----------------------------------------------------
+Depending Files:
+ scripts/infocompcore.maki
+-----------------------------------------------------
+---------------------------------------------------*/
+
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+System.onScriptLoaded ()
+{
+ initAttribs_windowpage();
+ initAttribs_vis();
+ initAttribs_Appearance();
+
+ debugString(DEBUG_PREFIX "System.onScriptLoded() {", 0);
+
+ sg = getScriptGroup();
+ main = sg.getParentLayout();
+
+ mainframe = main.getObject("player.mainframe");
+ dualwnd = mainframe.findObject("player.dualwnd");
+
+ sui_cover = sg.findObject("info.component.cover");
+ sui_vis = sg.findObject("info.component.vis");
+ sui_vis_full = sg.findObject("info.component.vis.full");
+ sui_vis_wdh = sui_vis.getObject("vis");
+ sui_vis_full_wdh = sui_vis_full.getObject("vis");
+ sui_fi = sg.findObject("info.component.infodisplay");
+ sui_eq = sg.findObject("info.component.eq");
+ sui_cfg = sg.findObject("info.component.config");
+#ifdef IC_COVERFLOW
+ _cflow_sui = sg.findObject("info.component.coverflow");
+#endif
+ _plsc_sui = sg.findObject("info.component.plsidecar");
+ g_footer = sg.findObject("infocomp.background.footer");
+ g_visbtns = g_footer.findObject("infocomp.visbuttons");
+ footerGrid = g_footer.findObject("footer.background.grid");
+
+ compChoose = sg.findObject("comp.menu");
+ sendToBtn = sg.findObject("sendTo");
+ //nowPlayingBtn = sg.findObject("nowplaying");
+ //webSearchBtn = sg.findObject("search");
+#ifdef DOHIDEMCV
+ last_menu_sel = getPrivateInt(getSkinName(), "MCV last sel", 1);
+#endif
+ callbackTimer = new Timer;
+ callbackTimer.setDelay(1);
+ tempDisable = new Timer;
+ tempDisable.setDelay(50);
+
+
+ if (ic_fileinfo.getData() == "1")
+ {
+ updateFileInfo ();
+ }
+ else if (ic_vis.getData() == "1")
+ {
+ switchToVis_Full();
+ }
+ else if (ic_eq.getData() == "1")
+ {
+ switchToEq();
+ }
+ else if (ic_config.getData() == "1")
+ {
+ switchToCfg();
+ }
+ else if (_plsc_ic_attrib.getData() == "1")
+ {
+ _plsc_switchTo();
+ }
+#ifdef IC_COVERFLOW
+ else if (_cflow_ic_attrib.getData() == "1")
+ {
+ _cflow_switchTo();
+ }
+#endif
+#ifdef DOHIDEMCV
+ else if (ic_hidden.getData() == "1")
+ {
+ hideMCV();
+ }
+#endif
+ startup_done = 1;
+ debugString(DEBUG_PREFIX "}", 0);
+ prevent_vis = 0;
+}
+
+updateFileInfo ()
+{
+ if (ic_vis_fileinfo.getData() == "1" && ic_cover_fileinfo.getData() == "1")
+ {
+ switchToVisCover();
+ }
+ else if (ic_vis_fileinfo.getData() == "1")
+ {
+ switchToVis();
+ }
+ else if (ic_cover_fileinfo.getData() == "1")
+ {
+ switchToCover();
+ }
+ else
+ {
+ switchToIcOnly();
+ }
+}
+
+System.onScriptUnloading ()
+{
+ debugString(DEBUG_PREFIX "System.onScriptUnloading() {", 0);
+
+ delete callbackTimer;
+ delete tempDisable;
+
+ debugString(DEBUG_PREFIX " delete Timers;", 0);
+ debugString(DEBUG_PREFIX "}", 0);
+} \ No newline at end of file
diff --git a/Src/resources/skins/Bento/scripts/mcvcore/show_hide.m b/Src/resources/skins/Bento/scripts/mcvcore/show_hide.m
new file mode 100644
index 00000000..0bea76b3
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/mcvcore/show_hide.m
@@ -0,0 +1,916 @@
+/*---------------------------------------------------
+-----------------------------------------------------
+Filename: show_hide.m
+Version: 1.0
+
+Type: maki
+Date: 29. Nov. 2006 - 15:57
+Author: Martin Poehlmann aka Deimos
+E-Mail: martin@skinconsortium.com
+Internet: www.skinconsortium.com
+ www.martin.deimos.de.vu
+-----------------------------------------------------
+Depending Files:
+ scripts/infocompcore.maki
+-----------------------------------------------------
+---------------------------------------------------*/
+
+#ifndef included
+#error This script can only be compiled as a #include
+#endif
+
+switchToCover ()
+{
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis();
+ hideVis_Full();
+ hideEq();
+ hideCfg();
+ openIC();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ if (startup_done)
+ {
+ ic_cover_fileinfo.setData("1");
+ ic_fileinfo.setData("1");
+ }
+ mychange = 0;
+ substract = 0;
+ sui_cover.setXmlParam("x", "4");
+
+ dualwnd.setXmlParam("maxwidth", "-100");
+ dualwnd.sendAction("set_maxwidth", "", -100, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "90");
+ g_footer.setXmlParam("w", "-91");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+ showCover();
+ FIT_W_COMP;
+ updateSaving(1);
+}
+
+switchToVisCover ()
+{
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis_Full();
+ hideEq();
+ hideCfg();
+ openIC();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ if (startup_done)
+ {
+ ic_cover_fileinfo.setData("1");
+ ic_vis_fileinfo.setData("1");
+ vis_lefttoplayer_attrib.setData("1");
+ ic_fileinfo.setData("1");
+ }
+ mychange = 0;
+ substract = 0;
+ sui_cover.setXmlParam("x", "92");
+
+ dualwnd.setXmlParam("maxwidth", "-188");
+ dualwnd.sendAction("set_maxwidth", "", -188, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "178");
+ g_footer.setXmlParam("w", "-179");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+ showCover();
+ showVis();
+ FIT_W2_COMP;
+ updateSaving(1);
+}
+switchToVis ()
+{
+ debugString(DEBUG_PREFIX "switchToVis();", D_WTF);
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideCover();
+ hideVis_Full();
+ hideEq();
+ hideCfg();
+ openIC();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ if (startup_done)
+ {
+ ic_vis_fileinfo.setData("1");
+ vis_lefttoplayer_attrib.setData("1");
+ ic_fileinfo.setData("1");
+ }
+ mychange = 0;
+ substract = 1;
+
+ dualwnd.setXmlParam("maxwidth", "-100");
+ dualwnd.sendAction("set_maxwidth", "", -100, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "90");
+ g_footer.setXmlParam("w", "-91");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+
+ showVis();
+ FIT_W_COMP;
+ updateSaving(1);
+}
+
+switchToIcOnly ()
+{
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis_Full();
+ hideVis();
+ hideCover();
+ hideEq();
+ hideCfg();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ if (startup_done) ic_fileinfo.setData("1");
+ //ic_vis_fileinfo.setData("0");
+ //ic_vis.setData("0");
+ mychange = 0;
+ substract = 0;
+
+ dualwnd.setXmlParam("maxwidth", "-100");
+ dualwnd.sendAction("set_maxwidth", "", -100, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "6");
+ g_footer.setXmlParam("w", "-7");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+ showFi();
+ FIT_WO_COMP;
+ updateSaving(1);
+}
+
+switchToEq ()
+{
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis_Full();
+ hideVis();
+ hideCover();
+ hideFi();
+ hideCfg();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ substract = 1;
+ ic_eq.setData("1");
+ //ic_vis_fileinfo.setData("0");
+ //ic_vis.setData("0");
+ mychange = 0;
+
+ dualwnd.setXmlParam("maxwidth", "-196");
+ dualwnd.sendAction("set_maxwidth", "", -196, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "6");
+ g_footer.setXmlParam("w", "-7");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+
+ showEq();
+ updateSaving(4);
+}
+
+switchToCfg ()
+{
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis_Full();
+ hideVis();
+ hideCover();
+ hideFi();
+ hideEq();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ ic_config.setData("1");
+ //ic_vis_fileinfo.setData("0");
+ //ic_vis.setData("0");
+ mychange = 0;
+ substract = 2;
+
+ dualwnd.setXmlParam("maxwidth", "-244");
+ dualwnd.sendAction("set_maxwidth", "", -244, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "75");
+ g_footer.setXmlParam("w", "-76");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+
+ showCfg();
+ updateSaving(5);
+}
+
+_Plsc_switchTo ()
+{
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis_Full();
+ hideVis();
+ hideCover();
+ hideFi();
+ hideEq();
+ hideCfg();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ _plsc_ic_attrib.setData("1");
+ //ic_vis_fileinfo.setData("0");
+ //ic_vis.setData("0");
+ mychange = 0;
+ substract = 0;
+
+ dualwnd.setXmlParam("maxwidth", "-156");
+ dualwnd.sendAction("set_maxwidth", "", -156, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "6");
+ g_footer.setXmlParam("w", "-7");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+
+ _Plsc_show();
+ updateSaving(3);
+}
+
+#ifdef IC_COVERFLOW
+_Cflow_switchTo ()
+{
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis_Full();
+ hideVis();
+ hideCover();
+ hideFi();
+ hideEq();
+ hideCfg();
+ _Plsc_hide();
+ mychange = 1;
+ _cflow_ic_attrib.setData("1");
+ //ic_vis_fileinfo.setData("0");
+ //ic_vis.setData("0");
+ mychange = 0;
+ substract = 0;
+
+ dualwnd.setXmlParam("maxwidth", "-156");
+ dualwnd.sendAction("set_maxwidth", "", -156, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "6");
+ g_footer.setXmlParam("w", "-7");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+
+ _Cflow_show();
+ updateSaving(3);
+}
+#endif
+
+switchToVis_Full ()
+{
+ debugString(DEBUG_PREFIX "switchToVis_FULL();", D_WTF);
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ closeIC();
+ hideVis();
+ hideCover();
+ hideEq();
+ //hideFi();
+ hideCfg();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ ic_vis.setData("1");
+ vis_lefttoplayer_full_attrib.setData("1");
+ mychange = 0;
+ substract = 1;
+
+ dualwnd.setXmlParam("maxwidth", "-156");
+ dualwnd.sendAction("set_maxwidth", "", -156, 0 , 0, 0);
+
+ g_footer.setXmlParam("x", "6");
+ g_footer.setXmlParam("w", "-7");
+
+ updateFooter();
+
+#ifdef DOHIDEMCV
+ dualwnd.setXmlParam("from", "right");
+ dualwnd.setXmlParam("minwidth", "147");
+#endif
+
+ showVis_Full();
+ updateSaving(2);
+}
+
+#ifdef DOHIDEMCV
+hideMCV ()
+{
+ debugString(DEBUG_PREFIX "hideMCV();", D_WTF);
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis_Full();
+ closeIC();
+ hideVis();
+ hideCover();
+ hideEq();
+ //hideFi();
+ hideCfg();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+ mychange = 1;
+ ic_hidden.setData("1");
+ mychange = 0;
+ updateSaving(0);
+ /*g_footer.setXmlParam("x", "6");
+ g_footer.setXmlParam("w", "-7");
+ dualwnd.setXmlParam("maxwidth", "-156");
+ dualwnd.sendAction("set_maxwidth", "", -156, 0 , 0, 0);*/
+// dualwnd.setXmlParam("maxwidth", "-8");
+// dualwnd.sendAction("set_maxwidth", "", -8, 0 , 0, 0);
+ dualwnd.setXmlParam("from", "left");
+ dualwnd.setXmlParam("minwidth", integerToString(8 - stringtoInteger(dualwnd.getXmlParam("maxwidth"))));
+ dualwnd.setXmlParam("maxwidth", "-155");
+ dualwnd.sendAction("set_maxwidth", "", -155, 0 , 0, 0);
+ dualwnd.setPosition(0);
+ updateSaving(6);
+}
+#endif
+
+tempDisable.onTimer()
+{
+ stop();
+}
+
+closeLC ()
+{
+ if (callbackTimer.isRunning()) return;
+ if (tempDisable.isRunning()) return;
+ tempDisable.start();
+ hideVis();
+ hideCover();
+ hideCfg();
+ hideEq();
+ hideVis_Full();
+ _Plsc_hide();
+#ifdef IC_COVERFLOW
+ _Cflow_hide();
+#endif
+}
+
+closeIC ()
+{
+ debugString(DEBUG_PREFIX "closeIC() {", 0);
+
+ hideFi();
+
+ onCloseIC();
+
+ debugString(DEBUG_PREFIX "}", 0);
+}
+
+openIC ()
+{
+ debugString(DEBUG_PREFIX "openIC() {", 0);
+
+ showFi();
+
+ onOpenIC();
+
+ debugString(DEBUG_PREFIX "}", 0);
+}
+
+showFi()
+{
+ debugString(DEBUG_PREFIX "showFi() {", 0);
+
+ showing_fi = 1;
+ setPrivateString(getSkinName(), "Component3", "File Info");
+ GuiObject o = sui_fi;
+ if (o != NULL)
+ {
+ bypasscancel = 1;
+ if (o) o.show();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", 0);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) fi object not provided (show)", 0);
+#endif
+ onShowFi();
+ showing_Fi = 0;
+
+ debugString(DEBUG_PREFIX "}", 0);
+}
+
+hideFi()
+{
+ debugString(DEBUG_PREFIX "hideFi() {", 0);
+
+ hiding_Fi = 1;
+ GuiObject o = sui_fi;
+ if (o != NULL) {
+ bypasscancel = 1;
+ if (o) o.hide();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", 0);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) sfi object not provided (hide)", 0);
+#endif
+ onHideFi();
+ hiding_Fi = 0;
+
+ debugString(DEBUG_PREFIX "}", 0);
+}
+
+showVis()
+{
+ //if (vis_inbig_attrib.getData() == "1") return;
+ debugString(DEBUG_PREFIX "showVis() {", D_WTF);
+ showing_vis = 1;
+ GuiObject o = sui_vis;
+ if (o != NULL)
+ {
+ bypasscancel = 1;
+ if (o) o.show();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", D_WTF);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) vis object not provided (show)", D_WTF);
+#endif
+ onShowVis();
+ showing_vis = 0;
+
+ debugString(DEBUG_PREFIX "}", D_WTF);
+}
+
+hideVis()
+{
+ debugString(DEBUG_PREFIX "hideVis() {", D_WTF);
+
+ hiding_vis = 1;
+ GuiObject o = sui_vis;
+ if (o != NULL) {
+ bypasscancel = 1;
+ if (o) o.hide();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", D_WTF);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) vis object not provided (hide)", D_WTF);
+#endif
+ onHideVis();
+ hiding_vis = 0;
+
+ debugString(DEBUG_PREFIX "}", D_WTF);
+}
+
+showCover()
+{
+ debugString(DEBUG_PREFIX "showCover() {", 0);
+
+ showing_Cover = 1;
+ GuiObject o = sui_Cover;
+ if (o != NULL)
+ {
+ bypasscancel = 1;
+ if (o) o.show();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", 0);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) Cover object not provided (show)", 0);
+#endif
+ onShowCover();
+ showing_Cover = 0;
+
+ debugString(DEBUG_PREFIX "}", 0);
+}
+
+hideCover()
+{
+ debugString(DEBUG_PREFIX "hideCover() {", 0);
+
+ hiding_Cover = 1;
+ GuiObject o = sui_Cover;
+ if (o != NULL) {
+ bypasscancel = 1;
+ if (o) o.hide();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", 0);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) Cover object not provided (hide)", 0);
+#endif
+ onHideCover();
+ hiding_Cover = 0;
+
+ debugString(DEBUG_PREFIX "}", 0);
+}
+
+showVis_Full()
+{
+ debugString(DEBUG_PREFIX "showVis_Full() {", D_WTF);
+
+ showing_vis_full = 1;
+ GuiObject o = sui_vis_full;
+ if (o != NULL)
+ {
+ bypasscancel = 1;
+ if (o) o.show();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", D_WTF);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) Vis_Full object not provided (show)", D_WTF);
+#endif
+ onShowVis_Full();
+ showing_vis_full = 0;
+
+ debugString(DEBUG_PREFIX "}", D_WTF);
+}
+
+hideVis_Full()
+{
+ debugString(DEBUG_PREFIX "hideVis_Full() {", D_WTF);
+
+ hiding_vis_full = 1;
+ GuiObject o = sui_vis_full;
+ if (o != NULL) {
+ bypasscancel = 1;
+ if (o) o.hide();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", D_WTF);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) Vis_Full object not provided (hide)", D_WTF);
+#endif
+ onHideVis_Full();
+ hiding_vis_full = 0;
+
+ debugString(DEBUG_PREFIX "}", D_WTF);
+}
+
+showEq()
+{
+ debugString(DEBUG_PREFIX "showEq() {", D_WTF);
+
+ showing_eq = 1;
+ GuiObject o = sui_eq;
+ if (o != NULL)
+ {
+ bypasscancel = 1;
+ if (o) o.show();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", D_WTF);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) Vis_Full object not provided (show)", D_WTF);
+#endif
+ onShowEq();
+ showing_eq = 0;
+
+ debugString(DEBUG_PREFIX "}", D_WTF);
+}
+
+hideEq()
+{
+ debugString(DEBUG_PREFIX "hideVis_Full() {", D_WTF);
+
+ hiding_eq = 1;
+ GuiObject o = sui_eq;
+ if (o != NULL) {
+ bypasscancel = 1;
+ if (o) o.hide();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", D_WTF);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) Eq object not provided (hide)", D_WTF);
+#endif
+ onHideEq();
+ hiding_eq = 0;
+
+ debugString(DEBUG_PREFIX "}", D_WTF);
+}
+
+showCfg()
+{
+ debugString(DEBUG_PREFIX "showCfg() {", D_WTF);
+
+ showing_cfg = 1;
+ GuiObject o = sui_cfg;
+ if (o != NULL)
+ {
+ bypasscancel = 1;
+ if (o) o.show();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", D_WTF);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) cfg_Full object not provided (show)", D_WTF);
+#endif
+ onShowcfg();
+ showing_cfg = 0;
+
+ debugString(DEBUG_PREFIX "}", D_WTF);
+}
+
+hideCfg()
+{
+ debugString(DEBUG_PREFIX "hideVis_Full() {", D_WTF);
+
+ hiding_cfg = 1;
+ GuiObject o = sui_cfg;
+ if (o != NULL) {
+ bypasscancel = 1;
+ if (o) o.hide();
+ bypasscancel = 0;
+ debugString(DEBUG_PREFIX " --> ok", D_WTF);
+ }
+#ifdef DEBUG
+ else debugString(DEBUG_PREFIX " --> (!) cfg object not provided (hide)", D_WTF);
+#endif
+ onHidecfg();
+ hiding_cfg = 0;
+
+ debugString(DEBUG_PREFIX "}", D_WTF);
+}
+
+callbackTimer.onTimer()
+{
+ callbackTimer.stop();
+
+ debugString(DEBUG_PREFIX "callbackTimer();", D_WTF);
+
+ int _callback_showing_vis = callback_showing_vis;
+ int _callback_hiding_vis = callback_hiding_vis;
+ int _callback_showing_fi = callback_showing_fi;
+ int _callback_hiding_fi = callback_hiding_fi;
+ int _callback_showing_cover = callback_showing_cover;
+ int _callback_hiding_cover = callback_hiding_cover;
+ int _callback_showing_vis_full = callback_showing_vis_full;
+ int _callback_hiding_vis_full = callback_hiding_vis_full;
+ int _callback_showing_eq = callback_showing_eq;
+ int _callback_hiding_eq = callback_hiding_eq;
+ int _callback_showing_cfg = callback_showing_cfg;
+ int _callback_hiding_cfg = callback_hiding_cfg;
+ int _plsc_callback_showing_temp = _plsc_callback_showing;
+ int _plsc_callback_hiding_temp = _plsc_callback_hiding;
+#ifdef IC_COVERFLOW
+ int _cflow_callback_showing_temp = _cflow_callback_showing;
+ int _cflow_callback_hiding_temp = _cflow_callback_hiding;
+#endif
+
+ callback_showing_vis = 0;
+ callback_hiding_vis = 0;
+ callback_showing_fi = 0;
+ callback_hiding_fi = 0;
+ callback_showing_cover = 0;
+ callback_hiding_cover = 0;
+ callback_showing_vis_full = 0;
+ callback_hiding_vis_full = 0;
+ callback_showing_eq = 0;
+ callback_hiding_eq = 0;
+ callback_showing_cfg = 0;
+ callback_hiding_cfg = 0;
+ _plsc_callback_showing = 0;
+ _plsc_callback_hiding = 0;
+#ifdef IC_COVERFLOW
+ _cflow_callback_showing = 0;
+ _cflow_callback_hiding = 0;
+#endif
+
+ if (_callback_showing_vis == 1)
+ {
+ ic_vis_fileinfo.setData("1");
+ ic_fileinfo.setData("1");
+ }
+ if (_callback_hiding_vis == 1)
+ {
+ ic_vis_fileinfo.setData("0");
+ }
+ if (_callback_showing_fi == 1)
+ {
+ showFi();
+ }
+ if (_callback_hiding_fi == 1)
+ {
+ hideFi();
+ }
+ if (_callback_showing_cover == 1)
+ {
+ ic_cover_fileinfo.setData("1");
+ ic_fileinfo.setData("1");
+ }
+ if (_callback_hiding_cover == 1)
+ {
+ ic_cover_fileinfo.setData("0");
+ }
+ if (_callback_showing_vis_full == 1)
+ {
+ switchToVis_Full();
+ }
+ if (_callback_hiding_vis_full == 1)
+ {
+ hideVis_Full();
+ }
+ if (_callback_showing_eq == 1)
+ {
+ switchToEq();
+ }
+ if (_callback_hiding_eq == 1)
+ {
+ hideEq();
+ }
+ if (_callback_showing_cfg == 1)
+ {
+ switchTocfg();
+ }
+ if (_callback_hiding_cfg == 1)
+ {
+ hidecfg();
+ }
+ if (_plsc_callback_showing_temp == 1)
+ {
+ _Plsc_switchTo();
+ }
+ if (_plsc_callback_hiding_temp == 1)
+ {
+ _Plsc_hide();
+ }
+#ifdef IC_COVERFLOW
+ if (_cflow_callback_showing_temp == 1)
+ {
+ _Cflow_switchTo();
+ }
+ if (_cflow_callback_hiding_temp == 1)
+ {
+ _Cflow_hide();
+ }
+#endif
+}
+
+dc_showFi ()
+{
+ callback_showing_fi = 1;
+ callback_hiding_fi = 0;
+ callbackTimer.start();
+}
+
+dc_hideFi ()
+{
+ callback_showing_fi = 0;
+ callback_hiding_fi = 1;
+ callbackTimer.start();
+}
+
+dc_showCover ()
+{
+ callback_showing_cover = 1;
+ callback_hiding_cover = 0;
+ callbackTimer.start();
+}
+
+dc_hideCover ()
+{
+ callback_showing_cover = 0;
+ callback_hiding_cover = 1;
+ callbackTimer.start();
+}
+
+dc_showVis ()
+{
+ debugString(DEBUG_PREFIX "dc_showVis();", D_WTF);
+ callback_showing_vis = 1;
+ callback_hiding_vis = 0;
+ callbackTimer.start();
+}
+
+dc_hideVis ()
+{
+ callback_showing_vis = 0;
+ callback_hiding_vis = 1;
+ callbackTimer.start();
+}
+
+dc_showVis_Full ()
+{
+ debugString(DEBUG_PREFIX "dc_showVis_Full();", D_WTF);
+ callback_showing_vis_full = 1;
+ callback_hiding_vis_full = 0;
+ callbackTimer.start();
+}
+
+dc_hideVis_Full ()
+{
+ callback_showing_vis_full = 0;
+ callback_hiding_vis_full = 1;
+ callbackTimer.start();
+}
+
+dc_showEq ()
+{
+ debugString(DEBUG_PREFIX "dc_showVis_Full();", D_WTF);
+ callback_showing_eq = 1;
+ callback_hiding_eq = 0;
+ callbackTimer.start();
+}
+
+dc_hideEq ()
+{
+ callback_showing_eq = 0;
+ callback_hiding_eq = 1;
+ callbackTimer.start();
+}
+
+dc_showCfg ()
+{
+ debugString(DEBUG_PREFIX "dc_showVis_Full();", D_WTF);
+ callback_showing_Cfg = 1;
+ callback_hiding_Cfg = 0;
+ callbackTimer.start();
+}
+
+dc_hideCfg ()
+{
+ callback_showing_Cfg = 0;
+ callback_hiding_Cfg = 1;
+ callbackTimer.start();
+} \ No newline at end of file
diff --git a/Src/resources/skins/Bento/scripts/playlistpro.m b/Src/resources/skins/Bento/scripts/playlistpro.m
new file mode 100644
index 00000000..17532b21
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/playlistpro.m
@@ -0,0 +1,426 @@
+/*
+
+PlaylistPro build 005
+Originally done by pjn123 (www.skinconsortium.com) for the Classic Pro plugin
+
+*/
+
+#include "lib/std.mi"
+#include "lib/pldir.mi"
+#include "init_Playlist.m"
+
+Function resizeResults(int items);
+Function doSearch(String input);
+Function setSearchBox(boolean onOff);
+Function clearSearchBox();
+Function int getPlEntry(int search_item);
+Function String replaceString(string baseString, string toreplace, string replacedby);
+
+Global Group frameGroup, topbar;
+Global Edit searchBox;
+Global Text helpSearch, searchNews;// fakeText;
+Global GuiObject fakeSB, searchXUI, searchButtonXui;
+Global Button searchButton, clearButton, clearButtonText;
+Global GuiList searchResults;
+Global Boolean foundsomething;
+Global int tn, h_tune;
+Global String temptoken;
+Global Windowholder plwh;
+GLobal Timer refreshActiveCheck;
+Global PopupMenu search_rc;
+
+Global Container results_container;
+Global Layout results_layout, main_layout;
+
+System.onScriptLoaded() {
+ frameGroup = getScriptGroup();
+ topbar = frameGroup.findObject("PlaylistPro.topbar");
+ plwh = frameGroup.findObject("wdh.playlist");
+
+ searchBox = frameGroup.findObject("wasabi.edit.box");
+ searchXUI = frameGroup.findObject("pl.search.edit");
+ searchButton = frameGroup.findObject("pl.search.go");
+ searchButtonXui = frameGroup.findObject("pl.search.go");
+ fakeSB = frameGroup.findObject("pl.search.edit.rect");
+ clearButton = frameGroup.findObject("pl.search.edit.clear");
+ clearButtonText = frameGroup.findObject("pl.search.edit.clear.text");
+ helpSearch = frameGroup.findObject("pl.search.edit.searchhelp");
+ //fakeText = frameGroup.findObject("pl.search.go.text.fake");
+
+ results_container = newDynamicContainer("searchresults");
+ results_layout = results_container.getLayout("normal");
+ searchResults = results_layout.findObject("PlaylistPro.list");
+ searchResults.setFontSize(16);
+ searchNews = results_layout.findObject("PlaylistPro.list.news");
+
+ main_layout = getContainer("main").getLayout("normal");
+
+ initAttribs_Playlist();
+
+ //translation workaround
+ /*searchButtonXui.setXmlParam("text", System.translate("Search"));
+ searchButtonXui.setXmlParam("x", integerToString(-1*fakeText.getAutoWidth()-4));
+ searchButtonXui.setXmlParam("w", integerToString(fakeText.getAutoWidth()+2));
+ searchXUI.setXmlParam("w", integerToString(-1*fakeText.getAutoWidth()-9));*/
+
+ refreshActiveCheck = new Timer;
+ refreshActiveCheck.setDelay(100);
+}
+System.onScriptUnLoading() {
+ delete refreshActiveCheck;
+}
+
+refreshActiveCheck.onTimer(){
+ if((!System.isAppActive() || System.isMinimized()) && results_layout.isVisible() ) results_layout.hide();
+}
+
+results_layout.onSetVisible(boolean onOff){
+ if(onOff){
+ refreshActiveCheck.start();
+ }
+ else{
+ refreshActiveCheck.stop();
+ }
+}
+
+System.onShowLayout(Layout _layout){
+ if(main_layout.isVisible()) results_layout.setXmlParam("ontop", "1");
+}
+
+frameGroup.onSetVisible(boolean onOff){
+ if(!onOff) clearSearchBox();
+}
+
+searchButton.onLeftClick(){
+ doSearch(searchBox.getText());
+}
+
+resizeResults(int items){
+ /*results_layout.setTargetX(results_layout.getLeft());
+ results_layout.setTargetY(results_layout.getTop());
+ results_layout.setTargetW(results_layout.getWidth());
+ results_layout.setTargetH(500);
+ results_layout.setTargetSpeed(1);
+ results_layout.gotoTarget();*/
+
+ //items++; //temp add one extra for info... xx items found
+ if(items>20) items=20;
+
+
+ if(items>=1) h_tune=29;
+ else h_tune=25;
+
+ //results_layout.setXmlParam("h", integerToString(20+items*18));
+
+ /*results_layout.setTargetX(results_layout.getLeft());
+ results_layout.setTargetY(results_layout.getTop());
+ results_layout.setTargetW(results_layout.getWidth());
+ results_layout.setTargetH(h_tune+items*16);
+ results_layout.setTargetSpeed(0.3);
+ results_layout.gotoTarget();*/
+ results_layout.resize(results_layout.getLeft(), results_layout.getTop(), results_layout.getWidth(), h_tune+items*16);
+}
+
+searchBox.onEnter(){
+ doSearch(searchBox.getText());
+}
+
+doSearch(String input){
+ if(input==""){
+ clearSearchBox();
+ return;
+ }
+
+ //search history stuff
+ String history = getPublicString("cPro.PlaylistPro.history", "");
+ history = replaceString(history, input, "");
+ history = replaceString(history, ";;", ";");
+ if(strleft(history, 1)==";") history = strright(history, strlen(history)-1);
+ if(strright(history, 1)==";") history = strleft(history, strlen(history)-1);
+ if(history=="") history= input;
+ else history= input+";"+history;
+
+ String output = getToken(history, ";", 0);
+ for(int i = 1; i<15; i++){
+ if(getToken(history, ";", i)=="") break;
+ output+=";"+getToken(history, ";", i);
+ }
+ setPublicString("cPro.PlaylistPro.history", history);
+
+
+ int itemsfound = 0;
+ input = strlower(input);
+
+ results_layout.setXmlParam("x", integerToString(fakeSB.clientToScreenX(fakeSB.getLeft()-2)));
+ results_layout.setXmlParam("y", integerToString(fakeSB.clientToScreenY(fakeSB.getTop() + fakeSB.getHeight())));
+ results_layout.setXmlParam("w", integerToString(frameGroup.getWidth()-19));
+
+ if(!results_layout.isVisible()) results_layout.setXmlParam("h", "1");
+
+ searchResults.deleteAllItems();
+ searchResults.scrollToItem(0);
+
+ for(int i = 0; i<PlEdit.getNumTracks(); i++){
+ foundsomething=false;
+
+ for(tn = 0; tn<10; tn++){
+ if(getToken(input, " ", tn)==""){
+ break;
+ }
+
+ temptoken = getToken(input, " ", tn);
+ if(strsearch(strlower(PlEdit.getTitle(i) + " " + PlEdit.getFileName(i)), temptoken)>=0){
+ foundsomething=true;
+ }
+ else{
+ foundsomething=false;
+ }
+
+ if(!foundsomething){
+ break;
+ }
+ }
+
+ if(foundsomething){
+ itemsfound++;
+ searchResults.addItem(integerToString(i+1)+". " + PlEdit.getTitle(i));
+ if(itemsfound>500){
+ searchNews.setText("Search result limited to 500 items");
+ break;
+ }
+ }
+ }
+
+ if(itemsfound==0){
+ searchNews.setText("Nothing was found");
+ }
+ else if(itemsfound<=500){
+ searchNews.setText(System.translate("Items found: ") +integerToString(itemsfound));
+ }
+
+ if(!results_layout.isVisible()) results_layout.show();
+
+ // Fix if always on top is enabled.. it just refresh the ontop ;)
+ results_layout.setXmlParam("ontop", "1");
+
+ resizeResults(itemsfound);
+}
+
+searchResults.onDoubleClick(Int itemnum){
+ PlEdit.playTrack (getPlEntry(itemnum));
+ setSearchBox(false);
+}
+
+searchResults.onRightClick(Int itemnum){
+ search_rc = new PopupMenu;
+ search_rc.addCommand("Move selected to top", 1, 0, 0);
+ search_rc.addCommand("Move selected to bottom", 2, 0, 0);
+ search_rc.addCommand("Move selected after current", 3, 0, 0);
+ search_rc.addCommand("Move selected together", 4, 0, 0);
+ search_rc.addSeparator();
+ search_rc.addCommand("Remove selected from playlist", 5, 0, 0);
+ int result = search_rc.popAtMouse();
+ delete search_rc;
+
+ int lastselected = searchResults.getFirstItemSelected();
+ int itemcounter = 1;
+
+ if(result==1){
+ PlEdit.moveTo (getPlEntry(lastselected), 0);
+ while(searchResults.getNextItemSelected(lastselected) != -1){
+ lastselected = searchResults.getNextItemSelected(lastselected);
+ PlEdit.moveTo (getPlEntry(lastselected), itemcounter);
+ itemcounter++;
+ }
+ PlEdit.showTrack(0);
+ }
+ else if(result==2){
+ PlEdit.moveTo (getPlEntry(lastselected), PlEdit.getNumTracks ()-1);
+ while(searchResults.getNextItemSelected(lastselected) != -1){
+ lastselected = searchResults.getNextItemSelected(lastselected);
+ PlEdit.moveTo (getPlEntry(lastselected)-itemcounter, PlEdit.getNumTracks ()-1);
+ itemcounter++;
+ }
+ PlEdit.showTrack(PlEdit.getNumTracks ()-1);
+ }
+ else if(result==3){
+ int align = 0;
+ int orignalPos = PlEdit.getCurrentIndex();
+ int temp = getPlEntry(lastselected);
+ if(PlEdit.getCurrentIndex() > temp) align++;
+
+ if(orignalPos > getPlEntry(lastselected)) PlEdit.moveTo (getPlEntry(lastselected), PlEdit.getCurrentIndex());
+ else PlEdit.moveTo (getPlEntry(lastselected), PlEdit.getCurrentIndex()+1);
+
+ while(searchResults.getNextItemSelected(lastselected) != -1){
+ lastselected = searchResults.getNextItemSelected(lastselected);
+
+ if(orignalPos != getPlEntry(lastselected)){
+ if(orignalPos > getPlEntry(lastselected)){
+ PlEdit.moveTo (getPlEntry(lastselected)-align, PlEdit.getCurrentIndex()+itemcounter);
+ }
+ else{
+ PlEdit.moveTo (getPlEntry(lastselected), PlEdit.getCurrentIndex()+itemcounter+1);
+ }
+
+ temp = getPlEntry(lastselected);
+ if(orignalPos > temp) align++;
+ itemcounter++;
+ }
+ }
+ PlEdit.showCurrentlyPlayingTrack();
+ }
+ else if(result==4){
+ int startpos = getPlEntry(lastselected);
+ while(searchResults.getNextItemSelected(lastselected) != -1){
+ lastselected = searchResults.getNextItemSelected(lastselected);
+ PlEdit.moveTo (getPlEntry(lastselected), startpos+itemcounter);
+ itemcounter++;
+ }
+ PlEdit.showTrack(startpos);
+ }
+ else if(result==5){
+ PlEdit.removeTrack (getPlEntry(lastselected));
+ while(searchResults.getNextItemSelected(lastselected) != -1){
+ lastselected = searchResults.getNextItemSelected(lastselected);
+ PlEdit.removeTrack (getPlEntry(lastselected)-itemcounter);
+ itemcounter++;
+ }
+ }
+
+ else return;
+
+ //hides the search
+ setSearchBox(false);
+}
+
+int getPlEntry(int search_item){
+ return stringToInteger(getToken(searchResults.getItemLabel(search_item,0), ". ", 0))-1;
+}
+
+setSearchBox(boolean onOff){
+ if(onOff){
+ searchBox.show();
+ clearButton.show();
+ clearButtonText.show();
+ helpSearch.hide();
+ searchBox.setFocus();
+ }
+ else{
+ searchBox.hide();
+ clearButton.hide();
+ clearButtonText.hide();
+ helpSearch.show();
+ results_layout.hide();
+ }
+}
+
+fakeSB.onLeftButtonDown(int x, int y){
+ setSearchBox(true);
+}
+fakeSB.onRightButtonDown(int x, int y){
+ search_rc = new PopupMenu;
+ search_rc.addCommand("** Search history **", 0, 0, 1);
+ search_rc.addSeparator();
+
+ String history = getPublicString("cPro.PlaylistPro.history", "");
+ boolean historyfound=false;
+ for(int i=0;i<15;i++){
+ String historyitem = getToken(history, ";", i);
+ if(historyitem==""){
+ if(i>0) historyfound=true;
+ break;
+ }
+ search_rc.addCommand(historyitem, i+1, 0, 0);
+ }
+ if(historyfound) search_rc.addSeparator();
+ search_rc.addCommand("Clear History", 100, 0, 0);
+
+ int result = search_rc.popAtMouse();
+ delete search_rc;
+
+ if(result>0 && result<100){
+ setSearchBox(true);
+ searchBox.setText(getToken(history, ";", result-1));
+ searchButton.leftClick();
+ }
+ else if(result==100){
+ setPublicString("cPro.PlaylistPro.history", "");
+ }
+}
+
+clearSearchBox(){
+ searchBox.setText("");
+ setSearchBox(false);
+}
+
+main_layout.onMove(){
+ if(results_layout.isVisible()){
+ results_layout.setXmlParam("x", integerToString(fakeSB.clientToScreenX(fakeSB.getLeft()-2)));
+ results_layout.setXmlParam("y", integerToString(fakeSB.clientToScreenY(fakeSB.getTop() + fakeSB.getHeight())));
+ results_layout.setXmlParam("ontop", "1");
+ }
+}
+main_layout.onResize(int x, int y, int w, int h){
+ if(results_layout.isVisible()) clearSearchBox();
+}
+
+frameGroup.onResize(int x, int y, int w, int h){
+ if(results_layout.isVisible()) clearSearchBox();
+
+ //if(playlist_search_attib.getData()=="0") return;
+
+ if(h<102 || playlist_search_attrib.getData()=="0"){
+
+ if(!topbar.isVisible()) return; //Don't do the same code over and over
+
+ topbar.hide();
+ plwh.setXmlParam("y", "0");
+ plwh.setXmlParam("h", "0");
+ }
+ else{
+ if(topbar.isVisible()) return; //Don't do the same code over and over
+
+ topbar.show();
+ plwh.setXmlParam("y", "30");
+ plwh.setXmlParam("h", "-30");
+ }
+}
+
+clearButton.onLeftClick(){
+ clearSearchBox();
+}
+
+playlist_search_attrib.onDataChanged(){
+ frameGroup.onResize(frameGroup.getLeft(), frameGroup.getTop(), frameGroup.getWidth(), frameGroup.getHeight());
+ //debug("abc " + getData());
+
+ if (getData() == "0"){
+ topbar.hide();
+ plwh.setXMLParam("y", "0");
+ plwh.setXMLParam("h", "0");
+ }
+ else if(getData() == "1"){
+
+ topbar.show();
+ plwh.setXMLParam("y", "30");
+ plwh.setXMLParam("h", "-30");
+
+ }
+}
+
+
+
+String replaceString(string baseString, string toreplace, string replacedby){
+ if (toreplace == "") return baseString;
+ string sf1 = strupper(baseString);
+ string sf2 = strupper(toreplace);
+ int i = strsearch(sf1, sf2);
+ if (i == -1) return baseString;
+ string left = "", right = "";
+ if (i != 0) left = strleft(baseString, i);
+ if (strlen(basestring) - i - strlen(toreplace) != 0) {
+ right = strright(basestring, strlen(basestring) - i - strlen(toreplace));
+ }
+ return left + replacedby + right;
+} \ No newline at end of file
diff --git a/Src/resources/skins/Bento/scripts/playlistpro.maki b/Src/resources/skins/Bento/scripts/playlistpro.maki
new file mode 100644
index 00000000..3db3ab8f
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/playlistpro.maki
Binary files differ
diff --git a/Src/resources/skins/Bento/scripts/pledit.m b/Src/resources/skins/Bento/scripts/pledit.m
new file mode 100644
index 00000000..87b2cf31
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/pledit.m
@@ -0,0 +1,619 @@
+/*---------------------------------------------------
+-----------------------------------------------------
+Filename: pledit.m
+Version: 3.1
+
+Type: maki
+Date: 18. Sep. 2007 - 19:42
+Author: Martin Poehlmann aka Deimos
+E-Mail: martin@skinconsortium.com
+Internet: www.skinconsortium.com
+ www.martin.deimos.de.vu
+-----------------------------------------------------
+---------------------------------------------------*/
+
+#include <lib/std.mi>
+
+//#define DEBUG
+#define FILE_NAME "pledit.m"
+#include <lib/com/debug.m>
+
+#define PL_GUID "{45F3F7C1-A6F3-4EE6-A15E-125E92FC3F8D}"
+#define PLC_POPPLER_POS 200
+
+#include "../../Big Bento/scripts/attribs/init_playlist.m"
+
+Function fitContent (int playlistw, int playlistx);
+Function fit (group g, int x, int rx, int y, int ry, int w, int rw, int h, int rh);
+Function int updatePoppler(int w);
+Function int updateMainPoppler(int w);
+
+Global Frame dualwnd, pl_dualwnd, mainframe;
+
+Global Group g_playlist, g_player, g_sui, g_buttons, g_mcv, g_cover, g_upper, wdh_pl;
+Global Button p_enlarge, p_small;
+Global Button p_resize;
+Global int down_x, down_gx, isresizing;
+Global layout normal;
+Global Container player;
+//Global WindowHolder wdh_pl;
+Global Text pl_time;
+
+Global Button pe_add, pe_rem, pe_sel, pe_misc, pe_manage;
+
+Global Boolean startup, isBig, bypass_nocomp;
+
+Global Timer dc_openPl, dc_closePl, dc_loadWnd;
+
+Global Int COMP_Y, COMP_H, SUI_Y, SUI_H, BOTTOMSPACER, MAX_PL_H;
+Global Int DEF_PL_W, SIDESPACER;
+
+Global Int min_infowidth;
+
+
+System.onScriptLoaded ()
+{
+ initAttribs_Playlist();
+ normal = getScriptGroup();
+ player = normal.getContainer();
+
+ isBig = (getParam() == "big");
+ if (isBig)
+ {
+ mainframe = normal.getObject("player.mainframe.big");
+ }
+ else
+ {
+ mainframe = normal.getObject("player.mainframe");
+ }
+
+ dualwnd = mainframe.findObject("player.dualwnd");
+ g_mcv = dualwnd.findObject("player.component.fileinfo");
+ g_upper = dualwnd.findObject("player.component.playlist.frame");
+ pl_dualwnd = dualwnd.findObject("playlist.dualwnd");
+ g_playlist = pl_dualwnd.findObject("player.component.playlist");
+ g_cover = pl_dualwnd.findObject("player.component.playlist.albumart");
+ g_player = dualwnd.findObject("player.layout");
+ g_sui = normal.getObject("sui.content");
+ g_buttons = g_playlist.getObject("player.component.playlist.buttons");
+ p_enlarge = g_buttons.getObject("player.playlist.enlarge");
+ p_small = g_buttons.getObject("player.playlist.small");
+ p_resize = g_playlist.getObject("player.resize");
+ wdh_pl = g_playlist.getObject("playlistpro");
+ pl_time = g_buttons.getObject("PLTime");
+
+ pe_add = g_buttons.getObject("player.playlist.add");
+ pe_rem = g_buttons.getObject("player.playlist.rem");
+ pe_sel = g_buttons.getObject("player.playlist.sel");
+ pe_misc = g_buttons.getObject("player.playlist.misc");
+ pe_manage = g_buttons.getObject("player.playlist.manage");
+
+ min_infowidth = stringtoInteger(dualwnd.getXmlParam("maxwidth"));
+
+ dc_openPl = new Timer;
+ dc_openPl.setDelay(1);
+
+ dc_closePl = new Timer;
+ dc_closePl.setDelay(1);
+
+ dc_loadWnd = new Timer;
+ dc_loadWnd.setDelay(1);
+
+ // Global Definitions:
+
+ DEF_PL_W = g_playlist.getGuiW(); // (-)
+ SIDESPACER = g_sui.getGuiX(); // (+)
+ COMP_Y = mainframe.getGuiY(); // (+)
+ COMP_H = mainframe.getGuiH(); // (+)
+ SUI_Y = g_sui.getGuiY(); // (+)
+ SUI_H = g_sui.getGuiH(); // (-)
+ BOTTOMSPACER = SUI_Y + SUI_H; // (-)
+ MAX_PL_H = BOTTOMSPACER - COMP_Y; // (-)
+
+ startup = 1;
+
+ // show playlist album art if checked
+ playlist_cover_attrib.onDataChanged();
+
+ //Bento v0.8 hack
+ if (mainframe.getPosition() < stringToInteger(mainframe.getXmlParam("minwidth")))
+ {
+ mainframe.setPosition(stringToInteger(mainframe.getXmlParam("minwidth")));
+ }
+}
+
+system.onScriptUnloading ()
+{
+ int pos = pl_dualwnd.getPosition();
+ if (pos > 0) setPrivateInt(getSkinName(), "playlist_cover_poppler", pos);
+ delete dc_loadWnd;
+}
+
+dc_loadWnd.onTimer ()
+{
+ stop();
+ int pos = dualwnd.getPosition();
+ if (pos > 0) updatePoppler(pos);
+ playlist_enlarge_attrib.onDataChanged();
+
+ if (dualwnd.getPosition() > 0
+#ifdef DOHIDEMCV
+ || dualwnd.getXMlParam("from") == "left"
+#endif
+ ) dc_openPL.start();
+
+
+ else wdh_pl.hide(); //hideWa2Component(PL_GUID);
+}
+
+playlist_enlarge_attrib.onDataChanged ()
+{
+ int pl_w = dualwnd.getPosition();
+
+#ifdef DOHIDEMCV
+ if (dualwnd.getXmlParam("from") == "left")
+ {
+ pl_w = dualwnd.getWidth() - 8;
+ }
+#endif
+
+ int pl_x = 0 - ( pl_w + SIDESPACER ); // (-)
+
+ if (getData() == "1")
+ {
+ int sui_w = pl_x - SIDESPACER; // (-)
+
+ dualwnd.setXmlParam("relath", "1");
+ dualwnd.setXmlParam("h", integerToString(0));
+ mainframe.setXmlParam("relath", "1");
+ mainframe.setXmlParam("h", integerToString(MAX_PL_H));
+
+ g_sui.setXmlParam("w", integerToString(sui_w-8));
+
+ int pos = getPrivateInt(getSkinName(), "playlist_cover_poppler", PLC_POPPLER_POS);
+ if (playlist_cover_attrib.getData() == "1" && pos > 0 && getPrivateString(getSkinName(), "Component", "Media Library") != "Hidden")
+ {
+ g_cover.show();
+ pl_dualwnd.setPosition (pos);
+ }
+ else
+ {
+ pl_dualwnd.setPosition (0);
+ g_cover.hide();
+ }
+
+ p_enlarge.hide();
+ p_small.show();
+ }
+ else
+ {
+ int sui_w = 0 - SIDESPACER - SIDESPACER; // (-)
+ int pc_w = pl_x - SIDESPACER; // (-)
+
+ g_cover.hide();
+
+ if (playlist_cover_attrib.getData() == "1")
+ {
+ int pos = pl_dualwnd.getPosition();
+ if (pos > 0) setPrivateInt(getSkinName(), "playlist_cover_poppler", pos);
+ }
+ pl_dualwnd.setPosition (0);
+
+ dualwnd.setXmlParam("h", integerToString(COMP_H-3));
+ dualwnd.setXmlParam("relath", "0");
+ mainframe.setXmlParam("h", integerToString(COMP_H));
+ mainframe.setXmlParam("relath", "0");
+
+ g_sui.setXmlParam("w", integerToString(sui_w));
+ p_enlarge.show();
+ p_small.hide();
+ }
+}
+
+g_playlist.onResize (int x, int y, int w, int h)
+{
+ int pos = dualwnd.getPosition();
+ debugString(integerToString(pos), 9);
+ updateMainPoppler(min_infowidth - pos - 8);
+
+ if (pos > 0
+#ifdef DOHIDEMCV
+ || dualwnd.getXMlParam("from") == "left"
+#endif
+ )
+ {
+ //setPrivateInt(getSkinName(), "pledit poppler width", dualwnd.getPosition());
+ if (!wdh_pl.isVisible())
+ {
+ setPrivateString(getSkinName(), "Pledit_pos", "top");
+ g_sui.sendAction("hide_comp", "pe", 0,0,0,0);
+
+ dc_openPl.start();
+ }
+
+ if (isBig)
+ {
+ if (w > 189)
+ {
+ pe_add.show();
+ pe_rem.show();
+ pe_sel.show();
+ pe_misc.show();
+ pe_manage.show();
+ }
+ else if (w <= 189 && w >158)
+ {
+ pe_add.show();
+ pe_rem.show();
+ pe_sel.show();
+ pe_misc.show();
+ pe_manage.hide();
+ }
+ else if (w <= 158 && w >127)
+ {
+ pe_add.show();
+ pe_rem.show();
+ pe_sel.show();
+ pe_misc.hide();
+ pe_manage.hide();
+ }
+ else if (w <= 127 && w >96)
+ {
+ pe_add.show();
+ pe_rem.show();
+ pe_sel.hide();
+ pe_misc.hide();
+ pe_manage.hide();
+ }
+ else if (w <= 96 && w >65)
+ {
+ pe_add.show();
+ pe_rem.hide();
+ pe_sel.hide();
+ pe_misc.hide();
+ pe_manage.hide();
+ }
+ else
+ {
+ pe_add.hide();
+ pe_rem.hide();
+ pe_sel.hide();
+ pe_misc.hide();
+ pe_manage.hide();
+ }
+ }
+ else
+ {
+ if (w > 146)
+ {
+ pe_add.show();
+ pe_rem.show();
+ pe_sel.show();
+ pe_misc.show();
+ pe_manage.show();
+ }
+ else if (w <= 146 && w >122)
+ {
+ pe_add.show();
+ pe_rem.show();
+ pe_sel.show();
+ pe_misc.show();
+ pe_manage.hide();
+ }
+ else if (w <= 122 && w >98)
+ {
+ pe_add.show();
+ pe_rem.show();
+ pe_sel.show();
+ pe_misc.hide();
+ pe_manage.hide();
+ }
+ else if (w <= 98 && w >74)
+ {
+ pe_add.show();
+ pe_rem.show();
+ pe_sel.hide();
+ pe_misc.hide();
+ pe_manage.hide();
+ }
+ else if (w <= 74 && w >50)
+ {
+ pe_add.show();
+ pe_rem.hide();
+ pe_sel.hide();
+ pe_misc.hide();
+ pe_manage.hide();
+ }
+ else
+ {
+ pe_add.hide();
+ pe_rem.hide();
+ pe_sel.hide();
+ pe_misc.hide();
+ pe_manage.hide();
+ }
+ }
+ }
+ else wdh_pl.hide();
+ if (playlist_enlarge_attrib.getdata() == "1")
+ {
+ int sui_w = - g_playlist.getWidth() - (2 * SIDESPACER) - 8;
+ g_sui.setXmlParam("w", integerToString(sui_w));
+ if (startup)
+ {
+ startup = 0;
+ mainframe.setXmlParam("relath", "1");
+ mainframe.setXmlParam("h", integerToString(MAX_PL_H));
+ dualwnd.setXmlParam("relath", "1");
+ dualwnd.setXmlParam("h", integerToString(0));
+ }
+ }
+}
+
+normal.onSetVisible (Boolean onoff)
+{
+ if (onoff)
+ {
+ playlist_enlarge_attrib.onDataChanged();
+ int pos = dualwnd.getPosition();
+ if (pos > 0
+#ifdef DOHIDEMCV
+ || dualwnd.getXMlParam("from") == "left"
+#endif
+ )
+ {
+ updatePoppler(pos);
+ dc_openPL.start();
+ }
+ else wdh_pl.hide();//hideWa2Component(PL_GUID);
+ }
+}
+
+normal.onUserResize (int x, int y, int w, int h)
+{
+ int pos = dualwnd.getPosition();
+ if (pos > 0) updatePoppler(pos);
+}
+
+/** Hide pl_time if it cannot be full displayed */
+
+pl_time.onResize (int x, int y, int w, int h)
+{
+ if (w < getTextWidth())
+ {
+ hide();
+ }
+ else
+ {
+ show();
+ }
+}
+
+pl_time.onTextChanged (String newtxt)
+{
+ if (getWidth() < getTextWidth())
+ {
+ hide();
+ }
+ else
+ {
+ show();
+ }
+}
+
+/** Playlist Component Handling */
+
+System.onGetCancelComponent (String guid, boolean goingvisible)
+{
+ if (getPrivateString(getSkinName(), "Pledit_pos", "top") == "sui")
+ {
+ return;
+ }
+
+ debugString(DEBUG_PREFIX "System.onGetCancelComponent ( "+ guid + " , " + integerToString(goingvisible) + " )", D_WTF);
+ if (guid == PL_GUID)
+ {
+ Boolean isShade = player.getCurLayout() != normal;
+ if (goingvisible == TRUE && !isShade)
+ {
+ int poppler_w = getPrivateInt(getSkinName(), "pledit poppler width", 200);
+ if (poppler_w < 1) poppler_w = 200;
+ g_playlist.show();
+ updatePoppler(poppler_w);
+ dc_openPl.start();
+ return FALSE;
+ }
+ else
+ {
+ if (dualwnd.getPosition() > 0) setPrivateInt(getSkinName(), "pledit poppler width", dualwnd.getPosition());
+ wdh_pl.hide();
+ dualwnd.setPosition(0);
+ return FALSE;
+ }
+ }
+}
+
+normal.onAction (String action, String param, Int x, int y, int p1, int p2, GuiObject source)
+{
+ if (action == "load_comp" && strlower(param) == "pledit")
+ {
+ int poppler_w = getPrivateInt(getSkinName(), "pledit poppler width", 200);
+ if (dualwnd.getPosition() > 0) poppler_w = dualwnd.getPosition();
+ if (dualwnd.getPosition() == 0) poppler_w = 200;
+ updatePoppler(poppler_w);
+ dc_openPl.start();
+ }
+ if (action == "hide_comp" && strlower(param) == "pledit")
+ {
+ setPrivateInt(getSkinName(), "pledit poppler width", dualwnd.getPosition());
+ wdh_pl.hide();
+ dualwnd.setPosition(0);
+ }
+ if (action == "pledit_posupdate")
+ {
+ int pos = dualwnd.getPosition();
+ if (pos > 0) updatePoppler(pos);
+ }
+ if (action == "sui")
+ {
+ if (param == "tonocomp")
+ {
+ if (playlist_cover_attrib.getData() == "1")
+ {
+ int pos = pl_dualwnd.getPosition();
+ if (pos > 0) setPrivateInt(getSkinName(), "playlist_cover_poppler", pos);
+ }
+ bypass_nocomp = TRUE; //we need to add a bypass otherwise playlist_cover_attrib will be turned OFF
+ pl_dualwnd.setPosition (0);
+ g_cover.hide();
+ bypass_nocomp = FALSE;
+ }
+ else if (param == "fromnocomp")
+ {
+ playlist_cover_attrib.onDataChanged ();
+ }
+ }
+}
+
+dualwnd.onAction (String action, String param, Int x, int y, int p1, int p2, GuiObject source)
+{
+ if (action == "set_maxwidth")
+ {
+ // update poppler for playlist/infocomp
+ updatePoppler(dualwnd.getPosition());
+ // update poppler bands for player/infocomp
+ min_infowidth = x;
+ updateMainPoppler(min_infowidth - dualwnd.getPosition() - 8);
+ }
+}
+
+wdh_pl.onSetVisible (Boolean onoff)
+{
+ debugString("wdh_pl set visible: " + integerToString(onoff), 9);
+ if (onoff)
+ {
+ playlist_cover_attrib.onDataChanged();
+ }
+ else
+ {
+ int pos = pl_dualwnd.getPosition();
+ if (pos > 0) setPrivateInt(getSkinName(), "playlist_cover_poppler", pos);
+ }
+}
+
+updatePoppler(int w)
+{
+ if (dualwnd.getPosition() == 0 && w == 0) return;
+ int min_w = stringToInteger(dualwnd.getXmlParam("minwidth"));
+ int max_w = stringToInteger(dualwnd.getXmlParam("maxwidth"));
+ if (max_w < 0) max_w = dualwnd.getWidth() + max_w;
+ debugString("max_w: " + integerToString(max_w), 9);
+ boolean reset = FALSE;
+ reset += (w == 0);
+ reset += (w < min_w);
+ if (reset) w = min_w;
+
+ // Prevent the playlist from overlapping the player
+ if (w > max_w)
+ {
+ w = max_w;
+
+ // Resize the player to get more space
+ if (max_w < min_w)
+ {
+ w = min_w;
+ int mainframe_pos = mainframe.getPosition() - (min_w - max_w); // I need to save this in a variable first, otherwise mainframe.setPos will crash...
+ mainframe.setPosition(mainframe_pos);
+ }
+ }
+ debugString("set poppler: " + integerToString(w), 9);
+ dualwnd.setPosition(w);
+}
+
+updateMainPoppler (int w)
+{
+ mainframe.setXmlparam("maxwidth", integerToString(w));
+}
+
+dc_openPl.onTimer ()
+{
+ dc_openPl.stop();
+ debugString("dc_openPl called!", 9);
+ wdh_pl.show();
+ g_playlist.show();
+ g_upper.show();
+ //if (!wdh_pl.isVisible()) debugInt(g_playlist.getWidth());
+}
+
+dc_closePl.onTimer ()
+{
+ dc_closePl.stop();
+ wdh_pl.hide();
+}
+
+//----------------------------------------------------------------------------------------------------------------
+// Playlist Album Art Handles
+//----------------------------------------------------------------------------------------------------------------
+
+Global boolean attrib_bypass = false;
+
+playlist_cover_attrib.onDataChanged ()
+{
+ if (attrib_bypass)
+ return;
+
+ if (playlist_enlarge_attrib.getData() == "0")
+ return;
+
+ if (getData() == "1")
+ {
+ int pos = getPrivateInt(getSkinName(), "playlist_cover_poppler", PLC_POPPLER_POS);
+ if (pos > 0 && getPrivateString(getSkinName(), "Component", "Media Library") != "Hidden")
+ {
+ pl_dualwnd.setPosition (pos);
+ g_cover.show();
+ }
+ else
+ {
+ pl_dualwnd.setPosition (0);
+ g_cover.hide();
+ }
+ }
+ else
+ {
+ int pos = pl_dualwnd.getPosition();
+ if (pos > 0) setPrivateInt(getSkinName(), "playlist_cover_poppler", pos);
+ pl_dualwnd.setPosition(0);
+ g_cover.hide();
+ }
+}
+
+Global Boolean bypass;
+
+player.onBeforeSwitchToLayout (Layout oldlayout, Layout newlayout)
+{
+ if (oldlayout == normal)
+ {
+ bypass = 1;
+ }
+}
+
+g_cover.onSetVisible (Boolean onoff)
+{
+ if (bypass)
+ {
+ bypass = 0;
+ return;
+ }
+
+ if (!onoff && !bypass_nocomp && playlist_cover_attrib.getdata() == "1" && getPrivateString(getSkinName(), "Component", "Media Library") != "Hidden" && playlist_enlarge_attrib.getData() == "1" && dualwnd.getPosition() > 0)
+ {
+ playlist_cover_attrib.setdata("0");
+ }
+ else if (onoff && !bypass_nocomp && playlist_cover_attrib.getdata() == "0" && dualwnd.getPosition() > 0)
+ {
+ attrib_bypass = true;
+ playlist_cover_attrib.setdata("1");
+ attrib_bypass = false;
+ }
+} \ No newline at end of file
diff --git a/Src/resources/skins/Bento/scripts/pledit.maki b/Src/resources/skins/Bento/scripts/pledit.maki
new file mode 100644
index 00000000..0e4f04a4
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/pledit.maki
Binary files differ
diff --git a/Src/resources/skins/Bento/scripts/workingdir.m b/Src/resources/skins/Bento/scripts/workingdir.m
new file mode 100644
index 00000000..7ab02534
--- /dev/null
+++ b/Src/resources/skins/Bento/scripts/workingdir.m
@@ -0,0 +1 @@
+//define BIG_BENTO_WORKINGDIR \ No newline at end of file