2 // This file is part of the aMule Project.
4 // Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org )
5 // Copyright (c) 2002-2008 Merkur ( devs@emule-project.net / http://www.emule-project.net )
7 // Any parts of this program derived from the xMule, lMule or eMule project,
8 // or contributed by third-party developers are copyrighted by their
11 // This program is free software; you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation; either version 2 of the License, or
14 // (at your option) any later version.
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
21 // You should have received a copy of the GNU General Public License
22 // along with this program; if not, write to the Free Software
23 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include <wx/gauge.h> // Do_not_auto_remove (win32)
30 #include <tags/FileTags.h>
32 #include "SearchDlg.h" // Interface declarations.
33 #include "SearchListCtrl.h" // Needed for CSearchListCtrl
34 #include "muuli_wdr.h" // Needed for IDC_STARTS
35 #include "amuleDlg.h" // Needed for CamuleDlg
36 #include "MuleNotebook.h"
37 #include "GetTickCount.h"
38 #include "Preferences.h"
39 #include "amule.h" // Needed for theApp
40 #include "SearchList.h" // Needed for CSearchList
41 #include <common/Format.h>
44 #define ID_SEARCHLISTCTRL wxID_HIGHEST+667
46 // just to keep compiler happy
47 static wxCommandEvent nullEvent
;
49 BEGIN_EVENT_TABLE(CSearchDlg
, wxPanel
)
50 EVT_BUTTON( IDC_STARTS
, CSearchDlg::OnBnClickedStart
)
51 EVT_TEXT_ENTER( IDC_SEARCHNAME
, CSearchDlg::OnBnClickedStart
)
53 EVT_BUTTON(IDC_CANCELS
, CSearchDlg::OnBnClickedStop
)
55 EVT_LIST_ITEM_SELECTED(ID_SEARCHLISTCTRL
, CSearchDlg::OnListItemSelected
)
57 EVT_BUTTON(IDC_SDOWNLOAD
, CSearchDlg::OnBnClickedDownload
)
58 EVT_BUTTON(IDC_SEARCH_RESET
, CSearchDlg::OnBnClickedReset
)
59 EVT_BUTTON(IDC_CLEAR_RESULTS
, CSearchDlg::OnBnClickedClear
)
61 EVT_CHECKBOX(IDC_EXTENDEDSEARCHCHECK
,CSearchDlg::OnExtendedSearchChange
)
62 EVT_CHECKBOX(IDC_FILTERCHECK
,CSearchDlg::OnFilterCheckChange
)
64 EVT_MULENOTEBOOK_PAGE_CLOSING(ID_NOTEBOOK
, CSearchDlg::OnSearchClosing
)
65 EVT_NOTEBOOK_PAGE_CHANGED(ID_NOTEBOOK
, CSearchDlg::OnSearchPageChanged
)
67 // Event handlers for the parameter fields getting changed
68 EVT_CUSTOM( wxEVT_COMMAND_TEXT_UPDATED
, IDC_SEARCHNAME
, CSearchDlg::OnFieldChanged
)
69 EVT_CUSTOM( wxEVT_COMMAND_TEXT_UPDATED
, IDC_EDITSEARCHEXTENSION
, CSearchDlg::OnFieldChanged
)
70 EVT_CUSTOM( wxEVT_COMMAND_SPINCTRL_UPDATED
, wxID_ANY
, CSearchDlg::OnFieldChanged
)
71 EVT_CUSTOM( wxEVT_COMMAND_CHOICE_SELECTED
, wxID_ANY
, CSearchDlg::OnFieldChanged
)
73 // Event handlers for the filter fields getting changed.
74 EVT_TEXT_ENTER(ID_FILTER_TEXT
, CSearchDlg::OnFilteringChange
)
75 EVT_CHECKBOX(ID_FILTER_INVERT
, CSearchDlg::OnFilteringChange
)
76 EVT_CHECKBOX(ID_FILTER_KNOWN
, CSearchDlg::OnFilteringChange
)
77 EVT_BUTTON(ID_FILTER
, CSearchDlg::OnFilteringChange
)
82 CSearchDlg::CSearchDlg(wxWindow
* pParent
)
83 : wxPanel(pParent
, -1)
85 m_last_search_time
= 0;
87 wxSizer
* content
= searchDlg(this, true);
88 content
->Show(this, true);
90 m_progressbar
= CastChild( ID_SEARCHPROGRESS
, wxGauge
);
91 m_progressbar
->SetRange(100);
93 m_notebook
= CastChild( ID_NOTEBOOK
, CMuleNotebook
);
95 #if defined(__WXMAC__)
96 //#warning TODO: restore the image list if/when wxMac supports locating the image
98 // Initialise the image list
99 wxImageList
* m_ImageList
= new wxImageList(16,16);
100 m_ImageList
->Add(amuleSpecial(3));
101 m_ImageList
->Add(amuleSpecial(4));
102 m_notebook
->AssignImageList(m_ImageList
);
106 wxChoice
* searchchoice
= CastChild( ID_SEARCHTYPE
, wxChoice
);
107 wxASSERT(searchchoice
);
108 wxASSERT(searchchoice
->GetString(0) == _("Local"));
109 wxASSERT(searchchoice
->GetString(2) == _("Kad"));
110 wxASSERT(searchchoice
->GetCount() == 4);
112 m_searchchoices
= searchchoice
->GetStrings();
114 // Let's break it now.
118 CastChild( IDC_TypeSearch
, wxChoice
)->SetSelection(0);
119 CastChild( IDC_SEARCHMINSIZE
, wxChoice
)->SetSelection(2);
120 CastChild( IDC_SEARCHMAXSIZE
, wxChoice
)->SetSelection(2);
122 // Not there initially.
123 s_searchsizer
->Show(s_extendedsizer
, false);
124 s_searchsizer
->Show(s_filtersizer
, false);
130 CSearchDlg::~CSearchDlg()
134 void CSearchDlg::FixSearchTypes()
136 wxChoice
* searchchoice
= CastChild( ID_SEARCHTYPE
, wxChoice
);
138 searchchoice
->Clear();
140 // We should have only filedonkey now. Let's insert stuff.
144 if (thePrefs::GetNetworkED2K()){
145 searchchoice
->Insert(m_searchchoices
[0], pos
++);
146 searchchoice
->Insert(m_searchchoices
[1], pos
++);
149 if (thePrefs::GetNetworkKademlia()) {
150 searchchoice
->Insert(m_searchchoices
[2], pos
++);
153 searchchoice
->Insert(m_searchchoices
[3], pos
++);
155 searchchoice
->SetSelection(0);
158 CSearchListCtrl
* CSearchDlg::GetSearchList( wxUIntPtr id
)
160 int nPages
= m_notebook
->GetPageCount();
161 for ( int i
= 0; i
< nPages
; i
++ ) {
162 CSearchListCtrl
* page
= dynamic_cast<CSearchListCtrl
*>(m_notebook
->GetPage(i
));
164 if (page
->GetSearchId() == id
) {
173 void CSearchDlg::AddResult(CSearchFile
* toadd
)
175 CSearchListCtrl
* outputwnd
= GetSearchList( toadd
->GetSearchID() );
178 outputwnd
->AddResult( toadd
);
180 // Update the result count
181 UpdateHitCount( outputwnd
);
186 void CSearchDlg::UpdateResult(CSearchFile
* toupdate
)
188 CSearchListCtrl
* outputwnd
= GetSearchList( toupdate
->GetSearchID() );
191 outputwnd
->UpdateResult( toupdate
);
193 // Update the result count
194 UpdateHitCount( outputwnd
);
199 void CSearchDlg::OnListItemSelected(wxListEvent
& event
)
201 FindWindow(IDC_SDOWNLOAD
)->Enable(true);
207 void CSearchDlg::OnExtendedSearchChange(wxCommandEvent
& event
)
209 s_searchsizer
->Show(s_extendedsizer
, event
.IsChecked());
215 void CSearchDlg::OnFilterCheckChange(wxCommandEvent
& event
)
217 s_searchsizer
->Show(s_filtersizer
, event
.IsChecked());
220 int nPages
= m_notebook
->GetPageCount();
221 for ( int i
= 0; i
< nPages
; i
++ ) {
222 CSearchListCtrl
* page
= dynamic_cast<CSearchListCtrl
*>(m_notebook
->GetPage(i
));
224 page
->EnableFiltering(event
.IsChecked());
226 UpdateHitCount(page
);
231 void CSearchDlg::OnSearchClosing(wxBookCtrlEvent
& evt
)
233 // Abort global search if it was last tab that was closed.
234 if ( evt
.GetSelection() == ((int)m_notebook
->GetPageCount() - 1 ) ) {
235 OnBnClickedStop(nullEvent
);
238 CSearchListCtrl
*ctrl
= dynamic_cast<CSearchListCtrl
*>(m_notebook
->GetPage(evt
.GetSelection()));
240 // Zero to avoid results added while destructing.
241 ctrl
->ShowResults(0);
242 theApp
->searchlist
->RemoveResults(ctrl
->GetSearchId());
244 // Do cleanups if this was the last tab
245 if ( m_notebook
->GetPageCount() == 1 ) {
246 FindWindow(IDC_SDOWNLOAD
)->Enable(FALSE
);
247 FindWindow(IDC_CLEAR_RESULTS
)->Enable(FALSE
);
252 void CSearchDlg::OnSearchPageChanged(wxBookCtrlEvent
& WXUNUSED(evt
))
254 int selection
= m_notebook
->GetSelection();
256 // Workaround for a bug in wxWidgets, where deletions of pages
257 // can result in an invalid selection. This has been reported as
258 // http://sourceforge.net/tracker/index.php?func=detail&aid=1865141&group_id=9863&atid=109863
259 if (selection
>= (int)m_notebook
->GetPageCount()) {
260 selection
= m_notebook
->GetPageCount() - 1;
263 // Only enable the Download button for pages where files have been selected
264 if ( selection
!= -1 ) {
265 CSearchListCtrl
*ctrl
= dynamic_cast<CSearchListCtrl
*>(m_notebook
->GetPage(selection
));
267 bool enable
= (ctrl
->GetSelectedItemCount() > 0);
268 FindWindow(IDC_SDOWNLOAD
)->Enable( enable
);
270 // set IDC_SEARCHNAME control to search text of currently selected tab
271 wxString SearchText
= m_notebook
->GetPageText(selection
).BeforeLast(wxT(' '));
273 if (SearchText
.StartsWith(wxT("!"), &rest
)) {
277 // This check is needed because some wxWidgets (tested with
278 // 2.8.7) will return an empty string during the page-changed
279 // event resulting from the first page to being inserted. This
280 // has been reported as patch #1895161:
281 // http://sourceforge.net/tracker/index.php?func=detail&aid=1895161&group_id=9863&atid=309863
282 if (SearchText
.Length()) {
283 CastChild(IDC_SEARCHNAME
, wxTextCtrl
)->SetValue(SearchText
);
287 // Select everything.
288 CastChild(IDC_SEARCHNAME
, wxTextCtrl
)->SetSelection(-1, -1);
294 void CSearchDlg::OnBnClickedStart(wxCommandEvent
& WXUNUSED(evt
))
296 wxString searchString
= CastChild( IDC_SEARCHNAME
, wxTextCtrl
)->GetValue();
297 searchString
.Trim(true);
298 searchString
.Trim(false);
300 if ( searchString
.IsEmpty() ) {
304 wxChoice
* choice
= CastChild( ID_SEARCHTYPE
, wxChoice
);
308 int searchtype
= choice
->GetSelection();
310 if (!thePrefs::GetNetworkED2K()) {
314 if (!thePrefs::GetNetworkKademlia()) {
318 switch ( searchtype
) {
325 // We musn't search more often than once every 2 secs
326 if ((GetTickCount() - m_last_search_time
) > 2000) {
327 m_last_search_time
= GetTickCount();
329 OnBnClickedStop(nullEvent
);
336 // Web Search (FileHash.com)
338 theApp
->amuledlg
->LaunchUrl(theApp
->amuledlg
->GenWebSearchUrl(searchString
, CamuleDlg::WS_FILEHASH
));
348 void CSearchDlg::OnFieldChanged( wxEvent
& WXUNUSED(evt
) )
352 // These are the IDs of the search-fields
353 int textfields
[] = { IDC_SEARCHNAME
, IDC_EDITSEARCHEXTENSION
};
355 for ( uint16 i
= 0; i
< itemsof(textfields
); i
++ ) {
356 enable
|= !CastChild( textfields
[i
], wxTextCtrl
)->GetValue().IsEmpty();
359 // Check if either of the dropdowns have been changed
360 enable
|= (CastChild(IDC_SEARCHMINSIZE
, wxChoice
)->GetSelection() != 2);
361 enable
|= (CastChild(IDC_SEARCHMAXSIZE
, wxChoice
)->GetSelection() != 2);
362 enable
|= (CastChild(IDC_TypeSearch
, wxChoice
)->GetSelection() > 0);
363 enable
|= (CastChild(ID_AUTOCATASSIGN
, wxChoice
)->GetSelection() > 0);
365 // These are the IDs of the search-fields
366 int spinfields
[] = { IDC_SPINSEARCHMIN
, IDC_SPINSEARCHMAX
, IDC_SPINSEARCHAVAIBILITY
};
367 for ( uint16 i
= 0; i
< itemsof(spinfields
); i
++ ) {
368 enable
|= (CastChild( spinfields
[i
], wxSpinCtrl
)->GetValue() > 0);
371 // Enable the "Reset" button if any fields contain text
372 FindWindow(IDC_SEARCH_RESET
)->Enable( enable
);
374 // Enable the Server Search button if the Name field contains text
375 enable
= !CastChild( IDC_SEARCHNAME
, wxTextCtrl
)->GetValue().IsEmpty();
376 FindWindow(IDC_STARTS
)->Enable( enable
);
380 void CSearchDlg::OnFilteringChange(wxCommandEvent
& WXUNUSED(evt
))
382 wxString filter
= CastChild(ID_FILTER_TEXT
, wxTextCtrl
)->GetValue();
383 bool invert
= CastChild(ID_FILTER_INVERT
, wxCheckBox
)->GetValue();
384 bool known
= CastChild(ID_FILTER_KNOWN
, wxCheckBox
)->GetValue();
386 // Check that the expression compiles before we try to assign it
387 // Otherwise we will get an error-dialog for each result-list.
388 if (wxRegEx(filter
, wxRE_DEFAULT
| wxRE_ICASE
).IsValid()) {
389 int nPages
= m_notebook
->GetPageCount();
390 for ( int i
= 0; i
< nPages
; i
++ ) {
391 CSearchListCtrl
* page
= dynamic_cast<CSearchListCtrl
*>(m_notebook
->GetPage(i
));
393 page
->SetFilter(filter
, invert
, known
);
395 UpdateHitCount(page
);
401 bool CSearchDlg::CheckTabNameExists(const wxString
& searchString
)
403 int nPages
= m_notebook
->GetPageCount();
404 for ( int i
= 0; i
< nPages
; i
++ ) {
405 // The BeforeLast(' ') is to strip the hit-count from the name
406 if ( m_notebook
->GetPageText(i
).BeforeLast(wxT(' ')) == searchString
) {
415 void CSearchDlg::CreateNewTab(const wxString
& searchString
, wxUIntPtr nSearchID
)
417 CSearchListCtrl
* list
= new CSearchListCtrl( (wxWindow
*)m_notebook
, ID_SEARCHLISTCTRL
, wxDefaultPosition
, wxDefaultSize
, wxLC_REPORT
|wxNO_BORDER
);
418 m_notebook
->AddPage(list
, searchString
, true, 0);
420 // Ensure that new results are filtered
421 bool enable
= CastChild(IDC_FILTERCHECK
, wxCheckBox
)->GetValue();
422 wxString filter
= CastChild(ID_FILTER_TEXT
, wxTextCtrl
)->GetValue();
423 bool invert
= CastChild(ID_FILTER_INVERT
, wxCheckBox
)->GetValue();
424 bool known
= CastChild(ID_FILTER_KNOWN
, wxCheckBox
)->GetValue();
426 list
->SetFilter(filter
, invert
, known
);
427 list
->EnableFiltering(enable
);
428 list
->ShowResults(nSearchID
);
431 FindWindow(IDC_CLEAR_RESULTS
)->Enable(true);
435 void CSearchDlg::OnBnClickedStop(wxCommandEvent
& WXUNUSED(evt
))
437 theApp
->searchlist
->StopGlobalSearch();
438 theApp
->searchlist
->StopKadSearch();
443 void CSearchDlg::ResetControls()
445 m_progressbar
->SetValue(0);
447 FindWindow(IDC_CANCELS
)->Disable();
448 FindWindow(IDC_STARTS
)->Enable(!CastChild( IDC_SEARCHNAME
, wxTextCtrl
)->GetValue().IsEmpty());
452 void CSearchDlg::LocalSearchEnd()
457 void CSearchDlg::KadSearchEnd(uint32 id
)
459 int nPages
= m_notebook
->GetPageCount();
460 for (int i
= 0; i
< nPages
; ++i
) {
461 CSearchListCtrl
* page
=
462 dynamic_cast<CSearchListCtrl
*>(m_notebook
->GetPage(i
));
463 if (page
->GetSearchId() == id
) {
465 if (m_notebook
->GetPageText(i
).StartsWith(wxT("!"),&rest
)) {
466 m_notebook
->SetPageText(i
,rest
);
472 void CSearchDlg::OnBnClickedDownload(wxCommandEvent
& WXUNUSED(evt
))
474 int sel
= m_notebook
->GetSelection();
476 CSearchListCtrl
* list
= dynamic_cast<CSearchListCtrl
*>(m_notebook
->GetPage(sel
));
478 // Download with items added to category specified in the drop-down menu
479 list
->DownloadSelected();
484 void CSearchDlg::OnBnClickedClear(wxCommandEvent
& WXUNUSED(ev
))
486 OnBnClickedStop(nullEvent
);
488 m_notebook
->DeleteAllPages();
490 FindWindow(IDC_CLEAR_RESULTS
)->Enable(FALSE
);
491 FindWindow(IDC_SDOWNLOAD
)->Enable(FALSE
);
495 void CSearchDlg::StartNewSearch()
497 static uint32 m_nSearchID
= 0;
500 FindWindow(IDC_STARTS
)->Disable();
501 FindWindow(IDC_SDOWNLOAD
)->Disable();
502 FindWindow(IDC_CANCELS
)->Enable();
504 CSearchList::CSearchParams params
;
506 params
.searchString
= CastChild( IDC_SEARCHNAME
, wxTextCtrl
)->GetValue();
507 params
.searchString
.Trim(true);
508 params
.searchString
.Trim(false);
510 if (params
.searchString
.IsEmpty()) {
514 if (CastChild(IDC_EXTENDEDSEARCHCHECK
, wxCheckBox
)->GetValue()) {
515 params
.extension
= CastChild( IDC_EDITSEARCHEXTENSION
, wxTextCtrl
)->GetValue();
517 uint32 sizemin
= GetTypeSize( (uint8
) CastChild( IDC_SEARCHMINSIZE
, wxChoice
)->GetSelection() );
518 uint32 sizemax
= GetTypeSize( (uint8
) CastChild( IDC_SEARCHMAXSIZE
, wxChoice
)->GetSelection() );
520 // Parameter Minimum Size
521 params
.minSize
= (uint64_t)(CastChild( IDC_SPINSEARCHMIN
, wxSpinCtrl
)->GetValue()) * (uint64_t)sizemin
;
523 // Parameter Maximum Size
524 params
.maxSize
= (uint64_t)(CastChild( IDC_SPINSEARCHMAX
, wxSpinCtrl
)->GetValue()) * (uint64_t)sizemax
;
526 if ((params
.maxSize
< params
.minSize
) && (params
.maxSize
)) {
527 wxMessageDialog
dlg(this,
528 _("Min size must be smaller than max size. Max size ignored."),
529 _("Search warning"), wxOK
|wxCENTRE
|wxICON_INFORMATION
);
535 // Parameter Availability
536 params
.availability
= CastChild( IDC_SPINSEARCHAVAIBILITY
, wxSpinCtrl
)->GetValue();
538 switch ( CastChild( IDC_TypeSearch
, wxChoice
)->GetSelection() ) {
539 case 0: params
.typeText
= wxEmptyString
; break;
540 case 1: params
.typeText
= ED2KFTSTR_ARCHIVE
; break;
541 case 2: params
.typeText
= ED2KFTSTR_AUDIO
; break;
542 case 3: params
.typeText
= ED2KFTSTR_CDIMAGE
; break;
543 case 4: params
.typeText
= ED2KFTSTR_IMAGE
; break;
544 case 5: params
.typeText
= ED2KFTSTR_PROGRAM
; break;
545 case 6: params
.typeText
= ED2KFTSTR_DOCUMENT
; break;
546 case 7: params
.typeText
= ED2KFTSTR_VIDEO
; break;
548 AddDebugLogLineM( true, logGeneral
,
549 CFormat( wxT("Warning! Unknown search-category (%s) selected!") )
556 SearchType search_type
= KadSearch
;
558 int selection
= CastChild( ID_SEARCHTYPE
, wxChoice
)->GetSelection();
560 if (!thePrefs::GetNetworkED2K()) {
564 if (!thePrefs::GetNetworkKademlia()) {
569 case 0: // Local Search
570 search_type
= LocalSearch
;
572 case 1: // Global Search
573 search_type
= GlobalSearch
;
575 case 2: // Kad search
576 search_type
= KadSearch
;
579 // Should never happen
584 uint32 real_id
= m_nSearchID
;
585 wxString error
= theApp
->searchlist
->StartNewSearch(&real_id
, search_type
, params
);
586 if (!error
.IsEmpty()) {
587 // Search failed / Remote in progress
588 wxMessageBox(error
, _("Search warning"),
589 wxOK
| wxCENTRE
| wxICON_INFORMATION
, this);
590 FindWindow(IDC_STARTS
)->Enable();
591 FindWindow(IDC_SDOWNLOAD
)->Disable();
592 FindWindow(IDC_CANCELS
)->Disable();
595 ((search_type
== KadSearch
) ? wxT("!") : wxEmptyString
) +
596 params
.searchString
+ wxT(" (0)"),
602 void CSearchDlg::UpdateHitCount(CSearchListCtrl
* page
)
604 for ( uint32 i
= 0; i
< (uint32
)m_notebook
->GetPageCount(); ++i
) {
605 if ( m_notebook
->GetPage(i
) == page
) {
606 wxString searchtxt
= m_notebook
->GetPageText(i
).BeforeLast(wxT(' '));
608 if ( !searchtxt
.IsEmpty() ) {
609 size_t shown
= page
->GetItemCount();
610 size_t hidden
= page
->GetHiddenItemCount();
613 searchtxt
+= wxString::Format(wxT(" (%u/%u)"), shown
, shown
+ hidden
);
615 searchtxt
+= wxString::Format(wxT(" (%u)"), shown
);
618 m_notebook
->SetPageText(i
, searchtxt
);
627 void CSearchDlg::OnBnClickedReset(wxCommandEvent
& WXUNUSED(evt
))
629 CastChild( IDC_SEARCHNAME
, wxTextCtrl
)->Clear();
630 CastChild( IDC_EDITSEARCHEXTENSION
, wxTextCtrl
)->Clear();
631 CastChild( IDC_SPINSEARCHMIN
, wxSpinCtrl
)->SetValue(0);
632 CastChild( IDC_SEARCHMINSIZE
, wxChoice
)->SetSelection(2);
633 CastChild( IDC_SPINSEARCHMAX
, wxSpinCtrl
)->SetValue(0);
634 CastChild( IDC_SEARCHMAXSIZE
, wxChoice
)->SetSelection(2);
635 CastChild( IDC_SPINSEARCHAVAIBILITY
, wxSpinCtrl
)->SetValue(0);
636 CastChild( IDC_TypeSearch
, wxChoice
)->SetSelection(0);
637 CastChild( ID_AUTOCATASSIGN
, wxChoice
)->SetSelection(0);
639 FindWindow(IDC_SEARCH_RESET
)->Enable(FALSE
);
643 void CSearchDlg::UpdateCatChoice()
645 wxChoice
* c_cat
= CastChild( ID_AUTOCATASSIGN
, wxChoice
);
648 c_cat
->Append(_("Main"));
650 for ( unsigned i
= 1; i
< theApp
->glob_prefs
->GetCatCount(); i
++ ) {
651 c_cat
->Append( theApp
->glob_prefs
->GetCategory( i
)->title
);
654 c_cat
->SetSelection( 0 );
657 void CSearchDlg::UpdateProgress(uint32 new_value
) {
658 m_progressbar
->SetValue(new_value
);
660 // File_checked_for_headers