Initial community commit
This commit is contained in:
767
Src/resources/skins/Big Bento/scripts/suicore/external_handles.m
Normal file
767
Src/resources/skins/Big Bento/scripts/suicore/external_handles.m
Normal file
@@ -0,0 +1,767 @@
|
||||
/*---------------------------------------------------
|
||||
-----------------------------------------------------
|
||||
Filename: external_handles.m
|
||||
|
||||
Type: maki
|
||||
Author: Martin Poehlmann aka Deimos
|
||||
E-Mail: martin@skinconsortium.com
|
||||
Internet: www.skinconsortium.com
|
||||
www.martin.deimos.de.vu
|
||||
-----------------------------------------------------
|
||||
Depending Files:
|
||||
scripts/suicore.maki
|
||||
-----------------------------------------------------
|
||||
---------------------------------------------------*/
|
||||
|
||||
#ifndef included
|
||||
#error This script can only be compiled as a #include
|
||||
#endif
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
// The main component switching as triggered by user menus, keyboard shortcuts, etc
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
System.onGetCancelComponent(String guid, boolean goingvisible) {
|
||||
debugString(DEBUG_PREFIX "System.onGetCancelComponent ( "+ guid + " , " + integerToString(goingvisible) + " ) {", D_WTF);
|
||||
debugString(DEBUG_PREFIX " [Last Content: " + getPrivateString(getSkinName(), "Component", "Media Library") + " ]", D_WTF);
|
||||
|
||||
Boolean isShade = (player.getCurLayout() != normal);
|
||||
|
||||
// isVideo() hasn't been set yet in System.onPlay and System.onTitleChange, so we check it here instead.
|
||||
if (play_auto_fs_video && !isVideo()) play_auto_fs_video = 0;
|
||||
|
||||
// Do Playlist Stuff First (is unlinked from SUI)
|
||||
|
||||
if (guid == PL_GUID)
|
||||
{
|
||||
if (goingvisible && isShade && (getPrivateString(getSkinName(), "Pledit_pos", "top") == "top" || pl_tab_attrib.getData() == "0"))
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> opening pl --- return from shade!", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return TRUE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
switchToNoComp();
|
||||
player.switchToLayout("normal");
|
||||
normal.sendAction("load_comp", "pledit", 0,0,0,0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// Now we detect if suicore is already performing an action - if so we will return.
|
||||
|
||||
if (bypasscancel)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> bypasscancel", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == ML_GUID && !goingvisible && hiding_ml)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> hiding_ml", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == VIDEO_GUID && !goingvisible && hiding_video)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> hiding_video", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == VIS_GUID && !goingvisible && hiding_vis)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> hiding_vis", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == PL_GUID && !goingvisible && hiding_pl)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> hiding_pl", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == ML_GUID && goingvisible && showing_ml)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> showing_ml", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == VIDEO_GUID && goingvisible && showing_video)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> showing_video", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == VIS_GUID && goingvisible && showing_vis)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> showing_vis", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == PL_GUID && goingvisible && showing_pl)
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> showing_pl", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Let's get our current Content
|
||||
|
||||
String window_content = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
|
||||
// If a window wants to hide but we are still in collapsed mode - return
|
||||
if (!goingvisible && window_content == "Hidden")
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> SUI isn't visible", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return TRUE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// All comps that want to be shown
|
||||
if (goingvisible) {
|
||||
if (guid == VIDEO_GUID && (window_content != "Video" || isShade)) {
|
||||
debugString(DEBUG_PREFIX " --> external showing_video --- start Timer", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
if (isShade)
|
||||
{
|
||||
sui_video.hide();
|
||||
player.switchToLayout("normal");
|
||||
}
|
||||
|
||||
//setPrivateString(getSkinName(), "Component", "Video");
|
||||
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
hideVis();
|
||||
hideMl();
|
||||
hidePL();
|
||||
//--hideCfg();
|
||||
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Video");
|
||||
dc_showSUI ();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
dc_showVideo();
|
||||
|
||||
return TRUE;
|
||||
} else if (guid == VIS_GUID && (window_content != "Vis" || isShade)) {
|
||||
|
||||
if (vis_inbig_attrib.getData() == "0")
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> vis shouldn't be shown in big sui!", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
debugString(DEBUG_PREFIX " --> external showing_vis --- start Timer", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return TRUE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
if (isShade)
|
||||
{
|
||||
sui_vis.hide();
|
||||
player.switchToLayout("normal");
|
||||
}
|
||||
|
||||
//setPrivateString(getSkinName(), "Component", "Vis");
|
||||
|
||||
disablePSOVC();
|
||||
hideVideo();
|
||||
hideMl();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
hidePL();
|
||||
//--hideCfg();
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Vis");
|
||||
dc_showSUI ();
|
||||
return TRUE;
|
||||
}
|
||||
sui_vis_wdh.setXmlParam("autoopen", "0");
|
||||
showVis();
|
||||
sui_vis_wdh.setXmlParam("autoopen", "1");
|
||||
return FALSE;
|
||||
} else if (guid == ML_GUID && (window_content != "Media Library" || isShade)) {
|
||||
debugString(DEBUG_PREFIX " --> external showing_ml --- start Timer", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return TRUE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
if (isShade)
|
||||
{
|
||||
sui_ml.hide();
|
||||
player.switchToLayout("normal");
|
||||
}
|
||||
|
||||
//setPrivateString(getSkinName(), "Component", "Media Library");
|
||||
|
||||
disablePSOVC();
|
||||
hideVideo();
|
||||
hideVis();
|
||||
hidePL();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Media Library");
|
||||
dc_showSUI ();
|
||||
return TRUE;
|
||||
}
|
||||
dc_showMl();
|
||||
|
||||
return TRUE;
|
||||
} else if (guid == PL_GUID && (window_content != "Pledit" || isShade) && pl_tab_attrib.getData() == "1") {
|
||||
if (getPrivateString(getSkinName(), "Pledit_pos", "top") != "sui")
|
||||
{
|
||||
debugString(DEBUG_PREFIX " suicore won't handle this!", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
debugString(DEBUG_PREFIX " --> external showing_pl --- start Timer", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return TRUE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
if (isShade)
|
||||
{
|
||||
sui_pl.hide();
|
||||
player.switchToLayout("normal");
|
||||
}
|
||||
|
||||
//setPrivateString(getSkinName(), "Component", "Media Library");
|
||||
|
||||
disablePSOVC();
|
||||
hideVideo();
|
||||
hideVis();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
hideML();
|
||||
//--hideCfg();
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Pledit");
|
||||
dc_showSUI ();
|
||||
return TRUE;
|
||||
}
|
||||
dc_showPl();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// All comps that want to be hidden
|
||||
if (!goingvisible) {
|
||||
if (guid == VIDEO_GUID && window_content == "Video") {
|
||||
debugString(DEBUG_PREFIX " --> external hiding_video", D_WTF);
|
||||
|
||||
if (getStatus() != 0 && isVideo() && cfg_Video.getBool("autoopen") && cfg_Video.getBool("autoclose"))
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> video is playing", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return TRUE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
disablePSOVC();
|
||||
hideVideo();
|
||||
hideVis();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
dc_showMl(); // normal Component
|
||||
debugString(DEBUG_PREFIX " --> no video is playing", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (guid == PL_GUID && window_content == "Pledit" && pl_tab_attrib.getData() == "1") {
|
||||
debugString(DEBUG_PREFIX " --> external hiding_pl", D_WTF);
|
||||
|
||||
if (getStatus() != STATUS_STOPPED && system.isVideo())
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> video is playing", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return TRUE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
disablePSOVC();
|
||||
hideML();
|
||||
hideVis();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
hidePL();
|
||||
//--hideCfg();
|
||||
dc_showVideo(); // normal Component
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
disablePSOVC();
|
||||
hideVideo();
|
||||
hideVis();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
hidePL();
|
||||
//--hideCfg();
|
||||
dc_showMl(); // normal Component
|
||||
debugString(DEBUG_PREFIX " --> no video is playing", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (guid == VIS_GUID && window_content == "Vis") {
|
||||
if (vis_inbig_attrib.getData() == "0")
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> vis shouldn't be closed in big sui!", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
return FALSE;
|
||||
}
|
||||
if (getStatus() != STATUS_STOPPED && system.isVideo())
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> external hiding_vis --- open Video", D_WTF);
|
||||
hideMl();
|
||||
hideVis();
|
||||
hidePL();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
dc_showVideo();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> external hiding_video --- hide Video", D_WTF);
|
||||
hideVideo();
|
||||
hideVis();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
hidePL();
|
||||
//--hideCfg();
|
||||
dc_showMl(); // normal Component
|
||||
}
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
return FALSE;
|
||||
}
|
||||
if (guid == ML_GUID && window_content == "Media Library") {
|
||||
if ((getStatus() == STATUS_PLAYING || getStatus() == STATUS_PAUSED) && isVideo())
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> external hiding_ml --- open Video", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
hideMl();
|
||||
hideVis();
|
||||
hidePL();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
dc_showVideo();
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> external hiding_ml --- switch to vis", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return flase;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
hideMl();
|
||||
hideVis();
|
||||
//--hideBrw();
|
||||
hidePL();
|
||||
//--hideCfg();
|
||||
hideVideo();
|
||||
//--hideExp();
|
||||
dc_closeSUI();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
debugString(DEBUG_PREFIX " --> Went thru", D_WTF);
|
||||
debugString(DEBUG_PREFIX " return FALSE;", D_WTF);
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Player.onSwitchToLayout (Layout _layout)
|
||||
{
|
||||
if (_layout.getId() != "normal")
|
||||
{
|
||||
mychange = 1;
|
||||
//--sui_explorer_attrib.setData("0");
|
||||
//--sui_browser_attrib.setData("0");
|
||||
//--sui_config_attrib.setData("0");
|
||||
mychange = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
// Windows that aren't registered with winamp will be handled here, the visibility state is linked to cfgattribs
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/*--sui_browser_attrib.onDataChanged ()
|
||||
{
|
||||
if (mychange) return;
|
||||
mychange = 1;
|
||||
String window_content = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
if (getData() == "1")
|
||||
{
|
||||
if (player.getCurLayout() != normal)
|
||||
{
|
||||
player.switchToLayout("normal");
|
||||
hideMl();
|
||||
hideVis();
|
||||
//--hideCfg();
|
||||
hideVideo();
|
||||
//--hideExp();
|
||||
dc_showBrw();
|
||||
return;
|
||||
}
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Browser");
|
||||
switchFromNoComp ();
|
||||
return;
|
||||
}
|
||||
switchToBrw();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((getStatus() == STATUS_PLAYING || getStatus() == STATUS_PAUSED) && isVideo())
|
||||
{
|
||||
hideBrw();
|
||||
dc_showVideo();
|
||||
}
|
||||
else
|
||||
{
|
||||
hideBrw();
|
||||
dc_showml();
|
||||
}
|
||||
}
|
||||
mychange = 0;
|
||||
}
|
||||
--*/
|
||||
|
||||
/*--sui_config_attrib.onDataChanged ()
|
||||
{
|
||||
if (mychange) return;
|
||||
mychange = 1;
|
||||
String window_content = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
if (getData() == "1")
|
||||
{
|
||||
if (player.getCurLayout() != "normal")
|
||||
{
|
||||
player.switchToLayout("normal");
|
||||
hideMl();
|
||||
hideVis();
|
||||
hideBrw();
|
||||
hideCfg();
|
||||
hideVideo();
|
||||
hideExp();
|
||||
dc_showCfg();
|
||||
return;
|
||||
}
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Config");
|
||||
switchFromNoComp ();
|
||||
return;
|
||||
}
|
||||
switchToCfg();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((getStatus() == STATUS_PLAYING || getStatus() == STATUS_PAUSED) && isVideo())
|
||||
{
|
||||
hideCfg();
|
||||
dc_showVideo();
|
||||
}
|
||||
else
|
||||
{
|
||||
hideCfg();
|
||||
dc_showml();
|
||||
}
|
||||
}
|
||||
mychange = 0;
|
||||
}
|
||||
|
||||
|
||||
sui_explorer_attrib.onDataChanged ()
|
||||
{
|
||||
if (mychange) return;
|
||||
mychange = 1;
|
||||
String window_content = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
if (getData() == "1")
|
||||
{
|
||||
if (player.getCurLayout() != normal)
|
||||
{
|
||||
player.switchToLayout("normal");
|
||||
hideMl();
|
||||
hideVis();
|
||||
hideBrw();
|
||||
//--hideCfg();
|
||||
hideVideo();
|
||||
dc_showExp();
|
||||
return;
|
||||
}
|
||||
if (window_content == "Hidden" )
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Explorer");
|
||||
switchFromNoComp ();
|
||||
return;
|
||||
}
|
||||
switchToExp();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((getStatus() == STATUS_PLAYING || getStatus() == STATUS_PAUSED) && isVideo())
|
||||
{
|
||||
hideExp();
|
||||
dc_showVideo();
|
||||
}
|
||||
else
|
||||
{
|
||||
hideExp();
|
||||
dc_showml();
|
||||
}
|
||||
}
|
||||
mychange = 0;
|
||||
}
|
||||
--*/
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
// If a link is clicked within winamp this function *should* be called by wasabi core.
|
||||
// returning 1 prevents winamp to open the url in an external browser
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
System.onOpenUrl(string url)
|
||||
{
|
||||
// If winamp is in shade mode
|
||||
if (player.getCurLayout() != normal)
|
||||
{
|
||||
string comp = getPrivateString(getSkinName(), "Component", "Media Library"); // Get the current sui component
|
||||
|
||||
// Can also happen, winamp is in shade - and normal wnd is collapsed
|
||||
if (comp == "Hidden")
|
||||
{
|
||||
player.switchToLayout("normal");
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Browser");
|
||||
setPrivateString(getSkinName(), "UrlXgive", url);
|
||||
switchFromNoComp();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// The other case - sade & normal is not collapsed
|
||||
setPrivateString(getSkinName(), "UrlXgive", url);
|
||||
player.switchToLayout("normal");
|
||||
hideMl();
|
||||
hideVis();
|
||||
//--hideCfg();
|
||||
hideVideo();
|
||||
//--hideExp();
|
||||
//--dc_showBrw();
|
||||
return 0;
|
||||
}
|
||||
|
||||
String window_content = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
|
||||
// just deliver the url since the browser is already visible
|
||||
if (window_content == "Browser")
|
||||
/*
|
||||
{
|
||||
browser brw = sui_brw.findObject("webbrowser");
|
||||
if (brw != NULL)
|
||||
{
|
||||
brw.sendAction ("openurl", url, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
// Some other component is visible - so we store the url and show the browser
|
||||
else
|
||||
{
|
||||
setPrivateString(getSkinName(), "UrlXgive", url);
|
||||
debugString("System.onOpenUrl( "+url+" ); --> opening Browser", D_WTF);
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Browser");
|
||||
switchFromNoComp ();
|
||||
return 0;
|
||||
}
|
||||
switchToBrw();
|
||||
}
|
||||
*/
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
// the sui window can recieve messages from other scripts (mainly: fileinfo.maki) - we handle this here
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/*sui_window.onAction (String action, String param, Int x, int y, int p1, int p2, GuiObject source)
|
||||
{
|
||||
// Perform a search in the browser
|
||||
if (strlower(action) == "browser_search")
|
||||
{
|
||||
browser brw = sui_brw.findObject("webbrowser");
|
||||
//if (player.getCurLayout() != normal) // unlikely to happen!
|
||||
{
|
||||
//setPrivateString(getSkinName(), "UrlXgive", url);
|
||||
player.switchToLayout("normal");
|
||||
hideMl();
|
||||
hideVis();
|
||||
//--hideCfg();
|
||||
hideVideo();
|
||||
//--hideExp();
|
||||
dc_showBrw();
|
||||
brw.sendAction ("search", param, 0, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
String window_content = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
if (window_content == "Browser")
|
||||
{
|
||||
if (brw != NULL)
|
||||
{
|
||||
brw.sendAction ("search", param, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//setPrivateString(getSkinName(), "UrlXgive", url);
|
||||
debugString("System.onOpenUrl( "+url+" ); --> opening Browser", D_WTF);
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Browser");
|
||||
switchFromNoComp ();
|
||||
brw.sendAction ("search", param, 0, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
switchToBrw();
|
||||
brw.sendAction ("search", param, 0, 0, 0, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// Just navigate to a site
|
||||
else if (strlower(action) == "browser_navigate")
|
||||
{
|
||||
browser brw = sui_brw.findObject("webbrowser");
|
||||
if (player.getCurLayout() != normal)
|
||||
{
|
||||
//setPrivateString(getSkinName(), "UrlXgive", url);
|
||||
player.switchToLayout("normal");
|
||||
hideMl();
|
||||
hideVis();
|
||||
//--hideCfg();
|
||||
hideVideo();
|
||||
//--hideExp();
|
||||
//--dc_showBrw();
|
||||
brw.sendAction ("openurl", param, 0, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
String window_content = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
if (window_content == "Browser")
|
||||
{
|
||||
if (brw != NULL)
|
||||
{
|
||||
brw.sendAction ("openurl", param, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//setPrivateString(getSkinName(), "UrlXgive", url);
|
||||
debugString("System.onOpenUrl( "+url+" ); --> opening Browser", D_WTF);
|
||||
if (window_content == "Hidden")
|
||||
{
|
||||
setPrivateString(getSkinName(), "Hidden Component", "Browser");
|
||||
brw.sendAction ("openurl", param, 0, 0, 0, 0);
|
||||
switchFromNoComp ();
|
||||
return 0;
|
||||
}
|
||||
switchToBrw();
|
||||
brw.sendAction ("openurl", param, 0, 0, 0, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else if (strlower(action) == "opentab")
|
||||
{
|
||||
if (strlower(param) == "ml")
|
||||
{
|
||||
switchToMl();
|
||||
}
|
||||
}
|
||||
else if (action == "hide_comp" && param == "pe")
|
||||
{
|
||||
if (getPrivateString(getSkinName(), "Component", "Media Library") == "Pledit")
|
||||
{
|
||||
switchToMl();
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
// Switching Vis Plugin between MCV and SUI
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
vis_inbig_attrib.onDataChanged ()
|
||||
{
|
||||
if (mychange) return;
|
||||
String window_content2 = getPrivateString(getSkinName(), "Component", "Cover");
|
||||
String window_content = getPrivateString(getSkinName(), "Component2", "Media Library");
|
||||
int xg = getPrivateInt(getSkinName(), "ComponentXgive", 0);
|
||||
if (getData() == "1" && (ic_vis.getData() == "1" || ic_vis_fileinfo.getData() == "1" || xg))
|
||||
{
|
||||
if (xg) setPrivateInt(getSkinName(), "ComponentXgive", 0);
|
||||
switchToVis();
|
||||
}
|
||||
else if (getData() == "0" && sui_Vis.isVisible())
|
||||
{
|
||||
setPrivateInt(getSkinName(), "ComponentXgive", 1);
|
||||
hideVis();
|
||||
switchToMl();
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
// this one has only debug aims :)
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#ifdef DEBUG
|
||||
System.onLookForComponent(String guid)
|
||||
{
|
||||
debugString(DEBUG_PREFIX "System.onLookForComponent ( "+ guid + " )", D_WTF);
|
||||
}
|
||||
#endif
|
||||
221
Src/resources/skins/Big Bento/scripts/suicore/load_handles.m
Normal file
221
Src/resources/skins/Big Bento/scripts/suicore/load_handles.m
Normal file
@@ -0,0 +1,221 @@
|
||||
/*---------------------------------------------------
|
||||
-----------------------------------------------------
|
||||
Filename: load_handles.m
|
||||
|
||||
Type: maki
|
||||
Author: Martin Poehlmann aka Deimos
|
||||
E-Mail: martin@skinconsortium.com
|
||||
Internet: www.skinconsortium.com
|
||||
www.martin.deimos.de.vu
|
||||
-----------------------------------------------------
|
||||
Depending Files:
|
||||
scripts/suicore.maki
|
||||
-----------------------------------------------------
|
||||
---------------------------------------------------*/
|
||||
|
||||
#ifndef included
|
||||
#error This script can only be compiled as a #include
|
||||
#endif
|
||||
|
||||
Function loadSUI (string content);
|
||||
Function collectComponents();
|
||||
|
||||
Global timer tmr_collect;
|
||||
|
||||
System.onScriptLoaded ()
|
||||
{
|
||||
startup = 1;
|
||||
initAttribs_windowpage();
|
||||
initAttribs_vis();
|
||||
initAttribs_Autoresize();
|
||||
initAttribs_Appearance();
|
||||
initVideo();
|
||||
debugString(DEBUG_PREFIX "-------------------------", D_WTF);
|
||||
debugString(DEBUG_PREFIX "System.onScriptLoded() {", D_WTF);
|
||||
|
||||
/*debugString(integerToString(isNamedWindowVisible(ML_GUID)),9);
|
||||
showWindow(ML_GUID, "", 0);
|
||||
debugString(integerToString(isNamedWindowVisible(ML_GUID)),9);*/
|
||||
|
||||
player = getContainer("main");
|
||||
normal = player.getLayout("normal");
|
||||
sui_window = normal.findObject("sui.content");
|
||||
sui_components = sui_window.findObject("sui.components");
|
||||
|
||||
h = getToken(getParam(),",",0);
|
||||
|
||||
sui_vis = sui_components.findObject("wdh.vis");
|
||||
sui_vis_wdh = sui_components.findObject("wdh.vis.object");
|
||||
sui_video = sui_components.findObject("wdh.video");
|
||||
sui_ml = sui_components.findObject("wdh.ml");
|
||||
sui_pl = sui_components.findObject("wdh.pl");
|
||||
//--sui_brw = sui_components.findObject("wdh.browser");
|
||||
//--sui_exp = sui_components.findObject("wdh.explorer");
|
||||
//--sui_cfg = sui_components.findObject("wdh.config");
|
||||
|
||||
switch_video = sui_window.findObject("switch.video");
|
||||
switch_vis = sui_window.findObject("switch.vis");
|
||||
switch_ml = sui_window.findObject("switch.ml");
|
||||
switch_pl = sui_window.findObject("switch.pl");
|
||||
//--switch_exp = sui_window.findObject("switch.explorer");
|
||||
//--switch_brw = sui_window.findObject("switch.browser");
|
||||
//--switch_cfg = sui_window.findObject("switch.config");
|
||||
|
||||
hide_sui = normal.getObject("sui.hide");
|
||||
show_sui = normal.getObject("sui.show");
|
||||
|
||||
pe_move_top = sui_pl.findObject("pe.move.top");
|
||||
/*
|
||||
b_maximize = normal.findObject("player.button.maximize");
|
||||
b_minimize = normal.findObject("player.button.minimize");
|
||||
b_shade = normal.findObject("player.button.shade");
|
||||
*/
|
||||
normal_resizer = normal.getObject("player.resizer.bottomright.dummy");
|
||||
normal_resizer2 = normal.getObject("player.resizer.bottomleft");
|
||||
normal_resizer3 = normal.getObject("player.resizer.bottom");
|
||||
normal_resizer4 = normal.getObject("player.resizer.bottom2");
|
||||
|
||||
normal_TBresizer = normal.findObject("titlebar.resizer.topright");
|
||||
normal_TBresizer2 = normal.findObject("titlebar.resizer.topleft");
|
||||
normal_TBresizer3 = normal.findObject("titlebar.resizer.top");
|
||||
|
||||
callbackTimer = new Timer;
|
||||
callbackTimer.setDelay(1);
|
||||
tempDisable = new Timer;
|
||||
tempDisable.setDelay(100);
|
||||
|
||||
tmr_collect = new timer;
|
||||
tmr_collect.setDelay(2000);
|
||||
//tmr_collect.start();
|
||||
|
||||
//collectComponents();
|
||||
|
||||
String window_content = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
|
||||
debugString(DEBUG_PREFIX "window_content = " + window_content, D_WTF);
|
||||
|
||||
loadSUI(window_content);
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
startup = 0;
|
||||
}
|
||||
|
||||
System.onScriptUnloading ()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "System.onScriptUnloading() {", D_NWTF);
|
||||
|
||||
delete callbackTimer;
|
||||
delete PSOVCTimer;
|
||||
delete tempDisable;
|
||||
delete tmr_collect;
|
||||
|
||||
debugString(DEBUG_PREFIX " delete Timers;", D_NWTF);
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
loadSUI (string content)
|
||||
{
|
||||
if (content == "Vis")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "if(Vis) performed", D_WTF);
|
||||
Mychange = 1;
|
||||
vis_inbig_attrib.setData("1");
|
||||
Mychange = 0;
|
||||
switchToVis();
|
||||
}
|
||||
else if (content == "Video")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "if(Video) performed", D_WTF);
|
||||
switchToVideo();
|
||||
}
|
||||
else if (content == "Media Library")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "if(ML) performed", D_WTF);
|
||||
switchToMl();
|
||||
}
|
||||
else if (content == "Pledit")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "if(PL) performed", D_WTF);
|
||||
switchToPl();
|
||||
}/*--
|
||||
else if (content == "Browser")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "if(Browser) performed", D_WTF);
|
||||
switchToBrw();
|
||||
}--*/
|
||||
/*--
|
||||
else if (content == "Explorer")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "if(Explorer) performed", D_WTF);
|
||||
switchToExp();
|
||||
}--*/
|
||||
/*--else if (content == "Config")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "if(Config) performed", D_WTF);
|
||||
switchToCfg();
|
||||
}--*/
|
||||
else if (content == "Hidden")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "if(Hidden) performed", D_WTF);
|
||||
switchToNoComp();
|
||||
}
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX "[!] oops no component to perform", D_WTF);
|
||||
}
|
||||
}
|
||||
/*
|
||||
collectComponents()
|
||||
{
|
||||
for ( int i = 0; i < getNumRegisteredWindows(); i++ )
|
||||
{
|
||||
debug((getRegisteredWindowName(i)));
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
/*
|
||||
collectComponents ()
|
||||
{
|
||||
int i = 0;
|
||||
string s;
|
||||
while (s = enumEmbedGUID(i) != "")
|
||||
{
|
||||
debug (s);
|
||||
i++;
|
||||
}
|
||||
if (i == 0 && !tmr_collect.isRunning())
|
||||
{
|
||||
tmr_collect.start();
|
||||
//}
|
||||
}*/
|
||||
/*
|
||||
tmr_collect.onTimer ()
|
||||
{
|
||||
tmr_collect.stop();
|
||||
debug(getRegisteredWindowName(0));
|
||||
|
||||
collectComponents();
|
||||
}
|
||||
*/
|
||||
/*
|
||||
player.onAddContent(GuiObject wnd, String id, String guid)
|
||||
{
|
||||
debug(wnd.getName());
|
||||
debug(id);
|
||||
// debug(guid);
|
||||
}*/
|
||||
/*
|
||||
sui_ml.onsetVisible(int v)
|
||||
{
|
||||
windowholder w = findObject("wdh");
|
||||
debug(w.getGUID());
|
||||
GuiObject o = w.getContent();
|
||||
debug(o.getId());
|
||||
debug(o.getName());
|
||||
}*/
|
||||
/*
|
||||
System.onCreateLayout (Layout _layout)
|
||||
{
|
||||
debug(_layout.getId());
|
||||
}*/
|
||||
870
Src/resources/skins/Big Bento/scripts/suicore/show_hide.m
Normal file
870
Src/resources/skins/Big Bento/scripts/suicore/show_hide.m
Normal file
@@ -0,0 +1,870 @@
|
||||
/*---------------------------------------------------
|
||||
-----------------------------------------------------
|
||||
Filename: show_hide.m
|
||||
|
||||
Type: maki
|
||||
Author: Martin Poehlmann aka Deimos
|
||||
E-Mail: martin@skinconsortium.com
|
||||
Internet: www.skinconsortium.com
|
||||
www.martin.deimos.de.vu
|
||||
-----------------------------------------------------
|
||||
Depending Files:
|
||||
scripts/suicore.maki
|
||||
-----------------------------------------------------
|
||||
---------------------------------------------------*/
|
||||
|
||||
#ifndef included
|
||||
#error This script can only be compiled as a #include
|
||||
#endif
|
||||
|
||||
switchToMl()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "switchToMl() {", D_WTF);
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
tempDisable.start();
|
||||
disablePSOVC();
|
||||
hideVis();
|
||||
hideVideo();
|
||||
hidePL();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
//prohibit a closing bug
|
||||
if (!startup) showMl();
|
||||
else
|
||||
{
|
||||
dc_showMl();
|
||||
onshowMl();
|
||||
}
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
hide_sui.show();
|
||||
show_sui.hide();
|
||||
}
|
||||
|
||||
switchToPl()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "switchToPl() {", D_WTF);
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
tempDisable.start();
|
||||
disablePSOVC();
|
||||
hideVis();
|
||||
hideVideo();
|
||||
hideML();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
//prohibit a closing bug
|
||||
if (!startup) showPl();
|
||||
else
|
||||
{
|
||||
dc_showPl();
|
||||
onshowPl();
|
||||
}
|
||||
debugString(DEBUG_PREFIX "}", D_WTF);
|
||||
|
||||
hide_sui.show();
|
||||
show_sui.hide();
|
||||
}
|
||||
|
||||
switchToVideo()
|
||||
{
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
tempDisable.start();
|
||||
hideMl();
|
||||
hidePL();
|
||||
hideVis();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
showVideo();
|
||||
|
||||
hide_sui.show();
|
||||
show_sui.hide();
|
||||
}
|
||||
|
||||
switchToVis()
|
||||
{
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
tempDisable.start();
|
||||
disablePSOVC();
|
||||
hideMl();
|
||||
hidePL();
|
||||
hideVideo();
|
||||
//--hideExp();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
showVis();
|
||||
|
||||
hide_sui.show();
|
||||
show_sui.hide();
|
||||
}
|
||||
|
||||
/*--switchToBrw()
|
||||
{
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
tempDisable.start();
|
||||
disablePSOVC();
|
||||
hideVis();
|
||||
hidePL();
|
||||
hideVideo();
|
||||
//--hideExp();
|
||||
hideMl();
|
||||
//--hideCfg();
|
||||
//--showBrw();
|
||||
|
||||
hide_sui.show();
|
||||
show_sui.hide();
|
||||
}
|
||||
|
||||
switchToExp()
|
||||
{
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
tempDisable.start();
|
||||
disablePSOVC();
|
||||
hideVis();
|
||||
hideVideo();
|
||||
hideMl();
|
||||
//--hideBrw();
|
||||
//--hideCfg();
|
||||
showExp();
|
||||
|
||||
hide_sui.show();
|
||||
show_sui.hide();
|
||||
}
|
||||
--*/
|
||||
/*--switchToCfg()
|
||||
{
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
tempDisable.start();
|
||||
disablePSOVC();
|
||||
hideVis();
|
||||
hideVideo();
|
||||
hideMl();
|
||||
hideBrw();
|
||||
hideExp();
|
||||
showCfg();
|
||||
|
||||
hide_sui.show();
|
||||
show_sui.hide();
|
||||
}--*/
|
||||
|
||||
switchToNoComp ()
|
||||
{
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
tempDisable.start();
|
||||
disablePSOVC();
|
||||
|
||||
onBeforeHideSUI();
|
||||
|
||||
hideVis();
|
||||
hideVideo();
|
||||
hideMl();
|
||||
hidePL();
|
||||
//--hideBrw();
|
||||
//--hideExp();
|
||||
//--hideCfg();
|
||||
|
||||
string comp = getPrivateString(getSkinName(), "Component", "Media Library");
|
||||
if (comp != "Hidden")
|
||||
{
|
||||
normal.sendAction("sui", "tonocomp", 0,0,0,0);
|
||||
setPrivateString(getSkinName(), "Hidden Component", comp);
|
||||
setPrivateString(getSkinName(), "Component", "Hidden");
|
||||
if (!getPrivateInt(getSkinName(), "isMainWndMaximized", 0)) setPrivateInt(getSkinName(), "nomax_h", normal.getHeight());
|
||||
}
|
||||
else normal.sendAction("sui", "tonocomp", 1,0,0,0);
|
||||
|
||||
normal_resizer.setXmlParam("resize", "right");
|
||||
normal_resizer2.setXmlParam("resize", "left");
|
||||
normal_resizer3.setXmlParam("resize", "");
|
||||
normal_resizer4.setXmlParam("resize", "");
|
||||
normal_TBresizer.setXmlParam("resize", "right");
|
||||
normal_TBresizer2.setXmlParam("resize", "left");
|
||||
normal_TBresizer3.hide();
|
||||
normal.setXmlParam("minimum_h" , h);
|
||||
|
||||
int sy = normal.getGuiY() + normal.getGuiH() - stringtointeger(h);
|
||||
normal.setXmlParam("h" , h);
|
||||
if (collapse_bottom_attrib.getdata() == "1") normal.setXmlParam("y" , integerToString(sy));
|
||||
|
||||
hide_sui.hide();
|
||||
show_sui.show();
|
||||
|
||||
onHideSUI();
|
||||
}
|
||||
|
||||
switchFromNoComp ()
|
||||
{
|
||||
if (callbackTimer.isRunning()) return;
|
||||
if (tempDisable.isRunning()) return;
|
||||
|
||||
string comp = getPrivateString(getSkinName(), "Hidden Component", "Media Library");
|
||||
setPrivateString(getSkinName(), "Component", comp);
|
||||
|
||||
int sh = getPrivateInt(getSkinName(), "nomax_h", 600);
|
||||
if (sh < 492) sh = 492;
|
||||
|
||||
normal.sendAction("sui", "fromnocomp", 0,0,0,0);
|
||||
normal_resizer.setXmlParam("resize", "bottomright");
|
||||
normal_resizer2.setXmlParam("resize", "bottomleft");
|
||||
normal_resizer3.setXmlParam("resize", "bottom");
|
||||
normal_resizer4.setXmlParam("resize", "bottom");
|
||||
normal_TBresizer.setXmlParam("resize", "topright");
|
||||
normal_TBresizer2.setXmlParam("resize", "topleft");
|
||||
normal_TBresizer3.show();
|
||||
normal.setXmlParam("minimum_h" , "492");
|
||||
double d_scale = normal.getScale();
|
||||
normal.beforeRedock();
|
||||
if (getPrivateInt(getSkinName(), "isMainWndMaximized", 0)) normal.resize(getViewPortLeft(),getViewPortTop(),getViewPortWidth()/d_scale, getViewPortHeight()/d_scale);
|
||||
else
|
||||
{
|
||||
if (collapse_bottom_attrib.getdata() == "1")
|
||||
{
|
||||
int sy = normal.getGuiY() + normal.getGuiH() - sh;
|
||||
if (sy < 0) sy = 0;
|
||||
normal.setXmlParam("y" , integerToString(sy));
|
||||
}
|
||||
normal.setXmlParam("h" , integerToString(sh));
|
||||
}
|
||||
normal.redock();
|
||||
loadSUI (comp);
|
||||
|
||||
onShowSUI();
|
||||
}
|
||||
|
||||
tempDisable.onTimer()
|
||||
{
|
||||
tempDisable.stop();
|
||||
}
|
||||
|
||||
showMl()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "showMl() {", D_NWTF);
|
||||
|
||||
showing_ml = 1;
|
||||
setPrivateString(getSkinName(), "Component", "Media Library");
|
||||
GuiObject o = sui_ml;
|
||||
if (o != NULL)
|
||||
{
|
||||
bypasscancel = 1;
|
||||
if (o) o.show();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) ml object not provided (show)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onShowMl();
|
||||
showing_ml = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
hideMl()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "hideMl() {", D_NWTF);
|
||||
|
||||
callback_showing_ml = 0;
|
||||
|
||||
hiding_ml = 1;
|
||||
GuiObject o = sui_ml;
|
||||
if (o != NULL) {
|
||||
bypasscancel = 1;
|
||||
if (o) o.hide();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) ml object not provided (hide)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onHideMl();
|
||||
hiding_ml = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
showPl()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "showPl() {", D_NWTF);
|
||||
|
||||
showing_pl = 1;
|
||||
setPrivateString(getSkinName(), "Component", "Pledit");
|
||||
setPrivateString(getSkinName(), "Pledit_pos", "sui");
|
||||
normal.sendAction("hide_comp", "pledit", 0,0,0,0);
|
||||
GuiObject o = sui_pl;
|
||||
if (o != NULL)
|
||||
{
|
||||
bypasscancel = 1;
|
||||
if (o) o.show();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) pl object not provided (show)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onShowPl();
|
||||
showing_pl = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
hidePl()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "hidePl() {", D_NWTF);
|
||||
|
||||
callback_showing_pl = 0;
|
||||
|
||||
hiding_pl = 1;
|
||||
GuiObject o = sui_pl;
|
||||
if (o != NULL) {
|
||||
bypasscancel = 1;
|
||||
if (o) o.hide();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) pl object not provided (hide)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onHidePl();
|
||||
hiding_pl = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
showVis()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "vis_inbig_attrib = " + vis_inbig_attrib.getData(), D_NWTF);
|
||||
if (vis_inbig_attrib.getData() == "1")
|
||||
{
|
||||
debugString(DEBUG_PREFIX "showVis() {", D_NWTF);
|
||||
|
||||
|
||||
showing_vis = 1;
|
||||
setPrivateString(getSkinName(), "Component", "Vis");
|
||||
GuiObject o = sui_vis;
|
||||
if (o != NULL)
|
||||
{
|
||||
bypasscancel = 1;
|
||||
if (o) o.show();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) vis object not provided (show)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onShowVis();
|
||||
showing_vis = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
}
|
||||
|
||||
hideVis()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "vis_inbig_attrib = " + vis_inbig_attrib.getData(), D_NWTF);
|
||||
debugString(DEBUG_PREFIX "hideVis() {", D_NWTF);
|
||||
|
||||
callback_showing_vis = 0;
|
||||
|
||||
hiding_vis = 1;
|
||||
GuiObject o = sui_vis;
|
||||
if (o != NULL) {
|
||||
bypasscancel = 1;
|
||||
if (o) o.hide();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) vis object not provided (hide)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onHideVis();
|
||||
hiding_vis = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
showVideo()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "showVideo() {", D_NWTF);
|
||||
|
||||
showing_video = 1;
|
||||
setPrivateString(getSkinName(), "Component", "Video");
|
||||
GuiObject o = sui_video;
|
||||
if (o != NULL)
|
||||
{
|
||||
bypasscancel = 1;
|
||||
if (o) {
|
||||
// hack to fix bug for auto fullscreen on play
|
||||
if (play_auto_fs_video) setVideoFullscreen(false);
|
||||
|
||||
o.show();
|
||||
|
||||
// hack to fix bug for auto fullscreen on play
|
||||
if (play_auto_fs_video) setVideoFullscreen(true);
|
||||
}
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) video object not provided (show)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onShowVideo();
|
||||
play_auto_fs_video = 0;
|
||||
showing_video = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
hideVideo()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "hideVideo() {", D_NWTF);
|
||||
|
||||
//callback_showing_video = 0;
|
||||
|
||||
hiding_video = 1;
|
||||
GuiObject o = sui_video;
|
||||
if (o != NULL) {
|
||||
bypasscancel = 1;
|
||||
if (o) o.hide();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) video object not provided (hide)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onHideVideo();
|
||||
hiding_video = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
/*--showBrw()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "showBrw() {", D_NWTF);
|
||||
|
||||
showing_brw = 1;
|
||||
setPrivateString(getSkinName(), "Component", "Browser");
|
||||
GuiObject o = sui_brw;
|
||||
if (o != NULL)
|
||||
{
|
||||
bypasscancel = 1;
|
||||
if (o) o.show();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) brw object not provided (show)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onShowBrw();
|
||||
|
||||
mychange = 1;
|
||||
sui_browser_attrib.setData("1");
|
||||
mychange = 0;
|
||||
|
||||
showing_brw = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
hideBrw()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "hideBrw() {", D_NWTF);
|
||||
|
||||
callback_showing_brw = 0;
|
||||
|
||||
hiding_brw = 1;
|
||||
GuiObject o = sui_brw;
|
||||
if (o != NULL) {
|
||||
bypasscancel = 1;
|
||||
if (o) o.hide();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) brw object not provided (hide)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onHideBrw();
|
||||
hiding_brw = 0;
|
||||
|
||||
mychange = 1;
|
||||
sui_browser_attrib.setData("0");
|
||||
mychange = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}--*/
|
||||
/*--
|
||||
showExp()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "showExp() {", D_NWTF);
|
||||
|
||||
showing_exp = 1;
|
||||
setPrivateString(getSkinName(), "Component", "Explorer");
|
||||
GuiObject o = sui_exp;
|
||||
if (o != NULL)
|
||||
{
|
||||
bypasscancel = 1;
|
||||
if (o) o.show();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) exp object not provided (show)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onShowExp();
|
||||
showing_exp = 0;
|
||||
|
||||
mychange = 1;
|
||||
sui_explorer_attrib.setData("1");
|
||||
mychange = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
hideExp()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "hideExp() {", D_NWTF);
|
||||
|
||||
callback_showing_exp = 0;
|
||||
|
||||
hiding_exp = 1;
|
||||
GuiObject o = sui_exp;
|
||||
if (o != NULL) {
|
||||
bypasscancel = 1;
|
||||
if (o) o.hide();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) exp object not provided (hide)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onHideExp();
|
||||
hiding_exp = 0;
|
||||
|
||||
mychange = 1;
|
||||
sui_explorer_attrib.setData("0");
|
||||
mychange = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}--*/
|
||||
/*--
|
||||
showCfg()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "showCfg() {", D_NWTF);
|
||||
|
||||
showing_Cfg = 1;
|
||||
setPrivateString(getSkinName(), "Component", "Config");
|
||||
GuiObject o = sui_Cfg;
|
||||
if (o != NULL)
|
||||
{
|
||||
bypasscancel = 1;
|
||||
if (o) o.show();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) Cfg object not provided (show)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onShowCfg();
|
||||
showing_Cfg = 0;
|
||||
|
||||
mychange = 1;
|
||||
sui_Config_attrib.setData("1");
|
||||
mychange = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
|
||||
hideCfg()
|
||||
{
|
||||
debugString(DEBUG_PREFIX "hideCfg() {", D_NWTF);
|
||||
|
||||
callback_showing_cfg = 0;
|
||||
|
||||
hiding_Cfg = 1;
|
||||
GuiObject o = sui_Cfg;
|
||||
if (o != NULL) {
|
||||
bypasscancel = 1;
|
||||
if (o) o.hide();
|
||||
bypasscancel = 0;
|
||||
debugString(DEBUG_PREFIX " --> ok", D_NWTF);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
debugString(DEBUG_PREFIX " --> (!) Cfg object not provided (hide)", D_NWTF);
|
||||
}
|
||||
#endif
|
||||
onHideCfg();
|
||||
hiding_Cfg = 0;
|
||||
|
||||
mychange = 1;
|
||||
sui_config_attrib.setData("0");
|
||||
mychange = 0;
|
||||
|
||||
debugString(DEBUG_PREFIX "}", D_NWTF);
|
||||
}
|
||||
--*/
|
||||
callbackTimer.onTimer()
|
||||
{
|
||||
callbackTimer.stop();
|
||||
|
||||
int _callback_showing_vis = callback_showing_vis;
|
||||
int _callback_hiding_vis = callback_hiding_vis;
|
||||
int _callback_showing_video = callback_showing_video;
|
||||
int _callback_hiding_video = callback_hiding_video;
|
||||
int _callback_showing_ml = callback_showing_ml;
|
||||
int _callback_hiding_ml = callback_hiding_ml;
|
||||
int _callback_showing_pl = callback_showing_pl;
|
||||
int _callback_hiding_pl = callback_hiding_pl;
|
||||
//--int _callback_showing_exp = callback_showing_exp;
|
||||
//--int _callback_hiding_exp = callback_hiding_exp;
|
||||
//--int _callback_showing_brw = callback_showing_brw;
|
||||
//--int _callback_hiding_brw = callback_hiding_brw;
|
||||
//--int _callback_showing_cfg = callback_showing_cfg;
|
||||
//--int _callback_hiding_cfg = callback_hiding_cfg;
|
||||
int _callback_showing_sui = callback_showing_sui;
|
||||
int _callback_closing_sui = callback_closing_sui;
|
||||
|
||||
callback_showing_vis = 0;
|
||||
callback_hiding_vis = 0;
|
||||
callback_showing_video = 0;
|
||||
callback_hiding_video = 0;
|
||||
callback_showing_ml = 0;
|
||||
callback_hiding_ml = 0;
|
||||
callback_showing_pl = 0;
|
||||
callback_hiding_pl = 0;
|
||||
//--callback_showing_exp = 0;
|
||||
//--callback_hiding_exp = 0;
|
||||
//--callback_showing_brw = 0;
|
||||
//--callback_hiding_brw = 0;
|
||||
//--callback_showing_cfg = 0;
|
||||
//--callback_hiding_cfg = 0;
|
||||
|
||||
callback_showing_sui = 0;
|
||||
callback_closing_sui = 0;
|
||||
|
||||
if (_callback_showing_ml == 1)
|
||||
{
|
||||
showMl();
|
||||
}
|
||||
if (_callback_hiding_ml == 1)
|
||||
{
|
||||
hideMl();
|
||||
}
|
||||
if (_callback_showing_pl == 1)
|
||||
{
|
||||
showPl();
|
||||
}
|
||||
if (_callback_hiding_pl == 1)
|
||||
{
|
||||
hidePl();
|
||||
}
|
||||
if (_callback_showing_video == 1)
|
||||
{
|
||||
showVideo();
|
||||
}
|
||||
if (_callback_showing_vis == 1)
|
||||
{
|
||||
showVis();
|
||||
}
|
||||
if (_callback_hiding_vis == 1)
|
||||
{
|
||||
hideVis();
|
||||
}
|
||||
if (_callback_hiding_video == 1)
|
||||
{
|
||||
hideVideo();
|
||||
}/*--
|
||||
if (_callback_showing_exp == 1)
|
||||
{
|
||||
showExp();
|
||||
}
|
||||
if (_callback_hiding_exp == 1)
|
||||
{
|
||||
hideExp();
|
||||
}
|
||||
if (_callback_showing_brw == 1)
|
||||
{
|
||||
showBrw();
|
||||
}
|
||||
if (_callback_hiding_brw == 1)
|
||||
{
|
||||
hideBrw();
|
||||
}--*/
|
||||
/*--if (_callback_showing_cfg == 1)
|
||||
{
|
||||
showCfg();
|
||||
}
|
||||
if (_callback_hiding_cfg == 1)
|
||||
{
|
||||
hideCfg();
|
||||
}--*/
|
||||
if (_callback_showing_SUI == 1)
|
||||
{
|
||||
switchFromNoComp();
|
||||
}
|
||||
if (_callback_closing_SUI == 1)
|
||||
{
|
||||
switchToNoComp();
|
||||
}
|
||||
}
|
||||
|
||||
dc_showMl()
|
||||
{
|
||||
callback_showing_ml = 1;
|
||||
callback_hiding_ml = 0;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_hideMl()
|
||||
{
|
||||
callback_showing_ml = 0;
|
||||
callback_hiding_ml = 1;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_showPl()
|
||||
{
|
||||
callback_showing_pl = 1;
|
||||
callback_hiding_pl = 0;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_hidePl()
|
||||
{
|
||||
callback_showing_pl = 0;
|
||||
callback_hiding_pl = 1;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_showVideo()
|
||||
{
|
||||
callback_showing_video = 1;
|
||||
callback_hiding_video = 0;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_showVis()
|
||||
{
|
||||
callback_showing_vis = 1;
|
||||
callback_hiding_vis = 0;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_hideVideo()
|
||||
{
|
||||
callback_showing_video = 0;
|
||||
callback_hiding_video = 1;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_hideVis()
|
||||
{
|
||||
callback_showing_vis = 0;
|
||||
callback_hiding_vis = 1;
|
||||
callbackTimer.start();
|
||||
}
|
||||
/*--
|
||||
dc_showBrw()
|
||||
{
|
||||
callback_showing_brw = 1;
|
||||
callback_hiding_brw = 0;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_hideBrw()
|
||||
{
|
||||
callback_showing_brw = 0;
|
||||
callback_hiding_brw = 1;
|
||||
callbackTimer.start();
|
||||
}--*/
|
||||
/*--
|
||||
dc_showExp()
|
||||
{
|
||||
callback_showing_exp = 1;
|
||||
callback_hiding_exp = 0;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_hideExp()
|
||||
{
|
||||
callback_showing_exp = 0;
|
||||
callback_hiding_exp = 1;
|
||||
callbackTimer.start();
|
||||
}
|
||||
--*/
|
||||
/*--dc_showCfg()
|
||||
{
|
||||
callback_showing_cfg = 1;
|
||||
callback_hiding_cfg = 0;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_hideCfg()
|
||||
{
|
||||
callback_showing_cfg = 0;
|
||||
callback_hiding_cfg = 1;
|
||||
callbackTimer.start();
|
||||
}--*/
|
||||
|
||||
dc_showSUI()
|
||||
{
|
||||
callback_showing_sui = 1;
|
||||
callback_closing_sui = 0;
|
||||
callbackTimer.start();
|
||||
}
|
||||
|
||||
dc_closeSUI()
|
||||
{
|
||||
callback_showing_sui = 0;
|
||||
callback_closing_sui = 1;
|
||||
callbackTimer.start();
|
||||
}
|
||||
146
Src/resources/skins/Big Bento/scripts/suicore/video_handles.m
Normal file
146
Src/resources/skins/Big Bento/scripts/suicore/video_handles.m
Normal file
@@ -0,0 +1,146 @@
|
||||
/*---------------------------------------------------
|
||||
-----------------------------------------------------
|
||||
Filename: video_handles.m
|
||||
Version: 2.0
|
||||
|
||||
Type: maki
|
||||
Date: 28. Okt. 2006 - 16:30
|
||||
Author: Martin Poehlmann aka Deimos
|
||||
E-Mail: martin@skinconsortium.com
|
||||
Internet: www.skinconsortium.com
|
||||
www.martin.deimos.de.vu
|
||||
-----------------------------------------------------
|
||||
Depending Files:
|
||||
scripts/suicore.maki
|
||||
-----------------------------------------------------
|
||||
---------------------------------------------------*/
|
||||
|
||||
#ifndef included
|
||||
#error This script can only be compiled as a #include
|
||||
#endif
|
||||
|
||||
#define SKINTWEAKS_CFGPAGE "{0542AFA4-48D9-4c9f-8900-5739D52C114F}"
|
||||
#define VIDEO_CONFIG_GROUP "{2135E318-6919-4bcf-99D2-62BE3FCA8FA6}"
|
||||
|
||||
Function initVideo();
|
||||
Function disablePSOVC();
|
||||
Function enablePSOVC();
|
||||
|
||||
Global Timer PSOVCTimer;
|
||||
Global string psovc_save;
|
||||
|
||||
Global WinampConfigGroup cfg_Video;
|
||||
|
||||
Global Boolean lastWasVideo;
|
||||
|
||||
initVideo ()
|
||||
{
|
||||
play_auto_fs_video = 0;
|
||||
|
||||
PSOVCTimer = new Timer;
|
||||
PSOVCTimer.setDelay(1000);
|
||||
|
||||
cfg_Video = WinampConfig.getGroup(VIDEO_CONFIG_GROUP);
|
||||
}
|
||||
|
||||
/** Prevent video playback to stop after the wnd is hidden */
|
||||
|
||||
disablePSOVC()
|
||||
{
|
||||
debugString("[suicore.m] " + "--> disabling stop on video close",0 );
|
||||
ConfigItem item = Config.getItem(SKINTWEAKS_CFGPAGE);
|
||||
if (item)
|
||||
{
|
||||
ConfigAttribute attr = item.getAttribute("Prevent video playback Stop on video window Close");
|
||||
if (attr) psovc_save = attr.getData();
|
||||
if (attr) attr.setData("1");
|
||||
}
|
||||
PSOVCTimer.start();
|
||||
debugString("[suicore.m] " + "--> PSOVCTimer.started();",0 );
|
||||
}
|
||||
|
||||
enablePSOVC()
|
||||
{
|
||||
debugString("[suicore.m] " + "--> enabling stop on video close",0 );
|
||||
PSOVCTimer.stop();
|
||||
ConfigItem item = Config.getItem(SKINTWEAKS_CFGPAGE);
|
||||
if (item)
|
||||
{
|
||||
ConfigAttribute attr = item.getAttribute("Prevent video playback Stop on video window Close");
|
||||
if (attr) attr.setData(psovc_save);
|
||||
}
|
||||
debugString("[suicore.m] " + "--> PSOVCTimer.stopped();",0 );
|
||||
}
|
||||
|
||||
PSOVCTimer.onTimer()
|
||||
{
|
||||
enablePSOVC();
|
||||
}
|
||||
|
||||
System.onPlay()
|
||||
{
|
||||
// needed to handle video auto fullscreen on play
|
||||
boolean auto_fs = cfg_Video.getBool("auto_fs");
|
||||
if (auto_fs) play_auto_fs_video = 1;
|
||||
else play_auto_fs_video = 0;
|
||||
|
||||
// removed for debugging aims
|
||||
// if (isVideo() && cfg_Video.getBool("autoopen") && !sui_video.isVisible()) dc_showVideo();
|
||||
}
|
||||
|
||||
System.onPause()
|
||||
{
|
||||
play_auto_fs_video = 0;
|
||||
}
|
||||
|
||||
System.onResume()
|
||||
{
|
||||
play_auto_fs_video = 0;
|
||||
|
||||
// removed for debugging aims
|
||||
// if (isVideo() && cfg_Video.getBool("autoopen") && !sui_video.isVisible()) dc_showVideo();
|
||||
}
|
||||
|
||||
System.onStop()
|
||||
{
|
||||
play_auto_fs_video = 0;
|
||||
}
|
||||
|
||||
System.onTitleChange(String newtitle)
|
||||
{
|
||||
// needed to handle video auto fullscreen on play
|
||||
boolean auto_fs = cfg_Video.getBool("auto_fs");
|
||||
if (auto_fs) play_auto_fs_video = 1;
|
||||
else play_auto_fs_video = 0;
|
||||
|
||||
/* removed for debugging aims
|
||||
if (startup)
|
||||
{
|
||||
lastWasVideo = isVideo();
|
||||
return;
|
||||
}
|
||||
|
||||
if (isVideo() && cfg_Video.getBool("autoopen") && !sui_video.isVisible() && getStatus() != 0) dc_showVideo();
|
||||
else if (!isVideo() && cfg_Video.getBool("autoclose") && sui_video.isVisible() && lastWasVideo) showML();
|
||||
lastWasVideo = isVideo();
|
||||
*/
|
||||
}
|
||||
|
||||
//S/ystem.onTitleChange (String newtitle)
|
||||
//{
|
||||
/*if (startup)
|
||||
{
|
||||
lastWasVideo = isVideo();
|
||||
return;
|
||||
}*/
|
||||
|
||||
/*if (!startup && isVideo() && cfg_Video.getBool("autoopen") && !sui_video.isVisible() && getStatus() != 0)
|
||||
{
|
||||
callbackTimer.stop();
|
||||
tempDisable.stop();
|
||||
switchToVideo();
|
||||
debug("");
|
||||
}*/
|
||||
//else if (!isVideo() && cfg_Video.getBool("autoclose") && sui_video.isVisible() && lastWasVideo) showML();
|
||||
//lastWasVideo = isVideo();
|
||||
//}
|
||||
Reference in New Issue
Block a user