// frmSearch.cpp - Search form.
//
-// (c) 2012-2015 Xestia Software Development.
+// (c) 2012-2017 Xestia Software Development.
//
// This file is part of Xestia Address Book.
//
frmSearchADT( parent )
{
+ // Setup the application icon.
+
+ wxMemoryInputStream istream(bigimgs_searchicon_png, sizeof(bigimgs_searchicon_png));
+ wxImage bigimgs_searchiconi(istream, wxBITMAP_TYPE_PNG);
+ wxBitmap searchiconbmp(bigimgs_searchiconi, -1);
+ wxIcon searchicon;
+ searchicon.CopyFromBitmap(searchiconbmp);
+ this->SetIcon(searchicon);
+
// Setup the search window.
XABSearchPanel *InitPanel = new XABSearchPanel( tabSearch );
}
+ // Clear the status bar.
+
+ wxCommandEvent statusResetEvent (SE_SBUPDATE);
+
+ wxString *statusReset = new wxString(wxT(""));
+
+ statusResetEvent.SetClientData(statusReset);
+ wxPostEvent(this, statusResetEvent);
+
// Add a search settings with the default things.
ScrollGen = 0;
// Close window.
- WindowData *WData = new WindowData;
+ if (SearchMode == false){
+
+ WindowData *WData = new WindowData;
- WData->DataType = 2;
- WData->WindowPointer = this;
- WData->WindowID = SearchUID;
+ WData->DataType = 2;
+ WData->WindowPointer = this;
+ WData->WindowID = SearchUID;
- wxCommandEvent delevent(WINDOW_CLOSE);
- delevent.SetClientData(WData);
- wxPostEvent(GetParent(), delevent);
+ wxCommandEvent delevent(WINDOW_CLOSE);
+ delevent.SetClientData(WData);
+ wxPostEvent(GetParent(), delevent);
- wxCommandEvent rs(CE_REMOVESEARCH);
- wxPostEvent(this, rs);
+ wxCommandEvent rs(CE_REMOVESEARCH);
+ wxPostEvent(this, rs);
- WData = NULL;
+ WData = NULL;
+
+ }
this->Destroy();