Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
ThreadSearch 0.7 release
dje:
@Pecan
--- Quote ---My fault. I assumed an absolute temporary dir of "temp". Should have asked the system for the location of the trash directory.
--- End quote ---
I don't know if it is still necessary but this is my codesnippets.ini
--- Code: ---ExternalEditor=Enter filename of external editor
SnippetFile=C:\\Documents and Settings\\Jerome\\Application Data\\codeblocks\\codesnippets.xml
ViewSearchBox=1
casesensitive=1
scope=2
SnippetFolder=Enter Snippets storage Folder
MouseDragSensitivity=8
MouseToLineRatio=30
MouseContextDelay=192
WindowState=External
WindowPosition=520 122 300 350
EditDlgXpos=235
EditDlgYpos=122
EditDlgWidth=500
EditDlgHeight=400
EditDlgMaximized=0
--- End code ---
Note: on my XP, I have neither C:\temp nor C:\tmp directories.
I suppose you know it but if it is not the case... There are TEMP and TMP environment variables on Windows.
Both yield on my PC
--- Code: ---C:\DOCUME~1\Jerome\LOCALS~1\Temp
--- End code ---
I just replace External by Floating and it works.
Thanks for patch.
Do you think I should apply it or should it be fixed directly in C::B sources ?
Note that I can paste text in your code snippets text control, does the problem concern only combo boxes ?
Dje
Pecan:
--- Quote from: dje on June 30, 2007, 09:47:16 pm ---
Thanks for patch.
Do you think I should apply it or should it be fixed directly in C::B sources ?
Note that I can paste text in your code snippets text control, does the problem concern only combo boxes ?
--- End quote ---
For the time being, I think you'll have to apply the patch to ThreadSearch.
I submitted a CB patch to correct this situation about a 1 1/2 years ago. But it just ended getting old and finally deleted.
This patch is written so that if the CB situation in main.cpp is ever corrected, this patch will still work anyway.
The problem affects ANY window or plugin that needs the use of copy/paste.
CodeSnippets et.al. have worked around this situation from the begining. I got so used to doing copy/paste this way that I forgot that it was a work-around.
That's why I didn't recognize the problem until tracing through it again. Hacks become algorithms.
Pecan:
--- Quote from: dje on June 30, 2007, 06:13:27 pm ---@Pecan
I was playing with code snippets when I found a bug :
--- End quote ---
Fixed: SVN 4200
Pecan:
Diffs to record and restore the position of the splitter sash accross CB runs.
ThreadSearchView.h
--- Code: ------ ThreadSearchview.h 2007-06-26 10:02:52.000000000 -0500
+++ ../ThreadSearchview.h 2007-06-30 19:11:38.718750000 -0500
@@ -87,6 +87,7 @@
/** Sets the splitter window sash position.
*/
void SetSashPosition(int position, const bool redraw = true) {m_pSplitter->SetSashPosition(position, redraw);}
+ int GetSashPosition() { return m_pSplitter->GetSashPosition(); }
/** PostThreadSearchEvent
--- End code ---
ThreadSearch.h
--- Code: ------ ThreadSearch.h 2007-06-28 20:30:16.000000000 -0500
+++ ../ThreadSearch.h 2007-06-30 19:11:34.703125000 -0500
@@ -248,6 +249,9 @@
bool m_ShowDirControls; // True if user wants to display directory specific controls
bool m_DisplayLogHeaders;
bool m_DrawLogLines;
bool b_OnReleased;
wxComboBox* m_pCboSearchExpr;
+ int m_SplitterPosn; // position of splitter from config
DECLARE_EVENT_TABLE();
};
--- End code ---
ThreadSearch.cpp
--- Code: ------ ThreadSearch.cpp 2007-06-28 21:12:28.000000000 -0500
+++ ../ThreadSearch.cpp 2007-06-30 19:11:57.968750000 -0500
@@ -102,8 +103,14 @@
m_pThreadSearchView->SetSashPosition(x/2);
m_pThreadSearchView->SetListColumns();
+ // Set the splitter posn from the config
+ if (m_SplitterPosn)
+ m_pThreadSearchView->SetSashPosition(m_SplitterPosn);
+
// Shows/Hides search widgets on the Messages notebook ThreadSearch panel
m_pThreadSearchView->ShowSearchControls(m_ShowSearchControls);
b_OnReleased = false;
}
void ThreadSearch::OnRelease(bool appShutDown)
@@ -509,6 +510,9 @@
m_FindData.SetSearchPath (pCfg->Read (wxT("/DirPath"), wxEmptyString));
m_FindData.SetSearchMask (pCfg->Read (wxT("/Mask"), wxT("*.cpp;*.c;*.h")));
+
+ m_SplitterPosn = pCfg->ReadInt(wxT("/SplitterPosn"), 0);
+
}
@@ -490,6 +509,8 @@
pCfg->Write(wxT("/DirPath"), m_FindData.GetSearchPath());
pCfg->Write(wxT("/Mask"), m_FindData.GetSearchMask());
+
+ pCfg->Write(wxT("/SplitterPosn"), m_pThreadSearchView->GetSashPosition() );
}
--- End code ---
Pecan:
I've run across a peculiar situation.
The ThreadSearch ToolBar and Log controls had been turned off.
I could find no other way to turn them back on except to edit default.conf.
What am I missing.
Edit: 2007/07/1
I figured it out. I had run /src/output/codeblocks which did not have ThreadSearch installed.
It evidently saved the default.conf entries as 0.
When I went back to /src/devel/codeblocks, I found no way to turn the ThreadSearch controls back on.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version