~ubuntu-branches/ubuntu/hardy/codeblocks/hardy-backports

« back to all changes in this revision

Viewing changes to src/plugins/contrib/ThreadSearch/ThreadSearchConfPanel.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Casadevall
  • Date: 2008-07-17 04:39:23 UTC
  • Revision ID: james.westby@ubuntu.com-20080717043923-gmsy5cwkdjswghkm
Tags: upstream-8.02
ImportĀ upstreamĀ versionĀ 8.02

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************
 
2
 * Name:      ThreadSearchConfPanel
 
3
 * Purpose:   This class implements the configuration panel used
 
4
 *            in modal dialog called on "Options" button click
 
5
 *            and by C::B on "Environment" settings window.
 
6
 * Author:    Jerome ANTOINE
 
7
 * Created:   2007-10-08
 
8
 * Copyright: Jerome ANTOINE
 
9
 * License:   GPL
 
10
 **************************************************************/
 
11
 
 
12
#include <sdk.h> // Code::Blocks SDK
 
13
#ifndef CB_PRECOMP
 
14
        #include <wx/checkbox.h>
 
15
        #include <wx/radiobox.h>
 
16
        #include <wx/sizer.h>
 
17
        #include <wx/statbox.h>
 
18
        #include <wx/stattext.h>
 
19
#endif
 
20
 
 
21
#include "ThreadSearch.h"
 
22
#include "SearchInPanel.h"
 
23
#include "DirectoryParamsPanel.h"
 
24
#include "ThreadSearchConfPanel.h"
 
25
#include "ThreadSearchControlIds.h"
 
26
#include "ThreadSearchViewManagerBase.h"
 
27
#include "ThreadSearchFindData.h"
 
28
#include "InsertIndexManager.h"
 
29
 
 
30
// begin wxGlade: ::extracode
 
31
 
 
32
// end wxGlade
 
33
 
 
34
 
 
35
ThreadSearchConfPanel::ThreadSearchConfPanel(ThreadSearch& threadSearchPlugin, wxWindow* parent,wxWindowID id)
 
36
                                          :m_ThreadSearchPlugin(threadSearchPlugin)
 
37
{
 
38
    Create(parent,id,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL);
 
39
 
 
40
    // begin wxGlade: ThreadSearchConfPanel::ThreadSearchConfPanel
 
41
    SizerOptions_staticbox = new wxStaticBox(this, -1, wxT("Options"));
 
42
    SizerThreadSearchOptions_staticbox = new wxStaticBox(this, -1, wxT("Thread search options"));
 
43
    SizerThreadSearchLayoutGlobal_staticbox = new wxStaticBox(this, -1, wxT("Show/Hide"));
 
44
    SizerListControlOptions_staticbox = new wxStaticBox(this, -1, wxT("List control options"));
 
45
    SizerThreadSearchLayout_staticbox = new wxStaticBox(this, -1, wxT("Layout"));
 
46
    SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in"));
 
47
    m_pPnlSearchIn = new SearchInPanel(this, wxID_ANY);
 
48
    m_pPnlDirParams = new DirectoryParamsPanel(this, wxID_ANY);
 
49
    m_pChkWholeWord = new wxCheckBox(this, idChkWholeWord, wxT("Whole word"));
 
50
    m_pChkStartWord = new wxCheckBox(this, idChkStartWord, wxT("Start word"));
 
51
    m_pChkMatchCase = new wxCheckBox(this, idChkMatchCase, wxT("Match case"));
 
52
    m_pChkRegExp = new wxCheckBox(this, idChkRegularExpression, wxT("Regular expression"));
 
53
    m_pChkThreadSearchEnable = new wxCheckBox(this, idChkThreadSearchEnable, wxT("Enable 'Find occurrences' contextual menu item"));
 
54
    m_pChkUseDefaultOptionsForThreadSearch = new wxCheckBox(this, idChkUseDefaultOptionsOnThreadSearch, wxT("Use default options when running 'Find occurrences' "));
 
55
    m_pChkShowThreadSearchToolBar = new wxCheckBox(this, idChkViewThreadSearchToolBar, wxT("Show ThreadSearch toolbar."));
 
56
    m_pChkShowThreadSearchWidgets = new wxCheckBox(this, idChkShowThreadSearchWidgets, wxT("Show search widgets in ThreadSearch Messages panel."));
 
57
    m_pChkShowCodePreview = new wxCheckBox(this, idChkShowCodePreview, wxT("Show code preview editor."));
 
58
    m_pChkDisplayLogHeaders = new wxCheckBox(this, idChkDisplayLogHeaders, wxT("Display header in log window."));
 
59
    m_pChkDrawLogLines = new wxCheckBox(this, idChkDrawLogLines, wxT("Draw lines between log columns."));
 
60
    const wxString m_pRadPanelManagement_choices[] = {
 
61
        wxT("Messages notebook"),
 
62
        wxT("Layout")
 
63
    };
 
64
    m_pRadPanelManagement = new wxRadioBox(this, wxID_ANY, wxT("ThreadSearch panel management by"), wxDefaultPosition, wxDefaultSize, 2, m_pRadPanelManagement_choices, 1, wxRA_SPECIFY_ROWS);
 
65
    const wxString m_pRadLoggerType_choices[] = {
 
66
        wxT("List"),
 
67
        wxT("Tree")
 
68
    };
 
69
    m_pRadLoggerType = new wxRadioBox(this, wxID_ANY, wxT("Logger type"), wxDefaultPosition, wxDefaultSize, 2, m_pRadLoggerType_choices, 1, wxRA_SPECIFY_ROWS);
 
70
    const wxString m_pRadSplitterWndMode_choices[] = {
 
71
        wxT("Horizontal"),
 
72
        wxT("Vertical")
 
73
    };
 
74
    m_pRadSplitterWndMode = new wxRadioBox(this, wxID_ANY, wxT("Splitter window mode"), wxDefaultPosition, wxDefaultSize, 2, m_pRadSplitterWndMode_choices, 1, wxRA_SPECIFY_ROWS);
 
75
    const wxString m_pRadSortBy_choices[] = {
 
76
        wxT("file path"),
 
77
        wxT("file name")
 
78
    };
 
79
    m_pRadSortBy = new wxRadioBox(this, wxID_ANY, wxT("Sort results by"), wxDefaultPosition, wxDefaultSize, 2, m_pRadSortBy_choices, 1, wxRA_SPECIFY_ROWS);
 
80
 
 
81
    set_properties();
 
82
    do_layout();
 
83
    // end wxGlade
 
84
}
 
85
 
 
86
 
 
87
BEGIN_EVENT_TABLE(ThreadSearchConfPanel, wxPanel)
 
88
    // begin wxGlade: ThreadSearchConfPanel::event_table
 
89
    EVT_CHECKBOX(idChkThreadSearchEnable, ThreadSearchConfPanel::OnThreadSearchEnable)
 
90
    EVT_CHECKBOX(idChkViewThreadSearchToolBar, ThreadSearchConfPanel::OnChkShowThreadSearchToolBarClick)
 
91
    EVT_CHECKBOX(idChkShowCodePreview, ThreadSearchConfPanel::OnChkCodePreview)
 
92
    EVT_CHECKBOX(idChkShowThreadSearchWidgets, ThreadSearchConfPanel::OnChkShowThreadSearchWidgetsClick)
 
93
    // end wxGlade
 
94
END_EVENT_TABLE();
 
95
 
 
96
 
 
97
void ThreadSearchConfPanel::OnThreadSearchEnable(wxCommandEvent &event)
 
98
{
 
99
        m_pChkUseDefaultOptionsForThreadSearch->Enable(event.IsChecked());
 
100
    event.Skip();
 
101
}
 
102
 
 
103
 
 
104
void ThreadSearchConfPanel::OnChkShowThreadSearchToolBarClick(wxCommandEvent &event)
 
105
{
 
106
        if ( (event.IsChecked() == false) && (m_pChkShowThreadSearchWidgets->GetValue() == false) )
 
107
        {
 
108
                if ( wxID_YES != cbMessageBox(wxT("Do you really want to hide both ThreadSearch toolbar and widgets ?"),
 
109
                                                                          wxT("Sure ?"), wxICON_QUESTION|wxYES_NO) )
 
110
                {
 
111
                        m_pChkShowThreadSearchToolBar->SetValue(true);
 
112
                }
 
113
        }
 
114
        event.Skip();
 
115
}
 
116
 
 
117
 
 
118
void ThreadSearchConfPanel::OnChkCodePreview(wxCommandEvent &event)
 
119
{
 
120
        m_pRadSplitterWndMode->Enable(event.IsChecked());
 
121
        event.Skip();
 
122
}
 
123
 
 
124
 
 
125
void ThreadSearchConfPanel::OnChkShowThreadSearchWidgetsClick(wxCommandEvent &event)
 
126
{
 
127
        if ( (event.IsChecked() == false) && (m_pChkShowThreadSearchToolBar->GetValue() == false) )
 
128
        {
 
129
                if ( wxID_YES != cbMessageBox(wxT("Do you really want to hide both ThreadSearch toolbar and widgets ?"),
 
130
                                                                          wxT("Sure ?"), wxICON_QUESTION|wxYES_NO) )
 
131
                {
 
132
                        m_pChkShowThreadSearchWidgets->SetValue(true);
 
133
                }
 
134
        }
 
135
        event.Skip();
 
136
}
 
137
 
 
138
 
 
139
// wxGlade: add ThreadSearchConfPanel event handlers
 
140
 
 
141
 
 
142
void ThreadSearchConfPanel::set_properties()
 
143
{
 
144
    // begin wxGlade: ThreadSearchConfPanel::set_properties
 
145
    m_pChkWholeWord->SetToolTip(wxT("Search text matches only whole words"));
 
146
    m_pChkWholeWord->SetValue(1);
 
147
    m_pChkStartWord->SetToolTip(wxT("Matches only word starting with search expression"));
 
148
    m_pChkMatchCase->SetToolTip(wxT("Case sensitive search."));
 
149
    m_pChkMatchCase->SetValue(1);
 
150
    m_pChkRegExp->SetToolTip(wxT("Search expression is a regular expression"));
 
151
    m_pChkThreadSearchEnable->SetValue(1);
 
152
    m_pChkUseDefaultOptionsForThreadSearch->SetValue(1);
 
153
    m_pChkShowThreadSearchToolBar->SetValue(1);
 
154
    m_pChkShowThreadSearchWidgets->SetValue(1);
 
155
    m_pChkShowCodePreview->SetValue(1);
 
156
    m_pChkDisplayLogHeaders->SetValue(1);
 
157
    m_pRadPanelManagement->SetSelection(0);
 
158
    m_pRadLoggerType->SetSelection(0);
 
159
    m_pRadSplitterWndMode->SetSelection(0);
 
160
    m_pRadSortBy->SetSelection(0);
 
161
    // end wxGlade
 
162
 
 
163
        ThreadSearchFindData findData;
 
164
        m_ThreadSearchPlugin.GetFindData(findData);
 
165
 
 
166
    m_pChkWholeWord->SetValue(findData.GetMatchWord());
 
167
    m_pChkStartWord->SetValue(findData.GetStartWord());
 
168
    m_pChkMatchCase->SetValue(findData.GetMatchCase());
 
169
    m_pChkRegExp->SetValue(findData.GetRegEx());
 
170
    m_pChkThreadSearchEnable->SetValue(m_ThreadSearchPlugin.GetCtxMenuIntegration());
 
171
    m_pChkUseDefaultOptionsForThreadSearch->SetValue(m_ThreadSearchPlugin.GetUseDefValsForThreadSearch());
 
172
    m_pChkUseDefaultOptionsForThreadSearch->Enable(m_ThreadSearchPlugin.GetCtxMenuIntegration());
 
173
    m_pChkDisplayLogHeaders->SetValue(m_ThreadSearchPlugin.GetDisplayLogHeaders());
 
174
    m_pChkDrawLogLines->SetValue(m_ThreadSearchPlugin.GetDrawLogLines());
 
175
    m_pChkShowThreadSearchToolBar->SetValue(m_ThreadSearchPlugin.IsToolbarVisible());
 
176
    m_pChkShowThreadSearchWidgets->SetValue(m_ThreadSearchPlugin.GetShowSearchControls());
 
177
    m_pChkShowCodePreview->SetValue(m_ThreadSearchPlugin.GetShowCodePreview());
 
178
 
 
179
    int radIndex = 0;
 
180
    switch (m_ThreadSearchPlugin.GetManagerType())
 
181
    {
 
182
                case ThreadSearchViewManagerBase::TypeLayout :
 
183
                {
 
184
                        radIndex = 1;
 
185
                        break;
 
186
                }
 
187
                default:
 
188
                // case ThreadSearchViewManagerBase::TypeMessagesNotebook :
 
189
                {
 
190
                        radIndex = 0;
 
191
                        break;
 
192
                }
 
193
    }
 
194
    m_pRadPanelManagement->SetSelection(radIndex);
 
195
 
 
196
    radIndex = 0;
 
197
    switch (m_ThreadSearchPlugin.GetLoggerType())
 
198
    {
 
199
                case ThreadSearchLoggerBase::TypeTree:
 
200
                {
 
201
                        radIndex = 1;
 
202
                        break;
 
203
                }
 
204
                default:
 
205
                // case ThreadSearchLoggerBase::TypeList :
 
206
                {
 
207
                        radIndex = 0;
 
208
                        break;
 
209
                }
 
210
    }
 
211
    m_pRadLoggerType->SetSelection(radIndex);
 
212
 
 
213
    radIndex = 0;
 
214
    switch (m_ThreadSearchPlugin.GetSplitterMode())
 
215
    {
 
216
                case wxSPLIT_HORIZONTAL:
 
217
                {
 
218
                        radIndex = 0;
 
219
                        break;
 
220
                }
 
221
                default :
 
222
                // case wxSPLIT_VERTICAL:
 
223
                {
 
224
                        radIndex = 1;
 
225
                        break;
 
226
                }
 
227
    }
 
228
    m_pRadSplitterWndMode->SetSelection(radIndex);
 
229
    m_pRadSplitterWndMode->Enable(m_ThreadSearchPlugin.GetShowCodePreview());
 
230
 
 
231
    radIndex = 0;
 
232
    switch (m_ThreadSearchPlugin.GetFileSorting())
 
233
    {
 
234
                case InsertIndexManager::SortByFileName:
 
235
                {
 
236
                        radIndex = 1;
 
237
                        break;
 
238
                }
 
239
                default:
 
240
                // case ThreadSearch::SortByFilePath :
 
241
                {
 
242
                        radIndex = 0;
 
243
                        break;
 
244
                }
 
245
    }
 
246
    m_pRadSortBy->SetSelection(radIndex);
 
247
 
 
248
    m_pPnlDirParams->SetSearchDirHidden(findData.GetHiddenSearch());
 
249
    m_pPnlDirParams->SetSearchDirRecursively(findData.GetRecursiveSearch());
 
250
    m_pPnlDirParams->SetSearchDirPath(findData.GetSearchPath());
 
251
    m_pPnlDirParams->SetSearchMask(findData.GetSearchMask());
 
252
 
 
253
    m_pPnlSearchIn->SetSearchInOpenFiles(findData.MustSearchInOpenFiles());
 
254
    m_pPnlSearchIn->SetSearchInProjectFiles(findData.MustSearchInProject());
 
255
    m_pPnlSearchIn->SetSearchInWorkspaceFiles(findData.MustSearchInWorkspace());
 
256
    m_pPnlSearchIn->SetSearchInDirectory(findData.MustSearchInDirectory());
 
257
}
 
258
 
 
259
 
 
260
void ThreadSearchConfPanel::do_layout()
 
261
{
 
262
    // begin wxGlade: ThreadSearchConfPanel::do_layout
 
263
    wxBoxSizer* SizerTop = new wxBoxSizer(wxVERTICAL);
 
264
    wxStaticBoxSizer* SizerThreadSearchLayout = new wxStaticBoxSizer(SizerThreadSearchLayout_staticbox, wxVERTICAL);
 
265
    wxFlexGridSizer* SizerThreadSearchGridLayout = new wxFlexGridSizer(4, 2, 0, 0);
 
266
    wxStaticBoxSizer* SizerListControlOptions = new wxStaticBoxSizer(SizerListControlOptions_staticbox, wxVERTICAL);
 
267
    wxStaticBoxSizer* SizerThreadSearchLayoutGlobal = new wxStaticBoxSizer(SizerThreadSearchLayoutGlobal_staticbox, wxVERTICAL);
 
268
    wxStaticBoxSizer* SizerThreadSearchOptions = new wxStaticBoxSizer(SizerThreadSearchOptions_staticbox, wxVERTICAL);
 
269
    wxStaticBoxSizer* SizerOptions = new wxStaticBoxSizer(SizerOptions_staticbox, wxHORIZONTAL);
 
270
    wxStaticBoxSizer* SizerSearchIn = new wxStaticBoxSizer(SizerSearchIn_staticbox, wxVERTICAL);
 
271
    SizerSearchIn->Add(m_pPnlSearchIn, 0, wxALL|wxEXPAND, 2);
 
272
    SizerSearchIn->Add(m_pPnlDirParams, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 2);
 
273
    SizerTop->Add(SizerSearchIn, 0, wxALL|wxEXPAND, 4);
 
274
    SizerOptions->Add(m_pChkWholeWord, 0, wxALL|wxADJUST_MINSIZE, 4);
 
275
    SizerOptions->Add(m_pChkStartWord, 0, wxALL|wxADJUST_MINSIZE, 4);
 
276
    SizerOptions->Add(m_pChkMatchCase, 0, wxALL|wxADJUST_MINSIZE, 4);
 
277
    SizerOptions->Add(m_pChkRegExp, 0, wxALL|wxADJUST_MINSIZE, 4);
 
278
    SizerTop->Add(SizerOptions, 0, wxALL|wxEXPAND, 4);
 
279
    SizerThreadSearchOptions->Add(m_pChkThreadSearchEnable, 0, wxALL|wxADJUST_MINSIZE, 4);
 
280
    SizerThreadSearchOptions->Add(m_pChkUseDefaultOptionsForThreadSearch, 0, wxALL|wxADJUST_MINSIZE, 4);
 
281
    wxStaticText* m_pStaDefaultOptions = new wxStaticText(this, wxID_ANY, wxT("       ('Whole word' = true, 'Start word' = false, 'Match case' = true, 'Regular expression' = false)"));
 
282
    SizerThreadSearchOptions->Add(m_pStaDefaultOptions, 0, wxADJUST_MINSIZE, 0);
 
283
    SizerTop->Add(SizerThreadSearchOptions, 0, wxALL|wxEXPAND, 4);
 
284
    SizerThreadSearchLayoutGlobal->Add(m_pChkShowThreadSearchToolBar, 0, wxALL|wxADJUST_MINSIZE, 4);
 
285
    SizerThreadSearchLayoutGlobal->Add(m_pChkShowThreadSearchWidgets, 0, wxALL|wxADJUST_MINSIZE, 4);
 
286
    SizerThreadSearchLayoutGlobal->Add(m_pChkShowCodePreview, 0, wxALL|wxADJUST_MINSIZE, 4);
 
287
    SizerThreadSearchGridLayout->Add(SizerThreadSearchLayoutGlobal, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4);
 
288
    SizerListControlOptions->Add(m_pChkDisplayLogHeaders, 0, wxALL|wxADJUST_MINSIZE, 4);
 
289
    SizerListControlOptions->Add(m_pChkDrawLogLines, 0, wxALL|wxADJUST_MINSIZE, 4);
 
290
    SizerThreadSearchGridLayout->Add(SizerListControlOptions, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4);
 
291
    SizerThreadSearchGridLayout->Add(m_pRadPanelManagement, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4);
 
292
    SizerThreadSearchGridLayout->Add(m_pRadLoggerType, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 4);
 
293
    SizerThreadSearchGridLayout->Add(m_pRadSplitterWndMode, 0, wxALL|wxEXPAND, 4);
 
294
    SizerThreadSearchGridLayout->Add(m_pRadSortBy, 0, wxALL|wxEXPAND, 4);
 
295
    SizerThreadSearchGridLayout->AddGrowableCol(0);
 
296
    SizerThreadSearchGridLayout->AddGrowableCol(1);
 
297
    SizerThreadSearchLayout->Add(SizerThreadSearchGridLayout, 1, wxALL|wxEXPAND|wxADJUST_MINSIZE, 0);
 
298
    SizerTop->Add(SizerThreadSearchLayout, 0, wxALL|wxEXPAND, 4);
 
299
    SetAutoLayout(true);
 
300
    SetSizer(SizerTop);
 
301
    SizerTop->Fit(this);
 
302
    SizerTop->SetSizeHints(this);
 
303
    // end wxGlade
 
304
}
 
305
 
 
306
 
 
307
void ThreadSearchConfPanel::OnApply()
 
308
{
 
309
        ThreadSearchFindData findData;
 
310
 
 
311
        // Inits variable data from user values
 
312
        findData.SetFindText       (wxEmptyString);
 
313
        findData.SetHiddenSearch   (m_pPnlDirParams->GetSearchDirHidden());
 
314
        findData.SetRecursiveSearch(m_pPnlDirParams->GetSearchDirRecursively());
 
315
        findData.SetSearchPath     (m_pPnlDirParams->GetSearchDirPath());
 
316
        findData.SetSearchMask     (m_pPnlDirParams->GetSearchMask());
 
317
        findData.SetMatchWord      (m_pChkWholeWord->IsChecked());
 
318
        findData.SetStartWord      (m_pChkStartWord->IsChecked());
 
319
        findData.SetMatchCase      (m_pChkMatchCase->IsChecked());
 
320
        findData.SetRegEx          (m_pChkRegExp->IsChecked());
 
321
 
 
322
        findData.UpdateSearchScope(ScopeOpenFiles,      m_pPnlSearchIn->GetSearchInOpenFiles());
 
323
        findData.UpdateSearchScope(ScopeProjectFiles,   m_pPnlSearchIn->GetSearchInProjectFiles());
 
324
        findData.UpdateSearchScope(ScopeWorkspaceFiles, m_pPnlSearchIn->GetSearchInWorkspaceFiles());
 
325
        findData.UpdateSearchScope(ScopeDirectoryFiles, m_pPnlSearchIn->GetSearchInDirectory());
 
326
 
 
327
        // Updates plug-in with new datas
 
328
        m_ThreadSearchPlugin.SetFindData(findData);
 
329
        m_ThreadSearchPlugin.SetCtxMenuIntegration(m_pChkThreadSearchEnable->IsChecked());
 
330
        m_ThreadSearchPlugin.SetUseDefValsForThreadSearch(m_pChkUseDefaultOptionsForThreadSearch->IsChecked());
 
331
        m_ThreadSearchPlugin.SetShowSearchControls(m_pChkShowThreadSearchWidgets->IsChecked());
 
332
        m_ThreadSearchPlugin.SetShowCodePreview(m_pChkShowCodePreview->IsChecked());
 
333
        m_ThreadSearchPlugin.SetDisplayLogHeaders(m_pChkDisplayLogHeaders->IsChecked());
 
334
        m_ThreadSearchPlugin.SetDrawLogLines(m_pChkDrawLogLines->IsChecked());
 
335
 
 
336
    int radIndex = m_pRadPanelManagement->GetSelection();
 
337
    ThreadSearchViewManagerBase::eManagerTypes mgrType;
 
338
    switch (radIndex)
 
339
    {
 
340
                case 1 :
 
341
                {
 
342
                        mgrType = ThreadSearchViewManagerBase::TypeLayout;
 
343
                        break;
 
344
                }
 
345
                default:
 
346
                // case 0 :
 
347
                {
 
348
                        mgrType = ThreadSearchViewManagerBase::TypeMessagesNotebook;
 
349
                        break;
 
350
                }
 
351
    }
 
352
    m_ThreadSearchPlugin.SetManagerType(mgrType);
 
353
 
 
354
    radIndex = m_pRadLoggerType->GetSelection();
 
355
    ThreadSearchLoggerBase::eLoggerTypes lgrType;
 
356
    switch (radIndex)
 
357
    {
 
358
                case 1 :
 
359
                {
 
360
                        lgrType = ThreadSearchLoggerBase::TypeTree;
 
361
                        break;
 
362
                }
 
363
                default:
 
364
                // case 0 :
 
365
                {
 
366
                        lgrType = ThreadSearchLoggerBase::TypeList;
 
367
                        break;
 
368
                }
 
369
    }
 
370
    m_ThreadSearchPlugin.SetLoggerType(lgrType);
 
371
 
 
372
    radIndex = m_pRadSortBy->GetSelection();
 
373
    InsertIndexManager::eFileSorting sortingType;
 
374
    switch (radIndex)
 
375
    {
 
376
                case 1 :
 
377
                {
 
378
                        sortingType = InsertIndexManager::SortByFileName;
 
379
                        break;
 
380
                }
 
381
                default:
 
382
                // case 0 :
 
383
                {
 
384
                        sortingType = InsertIndexManager::SortByFilePath;
 
385
                        break;
 
386
                }
 
387
    }
 
388
    m_ThreadSearchPlugin.SetFileSorting(sortingType);
 
389
 
 
390
    radIndex = m_pRadSplitterWndMode->GetSelection();
 
391
    wxSplitMode splitterMode;
 
392
    switch (radIndex)
 
393
    {
 
394
                case 1 :
 
395
                {
 
396
                        splitterMode = wxSPLIT_VERTICAL;
 
397
                        break;
 
398
                }
 
399
                default:
 
400
                // case 0 :
 
401
                {
 
402
                        splitterMode = wxSPLIT_HORIZONTAL;
 
403
                        break;
 
404
                }
 
405
    }
 
406
    m_ThreadSearchPlugin.SetSplitterMode(splitterMode);
 
407
 
 
408
        // Updates toolbar visibility
 
409
        m_ThreadSearchPlugin.ShowToolBar(m_pChkShowThreadSearchToolBar->IsChecked());
 
410
 
 
411
        // Notifies plug-in observers (ThreadSearchView)
 
412
        m_ThreadSearchPlugin.Notify();
 
413
}
 
414