Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiaab
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
frmContactEditorRoles: Implemented priority control
[xestiaab/.git]
/
source
/
contacteditor
/
frmContactEditorRoles.cpp
diff --git
a/source/contacteditor/frmContactEditorRoles.cpp
b/source/contacteditor/frmContactEditorRoles.cpp
index
30a20b4
..
43f6b9e
100644
(file)
--- a/
source/contacteditor/frmContactEditorRoles.cpp
+++ b/
source/contacteditor/frmContactEditorRoles.cpp
@@
-30,19
+30,9
@@
frmContactEditorRolesADT( parent )
// Setup the window.
EditorMode = FALSE;
// Setup the window.
EditorMode = FALSE;
- sliPriority->Disable();
-}
-
-void frmContactEditorRoles::EnablePriority( wxCommandEvent& event )
-{
- // Enable/disable the priority setting.
-
- if (chkUsePref->IsChecked()){
- sliPriority->Enable();
- } else {
- sliPriority->Disable();
- }
+ priorityCtrl = new XABPriorityCtrl(tabGeneral);
+ szrGeneral->Add(priorityCtrl, 1, wxEXPAND, 5);
}
}
@@
-83,9
+73,9
@@
void frmContactEditorRoles::ProcessAction( wxCommandEvent& event )
// Add the website priority.
// Add the website priority.
- if (
chkUsePref->Is
Checked()){
+ if (
priorityCtrl->IsPriority
Checked()){
- RolesListPrefPtr->insert(std::make_pair(RolesListIndex,
sliPriority
->GetValue()));
+ RolesListPrefPtr->insert(std::make_pair(RolesListIndex,
priorityCtrl
->GetValue()));
} else {
} else {
@@
-102,11
+92,11
@@
void frmContactEditorRoles::ProcessAction( wxCommandEvent& event )
coldata.SetText(txtRole->GetValue());
ListCtrlIndex = RolesListCtrlPtr->InsertItem(coldata);
coldata.SetText(txtRole->GetValue());
ListCtrlIndex = RolesListCtrlPtr->InsertItem(coldata);
- if (
chkUsePref->Is
Checked()){
+ if (
priorityCtrl->IsPriority
Checked()){
- RolesListCtrlPtr->SetItem(ListCtrlIndex, 1, wxString::Format(wxT("%i"),
sliPriority
->GetValue()));
+ RolesListCtrlPtr->SetItem(ListCtrlIndex, 1, wxString::Format(wxT("%i"),
priorityCtrl
->GetValue()));
- }
+ }
this->Close();
this->Close();
@@
-122,15
+112,15
@@
void frmContactEditorRoles::ProcessAction( wxCommandEvent& event )
RolesListPrefPtr->erase(RolesListIndex);
RolesListPrefPtr->erase(RolesListIndex);
- if (
chkUsePref->Is
Checked()){
+ if (
priorityCtrl->IsPriority
Checked()){
- RolesListPrefPtr->insert(std::make_pair(RolesListIndex,
sliPriority
->GetValue()));
+ RolesListPrefPtr->insert(std::make_pair(RolesListIndex,
priorityCtrl
->GetValue()));
} else {
RolesListPrefPtr->insert(std::make_pair(RolesListIndex, 0));
} else {
RolesListPrefPtr->insert(std::make_pair(RolesListIndex, 0));
- }
+ }
// Update the form.
// Update the form.
@@
-144,15
+134,15
@@
void frmContactEditorRoles::ProcessAction( wxCommandEvent& event )
RolesListCtrlPtr->SetItem(longSelected, 0, txtRole->GetValue());
RolesListCtrlPtr->SetItem(longSelected, 0, txtRole->GetValue());
- if (
chkUsePref->Is
Checked()){
+ if (
priorityCtrl->IsPriority
Checked()){
- RolesListCtrlPtr->SetItem(longSelected, 1, wxString::Format(wxT("%i"),
sliPriority
->GetValue()));
+ RolesListCtrlPtr->SetItem(longSelected, 1, wxString::Format(wxT("%i"),
priorityCtrl
->GetValue()));
} else {
RolesListCtrlPtr->SetItem(longSelected, 1, wxT(""));
} else {
RolesListCtrlPtr->SetItem(longSelected, 1, wxT(""));
- }
+ }
this->Close();
this->Close();
@@
-205,9
+195,8
@@
void frmContactEditorRoles::SetEditorMode(bool EditMode, SectionType SectType)
if (intiter->first == RolesListIndex && intiter->second > 0 &&
intiter != RolesListPrefPtr->end()){
if (intiter->first == RolesListIndex && intiter->second > 0 &&
intiter != RolesListPrefPtr->end()){
- sliPriority->SetValue(intiter->second);
- sliPriority->Enable();
- chkUsePref->SetValue(TRUE);
+ priorityCtrl->SetValue(intiter->second);
+ priorityCtrl->EnablePriority(true);
}
}
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy