[Winpt-commits] r174 - in trunk: . Include Po Src
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Thu Feb 2 09:20:52 CET 2006
Author: twoaday
Date: 2006-02-02 09:20:50 +0100 (Thu, 02 Feb 2006)
New Revision: 174
Modified:
trunk/Include/wptCommonCtl.h
trunk/Include/wptW32API.h
trunk/NEWS
trunk/Po/de.po
trunk/Src/ChangeLog
trunk/Src/WinPT.cpp
trunk/Src/wptAboutDlgs.cpp
trunk/Src/wptClipEditDlg.cpp
trunk/Src/wptKeyPropsDlg.cpp
trunk/Src/wptKeylist.cpp
trunk/Src/wptListView.cpp
trunk/Src/wptMainProc.cpp
trunk/TODO
Log:
2006-01-31 Timo Schulz <ts at g10code.de>
* wptMainProc.cpp (winpt_main_proc): Fix usage of the
help system.
* wptListView.cpp (listview_set_chkbox_style): New.
(listview_get_item_state): Support new checkbox style.
(listview_new): Reset flag var.
* wptKeylist.cpp (keylist_build): Support new checkbox style.
2006-01-30 Timo Schulz <ts at g10code.de>
* WinPT.cpp (check_readonly_attr): New.
(load_gpg_env): Use it here.
(WinPT): Make the the default key is searched in the
secret key cache.
Change error message.
* wptRegistry.cpp (regist_int_winpt): Make sure
the register extension is only offered once to the user.
* wptKeyPropsDlg.cpp (get_photo_tmpname): Always use
temp directory. Fixed a privilege problem.
Modified: trunk/Include/wptCommonCtl.h
===================================================================
--- trunk/Include/wptCommonCtl.h 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Include/wptCommonCtl.h 2006-02-02 08:20:50 UTC (rev 174)
@@ -60,6 +60,7 @@
HWND ctrl; /* the actual listview window. */
int cols; /* number of columns. */
int items; /* number of items. */
+ unsigned int ext_chkbox:1; /* exteneded style: checkboxes. */
HIMAGELIST hil; /* Imagelist context. */
};
typedef struct listview_ctrl_s * listview_ctrl_t;
@@ -85,6 +86,7 @@
int listview_get_item_text (listview_ctrl_t ctx, int entry, int pos,
char *text, int maxbytes);
void listview_set_ext_style (listview_ctrl_t ctx);
+void listview_set_chkbox_style (listview_ctrl_t ctx);
int listview_set_column_order (listview_ctrl_t ctx, int *array);
int listview_del_items (listview_ctrl_t ctx);
void listview_select_all (listview_ctrl_t ctx);
Modified: trunk/Include/wptW32API.h
===================================================================
--- trunk/Include/wptW32API.h 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Include/wptW32API.h 2006-02-02 08:20:50 UTC (rev 174)
@@ -88,13 +88,11 @@
#ifdef _MSC_VER
#include <htmlhelp.h>
-/* Support for the new html context sentensive help. For
- now it can be only used with native W32 compilers. */
#define html_help_init(cookie) \
HtmlHelp (NULL, NULL, HH_INITIALIZE, (DWORD)(cookie))
-#define html_help_deinit() \
- HtmlHelp (NULL, NULL, HH_UNINITIALIZE, 0)
+#define html_help_deinit(cookie) \
+ HtmlHelp (NULL, NULL, HH_UNINITIALIZE, (DWORD)(cookie))
#define html_help_dispatch(param, file, helparr) do { \
HELPINFO *inf; \
@@ -105,7 +103,7 @@
} while (0)
#else
#define html_help_init(cookie) do {} while (0)
-#define html_help_deinit() do {} while (0)
+#define html_help_deinit(cookie) do { (cookie) = 0; } while (0)
#define html_help_dispatch(param, file, helparr) do {} while (0)
#endif
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/NEWS 2006-02-02 08:20:50 UTC (rev 174)
@@ -742,3 +742,8 @@
(0.11.8)
* Improved key edit system. It now always also to edit public keys.
* Allow to sign a single user-id (new key edit dialog).
+* Check if the keyrings are read-only and offer to remove
+ this limitation.
+* Fix a problem that an unprivileged (normal) user cannot
+ display photo-ids via the Key Property dialog.
+* New key selection system for encryption based dialogs.
Modified: trunk/Po/de.po
===================================================================
--- trunk/Po/de.po 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Po/de.po 2006-02-02 08:20:50 UTC (rev 174)
@@ -15,7 +15,7 @@
msgstr ""
"Project-Id-Version: WinPT 0.11.6\n"
"Report-Msgid-Bugs-To: winpt at freakmail.de\n"
-"POT-Creation-Date: 2006-01-29 18:26+0100\n"
+"POT-Creation-Date: 2006-01-30 22:56+0100\n"
"PO-Revision-Date: 2005-12-28 16:10+0100\n"
"Last-Translator: Timo Schulz <ts at g10code.de>\n"
"Language-Team: DE <twoaday at freakmail.de>\n"
@@ -23,29 +23,29 @@
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
-#: Src/WinPT.cpp:166
+#: Src/WinPT.cpp:184
msgid "Could not create GPG home directory"
msgstr "Konnte GPG-Heimatverzeichnis nicht erstellen"
-#: Src/WinPT.cpp:167 Src/WinPT.cpp:198 Src/WinPT.cpp:248 Src/WinPT.cpp:252
-#: Src/WinPT.cpp:415 Src/WinPT.cpp:422 Src/WinPT.cpp:467 Src/WinPT.cpp:495
-#: Src/WinPT.cpp:504 Src/WinPT.cpp:508 Src/WinPT.cpp:525 Src/WinPT.cpp:595
-#: Src/WinPT.cpp:608 Src/WinPT.cpp:655 Src/WinPT.cpp:681 Src/WinPT.cpp:698
+#: Src/WinPT.cpp:185 Src/WinPT.cpp:217 Src/WinPT.cpp:267 Src/WinPT.cpp:271
+#: Src/WinPT.cpp:434 Src/WinPT.cpp:441 Src/WinPT.cpp:486 Src/WinPT.cpp:514
+#: Src/WinPT.cpp:523 Src/WinPT.cpp:527 Src/WinPT.cpp:544 Src/WinPT.cpp:614
+#: Src/WinPT.cpp:627 Src/WinPT.cpp:674 Src/WinPT.cpp:700 Src/WinPT.cpp:718
#: Src/wptErrors.cpp:141 Src/wptGPG.cpp:912 Src/wptGPG.cpp:923
#: Src/wptGPG.cpp:932 Src/wptGPG.cpp:942 Src/wptMainProc.cpp:345
#: Src/wptMainProc.cpp:527
msgid "WinPT Error"
msgstr "WinPT Fehler"
-#: Src/WinPT.cpp:197
+#: Src/WinPT.cpp:216
msgid "No useable secret key found."
msgstr "Kein benutzbarer geheimer Schlüssel gefunden."
-#: Src/WinPT.cpp:247
+#: Src/WinPT.cpp:266
msgid "Could not read GnuPG version."
msgstr "Konnte GnuPG-Version nicht auslesen."
-#: Src/WinPT.cpp:253
+#: Src/WinPT.cpp:272
#, c-format
msgid ""
"Sorry, you need a newer GPG version.\n"
@@ -54,11 +54,11 @@
"Sorry, Sie benötigen eine neuere GPG-Version.\n"
"Aktuelle GPG-Version %d.%d.%d benötigte benoetigte GPG version "
-#: Src/WinPT.cpp:281
+#: Src/WinPT.cpp:300
msgid "Failed to create WinPT directory"
msgstr "Konnte WinPT Verzeichnis nicht erstellen"
-#: Src/WinPT.cpp:282 Src/WinPT.cpp:300 Src/WinPT.cpp:311
+#: Src/WinPT.cpp:301 Src/WinPT.cpp:319 Src/WinPT.cpp:330
#: Src/wptKeyManagerDlg.cpp:957 Src/wptKeyserver.cpp:537
#: Src/wptKeyserverDlg.cpp:66 Src/wptKeyserverDlg.cpp:196
#: Src/wptKeyserverDlg.cpp:204 Src/wptKeyserverDlg.cpp:220
@@ -72,21 +72,21 @@
msgid "Keyserver"
msgstr "Schlüsselserver"
-#: Src/WinPT.cpp:299
+#: Src/WinPT.cpp:318
msgid "Failed to copy the keyserver.conf"
msgstr "Das Kopieren der keyserver.conf ist fehlgeschlagen"
# c:\oss\winpt-gpgme\src\WinPT.cpp:245
-#: Src/WinPT.cpp:414
+#: Src/WinPT.cpp:433
msgid "Cryptographic selftest failed."
msgstr "Kryptographischer Selbsttest ist fehlgeschlagen."
# c:\oss\winpt-gpgme\src\WinPT.cpp:252
-#: Src/WinPT.cpp:421
+#: Src/WinPT.cpp:440
msgid "A newer GPGME version is needed; at least "
msgstr "Eine neuere GPGME version wird benötigt; mindestens "
-#: Src/WinPT.cpp:468
+#: Src/WinPT.cpp:487
#, c-format
msgid ""
"GPG home directory is not set correctly.\n"
@@ -97,17 +97,17 @@
"Bitte überprüfen Sie die GPG Registryseinträge:\n"
"%s"
-#: Src/WinPT.cpp:472
+#: Src/WinPT.cpp:491
msgid "Select GPG Public Keyring"
msgstr "Öffentlichen GPG-Schlüsselbund auswählen"
# XXX: the \0\0 problem
# c:\oss\winpt-gpgme\src\WinPT.cpp:313
-#: Src/WinPT.cpp:494
+#: Src/WinPT.cpp:513
msgid "GPG home directory could not be determited."
msgstr "GPG-Home-Dir konnte nicht bestimmt werden."
-#: Src/WinPT.cpp:502
+#: Src/WinPT.cpp:521
msgid ""
"Could not find the GPG binary (gpg.exe).\n"
"Do you want to start the GPG preferences to correct this problem?"
@@ -116,7 +116,7 @@
"öffnen um das Problem zu beheben?"
# c:\oss\winpt-gpgme\src\WinPT.cpp:339
-#: Src/WinPT.cpp:517
+#: Src/WinPT.cpp:536
msgid ""
"Could not access and/or find the public and secret keyring.\n"
"If this is an accident, quit the program and fix it.\n"
@@ -131,20 +131,20 @@
# c:\oss\winpt-gpgme\src\WinPT.cpp:376
# c:\oss\winpt-gpgme\src\wptFileManagerDlg.cpp:426
# c:\oss\winpt-gpgme\src\wptFileManagerDlg.cpp:711
-#: Src/WinPT.cpp:550 Src/wptFileManagerDlg.cpp:487
+#: Src/WinPT.cpp:569 Src/wptFileManagerDlg.cpp:487
#: Src/wptFileManagerDlg.cpp:801
msgid "Wipe Free Space"
msgstr "Freien Speicher Löschen"
-#: Src/WinPT.cpp:594
+#: Src/WinPT.cpp:613
msgid "Could not register window class"
msgstr "Konnte keine Fensterklasse registrieren"
-#: Src/WinPT.cpp:608
+#: Src/WinPT.cpp:627
msgid "Could not create window"
msgstr "Konnte Fenster nicht erstellen"
-#: Src/WinPT.cpp:679
+#: Src/WinPT.cpp:698
msgid ""
"The keycache was not initialized or is empty.\n"
"Please check your GPG config (keyrings, pathes...)"
@@ -152,7 +152,7 @@
"Der Schlüsselspeicher wurde nicht initialisiert oder ist leer.\n"
"Bitte checken Sie die GPG Konfiguration (Schlüsselbunde, Pfade)"
-#: Src/WinPT.cpp:682
+#: Src/WinPT.cpp:701
msgid ""
"It seems that GPG is not set properly.\n"
"Do you want to start the GPG preferences dialog?"
@@ -160,17 +160,16 @@
"GPG ist nicht richtig konfiguriert.\n"
"Den GPG-Einstellungsdialog starten?"
-#: Src/WinPT.cpp:699
+#: Src/WinPT.cpp:719
#, c-format
msgid ""
-"Default key from the GPG options file could not be found.\n"
-"Please check your gpg.conf (options) to correct this:\n"
+"Default key (from the GPG config file) could not be found.\n"
+"Please check your gpg.conf or set a new default key to correct it:\n"
"\n"
"%s: public key not found."
msgstr ""
-"Standardschlüssel, der in der GPG-Optionendatei angegeben ist, kann nicht "
-"gefunden werden.\n"
-"Bitte überprüfen Sie Ihre GPG.CONF und korrigieren Sie das:\n"
+"Standardschlüssel (in der GPG Config-Datei) nicht gefunden.\n"
+"Bitte überprüfen Sie die gpg.conf oder setzen Sie einen neuen Standardschlüssel um das Problem zu beheben:\n"
"\n"
"%s: Öffentlicher Schlüssel nicht gefunden."
@@ -1637,7 +1636,7 @@
#: Src/wptMainProc.cpp:430 Src/wptPreferencesDlg.cpp:209
#: Src/wptPreferencesDlg.cpp:252 Src/wptPreferencesDlg.cpp:263
#: Src/wptPreferencesDlg.cpp:275 Src/wptPreferencesDlg.cpp:308
-#: Src/wptRegistry.cpp:609
+#: Src/wptRegistry.cpp:596
msgid "Preferences"
msgstr "Einstellungen"
@@ -1936,14 +1935,14 @@
#: Src/wptKeyEditDlgs.cpp:1086 Src/wptKeyEditDlgs.cpp:1147
#: Src/wptKeyEditDlgs.cpp:1396 Src/wptKeyEditDlgs.cpp:1416
#: Src/wptKeyEditDlgs.cpp:1455 Src/wptKeyEditDlgs.cpp:1486
-#: Src/wptKeylist.cpp:392 Src/wptKeylist.cpp:426 Src/wptKeyPropsDlg.cpp:161
+#: Src/wptKeylist.cpp:392 Src/wptKeylist.cpp:426 Src/wptKeyPropsDlg.cpp:165
#: Src/wptKeysigDlg.cpp:143 Src/wptKeysigDlg.cpp:208
msgid "Revoked"
msgstr "Widerrufen"
#: Src/wptImportList.cpp:266 Src/wptKeyEditDlgs.cpp:229
#: Src/wptKeyEditDlgs.cpp:1084 Src/wptKeyEditDlgs.cpp:1317
-#: Src/wptKeylist.cpp:394 Src/wptKeylist.cpp:424 Src/wptKeyPropsDlg.cpp:158
+#: Src/wptKeylist.cpp:394 Src/wptKeylist.cpp:424 Src/wptKeyPropsDlg.cpp:162
#: Src/wptKeysigDlg.cpp:142 Src/wptKeysigDlg.cpp:209
msgid "Expired"
msgstr "Abgelaufen"
@@ -2113,7 +2112,7 @@
#: Src/wptKeyEditDlgs.cpp:1418 Src/wptKeyEditDlgs.cpp:1488
#: Src/wptKeyEditDlgs.cpp:1568 Src/wptKeyEditDlgs.cpp:1746
#: Src/wptKeygenDlg.cpp:496 Src/wptKeygenDlg.cpp:612
-#: Src/wptKeyPropsDlg.cpp:359 Src/wptOwnertrustDlg.cpp:124
+#: Src/wptKeyPropsDlg.cpp:363 Src/wptOwnertrustDlg.cpp:124
#: Src/wptOwnertrustDlg.cpp:136
msgid "GnuPG Status"
msgstr "GnuPG-Status"
@@ -2241,7 +2240,7 @@
msgstr "Bevorzugter Keyserver wurde erfolgreich gesetzt."
#: Src/wptKeyEditDlgs.cpp:908 Src/wptKeyEditOwnertrustDlg.cpp:55
-#: Src/wptKeyPropsDlg.cpp:351
+#: Src/wptKeyPropsDlg.cpp:355
msgid "Change Ownertrust"
msgstr "Besitzervertrauen ändern"
@@ -2350,7 +2349,6 @@
"SIGN\t \t\tBenutzerkennung signieren (exportierbar)\r\n"
"LSIGN\t \t\tBenutzerkennung signieren (nicht-exportierbar)\r\n"
-
#: Src/wptKeyEditDlgs.cpp:1241
msgid "Key Edit Help"
msgstr "Hilfe zum Schlüssel bearbeiten"
@@ -2571,7 +2569,7 @@
#: Src/wptKeyEditOwnertrustDlg.cpp:88 Src/wptKeyEditOwnertrustDlg.cpp:95
#: Src/wptKeyEditOwnertrustDlg.cpp:104 Src/wptKeyManagerDlg.cpp:936
-#: Src/wptKeyManagerDlg.cpp:1767 Src/wptKeyPropsDlg.cpp:291
+#: Src/wptKeyManagerDlg.cpp:1767 Src/wptKeyPropsDlg.cpp:295
#: Src/wptOwnertrustDlg.cpp:97 Src/wptOwnertrustDlg.cpp:121
#: Src/wptOwnertrustDlg.cpp:133
msgid "Ownertrust"
@@ -2833,7 +2831,7 @@
msgid "Full"
msgstr "Voll"
-#: Src/wptKeylist.cpp:396 Src/wptKeylist.cpp:422 Src/wptKeyPropsDlg.cpp:164
+#: Src/wptKeylist.cpp:396 Src/wptKeylist.cpp:422 Src/wptKeyPropsDlg.cpp:168
msgid "Disabled"
msgstr "Inaktiv"
@@ -3333,7 +3331,7 @@
msgid "Key Signature List"
msgstr "Schlüssel-Signatur-Liste"
-#: Src/wptKeyManagerDlg.cpp:1598 Src/wptKeyPropsDlg.cpp:287
+#: Src/wptKeyManagerDlg.cpp:1598 Src/wptKeyPropsDlg.cpp:291
msgid "Key Properties"
msgstr "Schlüsseleigenschaften"
@@ -3401,13 +3399,13 @@
msgid "Unknown"
msgstr "Unbekannt"
-#: Src/wptKeyPropsDlg.cpp:211
+#: Src/wptKeyPropsDlg.cpp:215
#, c-format
msgid "Card-Type: %s\r\n"
msgstr ""
# c:\oss\winpt-gpgme\src\wptKeyPropsDlg.cpp:214
-#: Src/wptKeyPropsDlg.cpp:240
+#: Src/wptKeyPropsDlg.cpp:244
#, c-format
msgid ""
"Type: %s\r\n"
@@ -3430,25 +3428,25 @@
"Cipher: %s\r\n"
"%s\r\n"
-#: Src/wptKeyPropsDlg.cpp:288
+#: Src/wptKeyPropsDlg.cpp:292
msgid "&Change"
msgstr "&Ändern"
-#: Src/wptKeyPropsDlg.cpp:289
+#: Src/wptKeyPropsDlg.cpp:293
msgid "&Revokers"
msgstr "\"&Revokers\""
-#: Src/wptKeyPropsDlg.cpp:290
+#: Src/wptKeyPropsDlg.cpp:294
msgid "Change &Password"
msgstr "&Passwort ändern"
-#: Src/wptKeyPropsDlg.cpp:297
+#: Src/wptKeyPropsDlg.cpp:301
msgid "Photo-ID not validated."
msgstr "Foto-ID nicht geprüft."
# msgid "Unknown"
# msgstr "Unbekannt"
-#: Src/wptKeyPropsDlg.cpp:335
+#: Src/wptKeyPropsDlg.cpp:339
msgid ""
"The status of this key is 'revoked' or 'expired'.\n"
"You cannot change the ownertrust of such keys."
@@ -3456,11 +3454,11 @@
"Der Status dieses Schlüssels ist 'widerrufen' oder 'abgelaufen'.\n"
"Sie können das Vertrauen in solche Schlüssel nicht ändern."
-#: Src/wptKeyPropsDlg.cpp:337 Src/wptKeyPropsDlg.cpp:344
+#: Src/wptKeyPropsDlg.cpp:341 Src/wptKeyPropsDlg.cpp:348
msgid "WinPT Warning"
msgstr "WinPT Warnung"
-#: Src/wptKeyPropsDlg.cpp:341
+#: Src/wptKeyPropsDlg.cpp:345
msgid ""
"This is a non-valid key.\n"
"Modifying the ownertrust has no effect on such keys.\n"
@@ -3471,11 +3469,11 @@
"Das Vertrauen solcher Schlüssel zu ändern hat keinerlei Effekt.\n"
"Trotzdem fortfahren?"
-#: Src/wptKeyPropsDlg.cpp:358
+#: Src/wptKeyPropsDlg.cpp:362
msgid "Ownertrust successfully changed."
msgstr "Besitzervertrauen erfolgreich geändert."
-#: Src/wptKeyPropsDlg.cpp:371 Src/wptKeyRevokersDlg.cpp:146
+#: Src/wptKeyPropsDlg.cpp:375 Src/wptKeyRevokersDlg.cpp:146
msgid "Key Revokers"
msgstr "Schlüsselwiderrufer"
@@ -4032,7 +4030,7 @@
msgid "Remove all passphrases from cache?"
msgstr "Alle Passwörter aus Zwischenspeicher entfernen?"
-#: Src/wptMainProc.cpp:486 Src/wptProgressDlg.cpp:122 Src/wptRegistry.cpp:182
+#: Src/wptMainProc.cpp:486 Src/wptProgressDlg.cpp:122 Src/wptRegistry.cpp:202
msgid "WinPT"
msgstr "WinPT"
@@ -4382,19 +4380,19 @@
msgid "Please fill out all required fields for authentication."
msgstr "Bitte alle benötigen Felder für die Authentifizierung eingeben."
-#: Src/wptRegistry.cpp:165
+#: Src/wptRegistry.cpp:164
msgid "GPG Detached Signature"
msgstr "GPG Abgetrennte Signatur"
-#: Src/wptRegistry.cpp:166
+#: Src/wptRegistry.cpp:165
msgid "GPG Encrypted Data"
msgstr "GPG Verschlüsselte Daten"
-#: Src/wptRegistry.cpp:167
+#: Src/wptRegistry.cpp:166
msgid "GPG Armored Data"
msgstr "GPG ASCII-Geschützte Daten"
-#: Src/wptRegistry.cpp:180
+#: Src/wptRegistry.cpp:200
msgid ""
"WinPT can register some GPG file types for you so they can be processed with "
"a double click in the explorer.\n"
@@ -4404,11 +4402,11 @@
"Doppelklick im Explorer öffnen können.\n"
"Möchten Sie fortfahren?"
-#: Src/wptRegistry.cpp:191
+#: Src/wptRegistry.cpp:208
msgid "WinPT WARNING"
msgstr "WinPT WARNUNG"
-#: Src/wptRegistry.cpp:192
+#: Src/wptRegistry.cpp:209
#, c-format
msgid ""
"It seems there was already a '%s' file type registered by another "
@@ -4418,7 +4416,7 @@
"Der Dateityp '%s' scheint mit einer anderen Anwendung verknüpft zu sein.\n"
"Überschreiben?"
-#: Src/wptRegistry.cpp:609
+#: Src/wptRegistry.cpp:596
msgid "Could not write to Registry."
msgstr "Konnte Werte in Registry nicht speichern"
Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Src/ChangeLog 2006-02-02 08:20:50 UTC (rev 174)
@@ -1,3 +1,12 @@
+2006-01-31 Timo Schulz <ts at g10code.de>
+
+ * wptMainProc.cpp (winpt_main_proc): Fix usage of the
+ help system.
+ * wptListView.cpp (listview_set_chkbox_style): New.
+ (listview_get_item_state): Support new checkbox style.
+ (listview_new): Reset flag var.
+ * wptKeylist.cpp (keylist_build): Support new checkbox style.
+
2006-01-30 Timo Schulz <ts at g10code.de>
* WinPT.cpp (check_readonly_attr): New.
@@ -2,4 +11,9 @@
(load_gpg_env): Use it here.
+ (WinPT): Make the the default key is searched in the
+ secret key cache.
+ Change error message.
* wptRegistry.cpp (regist_int_winpt): Make sure
- the register extension is only offered once to the user.
+ the register extension is only offered once to the user.
+ * wptKeyPropsDlg.cpp (get_photo_tmpname): Always use
+ temp directory. Fixed a privilege problem.
Modified: trunk/Src/WinPT.cpp
===================================================================
--- trunk/Src/WinPT.cpp 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Src/WinPT.cpp 2006-02-02 08:20:50 UTC (rev 174)
@@ -690,7 +690,7 @@
}
}
else {
- gpg_keycache_t c;
+ gpg_keycache_t c, sec_c;
update_keycache (hwnd);
c = keycache_get_ctx (1);
if (!c || !gpg_keycache_get_size (c)) {
@@ -712,11 +712,12 @@
return 0;
}
}
- if (check_default_key (c)) {
+ sec_c = keycache_get_ctx (0);
+ if (check_default_key (sec_c)) {
char *p = get_gnupg_default_key ();
log_box (_("WinPT Error"), MB_ERR,
- _("Default key from the GPG options file could not be found.\n"
- "Please check your gpg.conf (options) to correct this:\n\n"
+ _("Default key (from the GPG config file) could not be found.\n"
+ "Please check your gpg.conf or set a new default key to correct it:\n\n"
"%s: public key not found."), p? p : "[null]");
free_if_alloc (p);
DestroyWindow (hwnd);
Modified: trunk/Src/wptAboutDlgs.cpp
===================================================================
--- trunk/Src/wptAboutDlgs.cpp 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Src/wptAboutDlgs.cpp 2006-02-02 08:20:50 UTC (rev 174)
@@ -89,11 +89,8 @@
BOOL CALLBACK
about_winpt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
- static DWORD cookie = 0;
-
switch (msg) {
case WM_INITDIALOG:
- html_help_init (&cookie);
SetWindowText (dlg, _("About WinPT"));
SetDlgItemText (dlg, IDC_ABOUT_GPLINF, _("Warranty"));
SetDlgItemText (dlg, IDC_ABOUT_INFO,
@@ -122,10 +119,6 @@
SetForegroundWindow (dlg);
return TRUE;
- case WM_DESTROY:
- html_help_deinit ();
- break;
-
case WM_HELP:
html_help_dispatch (lparam, "winpt.chm::winpt_texts.txt", help_arr);
break;
Modified: trunk/Src/wptClipEditDlg.cpp
===================================================================
--- trunk/Src/wptClipEditDlg.cpp 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Src/wptClipEditDlg.cpp 2006-02-02 08:20:50 UTC (rev 174)
@@ -189,8 +189,6 @@
BOOL CALLBACK
clip_edit_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
- static DWORD cookie = 0;
-
switch (msg) {
case WM_INITDIALOG:
SetWindowText (dlg, _("Clipboard Editor"));
@@ -201,16 +199,11 @@
SetDlgItemText (dlg, IDC_CLIPEDIT_QUOTE, _("Add quotes"));
SetDlgItemText (dlg, IDOK, _("&Close"));
- html_help_init (&cookie);
load_clipboard (dlg);
center_window (dlg, NULL);
SetForegroundWindow (dlg);
return TRUE;
- case WM_DESTROY:
- html_help_deinit ();
- break;
-
case WM_HELP:
html_help_dispatch (lparam, "winpt.chm::winpt_texts.txt", help_arr);
break;
Modified: trunk/Src/wptKeyPropsDlg.cpp
===================================================================
--- trunk/Src/wptKeyPropsDlg.cpp 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Src/wptKeyPropsDlg.cpp 2006-02-02 08:20:50 UTC (rev 174)
@@ -79,9 +79,13 @@
static const char*
get_photo_tmpname (HWND dlg)
{
- static char buf[64];
+ static char buf[MAX_PATH+128+1];
+ char name[64];
- _snprintf (buf, sizeof (buf)-1, "winpt_photo_%08lX.tmp", (DWORD)dlg);
+ _snprintf (name, sizeof (name)-1, "winpt_photo_%08lX.tmp", (DWORD)dlg);
+ GetTempPath (sizeof (buf)-128, buf);
+ strcat (buf, name);
+
return buf;
}
Modified: trunk/Src/wptKeylist.cpp
===================================================================
--- trunk/Src/wptKeylist.cpp 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Src/wptKeylist.cpp 2006-02-02 08:20:50 UTC (rev 174)
@@ -562,7 +562,7 @@
HICON ico[2];
listview_ctrl_t lv;
listview_column_t col;
- int j, n = 0;
+ int j, n = 0, ext_chk = 0;
int rc = 0;
rc = listview_new (&lv);
@@ -573,10 +573,12 @@
if ((mode & KEYLIST_ENCRYPT) || (mode & KEYLIST_ENCRYPT_MIN)) {
col = klist_enc;
n = (DIM(klist_enc) -1);
+ ext_chk = 1;
}
else if ((mode & KEYLIST_SIGN)) {
col = klist_enc;
n = (DIM(klist_enc) - 1) - 1;
+ ext_chk = 1;
}
else {
col = klist;
@@ -584,8 +586,10 @@
}
for (j = 0; j < n; j++)
- listview_add_column (lv, &col[j]);
+ listview_add_column (lv, &col[j]);
listview_set_ext_style (lv);
+ if (ext_chk)
+ listview_set_chkbox_style (lv);
ico[0] = LoadIcon (glob_hinst, (LPCTSTR)IDI_PUBKEY);
ico[1] = LoadIcon (glob_hinst, (LPCTSTR)IDI_KEYPAIR);
listview_set_image_list (lv, ico, 2);
Modified: trunk/Src/wptListView.cpp
===================================================================
--- trunk/Src/wptListView.cpp 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Src/wptListView.cpp 2006-02-02 08:20:50 UTC (rev 174)
@@ -49,9 +49,10 @@
c->items = 0;
c->ctrl = NULL;
c->hil = NULL;
+ c->ext_chkbox = 0;
*ctx = c;
return 0;
-} /* listview_new */
+}
void
@@ -247,11 +248,18 @@
}
+/* Return if the given element is selected or if the ext
+ style is used, if the checkbox is activated. */
int
-listview_get_item_state( listview_ctrl_t ctx, int pos )
-{
- return ListView_GetItemState( ctx->ctrl, pos, LVIS_SELECTED );
-} /* listview_get_item_state */
+listview_get_item_state (listview_ctrl_t ctx, int pos)
+{
+ int ret;
+ if (ctx->ext_chkbox)
+ ret = ListView_GetCheckState (ctx->ctrl, pos);
+ else
+ ret = ListView_GetItemState (ctx->ctrl, pos, LVIS_SELECTED);
+ return ret;
+}
int
@@ -321,11 +329,21 @@
} /* listview_get_item_text */
+/* Use extended style with checkboxes for each item. */
void
-listview_set_ext_style( listview_ctrl_t ctx )
+listview_set_chkbox_style (listview_ctrl_t ctx)
+{
+ ListView_SetExtendedListViewStyle (ctx->ctrl, LVS_EX_CHECKBOXES);
+ ctx->ext_chkbox = 1;
+}
+
+
+/* Use extended style to select the entire row. */
+void
+listview_set_ext_style (listview_ctrl_t ctx)
{
- ListView_SetExtendedListViewStyle( ctx->ctrl, LVS_EX_FULLROWSELECT );
-} /* listview_set_ext_style */
+ ListView_SetExtendedListViewStyle (ctx->ctrl, LVS_EX_FULLROWSELECT);
+}
int
Modified: trunk/Src/wptMainProc.cpp
===================================================================
--- trunk/Src/wptMainProc.cpp 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/Src/wptMainProc.cpp 2006-02-02 08:20:50 UTC (rev 174)
@@ -319,6 +319,7 @@
winpt_main_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
static NOTIFYICONDATA NID;
+ static DWORD cookie;
static int use_hotkey = 0;
INITCOMMONCONTROLSEX cce;
LPARAM param;
@@ -348,6 +349,7 @@
cce.dwSize = sizeof (INITCOMMONCONTROLSEX);
cce.dwICC = ICC_DATE_CLASSES;
InitCommonControlsEx (&cce);
+ html_help_init (&cookie);
LoadLibrary ("RichEd32.Dll");
break;
@@ -365,6 +367,7 @@
hotkeys_unregister (hwnd);
PTD_delete ();
agent_flush_cache ();
+ html_help_deinit (cookie);
if (!gpg_clip_istext_avail (&has_data) && has_data) {
int chk = get_reg_winpt_flag ("WipeClipboard");
if (chk == -1 && msg != WM_ENDSESSION)
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2006-01-30 14:01:50 UTC (rev 173)
+++ trunk/TODO 2006-02-02 08:20:50 UTC (rev 174)
@@ -1,7 +1,6 @@
Feel free if you think there is missing something to mail me.
-0.11.x-
- * Issue a warning if the keyrings are read-only.
* On modern P4 CPUs the thread scheduling mechanism seems to
cause trouble and the result is that any GPG operation will
be take much longer as expected.
More information about the Winpt-commits
mailing list