Fixed window cascading.
Moved position of first window a bit more to the center. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6550 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -114,7 +114,7 @@ DiskProbe::DiskProbe()
|
|||||||
: BApplication(kSignature),
|
: BApplication(kSignature),
|
||||||
fOpenWindow(NULL),
|
fOpenWindow(NULL),
|
||||||
fWindowCount(0),
|
fWindowCount(0),
|
||||||
fWindowPosition(30, 30, 500, 500)
|
fWindowPosition(50, 50, 500, 500)
|
||||||
{
|
{
|
||||||
fFilePanel = new BFilePanel();
|
fFilePanel = new BFilePanel();
|
||||||
|
|
||||||
@@ -220,6 +220,8 @@ DiskProbe::ReadyToRun()
|
|||||||
status_t
|
status_t
|
||||||
DiskProbe::Probe(entry_ref &ref)
|
DiskProbe::Probe(entry_ref &ref)
|
||||||
{
|
{
|
||||||
|
int32 probeWindows = 0;
|
||||||
|
|
||||||
// Do we already have that window open?
|
// Do we already have that window open?
|
||||||
for (int32 i = CountWindows(); i-- > 0; ) {
|
for (int32 i = CountWindows(); i-- > 0; ) {
|
||||||
ProbeWindow *window = dynamic_cast<ProbeWindow *>(WindowAt(i));
|
ProbeWindow *window = dynamic_cast<ProbeWindow *>(WindowAt(i));
|
||||||
@@ -230,6 +232,7 @@ DiskProbe::Probe(entry_ref &ref)
|
|||||||
window->Activate(true);
|
window->Activate(true);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
probeWindows++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Does the file really exists?
|
// Does the file really exists?
|
||||||
@@ -240,7 +243,7 @@ DiskProbe::Probe(entry_ref &ref)
|
|||||||
|
|
||||||
// cascade window
|
// cascade window
|
||||||
BRect rect = fWindowPosition;
|
BRect rect = fWindowPosition;
|
||||||
rect.OffsetBy(fWindowCount * 15, fWindowCount * 15);
|
rect.OffsetBy(probeWindows * 15, probeWindows * 15);
|
||||||
|
|
||||||
BWindow *window = new ProbeWindow(rect, &ref);
|
BWindow *window = new ProbeWindow(rect, &ref);
|
||||||
window->Show();
|
window->Show();
|
||||||
|
|||||||
Reference in New Issue
Block a user