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
frmContactEditorIM: Implemented priority control
[xestiaab/.git]
/
source
/
contacteditor
/
frmContactEditorIM.cpp
diff --git
a/source/contacteditor/frmContactEditorIM.cpp
b/source/contacteditor/frmContactEditorIM.cpp
index
dba7cba
..
87b8cb8
100644
(file)
--- a/
source/contacteditor/frmContactEditorIM.cpp
+++ b/
source/contacteditor/frmContactEditorIM.cpp
@@
-30,7
+30,8
@@
frmContactEditorIMADT( parent )
// Setup the window.
EditorMode = FALSE;
// Setup the window.
EditorMode = FALSE;
- sliPriority->Disable();
+ priorityCtrl = new XABPriorityCtrl(tabGeneral);
+ szrGeneral->Add(priorityCtrl, 1, wxEXPAND, 5);
// Add some values to the drop down box for IM types.
// Add some values to the drop down box for IM types.
@@
-44,19
+45,6
@@
frmContactEditorIMADT( parent )
}
}
-void frmContactEditorIM::EnablePriority( wxCommandEvent& event )
-{
-
- // Enable/disable the priority setting.
-
- if (chkUsePref->IsChecked()){
- sliPriority->Enable();
- } else {
- sliPriority->Disable();
- }
-
-}
-
void frmContactEditorIM::ProcessAction( wxCommandEvent& event )
{
void frmContactEditorIM::ProcessAction( wxCommandEvent& event )
{
@@
-151,9
+139,9
@@
void frmContactEditorIM::ProcessAction( wxCommandEvent& event )
// Set the priority.
// Set the priority.
- if (
chkUsePref->Is
Checked()){
+ if (
priorityCtrl->IsPriority
Checked()){
- IMListPrefPtr->insert(std::make_pair(IMListIndex,
sliPriority
->GetValue()));
+ IMListPrefPtr->insert(std::make_pair(IMListIndex,
priorityCtrl
->GetValue()));
} else {
} else {
@@
-172,9
+160,9
@@
void frmContactEditorIM::ProcessAction( wxCommandEvent& event )
IMListCtrlPtr->SetItem(ListCtrlIndex, 1, txtUsername->GetValue());
IMListCtrlPtr->SetItem(ListCtrlIndex, 1, txtUsername->GetValue());
- if (
chkUsePref->Is
Checked()){
+ if (
priorityCtrl->IsPriority
Checked()){
- IMListCtrlPtr->SetItem(ListCtrlIndex, 2, wxString::Format(wxT("%i"),
sliPriority
->GetValue()));
+ IMListCtrlPtr->SetItem(ListCtrlIndex, 2, wxString::Format(wxT("%i"),
priorityCtrl
->GetValue()));
}
}
@@
-231,9
+219,9
@@
void frmContactEditorIM::ProcessAction( wxCommandEvent& event )
IMListPrefPtr->erase(IMListIndex);
IMListPrefPtr->erase(IMListIndex);
- if (
chkUsePref->Is
Checked()){
+ if (
priorityCtrl->IsPriority
Checked()){
- IMListPrefPtr->insert(std::make_pair(IMListIndex,
sliPriority
->GetValue()));
+ IMListPrefPtr->insert(std::make_pair(IMListIndex,
priorityCtrl
->GetValue()));
} else {
} else {
@@
-254,9
+242,9
@@
void frmContactEditorIM::ProcessAction( wxCommandEvent& event )
IMListCtrlPtr->SetItem(longSelected, 0, cmbIMType->GetValue());
IMListCtrlPtr->SetItem(longSelected, 1, txtUsername->GetValue());
IMListCtrlPtr->SetItem(longSelected, 0, cmbIMType->GetValue());
IMListCtrlPtr->SetItem(longSelected, 1, txtUsername->GetValue());
- if (
chkUsePref->Is
Checked()){
+ if (
priorityCtrl->IsPriority
Checked()){
- IMListCtrlPtr->SetItem(longSelected, 2, wxString::Format(wxT("%i"),
sliPriority
->GetValue()));
+ IMListCtrlPtr->SetItem(longSelected, 2, wxString::Format(wxT("%i"),
priorityCtrl
->GetValue()));
} else {
} else {
@@
-376,9
+364,8
@@
void frmContactEditorIM::SetEditorMode(bool EditMode, SectionType SectType)
if (intiter->first == IMListIndex && intiter->second > 0 &&
intiter != IMListPrefPtr->end()){
if (intiter->first == IMListIndex && intiter->second > 0 &&
intiter != IMListPrefPtr->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