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
Removed references of CardDAV and delete ConnectionObject when finished
[xestiaab/.git]
/
source
/
contacteditor
/
frmContactEditorPicture.cpp
diff --git
a/source/contacteditor/frmContactEditorPicture.cpp
b/source/contacteditor/frmContactEditorPicture.cpp
index
d548c9a
..
0be5931
100644
(file)
--- a/
source/contacteditor/frmContactEditorPicture.cpp
+++ b/
source/contacteditor/frmContactEditorPicture.cpp
@@
-29,21
+29,27
@@
#include "../common/base64.h"
#include "../common/mime.h"
#include "../common/base64.h"
#include "../common/mime.h"
-
frmContactEditorPicture::frmContactEditorPicture( wxWindow* parent )
:
frmContactEditorPictureADT( parent )
{
frmContactEditorPicture::frmContactEditorPicture( wxWindow* parent )
:
frmContactEditorPictureADT( parent )
{
+
+ // Setup the window.
+
EditorMode = FALSE;
sliPriority->Disable();
cmbType->Append(wxT(""));
cmbType->Append(_("Home"));
cmbType->Append(_("Work"));
EditorMode = FALSE;
sliPriority->Disable();
cmbType->Append(wxT(""));
cmbType->Append(_("Home"));
cmbType->Append(_("Work"));
+
}
void frmContactEditorPicture::EnablePriority( wxCommandEvent& event )
{
}
void frmContactEditorPicture::EnablePriority( wxCommandEvent& event )
{
+
+ // Enable/disable the priority.
+
if (chkUsePref->IsChecked()){
sliPriority->Enable();
} else {
if (chkUsePref->IsChecked()){
sliPriority->Enable();
} else {
@@
-53,6
+59,9
@@
void frmContactEditorPicture::EnablePriority( wxCommandEvent& event )
void frmContactEditorPicture::ProcessData( wxCommandEvent& event )
{
void frmContactEditorPicture::ProcessData( wxCommandEvent& event )
{
+
+ // Process data.
+
long ListCtrlIndex;
if (EditorMode == FALSE){
long ListCtrlIndex;
if (EditorMode == FALSE){
@@
-186,7
+195,17
@@
void frmContactEditorPicture::ProcessData( wxCommandEvent& event )
coldata.SetId(PictureListIndex);
coldata.SetData(PictureListIndex);
coldata.SetId(PictureListIndex);
coldata.SetData(PictureListIndex);
- coldata.SetText(_("Picture"));
+
+ if (PictureLogo == TRUE){
+
+ coldata.SetText(_("Picture"));
+
+ } else {
+
+ coldata.SetText(_("Logo"));
+
+ }
+
ListCtrlIndex = PictureListCtrlPtr->InsertItem(coldata);
if (strValue == _("Home")) {
ListCtrlIndex = PictureListCtrlPtr->InsertItem(coldata);
if (strValue == _("Home")) {
@@
-258,7
+277,15
@@
void frmContactEditorPicture::ProcessData( wxCommandEvent& event )
return;
}
return;
}
- PictureListCtrlPtr->SetItem(longSelected, 0, wxT("Picture"));
+ if (PictureLogo == TRUE){
+ PictureListCtrlPtr->SetItem(longSelected, 0, _("Picture"));
+
+ } else {
+
+ PictureListCtrlPtr->SetItem(longSelected, 0, _("Logo"));
+
+ }
+
PictureListCtrlPtr->SetItem(longSelected, 1, strValue);
if (chkUsePref->IsChecked()){
PictureListCtrlPtr->SetItem(longSelected, 1, strValue);
if (chkUsePref->IsChecked()){
@@
-278,11
+305,18
@@
void frmContactEditorPicture::ProcessData( wxCommandEvent& event )
void frmContactEditorPicture::CloseWindow( wxCommandEvent& event )
{
void frmContactEditorPicture::CloseWindow( wxCommandEvent& event )
{
+
+ // Close this window.
+
this->Close();
this->Close();
+
}
void frmContactEditorPicture::SetEditorMode(bool EditMode)
{
}
void frmContactEditorPicture::SetEditorMode(bool EditMode)
{
+
+ // Set the editor mode.
+
// Set if the editor is adding or editing an address.
// FALSE = Add
// TRUE = Edit
// Set if the editor is adding or editing an address.
// FALSE = Add
// TRUE = Edit
@@
-308,7
+342,8
@@
void frmContactEditorPicture::SetEditorMode(bool EditMode)
striter = PictureListTypePtr->find(PictureListIndex);
striter = PictureListTypePtr->find(PictureListIndex);
- if (striter->first == PictureListIndex){
+ if (striter->first == PictureListIndex &&
+ striter != PictureListTypePtr->end()){
strValue = striter->second;
strValue = striter->second;
@@
-334,7
+369,8
@@
void frmContactEditorPicture::SetEditorMode(bool EditMode)
intiter = PictureListPrefPtr->find(PictureListIndex);
intiter = PictureListPrefPtr->find(PictureListIndex);
- if (intiter->first == PictureListIndex && intiter->second > 0){
+ if (intiter->first == PictureListIndex && intiter->second > 0 &&
+ intiter != PictureListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
sliPriority->SetValue(intiter->second);
sliPriority->Enable();
@@
-356,9
+392,12
@@
void frmContactEditorPicture::SetupPointers(std::map<int, std::string> *PictureL
std::map<int, wxString> *PictureListMediatype,
std::map<int, int> *PictureListPref,
wxListCtrl *PictureListCtrl,
std::map<int, wxString> *PictureListMediatype,
std::map<int, int> *PictureListPref,
wxListCtrl *PictureListCtrl,
- int PictureIndex )
+ int PictureIndex,
+ bool PictureLogoIn )
{
{
+ // Setup the pointers.
+
PictureListPtr = PictureList;
PictureListAltIDPtr = PictureListAltID;
PictureListPIDPtr = PictureListPID;
PictureListPtr = PictureList;
PictureListAltIDPtr = PictureListAltID;
PictureListPIDPtr = PictureListPID;
@@
-370,5
+409,6
@@
void frmContactEditorPicture::SetupPointers(std::map<int, std::string> *PictureL
PictureListPrefPtr = PictureListPref;
PictureListCtrlPtr = PictureListCtrl;
PictureListIndex = PictureIndex;
PictureListPrefPtr = PictureListPref;
PictureListCtrlPtr = PictureListCtrl;
PictureListIndex = PictureIndex;
+ PictureLogo = PictureLogoIn;
}
\ No newline at end of file
}
\ No newline at end of file
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy