summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.cpp4
-rw-r--r--main.cpp10
-rw-r--r--options.cpp16
3 files changed, 15 insertions, 15 deletions
diff --git a/init.cpp b/init.cpp
index 29602f6..c8d95ae 100644
--- a/init.cpp
+++ b/init.cpp
@@ -234,8 +234,8 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam)
extern list<wstring> transfers;
extern "C" int __declspec(dllexport) Unload(void)
{
- for (HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0))
- DBDeleteContactSetting(hContact, szGPGModuleName, "KeyID_Prescense");
+// for (HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0))
+// DBDeleteContactSetting(hContact, szGPGModuleName, "KeyID_Prescense");
if(!transfers.empty())
{
for(list<wstring>::iterator p = transfers.begin(); p != transfers.end(); p++)
diff --git a/main.cpp b/main.cpp
index d2d1984..501caa5 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1372,11 +1372,11 @@ static BOOL CALLBACK DlgProcImportKeyDialog(HWND hwndDlg, UINT msg, WPARAM wPara
cmd += server;
delete [] server;
cmd += _T("\" --recv-keys ");
- char *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID_Prescense", "");
- TCHAR *tmp2 = mir_a2t(tmp);
- mir_free(tmp);
- cmd += tmp2;
- mir_free(tmp2);
+// char *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID_Prescense", "");
+// TCHAR *tmp2 = mir_a2t(tmp);
+// mir_free(tmp);
+ cmd += toUTF16(hcontact_data[hContact].key_in_prescense);
+// mir_free(tmp2);
gpg_execution_params params;
pxResult result;
params.cmd = &cmd;
diff --git a/options.cpp b/options.cpp
index d2a106b..6acc3e7 100644
--- a/options.cpp
+++ b/options.cpp
@@ -674,18 +674,18 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
}
}
}
- char *tmp = UniGetContactSettingUtf(hcnt, szGPGModuleName, "KeyID_Prescense", "");
- if(tmp[0])
+// char *tmp = UniGetContactSettingUtf(hcnt, szGPGModuleName, "KeyID_Prescense", "");
+ if(!hcontact_data[hcnt].key_in_prescense.empty())
{
char *tmp2 = UniGetContactSettingUtf(hcnt, szGPGModuleName, "KeyID", "");
- if(strlen(tmp2) == 0)
+ if(!tmp2[0])
{
string out;
DWORD code;
wstring cmd = _T(" --export -a ");
- TCHAR *tmp3 = mir_a2t(tmp);
- cmd += tmp3;
- mir_free(tmp3);
+// TCHAR *tmp3 = mir_a2t(tmp);
+ cmd += toUTF16(hcontact_data[hcnt].key_in_prescense);
+// mir_free(tmp3);
gpg_execution_params params;
pxResult result;
params.cmd = &cmd;
@@ -723,14 +723,14 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP
str.clear();
str.append(tmp3);
string msg = "Load Public GPG Key (Key ID: ";
- msg += tmp;
+ msg += hcontact_data[hcnt].key_in_prescense;
msg += " found in prescense, and exists in keyring.)";
SetWindowTextA(hwndDlg, msg.c_str());
}
else
{
string msg = "Load Public GPG Key (Key ID: ";
- msg += tmp;
+ msg += hcontact_data[hcnt].key_in_prescense;
msg += " found in prescense.)";
SetWindowTextA(hwndDlg, msg.c_str());
EnableWindow(GetDlgItem(hwndDlg, IDC_IMPORT), 1);