Author Topic: ThreadSearch layout modification  (Read 19277 times)

Offline yesno

  • Multiple posting newcomer
  • *
  • Posts: 19
ThreadSearch layout modification
« on: January 25, 2009, 12:46:41 pm »
Hello,

I have shortened the headline of the headline of the ThreadSearch panel to fit on my screen (15", 1024x768 resolution).

The spacers are replaced by static lines. I don't know whether the lines are necessary, but the spacers are really too big.

Code
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"));

With applied changes it would look like the attached image.

With kind regards


[attachment deleted by admin]

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: ThreadSearch layout modification
« Reply #1 on: January 25, 2009, 03:25:11 pm »
Hi!

All my graphical stuf is generated by wxGlade (wxSmith is really cool but I'm used to this one because I also code GUI with perl).
It's OK to apply your patch if you use this tool to change graphical classes.
It seems the wxGlade project has not been patched.

Dje

mariocup

  • Guest
Re: ThreadSearch layout modification
« Reply #2 on: January 25, 2009, 03:27:48 pm »
Hi dje,

instead of changing the text Open files in Open etc. 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. This would be the better way in my eyes.

Offline yesno

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: ThreadSearch layout modification
« Reply #3 on: January 30, 2009, 02:15:57 pm »
... 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. ...

I think, this is the best idea. Have done it. Now it looks like the attached image.

Code
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>

I have also attached the necessary bitmaps for the 'Show dir items' button, now a wxBitmapButton, too.

With kind regards


[attachment deleted by admin]

mariocup

  • Guest
Re: ThreadSearch layout modification
« Reply #4 on: January 30, 2009, 02:28:34 pm »
Hi yesno,

yes that looks nice and well arranged.


Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: ThreadSearch layout modification
« Reply #5 on: January 30, 2009, 03:03:32 pm »
Hi,

thanks for the work.
I'll look at it this WE.

Jérôme

Offline yesno

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: ThreadSearch layout modification
« Reply #6 on: February 27, 2009, 10:28:02 pm »
Hi,

forget my last post, i have modified the log and the toolbar once again.
The changes are:
  • 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)
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).

With kind regards

[attachment deleted by admin]
« Last Edit: February 27, 2009, 10:29:39 pm by yesno »

Offline plee3

  • Single posting newcomer
  • *
  • Posts: 4
Re: ThreadSearch layout modification
« Reply #7 on: February 28, 2009, 01:00:59 am »
Hi,

forget my last post, i have modified the log and the toolbar once again.
The changes are:
  • 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)
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).

With kind regards

I download the zipfile, but it did not contain any of the source code or diff, just the batch fill to generate the diff. Am I missing something?

Thanks... Patrick

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: ThreadSearch layout modification
« Reply #8 on: February 28, 2009, 02:26:25 am »
Hi,

forget my last post, i have modified the log and the toolbar once again.
The changes are:
  • 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)
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).

With kind regards
Thank you very much. It's good news for a small computer screen. :D

Edit:
Where is the source code or patch?
« Last Edit: February 28, 2009, 02:42:25 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline yesno

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: ThreadSearch layout modification
« Reply #9 on: February 28, 2009, 09:39:43 am »
Oops, shame on me  :(, but now i've really attached the diff. OK forget the .bat and use this attached file.
It contains the modified files too.

With kind regards

PS There is a bug: if you use the options button from the toolbar, codeblocks crashes immediately. The options button from the log window is normal.

PPS Found the bug.
in ThreadView.cpp replace in line 79 EVT_BUTTON by EVT_TOOL and in line 628 (former 623) ProcessEvent by OnBtnOptionsClick

[attachment deleted by admin]
« Last Edit: February 28, 2009, 08:00:42 pm by yesno »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: ThreadSearch layout modification
« Reply #10 on: March 28, 2009, 04:03:05 am »
It was applied in the trunk 5489.

By the way.
I have built the SVN 5489 in Windows. It seems the threadSearch can't open main.cpp file (it is encoded in UTF-8 without BOM)

I have to convert to ANSI, then threadSearch can search again.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: ThreadSearch layout modification
« Reply #11 on: March 28, 2009, 08:14:19 pm »
Small problem with this update 5489. It does not include the patches proposed by Xaviou here to be able to translate in other languages the different items of this plugin. Some wxT have to be replaced by _.

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline yesno

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: ThreadSearch layout modification
« Reply #12 on: September 19, 2009, 08:43:55 am »
Hello,

first, the layout modification is fine now, but there are missing two modifications, both in ThreadSearch.cpp and each one line.

The first is
Code
in line 79 (rev. 5808):
replace
EVT_BUTTON (idBtnOptions, ThreadSearch::OnBtnOptionsClick)
by
EVT_TOOL (idBtnOptions, ThreadSearch::OnBtnOptionsClick)
because the options button from the toolbar is no more a button but a tool and without this modification nothing would happen.

The second one is
Code
in line 632 :
replace
m_pThreadSearchView->ProcessEvent(event);
by
m_pThreadSearchView->OnBtnOptionsClick(event);
This is necessary to prevent the event handler from being recursive (leading to a stack overflow leading to a crash)

With kind regards
« Last Edit: September 19, 2009, 08:55:14 am by yesno »

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: ThreadSearch layout modification
« Reply #13 on: September 20, 2009, 04:56:44 am »
Thank you yesno for the patch.

I've discovered another issue in that when executing a search, the options icon reverses it's colour and anything to the right of the ThreadSearch toolbar gets corrupted (i.e. it disappears).  If I move the ThreadSearch toolbar I'm able to see toolbars to the right of it once more.

I'm running Windows XP Pro with C::B compiled with MinGW GCC 4.4.0.

Offline yesno

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: ThreadSearch layout modification
« Reply #14 on: September 20, 2009, 10:23:36 am »
Hello,

As for the colour reversion of the options button - regardles the toolbar or the logwindow search button is pushed - : don't know the reason. Maybe an issue of wxMSW, Wind0ws or the button image.

The second issue can half be solved easily:
Insert after the line 740 in ThreadSearchView.cpp (rev. 5813):
Code
m_pToolBar->Update();

The contents of the other toolbars reappear, the dots on the left side don't.

With kind regards