wxString AccDirFull;
wxString AccDirFullSfx;
wxString AccName;
+ wxString AccType;
wxString AccDirFinal;
wxTreeItemId AccountTreeId;
wxTreeItemId GroupTreeId;
AccDirFull.Append(AccDirFullSfx);
AccName = preferences.accounts.GetAccountName(i);
AccName.Trim();
+ AccType = preferences.accounts.GetAccountType(i);
+ AccType.Trim();
AccountAccDirList.insert(std::make_pair(i, AccDirFull));
+ AccountAccTypeList.insert(std::make_pair(i, AccType));
if (preferences.accounts.GetAccountType(i) == wxT("CardDAV") ||
preferences.accounts.GetAccountType(i) == wxT("carddav")){
}
+frmImportContacts::~frmImportContacts()
+{
+
+ /*delete AccControl;
+ AccControl = NULL;
+ delete treAccounts;
+ treAccounts = NULL;
+ delete AccImgList;
+ AccImgList = NULL;*/
+
+}
+
void frmImportContacts::GetResult()
{
return AccountName;
+}
+
+wxString frmImportContacts::GetAccountType()
+{
+
+ wxString preffilename = GetUserPrefDir();
+
+ XABPreferences preferences(preffilename);
+
+ wxString AccountType;
+
+ //XABPrefAccounts prefaccounts;
+
+ wxTreeItemIdValue cookie;
+ wxTreeItemId next = treAccounts->GetRootItem();
+
+ wxTreeItemId selectedChild = treAccounts->GetSelection();
+ wxTreeItemId nextChild;
+
+ for (int i = 0; i < preferences.accounts.GetCount(); i++){
+
+ if (!nextChild){
+ nextChild = treAccounts->GetFirstChild(next, cookie);
+ } else {
+ nextChild = treAccounts->GetNextSibling(nextChild);
+ }
+
+ if (nextChild == selectedChild){
+
+ std::map<int, wxString>::iterator AccTypeIter = AccountAccTypeList.find(i);
+
+ AccountType = AccTypeIter->second;
+
+ }
+
+
+ }
+
+ return AccountType;
+
}
\ No newline at end of file