X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorPicture.cpp;h=1600bb081da91d2c472efc4e1e227f97c6d43a1f;hp=0be593115f491336237c5d711ccebe75096910c4;hb=ada42724cf083b0a311cf22260485d61516c25c8;hpb=77ae3ec9ac4dff78d7aa32d359be5a86fa192702 diff --git a/source/contacteditor/frmContactEditorPicture.cpp b/source/contacteditor/frmContactEditorPicture.cpp index 0be5931..1600bb0 100644 --- a/source/contacteditor/frmContactEditorPicture.cpp +++ b/source/contacteditor/frmContactEditorPicture.cpp @@ -37,7 +37,9 @@ frmContactEditorPictureADT( parent ) // Setup the window. EditorMode = FALSE; - sliPriority->Disable(); + priorityCtrl = new XABPriorityCtrl(tabGeneral); + szrGeneral->Add(priorityCtrl, 1, wxEXPAND, 5); + szrGeneral->Layout(); cmbType->Append(wxT("")); cmbType->Append(_("Home")); @@ -45,18 +47,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 +161,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 +212,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 +247,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 +278,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 +362,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); }