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:
@@ -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
|
void
|
||||||
Desktop::UpdateWorkspaces()
|
Desktop::UpdateWorkspaces()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ class Desktop : public MessageLooper, public ScreenOwner {
|
|||||||
{ return fBackgroundRegion; }
|
{ return fBackgroundRegion; }
|
||||||
|
|
||||||
void RedrawBackground();
|
void RedrawBackground();
|
||||||
|
void StoreWorkspaceConfiguration(Workspace::Private *workspace);
|
||||||
|
|
||||||
void MinimizeApplication(team_id team);
|
void MinimizeApplication(team_id team);
|
||||||
void BringApplicationToFront(team_id team);
|
void BringApplicationToFront(team_id team);
|
||||||
|
|||||||
@@ -105,9 +105,10 @@ Workspace::SetColor(const RGBColor& color, bool makeDefault)
|
|||||||
if (color == Color())
|
if (color == Color())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: support makeDefault
|
|
||||||
fWorkspace.SetColor(color);
|
fWorkspace.SetColor(color);
|
||||||
fDesktop.RedrawBackground();
|
fDesktop.RedrawBackground();
|
||||||
|
if (makeDefault)
|
||||||
|
fDesktop.StoreWorkspaceConfiguration(&fWorkspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user