[Igarden-commit] Garden/source/Document MaterialPictSelectDialog.cpp, 1.19.2.9, 1.19.2.10 Material
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2008-04-12 19:04:58
|
Update of /cvsroot/igarden/Garden/source/Document In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv22480/source/Document Modified Files: Tag: Release_branch_v1 MaterialPictSelectDialog.cpp MaterialPictSelectDialog.h Log Message: Load up metadata fields in picture select dialog. Add "created by" metadata field. Index: MaterialPictSelectDialog.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/MaterialPictSelectDialog.h,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.3 diff -C2 -d -r1.10.2.2 -r1.10.2.3 *** MaterialPictSelectDialog.h 21 Jul 2007 12:21:25 -0000 1.10.2.2 --- MaterialPictSelectDialog.h 12 Apr 2008 19:04:59 -0000 1.10.2.3 *************** *** 45,50 **** virtual long NumLocationChoices(); virtual void GetIndexedLocationChoiceName(long index, String &name); ! virtual void SelectLocationChoice(long index); ! virtual void SaveDefaultPictureProperties(String &title, String ©right); virtual long CreateLocationChoice(); --- 45,50 ---- virtual long NumLocationChoices(); virtual void GetIndexedLocationChoiceName(long index, String &name); ! virtual void SaveDefaultPictureProperties(String &title, String ©right, String &creator, long locationChoice); ! virtual void GetDefaultPictureProperties(String &title, String ©right, String &creator, long &locationChoice); virtual long CreateLocationChoice(); *************** *** 54,59 **** long DoHyperlinkHit( long arg, void* parg ); void SelectLocationChoiceBySiteName(char *url); PictureCell *_cell; - CGWorld *_defaultPicture; PictureInfo _defaultPictEntry; --- 54,60 ---- long DoHyperlinkHit( long arg, void* parg ); void SelectLocationChoiceBySiteName(char *url); + void SelectLocationChoice(long index); + PictureCell *_cell; CGWorld *_defaultPicture; PictureInfo _defaultPictEntry; Index: MaterialPictSelectDialog.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/MaterialPictSelectDialog.cpp,v retrieving revision 1.19.2.9 retrieving revision 1.19.2.10 diff -C2 -d -r1.19.2.9 -r1.19.2.10 *** MaterialPictSelectDialog.cpp 11 Apr 2008 10:39:00 -0000 1.19.2.9 --- MaterialPictSelectDialog.cpp 12 Apr 2008 19:04:59 -0000 1.19.2.10 *************** *** 278,282 **** XGFileSpecifier spec; bool foundPicture = false; - bool handled; XGFileHandle inHdl, outHdl; --- 278,281 ---- *************** *** 392,421 **** //******************************************* - /// SelectLocationChoice - // - void MaterialPictureSelectDialog::SelectLocationChoice(long index) - { - SourceMaterialFile *srcFile = SourceMaterialFile::GetSourceDatabase(); - InfoSupplier *sup; - XGUUID uid; - String extURL; - - if(index < 0) - _defaultPictEntry.SetSupplier(uid); // NilID - else - { - if(index < srcFile->NumSuppliers()) - { - sup = srcFile->GetIndexedSupplier(index); - sup->GetObjectID(uid); - extURL = sup->GetSiteURL(); - _defaultPictEntry.SetSupplier(uid); - _defaultPictEntry.SetExternalURL(extURL); - SetLocationMenuToMatch(index); - } - } - } - - //******************************************* /// CreateLocationChoice // --- 391,394 ---- *************** *** 437,446 **** /// SavePictureProperties // ! void MaterialPictureSelectDialog::SaveDefaultPictureProperties(String &title, String ©right) ! { _defaultPictEntry.SetTitle(title); _defaultPictEntry.SetCopyright(copyright); } //******************************************* /// OKClicked --- 410,452 ---- /// SavePictureProperties // ! void MaterialPictureSelectDialog::SaveDefaultPictureProperties(String &title, String ©right, String &creator, long locationChoice) ! { _defaultPictEntry.SetTitle(title); _defaultPictEntry.SetCopyright(copyright); + _defaultPictEntry.SetCreatedBy(creator); + SelectLocationChoice(locationChoice); + } + + //******************************************* + /// GetDefaultPictureProperties + // + void MaterialPictureSelectDialog::GetDefaultPictureProperties(String &title, String ©right, String &creator, long &locationChoice) + { + SourceMaterialFile *srcFile = SourceMaterialFile::GetSourceDatabase(); + InfoSupplier *sup; + XGUUID uid, supplierID, testID; + long i, count; + String extURL; + + title = _defaultPictEntry.GetTitle(); + copyright = _defaultPictEntry.GetCopyright(); + creator = _defaultPictEntry.GetCreatedBy(); + supplierID = _defaultPictEntry.GetSupplier(); + + locationChoice = -1; + count = srcFile->NumSuppliers(); + for(i = 0; i < count; i++) + { + sup = srcFile->GetIndexedSupplier(i); + sup->GetObjectID(testID); + if(testID == supplierID) + { + locationChoice = i; + break; + } + } } + //******************************************* /// OKClicked *************** *** 517,518 **** --- 523,546 ---- } + void MaterialPictureSelectDialog::SelectLocationChoice(long index) + { + SourceMaterialFile *srcFile = SourceMaterialFile::GetSourceDatabase(); + InfoSupplier *sup; + XGUUID uid; + String extURL; + + if(index < 0) + _defaultPictEntry.SetSupplier(uid); // NilID + else + { + if(index < srcFile->NumSuppliers()) + { + sup = srcFile->GetIndexedSupplier(index); + sup->GetObjectID(uid); + extURL = sup->GetSiteURL(); + _defaultPictEntry.SetSupplier(uid); + _defaultPictEntry.SetExternalURL(extURL); + SetLocationMenuToMatch(index); + } + } + } |