Skip to content

Commit

Permalink
#6131: IUserControl::getDisplayName is used by GroupDialog and AuiLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 15, 2022
1 parent 8d2ace9 commit 9e6a125
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions radiant/ui/groupdialog/GroupDialog.cpp
Expand Up @@ -284,11 +284,11 @@ void GroupDialog::addControl(const std::string& controlName)
auto page = std::make_shared<Page>();

page->name = controlName;
page->windowLabel = _("Something");
page->windowLabel = control->getDisplayName();
page->page = control->createWidget(_notebook.get());
page->tabIcon = "icon_texture.png";
page->tabLabel = _("Something");
page->position = Page::Position::End;
page->tabLabel = control->getDisplayName();
page->position = Page::Position::TextureBrowser;

addPage(page);
}
Expand Down
6 changes: 3 additions & 3 deletions radiant/ui/mainframe/AuiLayout.cpp
Expand Up @@ -101,11 +101,11 @@ void AuiLayout::activate()
wxSize size = topLevelParent->GetSize();
size.Scale(0.5, 1.0);
addPane(cameraControl->getControlName(), cameraControl->createWidget(managedArea),
DEFAULT_PANE_INFO(_("Camera"), size).Left().Position(0));
DEFAULT_PANE_INFO(cameraControl->getDisplayName(), size).Left().Position(0));
addPane("PropertiesPanel", notebookPanel,
DEFAULT_PANE_INFO(_("Properties"), size).Left().Position(1));
addPane(orthoViewControl->getControlName(), orthoViewControl->createWidget(managedArea),
DEFAULT_PANE_INFO(_("2D View"), size).CenterPane());
DEFAULT_PANE_INFO(orthoViewControl->getDisplayName(), size).CenterPane());
_auiMgr.Update();

// Nasty hack to get the panes sized properly. Since BestSize() is
Expand Down Expand Up @@ -197,7 +197,7 @@ void AuiLayout::createFloatingControl(const std::string& controlName)
auto managedWindow = _auiMgr.GetManagedWindow();

addPane(control->getControlName(), control->createWidget(managedWindow),
DEFAULT_PANE_INFO(controlName, wxSize(128, 128)).Float());
DEFAULT_PANE_INFO(control->getDisplayName(), wxSize(128, 128)).Float());
_auiMgr.Update();
}

Expand Down
2 changes: 1 addition & 1 deletion radiant/ui/texturebrowser/TextureBrowserManager.cpp
Expand Up @@ -32,7 +32,7 @@ class TextureBrowserControl :

std::string getDisplayName() override
{
return _("Texture Browser");
return _("Textures");
}

wxWindow* createWidget(wxWindow* parent) override
Expand Down

0 comments on commit 9e6a125

Please sign in to comment.