:
frmContactEditorIMADT( parent )
{
+
+ // Setup the window.
+
EditorMode = FALSE;
sliPriority->Disable();
void frmContactEditorIM::EnablePriority( wxCommandEvent& event )
{
+
+ // Enable/disable the priority setting.
+
if (chkUsePref->IsChecked()){
sliPriority->Enable();
} else {
sliPriority->Disable();
}
+
}
void frmContactEditorIM::ProcessAction( wxCommandEvent& event )
{
+ // Process the action.
+
long ListCtrlIndex;
// Check if IM type is empty and if it is then
void frmContactEditorIM::CloseWindow( wxCommandEvent& event )
{
+
+ // Close the window.
+
this->Close();
+
}
void frmContactEditorIM::SetEditorMode(bool EditMode, SectionType SectType)
{
+
+ // Set the editor mode.
+
// Set if the editor is adding or editing an address.
// FALSE = Add
// TRUE = Edit
}
- strIMUser = IMListPtr->find(IMListIndex)->second;
- strIMType = IMListTypeInfoPtr->find(IMListIndex)->second;
+ if (IMListPtr->find(IMListIndex) != IMListPtr->end()){
+
+ strIMUser = IMListPtr->find(IMListIndex)->second;
+
+ }
+
+ if (IMListTypeInfoPtr->find(IMListIndex) != IMListTypeInfoPtr->end()){
+
+ strIMType = IMListTypeInfoPtr->find(IMListIndex)->second;
+
+ }
if (strIMType == wxT("aim")){
intiter = IMListPrefPtr->find(IMListIndex);
- if (intiter->first == IMListIndex && intiter->second > 0){
+ if (intiter->first == IMListIndex && intiter->second > 0 &&
+ intiter != IMListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
int IMIndex )
{
+ // Setup the pointers.
+
IMListPtr = IMList;
IMListAltIDPtr = IMListAltID;
IMListPIDPtr = IMListPID;