X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditor-Calendar.cpp;h=aa9b3defe2a64c0a03a13afd93a12d33d9227eae;hb=26352297f5f767517d8cc1c1be9c5616f86af169;hp=95235c1bb19351dc74aa1dff57772aed6ff497a5;hpb=7c7382aec816add24a96a03f4cd37c461f48e9b6;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditor-Calendar.cpp b/source/contacteditor/frmContactEditor-Calendar.cpp index 95235c1..aa9b3de 100644 --- a/source/contacteditor/frmContactEditor-Calendar.cpp +++ b/source/contacteditor/frmContactEditor-Calendar.cpp @@ -22,11 +22,10 @@ void frmContactEditor::AddCalendarAddress( wxCommandEvent& event ) { - int intResult = 0; + // Bring up the window to add the calendar address. frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.CalendarList); frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList, &ContactEditorData.CalendarListAltID, &ContactEditorData.CalendarListPID, @@ -38,16 +37,19 @@ void frmContactEditor::AddCalendarAddress( wxCommandEvent& event ) frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; - + intValueSeek++; + } void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event ) { + // Bring up the window to modify the calendar address. + long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCalendarAddresses, + if (lboCalendarAddresses->GetItemCount() == 0 || !GetSelectedItem(lboCalendarAddresses, &longSelected, &intSelectedData)){ @@ -74,10 +76,12 @@ void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event ) void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event ) { + // Bring up the window to delete the calendar address. + long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCalendarAddresses, + if (lboCalendarAddresses->GetItemCount() == 0 || !GetSelectedItem(lboCalendarAddresses, &longSelected, &intSelectedData)){ @@ -96,11 +100,10 @@ void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event ) void frmContactEditor::AddCalendarRequest( wxCommandEvent& event ) { - int intResult = 0; + // Bring up the window to add a calendar request address. frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.CalendarRequestList); frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList, &ContactEditorData.CalendarRequestListAltID, &ContactEditorData.CalendarRequestListPID, @@ -112,16 +115,19 @@ void frmContactEditor::AddCalendarRequest( wxCommandEvent& event ) frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; - + intValueSeek++; + } void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event ) { + // Bring up the window to modify a calendar request address. + long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCalendarRequestAddress, + if (lboCalendarRequestAddress->GetItemCount() == 0 || !GetSelectedItem(lboCalendarRequestAddress, &longSelected, &intSelectedData)){ @@ -148,10 +154,12 @@ void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event ) void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event ) { + // Bring up the window to delete a calendar request address. + long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboCalendarRequestAddress, + if (lboCalendarRequestAddress->GetItemCount() == 0 || !GetSelectedItem(lboCalendarRequestAddress, &longSelected, &intSelectedData)){ @@ -171,11 +179,10 @@ void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event ) void frmContactEditor::AddFreeBusy( wxCommandEvent& event ) { - int intResult = 0; + // Bring up the window to add a calendar free/busy address. frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetEditorMode(FALSE); - intResult = GetLastInt(&ContactEditorData.FreeBusyList); frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList, &ContactEditorData.FreeBusyListAltID, &ContactEditorData.FreeBusyListPID, @@ -187,16 +194,19 @@ void frmContactEditor::AddFreeBusy( wxCommandEvent& event ) frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; - + intValueSeek++; + } void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event ) { + // Bring up the window to modify a calendar free/busy address. + long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboFreeBusyAddresses, + if (lboFreeBusyAddresses->GetItemCount() == 0 || !GetSelectedItem(lboFreeBusyAddresses, &longSelected, &intSelectedData)){ @@ -223,10 +233,12 @@ void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event ) void frmContactEditor::DeleteFreeBusy( wxCommandEvent& event ) { + // Bring up the window to delete a calendar free/busy address. + long longSelected = -1; int intSelectedData = 0; - if (!GetSelectedItem(lboFreeBusyAddresses, + if (lboFreeBusyAddresses->GetItemCount() == 0 || !GetSelectedItem(lboFreeBusyAddresses, &longSelected, &intSelectedData)){