Index: SearchInPanel.cpp
===================================================================
--- SearchInPanel.cpp (Revision 5419)
+++ SearchInPanel.cpp (Arbeitskopie)
@@ -29,10 +29,10 @@
wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL)
{
// begin wxGlade: SearchInPanel::SearchInPanel
- m_pChkSearchOpenFiles = new wxCheckBox(this, idChkSearchOpenFiles, wxT("Open files"));
- m_pChkSearchTargetFiles = new wxCheckBox(this, idChkSearchTargetFiles, wxT("Target files"));
- m_pChkSearchProjectFiles = new wxCheckBox(this, idChkSearchProjectFiles, wxT("Project files"));
- m_pChkSearchWorkspaceFiles = new wxCheckBox(this, idChkSearchWorkspaceFiles, wxT("Workspace files"));
+ m_pChkSearchOpenFiles = new wxCheckBox(this, idChkSearchOpenFiles, wxT("Open"));
+ m_pChkSearchTargetFiles = new wxCheckBox(this, idChkSearchTargetFiles, wxT("Target"));
+ m_pChkSearchProjectFiles = new wxCheckBox(this, idChkSearchProjectFiles, wxT("Project"));
+ m_pChkSearchWorkspaceFiles = new wxCheckBox(this, idChkSearchWorkspaceFiles, wxT("Workspace"));
m_pChkSearchDir = new wxCheckBox(this, idChkSearchDirectoryFiles, wxT("Directory"));
set_properties();
Index: ThreadSearchView.cpp
===================================================================
--- ThreadSearchView.cpp (Revision 5419)
+++ ThreadSearchView.cpp (Arbeitskopie)
@@ -55,7 +55,7 @@
m_pCboSearchExpr = new wxComboBox(this, idCboSearchExpr, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_pCboSearchExpr_choices, wxCB_DROPDOWN|wxTE_PROCESS_ENTER);
m_pBtnSearch = new wxButton(this, idBtnSearch, wxT("Search"));
m_pBtnOptions = new wxButton(this, idBtnOptions, wxT("Options"));
- m_pStaTxtSearchIn = new wxStaticText(this, -1, wxT("Search in "));
+ m_pStaTxtSearchIn = new wxStaticText(this, -1, wxT("Search in files:"));
m_pPnlSearchIn = new SearchInPanel(this, -1);
m_pBtnShowDirItems = new wxButton(this, idBtnShowDirItemsClick, wxT("Show dir items"));
m_pPnlDirParams = new DirectoryParamsPanel(this, -1);
@@ -292,10 +292,14 @@
m_pSizerSearchItems->Add(m_pCboSearchExpr, 2, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
m_pSizerSearchItems->Add(m_pBtnSearch, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
m_pSizerSearchItems->Add(m_pBtnOptions, 0, wxALL|wxADJUST_MINSIZE, 4);
- m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+// m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+ m_pStaLine1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(2, -1));
+ m_pSizerSearchItems->Add(m_pStaLine1, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL);
m_pSizerSearchItems->Add(m_pStaTxtSearchIn, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
m_pSizerSearchItems->Add(m_pPnlSearchIn, 0, wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0);
- m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+// m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+ m_pStaLine2 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(2, -1));
+ m_pSizerSearchItems->Add(m_pStaLine2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL);
m_pSizerSearchItems->Add(m_pBtnShowDirItems, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
m_pSizerTop->Add(m_pSizerSearchItems, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 0);
m_pSizerSearchDirItems->Add(m_pPnlDirParams, 1, wxALIGN_CENTER_VERTICAL, 0);
Index: ThreadSearchView.h
===================================================================
--- ThreadSearchView.h (Revision 5419)
+++ ThreadSearchView.h (Arbeitskopie)
@@ -20,6 +20,7 @@
#include <wx/datetime.h>
#include <wx/panel.h>
#include <wx/arrstr.h>
+#include <wx/statline.h>
#include "editormanager.h"
#include "cbproject.h"
@@ -181,6 +182,8 @@
ThreadSearchLoggerBase* m_pLogger;
wxPanel* m_pPnlListLog;
wxSplitterWindow* m_pSplitter;
+ wxStaticLine* m_pStaLine1;
+ wxStaticLine* m_pStaLine2;
// end wxGlade
wxStaticBoxSizer* m_pSizerSearchDirItems;
wxBoxSizer* m_pSizerSearchItems;
Index: ThreadSearchConfPanel.cpp
===================================================================
--- ThreadSearchConfPanel.cpp (Revision 5419)
+++ ThreadSearchConfPanel.cpp (Arbeitskopie)
@@ -44,7 +44,7 @@
SizerThreadSearchLayoutGlobal_staticbox = new wxStaticBox(this, -1, wxT("Show/Hide"));
SizerListControlOptions_staticbox = new wxStaticBox(this, -1, wxT("List control options"));
SizerThreadSearchLayout_staticbox = new wxStaticBox(this, -1, wxT("Layout"));
- SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in"));
+ SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in files:"));
m_pPnlSearchIn = new SearchInPanel(this, wxID_ANY);
m_pPnlDirParams = new DirectoryParamsPanel(this, wxID_ANY);
m_pChkWholeWord = new wxCheckBox(this, idChkWholeWord, wxT("Whole word"));
... I would rather prefer to substitute the Search and Options Label in the Thread Search Panel by the corresponding icons that are used in the Thread Search toolbar. ...
Index: SearchInPanel.cpp
===================================================================
--- SearchInPanel.cpp (Revision 5423)
+++ SearchInPanel.cpp (Arbeitskopie)
@@ -29,10 +29,10 @@
wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL)
{
// begin wxGlade: SearchInPanel::SearchInPanel
- m_pChkSearchOpenFiles = new wxCheckBox(this, idChkSearchOpenFiles, wxT("Open files"));
- m_pChkSearchTargetFiles = new wxCheckBox(this, idChkSearchTargetFiles, wxT("Target files"));
- m_pChkSearchProjectFiles = new wxCheckBox(this, idChkSearchProjectFiles, wxT("Project files"));
- m_pChkSearchWorkspaceFiles = new wxCheckBox(this, idChkSearchWorkspaceFiles, wxT("Workspace files"));
+ m_pChkSearchOpenFiles = new wxCheckBox(this, idChkSearchOpenFiles, wxT("Open"));
+ m_pChkSearchTargetFiles = new wxCheckBox(this, idChkSearchTargetFiles, wxT("Target"));
+ m_pChkSearchProjectFiles = new wxCheckBox(this, idChkSearchProjectFiles, wxT("Project"));
+ m_pChkSearchWorkspaceFiles = new wxCheckBox(this, idChkSearchWorkspaceFiles, wxT("Workspace"));
m_pChkSearchDir = new wxCheckBox(this, idChkSearchDirectoryFiles, wxT("Directory"));
set_properties();
Index: ThreadSearchConfPanel.cpp
===================================================================
--- ThreadSearchConfPanel.cpp (Revision 5423)
+++ ThreadSearchConfPanel.cpp (Arbeitskopie)
@@ -44,7 +44,7 @@
SizerThreadSearchLayoutGlobal_staticbox = new wxStaticBox(this, -1, wxT("Show/Hide"));
SizerListControlOptions_staticbox = new wxStaticBox(this, -1, wxT("List control options"));
SizerThreadSearchLayout_staticbox = new wxStaticBox(this, -1, wxT("Layout"));
- SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in"));
+ SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in files:"));
m_pPnlSearchIn = new SearchInPanel(this, wxID_ANY);
m_pPnlDirParams = new DirectoryParamsPanel(this, wxID_ANY);
m_pChkWholeWord = new wxCheckBox(this, idChkWholeWord, wxT("Whole word"));
Index: ThreadSearchView.cpp
===================================================================
--- ThreadSearchView.cpp (Revision 5423)
+++ ThreadSearchView.cpp (Arbeitskopie)
@@ -9,6 +9,9 @@
**************************************************************/
#include "sdk.h"
+#include <wx/bitmap.h>
+#include <wx/bmpbuttn.h>
+#include <wx/statline.h>
#ifndef CB_PRECOMP
#include <wx/splitter.h>
#include "cbeditor.h"
@@ -43,6 +46,7 @@
{
m_pFindThread = NULL;
m_pToolBar = NULL;
+ wxString prefix = ConfigManager::GetDataFolder() + _T("/images/ThreadSearch/");
// begin wxGlade: ThreadSearchView::ThreadSearchView
m_pSplitter = new wxSplitterWindow(this, -1, wxDefaultPosition, wxSize(1,1), wxSP_3D|wxSP_BORDER|wxSP_PERMIT_UNSPLIT);
@@ -53,11 +57,13 @@
};
m_pCboSearchExpr = new wxComboBox(this, idCboSearchExpr, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_pCboSearchExpr_choices, wxCB_DROPDOWN|wxTE_PROCESS_ENTER);
- m_pBtnSearch = new wxButton(this, idBtnSearch, wxT("Search"));
- m_pBtnOptions = new wxButton(this, idBtnOptions, wxT("Options"));
- m_pStaTxtSearchIn = new wxStaticText(this, -1, wxT("Search in "));
+ m_pBtnSearch = new wxBitmapButton(this, idBtnSearch, wxBitmap(prefix + wxT("findf.png"), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
+ m_pBtnOptions = new wxBitmapButton(this, idBtnOptions, wxBitmap(prefix + wxT("options.png"), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);//wxT("Options"));
+ m_pStaticLine1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);
+ m_pStaTxtSearchIn = new wxStaticText(this, -1, wxT("Search in files: "));
m_pPnlSearchIn = new SearchInPanel(this, -1);
- m_pBtnShowDirItems = new wxButton(this, idBtnShowDirItemsClick, wxT("Show dir items"));
+ m_pStaticLine2 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);
+ m_pBtnShowDirItems = new wxBitmapButton(this, idBtnShowDirItemsClick, wxBitmap(prefix + wxT("showdir.png"), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
m_pPnlDirParams = new DirectoryParamsPanel(this, -1);
m_pSearchPreview = new cbStyledTextCtrl(m_pPnlPreview, wxID_ANY, wxDefaultPosition, wxSize(1,1));
m_pLogger = ThreadSearchLoggerBase::BuildThreadSearchLoggerBase(*this, m_ThreadSearchPlugin,
@@ -231,11 +237,11 @@
pTopSizer->Show(m_pSizerSearchDirItems, show, true);
if ( show == true )
{
- m_pBtnShowDirItems->SetLabel(_T("Hide dir items"));
+ m_pBtnShowDirItems->SetToolTip(_T("Hide dir items"));
}
else
{
- m_pBtnShowDirItems->SetLabel(_T("Show dir items"));
+ m_pBtnShowDirItems->SetToolTip(_T("Show dir items"));
}
pTopSizer->Layout();
}
@@ -256,9 +262,19 @@
void ThreadSearchView::set_properties()
{
+ wxString prefix = ConfigManager::GetDataFolder() + _T("/images/ThreadSearch/");
// begin wxGlade: ThreadSearchView::set_properties
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
m_pCboSearchExpr->SetMinSize(wxSize(180, -1));
+ m_pBtnSearch->SetToolTip(wxT("Search in files"));
+ m_pBtnSearch->SetBitmapDisabled(wxBitmap(prefix + wxT("findfdisabled.png"), wxBITMAP_TYPE_PNG));
+ m_pBtnSearch->SetSize(m_pBtnSearch->GetBestSize());
+ m_pBtnOptions->SetToolTip(wxT("Options"));
+ m_pBtnOptions->SetBitmapDisabled(wxBitmap(prefix + wxT("optionsdisabled.png"), wxBITMAP_TYPE_PNG));
+ m_pBtnOptions->SetSize(m_pBtnOptions->GetBestSize());
+ m_pBtnShowDirItems->SetToolTip(wxT("Show dir Items"));
+ m_pBtnShowDirItems->SetBitmapDisabled(wxBitmap(prefix + wxT("showdirdisabled.png"), wxBITMAP_TYPE_PNG));
+ m_pBtnShowDirItems->SetSize(m_pBtnShowDirItems->GetBestSize());
m_pPnlPreview->SetMinSize(wxSize(25, -1));
// end wxGlade
@@ -282,6 +298,7 @@
void ThreadSearchView::do_layout()
{
+ wxString prefix = ConfigManager::GetDataFolder() + _T("/images/ThreadSearch/");
// begin wxGlade: ThreadSearchView::do_layout
wxBoxSizer* m_pSizerTop = new wxBoxSizer(wxVERTICAL);
wxBoxSizer* m_pSizerSplitter = new wxBoxSizer(wxHORIZONTAL);
@@ -291,11 +308,11 @@
m_pSizerSearchItems = new wxBoxSizer(wxHORIZONTAL);
m_pSizerSearchItems->Add(m_pCboSearchExpr, 2, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
m_pSizerSearchItems->Add(m_pBtnSearch, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
- m_pSizerSearchItems->Add(m_pBtnOptions, 0, wxALL|wxADJUST_MINSIZE, 4);
- m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+ m_pSizerSearchItems->Add(m_pBtnOptions, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
+ m_pSizerSearchItems->Add(m_pStaticLine1, 0, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 2);
m_pSizerSearchItems->Add(m_pStaTxtSearchIn, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
m_pSizerSearchItems->Add(m_pPnlSearchIn, 0, wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0);
- m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+ m_pSizerSearchItems->Add(m_pStaticLine2, 0, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 2);
m_pSizerSearchItems->Add(m_pBtnShowDirItems, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
m_pSizerTop->Add(m_pSizerSearchItems, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 0);
m_pSizerSearchDirItems->Add(m_pPnlDirParams, 1, wxALIGN_CENTER_VERTICAL, 0);
@@ -822,7 +839,9 @@
// Changes label/bitmap only if requested
if ( label != skip )
{
- m_pBtnSearch->SetLabel(searchButtonLabels[label]);
+ m_pBtnSearch->SetToolTip(searchButtonLabels[label]);
+ m_pBtnSearch->SetBitmapLabel (wxBitmap(searchButtonPathsEnabled [label], wxBITMAP_TYPE_PNG));
+ m_pBtnSearch->SetBitmapDisabled(wxBitmap(searchButtonPathsDisabled[label], wxBITMAP_TYPE_PNG));
pToolBarSearchBtn->SetBitmapLabel (wxBitmap(searchButtonPathsEnabled [label], wxBITMAP_TYPE_PNG));
pToolBarSearchBtn->SetBitmapDisabled(wxBitmap(searchButtonPathsDisabled[label], wxBITMAP_TYPE_PNG));
}
Index: ThreadSearchView.h
===================================================================
--- ThreadSearchView.h (Revision 5423)
+++ ThreadSearchView.h (Arbeitskopie)
@@ -42,6 +42,9 @@
class wxSplitterWindow;
class wxStaticBoxSizer;
class wxBoxSizer;
+class wxBitmap;
+class wxBitmapButton;
+class wxStaticLine;
class ThreadSearch;
class ThreadSearchEvent;
@@ -170,11 +173,13 @@
// begin wxGlade: ThreadSearchView::attributes
wxStaticBox* m_pSizerSearchDirItems_staticbox;
wxComboBox* m_pCboSearchExpr;
- wxButton* m_pBtnSearch;
- wxButton* m_pBtnOptions;
+ wxBitmapButton* m_pBtnSearch;
+ wxBitmapButton* m_pBtnOptions;
+ wxStaticLine* m_pStaticLine1;
wxStaticText* m_pStaTxtSearchIn;
SearchInPanel* m_pPnlSearchIn;
- wxButton* m_pBtnShowDirItems;
+ wxStaticLine* m_pStaticLine2;
+ wxBitmapButton* m_pBtnShowDirItems;
DirectoryParamsPanel* m_pPnlDirParams;
cbStyledTextCtrl* m_pSearchPreview;
wxPanel* m_pPnlPreview;
Index: ThreadSearch.wxg
===================================================================
--- ThreadSearch.wxg (Revision 5423)
+++ ThreadSearch.wxg (Arbeitskopie)
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!-- generated by wxGlade 0.6.3 on Sun Dec 07 20:34:29 2008 -->
+<!-- generated by wxGlade 0.6.3 on Fri Jan 30 12:30:01 2009 -->
<application path="C:\Dev\trunk\src\plugins\contrib\ThreadSearch\wxglade" name="" class="" option="1" language="C++" top_window="m_pThreadSearchConfDlg" encoding="ISO-8859-1" use_gettext="0" overwrite="1" use_new_namespace="1" for_version="2.6" is_template="0">
<object class="ThreadSearchView" name="m_pThreadSearchLog" base="EditTopLevelPanel">
@@ -32,9 +32,12 @@
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>4</border>
<option>0</option>
- <object class="wxButton" name="m_pBtnSearch" base="EditButton">
- <label>Search</label>
+ <object class="wxBitmapButton" name="m_pBtnSearch" base="EditBitmapButton">
+ <style>wxBU_AUTODRAW</style>
+ <disabled_bitmap>resources/images/findfdisabled.png</disabled_bitmap>
+ <tooltip>Search in files</tooltip>
<id>idBtnSearch</id>
+ <bitmap>resources/images/findf.png</bitmap>
<events>
<handler event="EVT_BUTTON">OnBtnSearchClick</handler>
</events>
@@ -44,20 +47,24 @@
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>4</border>
<option>0</option>
- <object class="wxButton" name="m_pBtnOptions" base="EditButton">
- <label>Options</label>
+ <object class="wxBitmapButton" name="m_pBtnOptions" base="EditBitmapButton">
+ <style>wxBU_AUTODRAW</style>
+ <disabled_bitmap>resources/images/optionsdisabled.png</disabled_bitmap>
+ <tooltip>Options</tooltip>
<id>idBtnOptions</id>
+ <bitmap>resources/images/options.png</bitmap>
<events>
<handler event="EVT_BUTTON">OnBtnOptionsClick</handler>
</events>
</object>
</object>
<object class="sizeritem">
- <border>0</border>
+ <flag>wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL</flag>
+ <border>2</border>
<option>0</option>
- <object class="spacer" name="spacer" base="EditSpacer">
- <height>20</height>
- <width>30</width>
+ <object class="wxStaticLine" name="m_pStaticLine1" base="EditStaticLine">
+ <style>wxLI_VERTICAL</style>
+ <attribute>1</attribute>
</object>
</object>
<object class="sizeritem">
@@ -66,7 +73,7 @@
<option>0</option>
<object class="wxStaticText" name="m_pStaTxtSearchIn" base="EditStaticText">
<attribute>1</attribute>
- <label>Search in </label>
+ <label>Search in files: </label>
</object>
</object>
<object class="sizeritem">
@@ -81,20 +88,24 @@
</object>
</object>
<object class="sizeritem">
- <border>0</border>
+ <flag>wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL</flag>
+ <border>2</border>
<option>0</option>
- <object class="spacer" name="spacer" base="EditSpacer">
- <height>20</height>
- <width>30</width>
+ <object class="wxStaticLine" name="m_pStaticLine2" base="EditStaticLine">
+ <style>wxLI_VERTICAL</style>
+ <attribute>1</attribute>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>4</border>
<option>0</option>
- <object class="wxButton" name="m_pBtnShowDirItems" base="EditButton">
- <label>Show dir items</label>
+ <object class="wxBitmapButton" name="m_pBtnShowDirItems" base="EditBitmapButton">
+ <style>wxBU_AUTODRAW</style>
+ <disabled_bitmap>resources/images/showdirdisabled.png</disabled_bitmap>
+ <tooltip>Show dir Items</tooltip>
<id>idBtnShowDirItemsClick</id>
+ <bitmap>resources/images/showdir.png</bitmap>
<events>
<handler event="EVT_BUTTON">OnBtnShowDirItemsClick</handler>
</events>
@@ -143,7 +154,7 @@
<size>1, 1</size>
<object class="wxPanel" name="m_pPnlPreview" base="EditPanel">
<style>wxTAB_TRAVERSAL</style>
- <size>1, 1</size>
+ <size>1, 274</size>
<object class="wxBoxSizer" name="m_pSizerSearchPreview" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
@@ -516,7 +527,7 @@
<option>0</option>
<object class="wxCheckBox" name="m_pChkSearchOpenFiles" base="EditCheckBox">
<checked>1</checked>
- <label>Open files</label>
+ <label>Open</label>
<tooltip>Search in open files</tooltip>
<id>idChkSearchOpenFiles</id>
<events>
@@ -529,7 +540,7 @@
<border>4</border>
<option>0</option>
<object class="wxCheckBox" name="m_pChkSearchTargetFiles" base="EditCheckBox">
- <label>Target files</label>
+ <label>Target</label>
<tooltip>Search in target files</tooltip>
<id>idChkSearchTargetFiles</id>
<events>
@@ -543,7 +554,7 @@
<option>0</option>
<object class="wxCheckBox" name="m_pChkSearchProjectFiles" base="EditCheckBox">
<checked>1</checked>
- <label>Project files</label>
+ <label>Project</label>
<tooltip>Search in project files</tooltip>
<id>idChkSearchProjectFiles</id>
<events>
@@ -556,7 +567,7 @@
<border>4</border>
<option>0</option>
<object class="wxCheckBox" name="m_pChkSearchWorkspaceFiles" base="EditCheckBox">
- <label>Workspace files</label>
+ <label>Workspace</label>
<tooltip>Search in workspace files</tooltip>
<id>idChkSearchWorkspaceFiles</id>
<events>
Hi,
forget my last post, i have modified the log and the toolbar once again.
The changes are:Since the diff file is longer than 1000 lines, i did'nt put it into a code section in this post but into the attached zipfile (and the screenshots too).
- Scope selection is now with wxBitmapButton with boolean state variables included to emulate checkboces/switchbuttons
- The toolbar has now tools rather than bitmapbutons (the look is like the other toolbars and the bitmaps fit)
- The bitmap size can be switched from 16x16 to 22x22 via settings-environment-view-toolbar icons size
- Some typo changes due to doxygen warnings (the doxyfile is included)
With kind regards
Hi,Thank you very much. It's good news for a small computer screen. :D
forget my last post, i have modified the log and the toolbar once again.
The changes are:Since the diff file is longer than 1000 lines, i did'nt put it into a code section in this post but into the attached zipfile (and the screenshots too).
- Scope selection is now with wxBitmapButton with boolean state variables included to emulate checkboces/switchbuttons
- The toolbar has now tools rather than bitmapbutons (the look is like the other toolbars and the bitmaps fit)
- The bitmap size can be switched from 16x16 to 22x22 via settings-environment-view-toolbar icons size
- Some typo changes due to doxygen warnings (the doxyfile is included)
With kind regards
in line 79 (rev. 5808):
replace
EVT_BUTTON (idBtnOptions, ThreadSearch::OnBtnOptionsClick)
by
EVT_TOOL (idBtnOptions, ThreadSearch::OnBtnOptionsClick)
in line 632 :
replace
m_pThreadSearchView->ProcessEvent(event);
by
m_pThreadSearchView->OnBtnOptionsClick(event);
m_pToolBar->Update();
The second issue can half be solved easily:
Insert after the line 740 in ThreadSearchView.cpp (rev. 5813):Codem_pToolBar->Update();
The contents of the other toolbars reappear, the dots on the left side don't.
In ThreadSearch.cpp in line 646 (rev. 5815)
replace
m_pThreadSearchView->ProcessEvent(event);
by
m_pThreadSearchView->OnBtnSearchClick(event);
Hello,
I have found the reason for the crash: it's a stack overflow from an endless recursion of ThreadSearch::OnBtnSearchClick(wxCommandEvent), same problem as ThreadSearch::OnBtnOptionsClick(wxCommandEvent) described in post #12.
The patch would be:CodeIn ThreadSearch.cpp in line 646 (rev. 5815)
replace
m_pThreadSearchView->ProcessEvent(event);
by
m_pThreadSearchView->OnBtnSearchClick(event);
Hope that helps
Index: ThreadSearch.cpp
===================================================================
--- ThreadSearch.cpp (Revision 5824)
+++ ThreadSearch.cpp (Arbeitskopie)
@@ -76,8 +76,8 @@
EVT_MENU (idMenuEditCopy, ThreadSearch::OnMnuEditCopy)
EVT_UPDATE_UI (idMenuEditCopy, ThreadSearch::OnMnuEditCopyUpdateUI)
EVT_MENU (idMenuEditPaste, ThreadSearch::OnMnuEditPaste)
- EVT_TOOL (idBtnOptions, ThreadSearch::OnBtnOptionsClick)
- EVT_TOOL (idBtnSearch, ThreadSearch::OnBtnSearchClick)
+ EVT_BUTTON (idBtnOptions, ThreadSearch::OnBtnOptionsClick)
+ EVT_BUTTON (idBtnSearch, ThreadSearch::OnBtnSearchClick)
EVT_TEXT_ENTER(idCboSearchExpr, ThreadSearch::OnCboSearchExprEnter)
EVT_TEXT (idCboSearchExpr, ThreadSearch::OnCboSearchExprEnter)
// ---------------------------------------------------------------------------
@@ -605,13 +605,19 @@
m_pToolbar->SetToolBitmapSize(wxSize(22,22));
}
m_pCboSearchExpr = new wxComboBox (toolBar, idCboSearchExpr, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN);
+ wxBitmapButton* pBtnSearch = new wxBitmapButton(toolBar, idBtnSearch, wxBitmap(prefix + wxT("findf.png"), wxBITMAP_TYPE_PNG));
+ wxBitmapButton* pBtnOptions = new wxBitmapButton(toolBar, idBtnOptions, wxBitmap(prefix + wxT("options.png"), wxBITMAP_TYPE_PNG));
m_pCboSearchExpr->SetToolTip(_("Text to search"));
+ pBtnSearch->SetToolTip(_("Run search"));
+ pBtnOptions->SetToolTip(_("Show options window"));
+ pBtnSearch->SetBitmapDisabled(wxBitmap(prefix + wxT("findfdisabled.png"), wxBITMAP_TYPE_PNG));
+ pBtnOptions->SetBitmapDisabled(wxBitmap(prefix + wxT("optionsdisabled.png"), wxBITMAP_TYPE_PNG));
toolBar->AddControl(m_pCboSearchExpr);
- toolBar->AddTool(idBtnSearch,_(""),wxBitmap(prefix + wxT("findf.png"), wxBITMAP_TYPE_PNG),wxBitmap(prefix + wxT("findfdisabled.png"), wxBITMAP_TYPE_PNG),wxITEM_NORMAL,_("Run search")); //Control(pBtnSearch);
- toolBar->AddTool(idBtnOptions,_(""),wxBitmap(prefix + wxT("options.png"), wxBITMAP_TYPE_PNG),wxBitmap(prefix + wxT("optionsdisabled.png"), wxBITMAP_TYPE_PNG),wxITEM_NORMAL,_("Show options window")); //Control(pBtnSearch);
+ toolBar->AddControl(pBtnSearch);
+ toolBar->AddControl(pBtnOptions);
toolBar->Realize();
#if wxCHECK_VERSION(2, 8, 0)
@@ -629,7 +635,7 @@
if ( !IsAttached() )
return;
- m_pThreadSearchView->OnBtnOptionsClick(event);
+ m_pThreadSearchView->ProcessEvent(event);
}
@@ -643,7 +649,7 @@
{
// In this case, user wants to stops search,
// we just transmit event
- m_pThreadSearchView->OnBtnSearchClick(event);
+ m_pThreadSearchView->ProcessEvent(event);
}
else
Index: ThreadSearchView.cpp
===================================================================
--- ThreadSearchView.cpp (Revision 5824)
+++ ThreadSearchView.cpp (Arbeitskopie)
@@ -716,6 +716,7 @@
};
long toolBarIdsArray[] = {
+ idBtnOptions,
idCboSearchExpr
};
@@ -737,9 +738,6 @@
{
m_pToolBar->FindControl(toolBarIdsArray[i])->Enable(enable);
}
-
- m_pToolBar->EnableTool(idBtnOptions,enable);
- m_pToolBar->Update();
}
@@ -871,6 +869,7 @@
wxEmptyString};
// Gets toolbar search button pointer
+ wxBitmapButton* pToolBarSearchBtn = static_cast<wxBitmapButton*>(m_pToolBar->FindControl(idBtnSearch));
// Changes label/bitmap only if requested
if ( label != skip )
{
@@ -878,14 +877,14 @@
m_pBtnSearch->SetBitmapLabel (wxBitmap(searchButtonPathsEnabled [label], wxBITMAP_TYPE_PNG));
m_pBtnSearch->SetBitmapDisabled(wxBitmap(searchButtonPathsDisabled[label], wxBITMAP_TYPE_PNG));
//{ Toolbar buttons
- m_pToolBar->SetToolNormalBitmap(idBtnSearch,wxBitmap(searchButtonPathsEnabled [label], wxBITMAP_TYPE_PNG));
- m_pToolBar->SetToolDisabledBitmap(idBtnSearch,wxBitmap(searchButtonPathsDisabled[label], wxBITMAP_TYPE_PNG));
+ pToolBarSearchBtn->SetBitmapLabel (wxBitmap(searchButtonPathsEnabled [label], wxBITMAP_TYPE_PNG));
+ pToolBarSearchBtn->SetBitmapDisabled(wxBitmap(searchButtonPathsDisabled[label], wxBITMAP_TYPE_PNG));
//}
}
// Sets enable state
m_pBtnSearch->Enable(enable);
- m_pToolBar->EnableTool(idBtnSearch,enable);
+ pToolBarSearchBtn->Enable(enable);
}