View Issue Details

IDProjectCategoryView StatusLast Update
0006746MMW v4Framework: Scripts/Extensionspublic2013-12-20 10:28
Reporterzvezdan Assigned To 
PriorityhighSeverityfeatureReproducibilityN/A
Status feedbackResolutionreopened 
Fixed in Version3.1 
Summary0006746: ISDBApplication::CursorType property needed
DescriptionCurrently, the CursorType property could be set only for ISDBUICommon object of some UI control, but not globally for whole application. This is particularly needed for setting of the hourglass cursor when some time-consuming script is executed.
TagsNo tags attached.
Fixed in build1210

Relationships

related to 0006747 new Show progress with animated cursor similar to new Total Commander 
related to 0011639 new Mouse cursor set with SDB.CursorType is not consistent 

Activities

Ludek

2011-01-20 16:15

developer   ~0022495

Last edited: 2011-01-20 16:16

Seems to be already implemented:
http://www.mediamonkey.com/wiki/index.php/ISDBApplication::CursorType

and works fine, tested with the following script:

Option Explicit

Sub OnStartup()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = "Set cursor"
    oMenuItem.UseScript = Script.ScriptPath
    oMenuItem.OnClickFunc = "SetCursor"
End Sub

Sub SetCursor(oItem)
    SDB.CursorType = -11
End Sub

zvezdan

2011-01-20 18:22

updater   ~0022499

Sorry, I forgot that it has that implemented, but I recall that it is not working as it should. Here is one test script:

Option Explicit

Dim lblInfo

Sub OnStartup()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = SDB.Localize("Test Hourglass Cursor")
    oMenuItem.UseScript = Script.ScriptPath
    oMenuItem.OnClickFunc = "Test"

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = SDB.Localize("Hourglass Cursor On")
    oMenuItem.UseScript = Script.ScriptPath
    oMenuItem.OnClickFunc = "HourglassOn"

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Edit, 0, 0)
    oMenuItem.Caption = SDB.Localize("Hourglass Cursor Off")
    oMenuItem.UseScript = Script.ScriptPath
    oMenuItem.OnClickFunc = "HourglassOff"
End Sub

Sub Test(oItem)
    Dim oForm
    Dim btnAppCursor
    Dim btnLblCursor
    Dim btnCancel
    Dim iModalResult

    Set oForm = SDB.UI.NewForm
    oForm.Common.SetRect 100, 100, 300, 130
    oForm.Caption = SDB.Localize("Test")

    Set lblInfo = SDB.UI.NewLabel(oForm)
    lblInfo.Caption = "SDB.CursorType: " & SDB.CursorType
    lblInfo.Common.SetRect 10, 10, 300, 17

    Set btnAppCursor = SDB.UI.NewButton(oForm)
    btnAppCursor.Common.SetRect 10, 30, 80, 25
    btnAppCursor.Caption = "App cursor"
    Script.RegisterEvent btnAppCursor, "OnClick", "btnAppCursor_OnClick"

    Set btnLblCursor = SDB.UI.NewButton(oForm)
    btnLblCursor.Common.SetRect 100, 30, 80, 25
    btnLblCursor.Caption = "Label cursor"
    Script.RegisterEvent btnLblCursor, "OnClick", "btnLblCursor_OnClick"

    Set btnCancel = SDB.UI.NewButton(oForm)
    btnCancel.Caption = SDB.Localize("&Close")
    btnCancel.Common.SetRect 200, 60, 70, 25
    btnCancel.Cancel = True
    btnCancel.ModalResult = 2

    iModalResult = oForm.ShowModal
End Sub

Sub btnAppCursor_OnClick()
    SDB.CursorType = -11
End Sub

Sub btnLblCursor_OnClick()
    lblInfo.Common.CursorType = -11
End Sub

Sub HourglassOn(oItem)
    SDB.CursorType = -11
End Sub

Sub HourglassOff(oItem)
    SDB.CursorType = 0
End Sub

1. If you chose "Edit / Test Hourglass Cursor" you would get one new modal dialog box, after that when you click on "App cursor" button you would change cursor to hourglass, but it stays like that only when mouse cursor is over the client area of that dialog box. I think it should stay as hourglass every time when cursor is over some MM window.

2. If you chose "Edit / Hourglass Cursor On" you would get the hourglass cursor over some parts of the main windows, e.g. over the main tracklist, tree panel, NP, but not over the header of the main tracklist, the header of NP panel, app title bar or MM player. Even more, when you move cursor over MM player, the hourglass would switch to default arrow and will not turn back to hourglass even if you move the cursor back to the main tracklist. However, if you choose the mentioned option and move cursor over the header of tracklist, the cursor will change from the hourglass to the default arrow only when the cursor is over that header, but when you move cursor back to the tracklist it will return back to the hourglass.

zvezdan

2013-12-20 10:28

updater   ~0038905

This is not resolved as you could see from the test script.