[Igarden-commit] Garden/source/SourceMaterialDB QueryDialog.h, 1.8.2.2, 1.8.2.3 QueryDialog.cpp, 1.
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2008-05-12 11:18:20
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23264/source/SourceMaterialDB Modified Files: Tag: Release_branch_v1 QueryDialog.h QueryDialog.cpp Log Message: Handle zone as one of the search parameters (from Site Data) Index: QueryDialog.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/QueryDialog.cpp,v retrieving revision 1.25.2.9 retrieving revision 1.25.2.10 diff -C2 -d -r1.25.2.9 -r1.25.2.10 *** QueryDialog.cpp 11 May 2008 12:43:08 -0000 1.25.2.9 --- QueryDialog.cpp 12 May 2008 11:18:20 -0000 1.25.2.10 *************** *** 140,143 **** --- 140,146 ---- QueryDialog::QueryDialog( CGardenForm* super, SourceMaterialFile* database ) { + PersistentTags *prefs = GetActivePreferences(super ? super->GetFile() : NULL); + Int32 zonePref; + _query = new SourceQuery(database); _super = super; *************** *** 146,153 **** _timer = new XGTimer; _advertDisplayed = false; ! UpdateSummary(); ! ! PersistentTags *prefs = GetActivePreferences(super ? super->GetFile() : NULL); DoPreferencesChanged(0, prefs); } // --------------------------------------------------------------------------- --- 149,155 ---- _timer = new XGTimer; _advertDisplayed = false; ! DoPreferencesChanged(0, prefs); + UpdateSummary(); } // --------------------------------------------------------------------------- *************** *** 741,748 **** void QueryDialog::ClearControls() { ! XGEditText *et; DBPersist::SetMaxRows(_query->GetStorage(), kSearchesCID, 0); _query = new SourceQuery(SourceMaterialFile::GetSourceDatabase()); SetupControlsFromAttributes(); --- 743,755 ---- void QueryDialog::ClearControls() { ! XGEditText *et; DBPersist::SetMaxRows(_query->GetStorage(), kSearchesCID, 0); _query = new SourceQuery(SourceMaterialFile::GetSourceDatabase()); + + PRECONDITION(_query != NULL); + _query->EnableRemoteSearch(GlobalTags::_globalPrefs->GetBoolPref(kUseInternetPref)); + + LoadZoneData(); SetupControlsFromAttributes(); *************** *** 753,756 **** --- 760,777 ---- } + void QueryDialog::LoadZoneData() + { + Int32 zonePref; + + PersistentTags *prefs = GetActivePreferences(_super ? _super->GetFile() : NULL); + if(prefs->GetInt32Pref(kZoneSiteData, zonePref)) + { + zonePref = ToggleRangeBits(0x00000001, zonePref); + _query->SetInt32(kPlantZone, zonePref); + } + else + _query->ClearInt32(kPlantZone); + } + // --------------------------------------------------------------------------- // void QueryDialog::HandleAttributeMenuMsg( Int32 panelIndex, Int32 viewID ) *************** *** 1773,1779 **** // long QueryDialog::DoPreferencesChanged( long /*arg*/, void* /*parg*/ ) ! { PRECONDITION(_query != NULL); _query->EnableRemoteSearch(GlobalTags::_globalPrefs->GetBoolPref(kUseInternetPref)); return(0); --- 1794,1802 ---- // long QueryDialog::DoPreferencesChanged( long /*arg*/, void* /*parg*/ ) ! { PRECONDITION(_query != NULL); _query->EnableRemoteSearch(GlobalTags::_globalPrefs->GetBoolPref(kUseInternetPref)); + LoadZoneData(); + QueryDialog::UpdateSummary(); return(0); Index: QueryDialog.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/QueryDialog.h,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** QueryDialog.h 19 Mar 2008 01:07:43 -0000 1.8.2.2 --- QueryDialog.h 12 May 2008 11:18:19 -0000 1.8.2.3 *************** *** 89,92 **** --- 89,93 ---- void SetStatus(const char *message); void Initialize(XGWindow* dialog); + void LoadZoneData(); void DoSetStatus(long arg, void* parg); long DoGetMenuStatus(long arg, void* parg); |