Skip to content

Commit

Permalink
AUI layout is now the default layout for new users
Browse files Browse the repository at this point in the history
AuiLayout replaces EmbeddedLayout as the default if no layout is configured in
settings. The new layout is not currently replacing any existing layouts, so
users with existing stored preferences will not see any change.
  • Loading branch information
Matthew Mott committed Feb 23, 2021
1 parent b05a9fb commit 7a69f45
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions radiant/ui/mainframe/MainFrame.cpp
Expand Up @@ -18,7 +18,7 @@
#include "wxutil/MultiMonitor.h"

#include "ui/mainframe/ScreenUpdateBlocker.h"
#include "ui/mainframe/EmbeddedLayout.h"
#include "ui/mainframe/AuiLayout.h"
#include "ui/mainframe/TopLevelFrame.h"

#include "module/StaticModule.h"
Expand All @@ -33,7 +33,7 @@
#include <windows.h>
#endif

namespace
namespace
{
const std::string RKEY_WINDOW_LAYOUT = "user/ui/mainFrame/windowLayout";
const std::string RKEY_WINDOW_STATE = "user/ui/mainFrame/window";
Expand All @@ -43,7 +43,7 @@ namespace
const std::string RKEY_ACTIVE_LAYOUT = "user/ui/mainFrame/activeLayout";
}

namespace ui
namespace ui
{

MainFrame::MainFrame() :
Expand Down Expand Up @@ -239,7 +239,7 @@ void MainFrame::construct()

if (activeLayout.empty())
{
activeLayout = EMBEDDED_LAYOUT_NAME; // fall back to hardcoded layout
activeLayout = AUI_LAYOUT_NAME; // fall back to hardcoded layout
}

// Apply the layout
Expand All @@ -250,10 +250,10 @@ void MainFrame::construct()
// Layout is still empty, this is not good
rError() << "Could not restore layout " << activeLayout << std::endl;

if (activeLayout != EMBEDDED_LAYOUT_NAME)
if (activeLayout != AUI_LAYOUT_NAME)
{
// Try to fallback to floating layout
applyLayout(EMBEDDED_LAYOUT_NAME);
applyLayout(AUI_LAYOUT_NAME);
}
}

Expand Down Expand Up @@ -338,7 +338,7 @@ void MainFrame::onTopLevelFrameClose(wxCloseEvent& ev)
return;
}
}

wxASSERT(wxTheApp->GetTopWindow() == _topLevelWindow);

_topLevelWindow->Hide();
Expand All @@ -350,7 +350,7 @@ void MainFrame::onTopLevelFrameClose(wxCloseEvent& ev)
// Broadcast shutdown event
signal_MainFrameShuttingDown().emit();
signal_MainFrameShuttingDown().clear();

// Destroy the actual window
_topLevelWindow->Destroy();
_topLevelWindow = nullptr;
Expand Down Expand Up @@ -557,7 +557,7 @@ std::string MainFrame::getCurrentLayout()
return (_currentLayout != NULL) ? _currentLayout->getName() : "";
}

IScopedScreenUpdateBlockerPtr MainFrame::getScopedScreenUpdateBlocker(const std::string& title,
IScopedScreenUpdateBlockerPtr MainFrame::getScopedScreenUpdateBlocker(const std::string& title,
const std::string& message, bool forceDisplay)
{
return IScopedScreenUpdateBlockerPtr(new ScreenUpdateBlocker(title, message, forceDisplay));
Expand Down

0 comments on commit 7a69f45

Please sign in to comment.