* Use hiding instead of minimizing for the Download window.

* Auto-show and auto-move-to-current-workspace when a download starts.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@61 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi 2010-02-13 13:42:52 +00:00
parent 8260b39fbc
commit aab72d7ea6
2 changed files with 11 additions and 7 deletions

View File

@ -347,7 +347,7 @@ DownloadWindow::DownloadWindow(BRect frame, bool visible)
BMenuBar* menuBar = new BMenuBar("Menu bar");
BMenu* menu = new BMenu("Window");
menu->AddItem(new BMenuItem("Minimize", new BMessage(B_QUIT_REQUESTED), 'M'));
menu->AddItem(new BMenuItem("Hide", new BMessage(B_QUIT_REQUESTED), 'H'));
menuBar->AddItem(menu);
BScrollView* scrollView = new DownloadContainerScrollView(downloadsGroupView);
@ -372,7 +372,7 @@ DownloadWindow::DownloadWindow(BRect frame, bool visible)
downloadFinished(NULL);
if (!visible)
Minimize(true);
Hide();
Show();
}
@ -411,8 +411,8 @@ void DownloadWindow::MessageReceived(BMessage* message)
bool DownloadWindow::QuitRequested()
{
if (!IsMinimized())
Minimize(true);
if (!IsHidden())
Hide();
return false;
}
@ -437,6 +437,10 @@ void DownloadWindow::downloadStarted(WebDownload* download)
return;
m_downloadViewsLayout->AddView(index, view);
saveSettings();
SetWorkspaces(B_CURRENT_WORKSPACE);
if (IsHidden())
Show();
}
void DownloadWindow::downloadFinished(WebDownload* download)

View File

@ -173,8 +173,8 @@ void LauncherApp::MessageReceived(BMessage* message)
uint32 workspaces;
if (message->FindUInt32("workspaces", &workspaces) == B_OK)
m_downloadWindow->SetWorkspaces(workspaces);
if (m_downloadWindow->IsMinimized())
m_downloadWindow->Minimize(false);
if (m_downloadWindow->IsHidden())
m_downloadWindow->Show();
else
m_downloadWindow->Activate();
}
@ -231,7 +231,7 @@ bool LauncherApp::QuitRequested()
settingsArchive.AddRect("window frame", m_lastWindowFrame);
if (m_downloadWindow->Lock()) {
settingsArchive.AddRect("downloads window frame", m_downloadWindow->Frame());
settingsArchive.AddBool("show downloads", !m_downloadWindow->IsMinimized());
settingsArchive.AddBool("show downloads", !m_downloadWindow->IsHidden());
m_downloadWindow->Unlock();
}
settingsArchive.Flatten(&settingsFile);