GUI: Small bugfix, new panes were unfloatable by default

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4160 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2009-09-02 15:23:53 +00:00
parent b6c3d5d530
commit 6f4a0903c0
4 changed files with 16 additions and 15 deletions

View File

@ -238,7 +238,7 @@ EVT_MENU(IDM_PERSPECTIVES_ADD_PANE, CFrame::OnToolBar)
EVT_MENU_RANGE(IDM_PERSPECTIVES_0, IDM_PERSPECTIVES_100, CFrame::OnSelectPerspective)
EVT_MENU(IDM_ADD_PERSPECTIVE, CFrame::OnDropDownToolbarSelect)
EVT_MENU(IDM_TAB_SPLIT, CFrame::OnDropDownToolbarSelect)
EVT_MENU(IDM_FLOATABLE_PANES, CFrame::OnDropDownToolbarSelect)
EVT_MENU(IDM_NO_DOCKING, CFrame::OnDropDownToolbarSelect)
#if defined(HAVE_SFML) && HAVE_SFML
EVT_MENU(IDM_NETPLAY, CFrame::OnNetPlay)
@ -313,7 +313,7 @@ CFrame::CFrame(wxFrame* parent,
: wxFrame(parent, id, title, pos, size, style)
, m_LogWindow(NULL), m_ToolBar(NULL), m_ToolBarDebug(NULL), m_ToolBarAui(NULL)
, m_pStatusBar(NULL), m_GameListCtrl(NULL), m_Panel(NULL)
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bFloatPane(false), bRenderToMain(true)
, UseDebugger(_UseDebugger), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false), bRenderToMain(true)
, HaveLeds(false), HaveSpeakers(false)
, m_fLastClickTime(0), m_iLastMotionTime(0), LastMouseX(0), LastMouseY(0)
#if wxUSE_TIMER

View File

@ -168,7 +168,7 @@ class CFrame : public wxFrame
bool UseDebugger;
bool m_bEdit;
bool m_bTabSplit;
bool m_bFloatPane;
bool m_bNoDocking;
char **drives;

View File

@ -534,10 +534,10 @@ void CFrame::OnDropDownSettingsToolbar(wxAuiToolBarEvent& event)
menuPopup.Append(new wxMenuItem(&menuPopup));
Item = new wxMenuItem(&menuPopup, IDM_TAB_SPLIT, wxT("Tab split"), wxT(""), wxITEM_CHECK);
menuPopup.Append(Item);
if (m_bTabSplit) Item->Check(true);
Item = new wxMenuItem(&menuPopup, IDM_FLOATABLE_PANES, wxT("No docking"), wxT(""), wxITEM_CHECK);
Item->Check(m_bTabSplit);
Item = new wxMenuItem(&menuPopup, IDM_NO_DOCKING, wxT("No docking"), wxT(""), wxITEM_CHECK);
menuPopup.Append(Item);
if (m_bFloatPane) Item->Check(true);
Item->Check(m_bNoDocking);
// Line up our menu with the button
wxRect rect = Tb->GetToolRect(event.GetId());
@ -656,9 +656,9 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
m_bTabSplit = event.IsChecked();
ToggleNotebookStyle(wxAUI_NB_TAB_SPLIT);
break;
case IDM_FLOATABLE_PANES:
m_bFloatPane = event.IsChecked();
TogglePaneStyle(m_bFloatPane, IDM_FLOATABLE_PANES);
case IDM_NO_DOCKING:
m_bNoDocking = event.IsChecked();
TogglePaneStyle(m_bNoDocking, IDM_NO_DOCKING);
break;
}
}
@ -712,12 +712,12 @@ void CFrame::TogglePaneStyle(bool On, int EventId)
Pane.Dockable(On);
break;
/*
case IDM_FLOATABLE_PANES:
case IDM_NO_DOCKING:
Pane.Dockable(!On);
break;
*/
}
Pane.Dockable(!m_bFloatPane);
Pane.Dockable(!m_bNoDocking);
}
}
m_Mgr->Update();
@ -964,7 +964,7 @@ void CFrame::ReloadPanes()
for (u32 i = 0; i < Perspectives.at(ActivePerspective).Width.size() - 1; i++)
{
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo().Hide()
.CaptionVisible(m_bEdit).Floatable(m_bFloatPane));
.CaptionVisible(m_bEdit).Dockable(!m_bNoDocking));
}
HideAllNotebooks(true);
@ -975,7 +975,7 @@ void CFrame::ReloadPanes()
// Reset toolbars
ResetToolbarStyle();
// Restore settings
TogglePaneStyle(m_bFloatPane, IDM_FLOATABLE_PANES);
TogglePaneStyle(m_bNoDocking, IDM_NO_DOCKING);
TogglePaneStyle(m_bEdit, IDM_EDIT_PERSPECTIVES);
}
// Create one pane by default
@ -1148,7 +1148,8 @@ void CFrame::NamePanes()
void CFrame::AddPane()
{
m_Mgr->AddPane(CreateEmptyNotebook(), wxAuiPaneInfo()
.CaptionVisible(m_bEdit).Floatable(m_bFloatPane));
.CaptionVisible(m_bEdit).Dockable(!m_bNoDocking));
NamePanes();
AddRemoveBlankPage();
m_Mgr->Update();

View File

@ -182,7 +182,7 @@ enum
IDM_PERSPECTIVES_ADD_PANE,
IDM_EDIT_PERSPECTIVES,
IDM_TAB_SPLIT,
IDM_FLOATABLE_PANES,
IDM_NO_DOCKING,
IDM_PERSPECTIVES_0,
IDM_PERSPECTIVES_100 = IDM_PERSPECTIVES_0 + 100,
// --------------------------------------------------------------