X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fsearch%2FfrmSearch.cpp;h=8d8530c5312f153a94de7f032c01a745d2d71b5c;hb=16ba57d640fd0412351c4cf8d324f02fdb2b2987;hp=6d3b891f02b6d3d12e2f8611f4efa913ff49a832;hpb=5e1d22ce3c6b42be0b5f7e78bc21415ad1636bf1;p=xestiaab%2F.git
diff --git a/source/search/frmSearch.cpp b/source/search/frmSearch.cpp
index 6d3b891..8d8530c 100644
--- a/source/search/frmSearch.cpp
+++ b/source/search/frmSearch.cpp
@@ -1,6 +1,6 @@
// frmSearch.cpp - Search form.
//
-// (c) 2012-2015 Xestia Software Development.
+// (c) 2012-2017 Xestia Software Development.
//
// This file is part of Xestia Address Book.
//
@@ -17,14 +17,7 @@
// with Xestia Address Book. If not, see
#include "frmSearch.h"
-#include "../frmMain.h"
-#include "../frmContact.h"
-#include "frmSearchAccounts.h"
-#include "../common/preferences.h"
-#include "../common/dirs.h"
-#include "../vcard/vcard.h"
-#include
#define SEARCHSETTINGS_MAX 15
@@ -59,6 +52,15 @@ frmSearch::frmSearch( wxWindow* parent )
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 );
@@ -232,6 +234,15 @@ void frmSearch::ResetContacts( wxCommandEvent& event )
}
+ // 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;
@@ -257,7 +268,6 @@ void frmSearch::AddSearchSetting( wxCommandEvent& event )
NewPanel->SetupPointers(this);
NewPanel->SetupInteger(ScrollGen);
szrSearch->Add(NewPanel, 1, wxEXPAND|wxGROW, 5);
- //szrSearch->Fit(tabSearch);
szrSearch->FitInside(tabSearch);
szrSearch->Layout();
szrSearch->RecalcSizes();
@@ -323,8 +333,6 @@ void frmSearch::RemoveSearchSetting( wxCommandEvent& event )
delete XABSPPtr;
XABSPPtr = NULL;
- //szrSearch->Fit(tabSearch);
-
if (SearchFrames.size() < SEARCHSETTINGS_MAX && SearchFrames.size() > 1){
for (std::map::iterator iter = SearchFrames.begin();
@@ -466,20 +474,24 @@ void frmSearch::CloseWindow( wxCloseEvent& event ){
// 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();