Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Was the width of top view saved in CC configure file?
ollydbg:
See the screen shot below.
I drag the splitter bar(make the top view a litter larger), but this distance will be reset after CB restarted(This is quite a bit annoying :(). So, My question is: Does this value be saved correctly in the default.conf file?
Some code maybe here:
--- Code: ---// class constructor
ClassBrowser::ClassBrowser(wxWindow* parent, NativeParser* np)
: m_NativeParser(np),
m_TreeForPopupMenu(0),
m_pParser(0L),
m_pActiveProject(0),
m_Semaphore(0, 1),
m_pBuilderThread(0)
{
ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("code_completion"));
wxXmlResource::Get()->LoadPanel(this, parent, _T("pnlCB"));
m_Search = XRCCTRL(*this, "cmbSearch", wxComboBox);
if (platform::windows)
m_Search->SetWindowStyle(wxTE_PROCESS_ENTER); // it's a must on windows to catch EVT_TEXT_ENTER
// Subclassed in XRC file, for reference see here: http://wiki.wxwidgets.org/Resource_Files
m_Tree = XRCCTRL(*this, "treeAll", CBTreeCtrl);
m_TreeBottom = XRCCTRL(*this, "treeMembers", CBTreeCtrl);
int filter = cfg->ReadInt(_T("/browser_display_filter"), bdfWorkspace);
XRCCTRL(*this, "cmbView", wxChoice)->SetSelection(filter);
int pos = cfg->ReadInt(_T("/splitter_pos"), 250);
XRCCTRL(*this, "splitterWin", wxSplitterWindow)->SetSashPosition(pos, false);
// if the classbrowser is put under the control of a wxFlatNotebook,
// somehow the main panel is like "invisible" :/
// so we force the correct color for the panel here...
XRCCTRL(*this, "MainPanel", wxPanel)->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
}
// class destructor
ClassBrowser::~ClassBrowser()
{
int pos = XRCCTRL(*this, "splitterWin", wxSplitterWindow)->GetSashPosition();
Manager::Get()->GetConfigManager(_T("code_completion"))->Write(_T("/splitter_pos"), pos);
UnlinkParser();
if (m_pBuilderThread)
{
m_Semaphore.Post();
m_pBuilderThread->Delete();
m_pBuilderThread->Wait();
}
}
--- End code ---
[attachment deleted by admin]
Jenna:
For me (debian 64-bit) it is the same as it was when closing C::B.
I don't know where and when it is saved (the layout-manager does not ask), but it is saved.
ollydbg:
This does not work on Win Vista(at the moment).
Is this value refer to the splitter of the top and bottom view?
--- Code: ---<SPLITTER_POS int="195" />
--- End code ---
in default.conf file.
Jenna:
--- Quote from: ollydbg on January 16, 2010, 05:14:59 pm ---This does not work on Win Vista(at the moment).
Is this value refer to the splitter of the top and bottom view?
--- Code: ---<SPLITTER_POS int="195" />
--- End code ---
in default.conf file.
--- End quote ---
I will test this on vista, but the ClassBrowser-class reads the splitter position in the constructor and writes it in the destructor.
MortenMacFly:
--- Quote from: jens on January 16, 2010, 06:05:18 pm ---I will test this on vista, but the ClassBrowser-class reads the splitter position in the constructor and writes it in the destructor.
--- End quote ---
It is written correctly to the configuration file (when C::B is being closed). Thats what I can tell from tests. So it must be related to loading / applying...
Navigation
[0] Message Index
[#] Next page
Go to full version