X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorPicture.cpp;h=e28b271d3770a5b6aaf395fc3aef01f00c5aa364;hp=0be593115f491336237c5d711ccebe75096910c4;hb=c240addfc3f8e8686707b012ac9032b9e2411b91;hpb=10f49df37ad495d12b4edb62efbffc0bf2d1d57b diff --git a/source/contacteditor/frmContactEditorPicture.cpp b/source/contacteditor/frmContactEditorPicture.cpp index 0be5931..e28b271 100644 --- a/source/contacteditor/frmContactEditorPicture.cpp +++ b/source/contacteditor/frmContactEditorPicture.cpp @@ -37,7 +37,8 @@ frmContactEditorPictureADT( parent ) // Setup the window. EditorMode = FALSE; - sliPriority->Disable(); + priorityCtrl = new XABPriorityCtrl(tabGeneral); + szrGeneral->Add(priorityCtrl, 1, wxEXPAND, 5); cmbType->Append(wxT("")); cmbType->Append(_("Home")); @@ -45,18 +46,6 @@ frmContactEditorPictureADT( parent ) } -void frmContactEditorPicture::EnablePriority( wxCommandEvent& event ) -{ - - // Enable/disable the priority. - - if (chkUsePref->IsChecked()){ - sliPriority->Enable(); - } else { - sliPriority->Disable(); - } -} - void frmContactEditorPicture::ProcessData( wxCommandEvent& event ) { @@ -171,9 +160,9 @@ void frmContactEditorPicture::ProcessData( wxCommandEvent& event ) // Setup Organisation Priority. - if (chkUsePref->IsChecked()){ + if (priorityCtrl->IsPriorityChecked()){ - PictureListPrefPtr->insert(std::make_pair(PictureListIndex, sliPriority->GetValue())); + PictureListPrefPtr->insert(std::make_pair(PictureListIndex, priorityCtrl->GetValue())); } else { @@ -222,9 +211,9 @@ void frmContactEditorPicture::ProcessData( wxCommandEvent& event ) } - if (chkUsePref->IsChecked()){ + if (priorityCtrl->IsPriorityChecked()){ - PictureListCtrlPtr->SetItem(ListCtrlIndex, 2, wxString::Format(wxT("%i"), sliPriority->GetValue())); + PictureListCtrlPtr->SetItem(ListCtrlIndex, 2, wxString::Format(wxT("%i"), priorityCtrl->GetValue())); } @@ -257,9 +246,9 @@ void frmContactEditorPicture::ProcessData( wxCommandEvent& event ) PictureListPrefPtr->erase(PictureListIndex); - if (chkUsePref->IsChecked()){ + if (priorityCtrl->IsPriorityChecked()){ - PictureListPrefPtr->insert(std::make_pair(PictureListIndex, sliPriority->GetValue())); + PictureListPrefPtr->insert(std::make_pair(PictureListIndex, priorityCtrl->GetValue())); } else { @@ -288,9 +277,9 @@ void frmContactEditorPicture::ProcessData( wxCommandEvent& event ) PictureListCtrlPtr->SetItem(longSelected, 1, strValue); - if (chkUsePref->IsChecked()){ + if (priorityCtrl->IsPriorityChecked()){ - PictureListCtrlPtr->SetItem(longSelected, 2, wxString::Format(wxT("%i"), sliPriority->GetValue())); + PictureListCtrlPtr->SetItem(longSelected, 2, wxString::Format(wxT("%i"), priorityCtrl->GetValue())); } else { @@ -372,9 +361,8 @@ void frmContactEditorPicture::SetEditorMode(bool EditMode) if (intiter->first == PictureListIndex && intiter->second > 0 && intiter != PictureListPrefPtr->end()){ - sliPriority->SetValue(intiter->second); - sliPriority->Enable(); - chkUsePref->SetValue(TRUE); + priorityCtrl->SetValue(intiter->second); + priorityCtrl->EnablePriority(true); }