X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorKey.cpp;h=569b0c3ab766da74d31f73856d83c5abac3047cc;hb=b3c6e1e0d266bddfff1b817633edc77c1c6109f6;hp=eca76732b24d4232c783ce1988ea3b202907ce13;hpb=49741064286885973537ba6574b05f4709b869c0;p=xestiaab%2F.git diff --git a/source/contacteditor/frmContactEditorKey.cpp b/source/contacteditor/frmContactEditorKey.cpp index eca7673..569b0c3 100644 --- a/source/contacteditor/frmContactEditorKey.cpp +++ b/source/contacteditor/frmContactEditorKey.cpp @@ -1,3 +1,21 @@ +// frmContactEditorKey.cpp - frmContactEditorKey form. +// +// (c) 2012-2015 Xestia Software Development. +// +// This file is part of Xestia Address Book. +// +// Xestia Address Book is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by the +// Free Software Foundation, version 3 of the license. +// +// Xestia Address Book is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with Xestia Address Book. If not, see + #include "frmContactEditorKey.h" #include #include "../common/textprocessing.h" @@ -19,12 +37,15 @@ frmContactEditorKeyADT( parent ) cmbKeyMainType->Append(_("URL")); cmbKeyMainType->Append(_("Key")); + cmbType->Append(""); cmbType->Append(_("Home")); cmbType->Append(_("Work")); cmbURL->Append(_("PGP Key")); cmbKeyType->Append(_("PGP Key")); + + cmbType->SetSelection(0); } @@ -92,7 +113,8 @@ void frmContactEditorKey::SetEditorMode(bool EditMode) striter = KeyListDataTypePtr->find(KeyListIndex); - if (striter->first == KeyListIndex){ + if (striter->first == KeyListIndex && + striter != KeyListDataTypePtr->end()){ strValue = striter->second; @@ -131,7 +153,8 @@ void frmContactEditorKey::SetEditorMode(bool EditMode) striter = KeyListDataTypePtr->find(KeyListIndex); - if (striter->first == KeyListIndex){ + if (striter->first == KeyListIndex && + striter != KeyListDataTypePtr->end()){ strValue = striter->second; @@ -147,7 +170,8 @@ void frmContactEditorKey::SetEditorMode(bool EditMode) striter = KeyListTypePtr->find(KeyListIndex); - if (striter->first == KeyListIndex){ + if (striter->first == KeyListIndex && + striter != KeyListTypePtr->end()){ strValue = striter->second; @@ -171,7 +195,8 @@ void frmContactEditorKey::SetEditorMode(bool EditMode) intiter = KeyListPrefPtr->find(KeyListIndex); - if (intiter->first == KeyListIndex && intiter->second > 0){ + if (intiter->first == KeyListIndex && intiter->second > 0 && + intiter != KeyListPrefPtr->end()){ sliPriority->SetValue(intiter->second); sliPriority->Enable();