hopefully implemented makedefault in Workspace::SetColor()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17113 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
196144a56c
commit
190b4fa4ef
|
@ -657,6 +657,27 @@ Desktop::RedrawBackground()
|
|||
}
|
||||
|
||||
|
||||
/*!
|
||||
\brief Store the workspace configuration
|
||||
*/
|
||||
void
|
||||
Desktop::StoreWorkspaceConfiguration(Workspace::Private *workspace)
|
||||
{
|
||||
// store settings
|
||||
for (int32 index = 0; index < 32; index++) {
|
||||
if (&fWorkspaces[index] == workspace) {
|
||||
const BMessage *oldSettings = fSettings->WorkspacesMessage(index);
|
||||
BMessage settings;
|
||||
if (oldSettings)
|
||||
settings = *oldSettings;
|
||||
workspace->StoreConfiguration(settings);
|
||||
fSettings->Save(kWorkspacesSettings);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Desktop::UpdateWorkspaces()
|
||||
{
|
||||
|
|
|
@ -163,6 +163,7 @@ class Desktop : public MessageLooper, public ScreenOwner {
|
|||
{ return fBackgroundRegion; }
|
||||
|
||||
void RedrawBackground();
|
||||
void StoreWorkspaceConfiguration(Workspace::Private *workspace);
|
||||
|
||||
void MinimizeApplication(team_id team);
|
||||
void BringApplicationToFront(team_id team);
|
||||
|
|
|
@ -105,9 +105,10 @@ Workspace::SetColor(const RGBColor& color, bool makeDefault)
|
|||
if (color == Color())
|
||||
return;
|
||||
|
||||
// TODO: support makeDefault
|
||||
fWorkspace.SetColor(color);
|
||||
fDesktop.RedrawBackground();
|
||||
if (makeDefault)
|
||||
fDesktop.StoreWorkspaceConfiguration(&fWorkspace);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue