Ticket #254: 20070816 - Ticket 254b.diff

File 20070816 - Ticket 254b.diff, 1.1 KB (added by anxiety, 17 months ago)

Diff file, sounds disables correctly in this one

  • src/preferences/sounds/HWindow.cpp

     
    139139                                                ,new BMessage(M_STOP_MESSAGE) 
    140140                                                ,B_FOLLOW_RIGHT | B_FOLLOW_TOP); 
    141141        button->ResizeToPreferred(); 
     142        button->SetEnabled(false); 
    142143        button->MoveTo(box->Bounds().right - button->Bounds().Width() - 15, rect.top); 
    143144        box->AddChild(button); 
    144145         
     
    153154                                                                ,new BMessage(M_PLAY_MESSAGE) 
    154155                                                                ,B_FOLLOW_RIGHT | B_FOLLOW_TOP); 
    155156        button->ResizeToPreferred(); 
     157        button->SetEnabled(false); 
    156158        button->MoveTo(rect.left - button->Bounds().Width() - 15, rect.top); 
    157159        box->AddChild(button); 
    158160         
     
    408410         
    409411        if(!menufield) 
    410412                return; 
     413 
    411414        if(sel >=0) { 
    412415                menufield->SetEnabled(true); 
    413                 button->SetEnabled(true); 
     416 
     417                HEventItem *item = cast_as(fEventList->ItemAt(sel),HEventItem); 
     418                const char* path = item->Path(); 
     419                if (path && strcmp(path, "")) 
     420                        button->SetEnabled(true); 
     421                else 
     422                        button->SetEnabled(false); 
    414423        } else { 
    415424                menufield->SetEnabled(false); 
    416425                button->SetEnabled(false);