:
frmContactEditorPictureADT( parent )
{
+
+ // Setup the window.
+
EditorMode = FALSE;
sliPriority->Disable();
cmbType->Append(wxT(""));
cmbType->Append(_("Home"));
cmbType->Append(_("Work"));
+
}
void frmContactEditorPicture::EnablePriority( wxCommandEvent& event )
{
+
+ // Enable/disable the priority.
+
if (chkUsePref->IsChecked()){
sliPriority->Enable();
} else {
void frmContactEditorPicture::ProcessData( wxCommandEvent& event )
{
+
+ // Process data.
+
long ListCtrlIndex;
if (EditorMode == FALSE){
return;
}
- if (PictureLogo == TRUE){
-
+ if (PictureLogo == TRUE){
PictureListCtrlPtr->SetItem(longSelected, 0, _("Picture"));
} else {
void frmContactEditorPicture::CloseWindow( wxCommandEvent& event )
{
+
+ // Close this window.
+
this->Close();
+
}
void frmContactEditorPicture::SetEditorMode(bool EditMode)
{
+
+ // Set the editor mode.
+
// Set if the editor is adding or editing an address.
// FALSE = Add
// TRUE = Edit
striter = PictureListTypePtr->find(PictureListIndex);
- if (striter->first == PictureListIndex){
+ if (striter->first == PictureListIndex &&
+ striter != PictureListTypePtr->end()){
strValue = striter->second;
intiter = PictureListPrefPtr->find(PictureListIndex);
- if (intiter->first == PictureListIndex && intiter->second > 0){
+ if (intiter->first == PictureListIndex && intiter->second > 0 &&
+ intiter != PictureListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
bool PictureLogoIn )
{
+ // Setup the pointers.
+
PictureListPtr = PictureList;
PictureListAltIDPtr = PictureListAltID;
PictureListPIDPtr = PictureListPID;