[Winpt-commits] r218 - in trunk: . Include MyGPGME Po Src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed May 24 09:53:28 CEST 2006
Author: twoaday
Date: 2006-05-24 09:53:24 +0200 (Wed, 24 May 2006)
New Revision: 218
Added:
trunk/MyGPGME/WARNING
Modified:
trunk/ChangeLog
trunk/FAQ
trunk/Include/wptRegistry.h
trunk/NEWS
trunk/Po/ChangeLog
trunk/Po/LINGUAS
trunk/Po/build-utf-mo.sh
trunk/README
trunk/Src/ChangeLog
trunk/Src/WinPT-en.rc
trunk/Src/WinPT.cpp
trunk/Src/resource.h
trunk/Src/wptFileManager.cpp
trunk/Src/wptKeyEditDlgs.cpp
trunk/Src/wptKeyManagerDlg.cpp
trunk/Src/wptKeyserverDlg.cpp
trunk/Src/wptPreferencesDlg.cpp
trunk/Src/wptRegistry.cpp
trunk/THANKS
Log:
2006-05-23 Timo Schulz <ts at g10code.de>
* wptKeyEditDlgs.cpp (do_add_new_userid): Fix re-introduced
problem.
(keyedit_main_dlg_proc): Popup menu for the user ID list
with common commands.
* wptKeyserverDlg.cpp (keyserver_dlg_proc): Automatically
disable search for ldap servers.
Use subkeys.pgp.net by default when no server was selected.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/ChangeLog 2006-05-24 07:53:24 UTC (rev 218)
@@ -1,3 +1,8 @@
+2006-05-22 Timo Schulz <ts at g10code.de>
+
+ * README: More updates.
+ * FAQ: Ditto. Still obsolete.
+
2006-03-10 Timo Schulz <ts at g10code.de>
* README: Updated some more passages.
Modified: trunk/FAQ
===================================================================
--- trunk/FAQ 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/FAQ 2006-05-24 07:53:24 UTC (rev 218)
@@ -1,11 +1,11 @@
The Tiny WinPT FAQ.
- (warning: file is obsolete!)
+ (warning: file is obsolete!)
Version 1.0
-Last modified July 22, 2001
-Maintained by Rich Wielgosz <rich at richwilgoz.com>
--------------------------------------------------
+Last modified May 22, 2006
+Initial version created by Rich Wielgosz <rich at richwilgoz.com>
+-----------------------------------------------------------------
1. General
1.1 What is WinPT?
@@ -20,7 +20,6 @@
4. Problem and errors
4.1 WinPT wouldn't let me register a hotkey. Why not?
-4.2 Why is "Passphrase Caching" greyed out?
4.3 People can't verify my signatures. Why?
4.4 I get a "no data" error when trying to decrypt text. How come?
4.5 What is "Debug Mode" ?
@@ -65,7 +64,7 @@
Q: Does WinPT require anything else to work?
A: WinPT requires that you have installed the Gnu Privacy Guard (GnuPG)
- encryption engine version 1.4.2 or greater, for Win32. (r)
+ encryption engine version 1.4.3 or greater, for Win32.
3. Usage
@@ -104,14 +103,6 @@
Please note that the "Export to clipboard" and "Import from clipboard"
hotkeys can not be redefined.
-4.2
-Q: Why is passphrase caching greyed out in the preferences menu?
-
-A: It is greyed out because it is not supported yet. Once the GPG
- (passphrase caching) Agent is ready for use, or when we find another
- trustworthy caching program, we'll activate it then.
-
-
4.3
Q: Why are people having trouble verifying my signatures in the email that
I send them?
@@ -185,7 +176,7 @@
mail them to Timo with a detailed explanation of what happened. One
file is in the same directory as your WinPT executable and is called
"gpgme.dbg". The other file is called "winpt.log" and can be found
- in your C:\WINDOWS\TEMP directory. If you can't find the "winpt.log"
+ in your C:\$USER\TEMP directory. If you can't find the "winpt.log"
file don't worry, sometimes it isn't generated, but "gpgme.dbg" is
always generated. To enable debug mode in WinPT use the "--enable-debug" switch on the command line when invoking WinPT. If you've set up WinPT to run from an icon, right-click on the WinPT icon and select "properties," then select the "shortcut" tab and type "--enable-debug" (without quotes) in the end of the "Target" field. Be sure there is a space between the last character of what was originally in that field, and what you add.
Modified: trunk/Include/wptRegistry.h
===================================================================
--- trunk/Include/wptRegistry.h 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Include/wptRegistry.h 2006-05-24 07:53:24 UTC (rev 218)
@@ -28,7 +28,7 @@
CFG_INVALID=0,
CFG_CACHETIME,
CFG_WORDWRAP,
- CFG_FASTMODE,
+ CFG_FILEEXT,
CFG_VIEWER,
CFG_WIPEMODE,
CFG_ALWAYSTRUST,
@@ -48,12 +48,12 @@
int no_hotkeys; /* disable ALL hotkeys */
int word_wrap; /* set word wrapping (0 means to disable it) */
int cache_time; /* caching time for passphrase */
- int use_tmpfiles; /* use tempfiles for gpg communication */
int use_viewer; /* use clipboard viewer for displaying plaintext */
int no_zip_mmedia; /* disable compression for multi-media files (movies, music) */
int wipe_mode; /* simple=0, dod=1, gutmann=2 */
int always_trust; /* skip key validation (1 means yes) */
int auto_backup; /* automatic backup (1 means activated) */
+ int default_ext; /* 1 = GPG, PGP otherwise. */
struct {
int mode; /* backup mode */
char *path; /* keyring backup path */
Added: trunk/MyGPGME/WARNING
===================================================================
--- trunk/MyGPGME/WARNING 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/MyGPGME/WARNING 2006-05-24 07:53:24 UTC (rev 218)
@@ -0,0 +1,12 @@
+
+This folder is just used as a backup folder. The code won't
+be actively maintained any longer. Kurt Fitzner still uses the
+code in his GPGee program and thus he's propably a better contact
+to talk about problems with MyGPGME or feature requests.
+
+As the original author I still can answer elemental questions
+about the code and how it works.
+
+
+ Timo
+
\ No newline at end of file
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/NEWS 2006-05-24 07:53:24 UTC (rev 218)
@@ -827,4 +827,4 @@
* Fix double-click code for the Explorer.
* Avoid problem in the key property dialog when a key
has designated revokers.
-
\ No newline at end of file
+* More PGP-friendly file output for encryption/signing/export.
Modified: trunk/Po/ChangeLog
===================================================================
--- trunk/Po/ChangeLog 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Po/ChangeLog 2006-05-24 07:53:24 UTC (rev 218)
@@ -1,3 +1,7 @@
+2006-05-22 Timo Schulz <ts at g10code.de>
+
+ * LINGUAS: Removed 'fr' because is too unfinished.
+
2006-05-07 Timo Schulz <ts at g10code.de>
* de.po: Updated for 0.12.0
Modified: trunk/Po/LINGUAS
===================================================================
--- trunk/Po/LINGUAS 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Po/LINGUAS 2006-05-24 07:53:24 UTC (rev 218)
@@ -1,6 +1,5 @@
# Set of available languages.
de
-fr
jp
Modified: trunk/Po/build-utf-mo.sh
===================================================================
--- trunk/Po/build-utf-mo.sh 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Po/build-utf-mo.sh 2006-05-24 07:53:24 UTC (rev 218)
@@ -4,7 +4,8 @@
#sed "/^\"Content-Type:/ s/charset=[a-zA-Z0-9_-]*/charset=utf-8/"|
#msgfmt --output-file=winpt.mo -
-msgfmt -v --check --output-file=winpt.mo de.po
-#msgfmt -v --check --output-file=winpt.mo jp.po
+#msgfmt -v --check --output-file=winpt.mo fr.po
+#msgfmt -v --check --output-file=winpt.mo de.po
+msgfmt -v --check --output-file=winpt.mo jp.po
Modified: trunk/README
===================================================================
--- trunk/README 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/README 2006-05-24 07:53:24 UTC (rev 218)
@@ -4,6 +4,7 @@
Index
1. Note
2. Bugs and improvements
+ 2.1 Legacy Windows versions
3. What is WinPT?
4. Install
4.1 Keyserver config file
@@ -54,6 +55,16 @@
http://www.winpt.org
+2.1 Legacy Windows versions
+
+I know a lot of people still user old versions of WinPT but it is very
+hard to test the code on all these platforms and thus I decided to
+obsolete the support for these OS versions: Win95, WinME/98. The code
+works on 98/ME without known limitations but if you will encounter
+a serious problem, I doubt I can fix it without having this OS and
+this is the major problem!
+
+
3. What is WinPT?
-----------------
Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/ChangeLog 2006-05-24 07:53:24 UTC (rev 218)
@@ -1,5 +1,25 @@
-2005-05-20 Timo Schulz <ts at g10code.de>
+2006-05-23 Timo Schulz <ts at g10code.de>
+ * wptKeyEditDlgs.cpp (do_add_new_userid): Fix re-introduced
+ problem.
+ (keyedit_main_dlg_proc): Popup menu for the user ID list
+ with common commands.
+ * wptKeyserverDlg.cpp (keyserver_dlg_proc): Automatically
+ disable search for ldap servers.
+ Use subkeys.pgp.net by default when no server was selected.
+
+2006-05-22 Timo Schulz <ts at g10code.de>
+
+ * wptRegistry.cpp (set_reg_winpt_prefs, get_reg_winpt_prefs):
+ Support for the new 'default ext' value.
+ * wptPreferencesDlg.cpp (on_init_dialog): Likewise.
+ (prefs_dlg_proc): Likewise.
+ * wptFileManager.cpp (file_get_extension): Likewise.
+ (get_output_file): Likewise.
+ (fm_export): Likewise.
+
+2006-05-20 Timo Schulz <ts at g10code.de>
+
* wptKeyPropsDlg.cpp (keyprops_load_photo): avoid expensive
process call when no photo is available.
(keyprops_dlg_proc): avoid static data.
Modified: trunk/Src/WinPT-en.rc
===================================================================
--- trunk/Src/WinPT-en.rc 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/WinPT-en.rc 2006-05-24 07:53:24 UTC (rev 218)
@@ -637,23 +637,21 @@
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "General options",IDC_PREFS_ALLOPTINF,8,2,271,101
- CONTROL "Do not use any &temporary files",IDC_PREFS_SECMODE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,13,232,10
CONTROL "Use clipboard &viewer to display the plaintext",
IDC_PREFS_VIEWER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
- 13,26,229,10
+ 13,13,229,10
CONTROL "Skip key validation and assume that keys are always fully trusted",
IDC_PREFS_TRUST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,
- 40,234,8
+ 27,234,8
LTEXT "Word wrap cleartext &signatures at column",
- IDC_PREFS_WWINFO,13,56,139,8
+ IDC_PREFS_WWINFO,14,56,139,8
EDITTEXT IDC_PREFS_WORDWRAP,155,55,14,13
LTEXT "Cache &passphrases for 'n' minutes",IDC_PREFS_CACHEINF,
- 12,73,117,8
+ 14,73,117,8
EDITTEXT IDC_PREFS_CACHETIME,155,71,25,13
LTEXT "(CTRL+ALT+F to clear cache)",IDC_PREFS_CACHEHINT,182,73,
96,8
- LTEXT "Select &wipe mode",IDC_PREFS_WIPEINF,13,88,79,8
+ LTEXT "Select &wipe mode",IDC_PREFS_WIPEINF,14,88,79,8
COMBOBOX IDC_PREFS_WIPEMODE,155,87,64,40,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
GROUPBOX "Clipboard hotkeys",IDC_PREFS_CLIPINF,8,105,112,70
@@ -690,6 +688,10 @@
PUSHBUTTON "Browse...",IDC_PREFS_BAKSELECT,212,218,47,14
DEFPUSHBUTTON "&OK",IDOK,176,238,50,14
PUSHBUTTON "&Cancel",IDCANCEL,228,238,50,14
+ LTEXT "Default extension for encrypted files",IDC_PREFS_EXTINF,
+ 14,42,138,9
+ COMBOBOX IDC_PREFS_DEFEXT,155,40,76,47,CBS_DROPDOWNLIST |
+ WS_VSCROLL | WS_TABSTOP
END
IDD_WINPT_HKPSEARCH DIALOG DISCARDABLE 0, 0, 359, 157
@@ -1934,8 +1936,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,12,1,0
- PRODUCTVERSION 0,12,1,0
+ FILEVERSION 0,12,2,0
+ PRODUCTVERSION 0,12,2,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -1953,14 +1955,14 @@
VALUE "Comments", "This is free software under the terms of the GNU GPL v2\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "Windows Privacy Tray (WinPT)\0"
- VALUE "FileVersion", "0.12.1\0"
+ VALUE "FileVersion", "0.12.2\0"
VALUE "InternalName", "WinPT\0"
VALUE "LegalCopyright", " Copyright (C) 2006 Timo Schulz\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "WinPT.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Windows Privacy Tray\0"
- VALUE "ProductVersion", "0.12.1\0"
+ VALUE "ProductVersion", "0.12.2\0"
VALUE "SpecialBuild", "\0"
END
END
@@ -2258,7 +2260,17 @@
END
END
+IDR_WINPT_KEYEDIT MENU DISCARDABLE
+BEGIN
+ POPUP "Context menu"
+ BEGIN
+ MENUITEM "Flag user ID as &primary", ID_KEYEDIT_UID_PRIM
+ MENUITEM "&Delete user ID", ID_KEYEDIT_UID_DEL
+ MENUITEM "&Revoke user ID", ID_KEYEDIT_UID_REV
+ END
+END
+
/////////////////////////////////////////////////////////////////////////////
//
// Accelerator
Modified: trunk/Src/WinPT.cpp
===================================================================
--- trunk/Src/WinPT.cpp 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/WinPT.cpp 2006-05-24 07:53:24 UTC (rev 218)
@@ -381,7 +381,6 @@
reg_prefs.expert = 0;
reg_prefs.kserv_conf = m_strdup ("keyserver.conf");
reg_prefs.no_zip_mmedia = 1;
- reg_prefs.use_tmpfiles = 1;
reg_prefs.word_wrap = 80;
reg_prefs.use_viewer = 0; /* XXX */
return 0;
@@ -522,7 +521,6 @@
if (!created) {
memset (®_prefs, 0, sizeof (reg_prefs));
- reg_prefs.use_tmpfiles = 1; /* default */
reg_prefs.fm.progress = 0; /* XXX: fix the bug and enable it again */
get_reg_winpt_prefs (®_prefs);
gnupg_load_config ();
Modified: trunk/Src/resource.h
===================================================================
--- trunk/Src/resource.h 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/resource.h 2006-05-24 07:53:24 UTC (rev 218)
@@ -165,6 +165,7 @@
#define IDI_KEY_SIG 242
#define IDI_USERID 243
#define IDD_WINPT_LANGUAGE 245
+#define IDR_WINPT_KEYEDIT 246
#define IDC_CLIPEDIT_SEND 1000
#define IDC_CLIPEDIT_CLEAR 1001
#define IDC_CLIPEDIT_CLIPTEXT 1002
@@ -651,6 +652,8 @@
#define IDC_SIGPROPS_POLIC 1527
#define IDC_KEYEDIT_REVOKE 1528
#define IDC_ENCRYPT_OPTINF 1529
+#define IDC_PREFS_EXTINF 1530
+#define IDC_PREFS_DEFEXT 1531
#define ID_GPG_ENCRYPT 40003
#define ID_GPG_DECRYPT 40004
#define ID_GPG_SIGN 40005
@@ -825,14 +828,17 @@
#define ID_KSERVCTX_EDIT 40184
#define ID_KEYMISC_VIEWDESC 40185
#define ID_GROUP_SHOW 40186
+#define ID_KEYEDIT_UID_PRIM 40187
+#define ID_KEYEDIT_UID_DEL 40188
+#define ID_KEYEDIT_UID_REV 40189
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 246
-#define _APS_NEXT_COMMAND_VALUE 40187
-#define _APS_NEXT_CONTROL_VALUE 1530
+#define _APS_NEXT_RESOURCE_VALUE 247
+#define _APS_NEXT_COMMAND_VALUE 40190
+#define _APS_NEXT_CONTROL_VALUE 1532
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
Modified: trunk/Src/wptFileManager.cpp
===================================================================
--- trunk/Src/wptFileManager.cpp 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/wptFileManager.cpp 2006-05-24 07:53:24 UTC (rev 218)
@@ -200,7 +200,7 @@
return ".asc";
if (!use_armor && sigmode == GPGME_SIG_MODE_DETACH)
return ".sig";
- return ".gpg";
+ return reg_prefs.default_ext == 1? ".pgp" : ".gpg";
}
@@ -1576,7 +1576,8 @@
if (stristr (name, ".sig") ||
stristr (name, ".asc") ||
- stristr (name, ".gpg")) {
+ stristr (name, ".gpg") ||
+ stristr (name, ".pgp")) {
_snprintf (fname, sizeof (fname) - 1, "%s", name);
fname[strlen (fname) - 4] = '\0';
if (file_exist_check (fname) == 0 && detached)
@@ -1743,7 +1744,7 @@
name = get_filesave_dlg (c->dlg, _("Choose Name for Key File"),
NULL, p? p : NULL);
if (!name)
- name = "keys.gpg";
+ name = reg_prefs.default_ext? "keys.pgp" : "keys.gpg";
patt = gpg_keylist_to_pattern (rset, c->n_recp);
Modified: trunk/Src/wptKeyEditDlgs.cpp
===================================================================
--- trunk/Src/wptKeyEditDlgs.cpp 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/wptKeyEditDlgs.cpp 2006-05-24 07:53:24 UTC (rev 218)
@@ -120,8 +120,9 @@
/* Key edit callback context. */
struct keyedit_cb_s {
- const char *keyid;
- const char *pass;
+ HWND parent; /* parent window handle. */
+ const char *keyid; /* key ID of the key. */
+ const char *pass; /* pointer to the passphrase. */
listview_ctrl_t lv;
int lv_pos;
void *opaque;
@@ -209,7 +210,7 @@
const char *utf8_name, const char *email,
const char *utf8_comment)
{
- char *p;
+ char *p, *native;
size_t n;
n = strlen (utf8_name) + strlen (email) + 16;
@@ -218,18 +219,19 @@
p = new char[n+1];
if (!p)
BUG (NULL);
- if (utf8_comment) {
+ if (utf8_comment)
sprintf (p, "%s (%s)", utf8_name, utf8_comment);
- }
else
sprintf (p, "%s", utf8_name);
+ native = utf8_to_native (p);
+ free_if_alloc (p);
listview_add_item (lv, "");
- listview_add_sub_item (lv, 0, 0, _("Ultimate" ));
- listview_add_sub_item (lv, 0, 1, p);
- listview_add_sub_item (lv, 0, 2, email && *email? email : "");
- listview_add_sub_item (lv, 0, 3, get_key_created (time (NULL)));
- free_if_alloc (p);
+ listview_add_sub_item (lv, 0, UID_COL_VALID, _("Ultimate" ));
+ listview_add_sub_item (lv, 0, UID_COL_NAME, native);
+ listview_add_sub_item (lv, 0, UID_COL_EMAIL, email && *email? email : "");
+ listview_add_sub_item (lv, 0, UID_COL_CREATION, get_key_created (time (NULL)));
+ free_if_alloc (native);
}
@@ -241,10 +243,10 @@
int n;
expdate = keygen->expire? get_key_expire_date (keygen->expire) : _("Never");
- _snprintf (info, sizeof info-1, "%d-bit %s",
- keygen->bits,
+ _snprintf (info, sizeof (info)-1, "%d-bit %s",
+ keygen->bits,
get_key_pubalgo ((gpgme_pubkey_algo_t)keygen->algo));
- _snprintf (keyid, sizeof keyid-1, "0x%s", keygen->fpr+8);
+ _snprintf (keyid, sizeof (keyid)-1, "0x%s", keygen->fpr+8);
s = get_key_created (time (NULL));
n = listview_count_items (lv, 0);
listview_add_item_pos (lv, n);
@@ -388,7 +390,7 @@
msg_box( dlg, _("Please enter a file name."), _("Add Photo"), MB_ERR);
return FALSE;
}
- if (get_file_size (file) == 0 || get_file_size (file) > 6144 ) {
+ if (get_file_size (file) == 0 || get_file_size (file) > 6144) {
id = msg_box (dlg, _("The JPEG is really large.\n"
"Are you sure you want to use it?"),
_("Add Photo"), MB_YESNO|MB_INFO);
@@ -446,6 +448,7 @@
SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
SetWindowText (dlg, _("Add Revoker"));
SetForegroundWindow (dlg);
+ center_window (dlg, cb->parent);
break;
case WM_SYSCOMMAND:
@@ -515,6 +518,7 @@
SetDlgItemText (dlg, IDC_ADDUID_INFCOMMENT, _("&Comment"));
SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
SetForegroundWindow (dlg);
+ center_window (dlg, ctx->parent);
return FALSE;
case WM_SYSCOMMAND:
@@ -659,6 +663,7 @@
EnableWindow (GetDlgItem (dlg, IDC_ADDSUBKEY_EXPDATE), FALSE);
init_keysize_box (dlg, IDC_ADDSUBKEY_SIZE);
SetForegroundWindow (dlg);
+ center_window (dlg, ctx->parent);
return FALSE;
case WM_SYSCOMMAND:
@@ -773,6 +778,7 @@
memset (&keygen, 0, sizeof (keygen));
memset (&cb, 0, sizeof cb);
+ cb.parent = dlg;
cb.opaque = &keygen;
cb.is_protected = k->is_protected;
cb.pass = pass;
@@ -918,6 +924,7 @@
if (cancel)
return FALSE;
}
+ cb.parent = dlg;
cb.pass = pass;
cb.keyid = k->keyid;
@@ -950,6 +957,7 @@
}
memset (&cb, 0, sizeof (cb));
+ cb.parent = dlg;
cb.is_protected = k->is_protected;
cb.keyid = k->keyid;
cb.pass = pass;
@@ -1725,6 +1733,7 @@
SetDlgItemText (dlg, IDC_SHOWPREF_UIDHINT, _("user ID:"));
SetWindowText (dlg, _("Key Preferences"));
SetForegroundWindow (dlg);
+ center_window (dlg, cb->parent);
break;
case WM_COMMAND:
@@ -1757,6 +1766,7 @@
return FALSE;
}
memset (&cb, 0, sizeof (cb));
+ cb.parent = dlg;
cb.opaque = k->ctx;
cb.keyid = k->keyid;
cb.lv = lv;
@@ -2163,13 +2173,24 @@
case WM_NOTIFY:
NMHDR * notify;
notify = (NMHDR *)lparam;
- if (notify && notify->code == NM_DBLCLK &&
- notify->idFrom == IDC_KEYEDIT_UIDLIST)
+ if (!notify || notify->idFrom != IDC_KEYEDIT_UIDLIST)
+ break;
+ if (notify->code == NM_DBLCLK)
do_editkey_showpref (k, dlg, lvuid);
+ if (notify->code == NM_RCLICK && k->key_pair) {
+ HMENU hm = LoadMenu (glob_hinst, MAKEINTRESOURCE (IDR_WINPT_KEYEDIT));
+ HMENU popup = GetSubMenu (hm, 0);
+ POINT p;
+
+ GetCursorPos (&p);
+ TrackPopupMenu (popup, TPM_RIGHTALIGN, p.x, p.y, 0, dlg, NULL);
+ DestroyMenu (hm);
+ DestroyMenu (popup);
+ }
break;
case WM_COMMAND:
- switch( LOWORD( wparam ) ) {
+ switch (LOWORD (wparam)) {
case IDOK:
cmd = lookup_cmd (dlg);
if (cmd == LB_ERR) {
@@ -2206,8 +2227,8 @@
case CMD_CLEAN: do_editkey_clean (k, dlg); break;
case CMD_MINIMIZE: do_editkey_minimize (k, dlg); break;
}
- break;
-
+ break;
+
case IDCANCEL:
EndDialog (dlg, FALSE);
break;
@@ -2219,6 +2240,18 @@
case IDC_KEYEDIT_REVOKE:
gen_desig_revoke_cert (k, dlg);
break;
+
+ case ID_KEYEDIT_UID_PRIM:
+ do_editkey_primary (k, dlg, lvuid);
+ break;
+
+ case ID_KEYEDIT_UID_DEL:
+ do_editkey_deluid (k, dlg, lvuid);
+ break;
+
+ case ID_KEYEDIT_UID_REV:
+ do_editkey_revuid (k, dlg, lvuid);
+ break;
}
break;
}
Modified: trunk/Src/wptKeyManagerDlg.cpp
===================================================================
--- trunk/Src/wptKeyManagerDlg.cpp 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/wptKeyManagerDlg.cpp 2006-05-24 07:53:24 UTC (rev 218)
@@ -85,6 +85,7 @@
unsigned int enable_groups:1;
};
+typedef struct km_info_s *km_info_t;
/* Toolbar button structure. */
struct mybuttons {
@@ -1176,12 +1177,12 @@
BOOL CALLBACK
keymanager_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
- struct km_info_s *kmi = NULL;
HWND kl;
HMENU hm;
- struct keycache_s *kci;
gpg_keycache_t c;
gpgme_key_t key;
+ struct keycache_s *kci;
+ km_info_t kmi = NULL;
struct genkey_s genkey;
struct winpt_key_s k = {0};
struct URL_ctx_s *url;
@@ -1191,7 +1192,7 @@
int l_idx = 0, i=0, rc;
if ((msg != WM_INITDIALOG)
- && ((kmi = (struct km_info_s*)GetWindowLong (dlg, GWL_USERDATA)) == NULL))
+ && ((kmi = (km_info_t)GetWindowLong (dlg, GWL_USERDATA)) == NULL))
return FALSE;
/* handle dynamic popup items in the keyserver menu. */
Modified: trunk/Src/wptKeyserverDlg.cpp
===================================================================
--- trunk/Src/wptKeyserverDlg.cpp 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/wptKeyserverDlg.cpp 2006-05-24 07:53:24 UTC (rev 218)
@@ -606,7 +606,12 @@
}
else if (notify->code == LVN_ITEMCHANGED &&
((LPNMLISTVIEW)lparam)->uNewState) {
- /* XXX: disable search for ldap servers. */
+ listview_get_item_text (lv, listview_get_curr_pos (lv),
+ KS_COL_NAME, kserver, sizeof (kserver)-1);
+ if (!strnicmp (kserver, "ldap://", 7))
+ EnableWindow (GetDlgItem (dlg, IDC_KEYSERVER_INDEX), FALSE);
+ else
+ EnableWindow (GetDlgItem (dlg, IDC_KEYSERVER_INDEX), TRUE);
}
return TRUE;
@@ -632,31 +637,26 @@
return TRUE;
case IDC_KEYSERVER_INDEX:
- if (!lv_idx) {
+ if (!lv_idx)
lv_idx = kserver_get_pos (lv);
- if (lv_idx == -1) {
- msg_box (dlg, _("Please select one of the keyservers."),
- _("Keyserver"), MB_INFO);
- return FALSE;
- }
- }
- listview_get_item_text (lv, lv_idx, KS_COL_NAME,
- proto, sizeof (proto)-1);
- if (!strncmp (proto, "ldap", 4)) {
- msg_box (dlg, _("This is not implemented yet!"),
- _("Keyserver"), MB_ERR);
- return FALSE;
- }
- listview_get_item_text (lv, lv_idx, KS_COL_NAME,
- kserver, sizeof (kserver)-1);
+
if (!GetDlgItemText (dlg, IDC_KEYSERVER_SEARCH, pattern, sizeof (pattern)-1)) {
msg_box (dlg, _("Please enter the search pattern."),
_("Keyserver"), MB_INFO);
return FALSE;
}
- ksc.name = kserver;
+
+ if (lv_idx != -1) {
+ listview_get_item_text (lv, lv_idx, KS_COL_NAME,
+ kserver, sizeof (kserver)-1);
+ ksc.name = kserver;
+ ksc.port = kserver_get_port (lv);
+ }
+ else {
+ ksc.name = DEF_HKP_KEYSERVER;
+ ksc.port = HKP_PORT;
+ }
ksc.pattern = pattern;
- ksc.port = kserver_get_port (lv);
DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_HKPSEARCH, dlg,
hkpsearch_dlg_proc, (LPARAM) &ksc);
return TRUE;
Modified: trunk/Src/wptPreferencesDlg.cpp
===================================================================
--- trunk/Src/wptPreferencesDlg.cpp 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/wptPreferencesDlg.cpp 2006-05-24 07:53:24 UTC (rev 218)
@@ -129,9 +129,11 @@
{IDC_PREFS_CURRINF, _("Current window hotkeys")},
{IDC_PREFS_KSELFILE, _("Browse...")},
{IDC_PREFS_BAKSELECT, _("Browse...")},
+ {IDC_PREFS_EXTINF, _("Default extension for encrypted files")},
{IDCANCEL, _("&Cancel")},
{0, NULL}};
int i;
+ HWND cb;
gettext_localize_dialog (dlg, prefs, _("WinPT Preferences"));
@@ -148,10 +150,13 @@
key[1] = 0;
SetDlgItemText (dlg, hotkeys[i], key);
}
+ cb = GetDlgItem (dlg, IDC_PREFS_DEFEXT);
+ combox_add_string (cb, _("GnuPG (.gpg)"));
+ combox_add_string (cb, _("PGP (.pgp)"));
+ SendMessage (cb, CB_SETCURSEL, 0, 0);
+
CheckDlgButton (dlg, IDC_PREFS_DISABLE_HOTKEYS,
reg_prefs.no_hotkeys ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton (dlg, IDC_PREFS_SECMODE,
- reg_prefs.use_tmpfiles ? BST_UNCHECKED : BST_CHECKED);
CheckDlgButton (dlg, IDC_PREFS_VIEWER,
reg_prefs.use_viewer ? BST_CHECKED: BST_UNCHECKED);
CheckDlgButton (dlg, IDC_PREFS_TRUST,
@@ -162,6 +167,8 @@
reg_prefs.backup.mode==1? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton (dlg, IDC_PREFS_BAKUSER,
reg_prefs.backup.mode==2? BST_CHECKED : BST_UNCHECKED);
+ SendDlgItemMessage (dlg, IDC_PREFS_DEFEXT, CB_SETCURSEL,
+ reg_prefs.default_ext, 0);
if (reg_prefs.no_hotkeys)
disable_hotkey_items (dlg, 1);
if (!reg_prefs.auto_backup)
@@ -272,8 +279,8 @@
_("Preferences"), MB_ERR);
return TRUE;
}
+ reg_prefs.default_ext = SendDlgItemMessage (dlg, IDC_PREFS_DEFEXT, CB_GETCURSEL, 0, 0);
reg_prefs.word_wrap = rc;
- reg_prefs.use_tmpfiles = IsDlgButtonChecked (dlg, IDC_PREFS_SECMODE)? 0 : 1;
reg_prefs.use_viewer = IsDlgButtonChecked (dlg, IDC_PREFS_VIEWER)? 1 : 0;
reg_prefs.backup.mode = IsDlgButtonChecked (dlg, IDC_PREFS_BAKHOME ) ? 1 :
IsDlgButtonChecked (dlg, IDC_PREFS_BAKUSER)? 2 : 0;
Modified: trunk/Src/wptRegistry.cpp
===================================================================
--- trunk/Src/wptRegistry.cpp 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/Src/wptRegistry.cpp 2006-05-24 07:53:24 UTC (rev 218)
@@ -472,7 +472,7 @@
NULL,
"CacheTime",
"WordWrap",
- "FastMode",
+ "DefaultExt",
"Viewer",
"WipeMode",
"AlwaysTrust",
@@ -532,8 +532,8 @@
case CFG_WIPEMODE:
sprintf (buf, "%d", opt->wipe_mode);
break;
- case CFG_FASTMODE:
- sprintf (buf, "%d", opt->use_tmpfiles);
+ case CFG_FILEEXT:
+ sprintf (buf, "%d", opt->default_ext);
break;
case CFG_NOZIP_MMEDIA:
sprintf (buf, "%d", opt->no_zip_mmedia);
@@ -638,8 +638,8 @@
case CFG_WORDWRAP:
opt->word_wrap = atol (val);
break;
- case CFG_FASTMODE:
- opt->use_tmpfiles = atol (val);
+ case CFG_FILEEXT:
+ opt->default_ext = atol (val);
break;
case CFG_NOZIP_MMEDIA:
opt->no_zip_mmedia = atol (val);
Modified: trunk/THANKS
===================================================================
--- trunk/THANKS 2006-05-22 14:21:39 UTC (rev 217)
+++ trunk/THANKS 2006-05-24 07:53:24 UTC (rev 218)
@@ -14,6 +14,9 @@
Intevation for providing the nice GForge environment and webspace.
+And last but not least g10 Code for offering commercial support
+and the resources.
+
Achim Pietig achim at pietig.com
Andy Futrell andy.futrell at ipaper.com
Andrea Ungaro semperfin at tin.it
More information about the Winpt-commits
mailing list