1 |
/* wptOwnertrust.cpp - Ownertrust im- and export |
/* wptOwnertrust.cpp - Ownertrust im- and export |
2 |
* Copyright (C) 2001, 2002, 2003, 2005 Timo Schulz |
* Copyright (C) 2001, 2002, 2003, 2005, 2006 Timo Schulz |
3 |
* Copyright (C) 2005 g10 Code GmbH |
* Copyright (C) 2005 g10 Code GmbH |
4 |
* |
* |
5 |
* This file is part of WinPT. |
* This file is part of WinPT. |
52 |
} |
} |
53 |
else |
else |
54 |
err = gpg_error (GPG_ERR_ENOENT); |
err = gpg_error (GPG_ERR_ENOENT); |
55 |
free (ot_data); |
safe_free (ot_data); |
56 |
return 0; |
return 0; |
57 |
} |
} |
58 |
|
|
80 |
|
|
81 |
err = gpg_manage_ownertrust (&ot_data, 0); |
err = gpg_manage_ownertrust (&ot_data, 0); |
82 |
|
|
83 |
free (ot_data); |
safe_free (ot_data); |
84 |
return 0; |
return 0; |
85 |
} |
} |
86 |
|
|
105 |
SetForegroundWindow (dlg); |
SetForegroundWindow (dlg); |
106 |
return TRUE; |
return TRUE; |
107 |
|
|
|
case WM_SYSCOMMAND: |
|
|
if (LOWORD (wparam) == SC_CLOSE) |
|
|
EndDialog (dlg, TRUE); |
|
|
return TRUE; |
|
|
|
|
108 |
case WM_COMMAND: |
case WM_COMMAND: |
109 |
switch (LOWORD (wparam)) { |
switch (LOWORD (wparam)) { |
110 |
case IDC_OWNERTRUST_EXPORT: |
case IDC_OWNERTRUST_EXPORT: |
111 |
fname = get_filesave_dlg (dlg, _("Select file name for output"), NULL, NULL); |
fname = get_filesave_dlg (dlg, _("Select File Name for Output"), NULL, NULL); |
112 |
if (!fname) |
if (!fname) |
113 |
return TRUE; |
return TRUE; |
114 |
err = gpg_export_ownertrust (fname); |
err = gpg_export_ownertrust (fname); |
120 |
return TRUE; |
return TRUE; |
121 |
|
|
122 |
case IDC_OWNERTRUST_IMPORT: |
case IDC_OWNERTRUST_IMPORT: |
123 |
fname = get_fileopen_dlg (dlg, _("Select file name for input"), NULL, NULL); |
fname = get_fileopen_dlg (dlg, _("Select File Name for Input"), NULL, NULL); |
124 |
if (!fname) |
if (!fname) |
125 |
return TRUE; |
return TRUE; |
126 |
err = gpg_import_ownertrust (fname); |
err = gpg_import_ownertrust (fname); |