fixed newlines
fixed a crashing bug when no file was selected and play clicked set a default ramp time of 250 ms git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1293 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -23,7 +23,7 @@ FileSoundWindow::FileSoundWindow(BRect windowBounds)
|
|||||||
preload = false;
|
preload = false;
|
||||||
playing = false;
|
playing = false;
|
||||||
paused = false;
|
paused = false;
|
||||||
rampTime = 0;
|
rampTime = 250000; // 250 ms default
|
||||||
fileSound = 0;
|
fileSound = 0;
|
||||||
//make openPanel and let it send its messages to this window
|
//make openPanel and let it send its messages to this window
|
||||||
openPanel = new BFilePanel();
|
openPanel = new BFilePanel();
|
||||||
@@ -60,7 +60,7 @@ FileSoundWindow::FileSoundWindow(BRect windowBounds)
|
|||||||
box -> AddChild(pauseButton);
|
box -> AddChild(pauseButton);
|
||||||
//make textcontrol to enter delay for pausing/resuming
|
//make textcontrol to enter delay for pausing/resuming
|
||||||
BRect delayBounds(pauseBounds.right + 10, pauseBounds.top,pauseBounds.right + 150, pauseBounds.bottom);
|
BRect delayBounds(pauseBounds.right + 10, pauseBounds.top,pauseBounds.right + 150, pauseBounds.bottom);
|
||||||
delayControl = new BTextControl(delayBounds,"delay","Ramp time (ms)","0", new BMessage(DELAY_MSG));
|
delayControl = new BTextControl(delayBounds,"delay","Ramp time (ms)","250", new BMessage(DELAY_MSG));
|
||||||
delayControl -> SetDivider(90);
|
delayControl -> SetDivider(90);
|
||||||
delayControl -> SetModificationMessage(new BMessage(DELAY_MSG));
|
delayControl -> SetModificationMessage(new BMessage(DELAY_MSG));
|
||||||
box -> AddChild(delayControl);
|
box -> AddChild(delayControl);
|
||||||
@@ -123,6 +123,7 @@ void FileSoundWindow::MessageReceived(BMessage *message)
|
|||||||
BAlert *alert = new BAlert("alert","Other kind of error!","Ok");
|
BAlert *alert = new BAlert("alert","Other kind of error!","Ok");
|
||||||
alert -> Go();
|
alert -> Go();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
paused = false;
|
paused = false;
|
||||||
pauseButton -> SetLabel("Pause");
|
pauseButton -> SetLabel("Pause");
|
||||||
|
|||||||
Reference in New Issue
Block a user