[Winpt-commits] r329 - trunk/Include

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Sep 25 18:08:15 CEST 2009


Author: twoaday
Date: 2009-09-25 18:08:14 +0200 (Fri, 25 Sep 2009)
New Revision: 329

Removed:
   trunk/Include/wptListView.h
Modified:
   trunk/Include/Makefile.am
   trunk/Include/wptCommonCtl.h
   trunk/Include/wptContext.h
   trunk/Include/wptCrypto.h
   trunk/Include/wptDlgs.h
   trunk/Include/wptErrors.h
   trunk/Include/wptFileManager.h
   trunk/Include/wptGPG.h
   trunk/Include/wptHotkey.h
   trunk/Include/wptKeyCache.h
   trunk/Include/wptKeyEdit.h
   trunk/Include/wptKeyManager.h
   trunk/Include/wptKeylist.h
   trunk/Include/wptKeyserver.h
   trunk/Include/wptNLS.h
   trunk/Include/wptRegistry.h
   trunk/Include/wptVersion.h
   trunk/Include/wptW32API.h
Log:


Modified: trunk/Include/Makefile.am
===================================================================
--- trunk/Include/Makefile.am	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/Makefile.am	2009-09-25 16:08:14 UTC (rev 329)
@@ -27,7 +27,6 @@
 	wptHTTP.h \
 	wptKeyEdit.h \
 	wptKeylist.h \
-        wptListView.h \
 	wptKeyManager.h \
 	wptKeyserver.h \
 	wptNLS.h \

Modified: trunk/Include/wptCommonCtl.h
===================================================================
--- trunk/Include/wptCommonCtl.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptCommonCtl.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,6 +1,5 @@
 /* wptCommonCtl.h - Win32 Imagelist headerfile
- *	Copyright (C) 2003 Andreas Jobs
- *	Copyright (C) 2004, 2005, 2006 Timo Schulz
+ *	Copyright (C) 2004-2006, 2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -13,10 +12,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
  */
 
 #ifndef WPT_COMMONCTL_H
@@ -88,6 +83,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_grid_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_set_column_width (listview_ctrl_t ctx, int col, int width);
@@ -103,10 +99,12 @@
 			      HICON *ico, DWORD nicons);
 
 /*-- Image List --*/
-extern HIMAGELIST glob_imagelist;
+int imagelist_load (HWND hwnd, HIMAGELIST *r_il);
+int imagelist_destroy (HIMAGELIST il);
+int imagelist_getindex (HIMAGELIST il, int icon);
 
-int imagelist_load (HWND hwnd);
-int imagelist_destroy (void);
-int imagelist_getindex (int icon);
+int b_imagelist_load (HWND hwnd, HIMAGELIST *r_il);
+int b_imagelist_destroy (HIMAGELIST il);
+int b_imagelist_getindex (HIMAGELIST il, int bitmap);
 
 #endif /*WPT_COMMONCTL_H*/

Modified: trunk/Include/wptContext.h
===================================================================
--- trunk/Include/wptContext.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptContext.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptContext.h - Internal file to store private contexts
- *	Copyright (C) 2001-2006 Timo Schulz
+ *	Copyright (C) 2001-2006, 2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -12,10 +12,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 #ifndef WPT_CONTEXT_H
 #define WPT_CONTEXT_H
@@ -101,6 +97,7 @@
     int  cancel;	    /* user cancelled operation. */
     int  check;		    /* use strict URL checking. */
 };
+typedef struct URL_ctx_s *URL_ctx_t;
 
 /* Key generation context */
 struct genkey_s {

Modified: trunk/Include/wptCrypto.h
===================================================================
--- trunk/Include/wptCrypto.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptCrypto.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptCrypto.h
- *	Copyright (C) 2005 Timo Schulz
+ *	Copyright (C) 2005, 2008 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -20,15 +20,6 @@
 #ifndef WPT_CRYPTO_H
 #define WPT_CRYPTO_H
 
-/* Available wipe modes. */
-enum wipe_mode_t {
-    WIPE_MODE_SIMPLE	= 0,	/* 2 random passes */
-    WIPE_MODE_DOD	= 1,
-    WIPE_MODE_GUTMANN	= 2,
-    WIPE_MODE_FAST	= 3,	/* 1 random pass */
-    WIPE_MODE_PASSES	= 4	/* generic for n random passes. */
-};
-
 /* Possible PGP message types. */
 enum pgp_type_t {
     PGP_NONE	     =  0,
@@ -44,16 +35,10 @@
 extern "C" {
 #endif
 
-int gpg_md_hash_file (int mdalgo, const char *file, byte *digest, size_t *nlen);
+int gpg_md_hash_file (int mdalgo, const char *file, 
+		      byte *digest, size_t *nlen);
 int gpg_md_selftest (void);
 
-int rename_unlink (const char *path);
-int secure_unlink (const char *path, const int mode, const int passes);
-void secure_unlink_set_cb (void (*cb)(void *, const char *, int, int, int),
-			   void *cb_value);
-int wipe_freespace (const char * drive, HANDLE *r_fd,
-		    void (*cb)(void *, unsigned __int64, unsigned __int64), 
-		    void * cb_value);
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/Include/wptDlgs.h
===================================================================
--- trunk/Include/wptDlgs.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptDlgs.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -182,11 +182,6 @@
 				       WPARAM wparam,
 				       LPARAM lparam);
 
-BOOL CALLBACK space_wipefrees_dlg_proc( HWND dlg, 
-				       UINT msg, 
-				       WPARAM wparam, 
-				       LPARAM lparam );
-
 BOOL CALLBACK file_sign_dlg_proc(HWND dlg, 
 				    UINT msg, 
 				    WPARAM wparam,

Modified: trunk/Include/wptErrors.h
===================================================================
--- trunk/Include/wptErrors.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptErrors.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptErrors.h - Errors headerfile
- *	Copyright (C) 2000-2006 Timo Schulz
+ *	Copyright (C) 2000-2006, 2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -12,10 +12,7 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+
  */
 
 #ifndef WPT_ERRORS_H
@@ -85,9 +82,14 @@
 int printf_box (const char * title, int style, const char * format, ...);
 #define log_box printf_box
 
-/*-- wptW32API.cpp --*/
+/*-- wptTrayPop.cpp --*/
 int msg_box (HWND hwnd, const char * text, const char * title, int mode);
 int show_msg (HWND hWnd, int millis, LPCTSTR string);
 #define status_box(hwnd, text, title) msg_box (hwnd, text, title, MB_OK)
 
+void balloon_msg_disable (void);
+void show_balloon_msg (HWND hparwnd, LPCTSTR string, LPCTSTR icon_name);
+HWND show_balloon_msg_pos (HWND hparwnd, int millis, int x, int y,
+			   LPCTSTR string, LPCTSTR icon_name);
+
 #endif /* WPT_ERRORS_H */

Modified: trunk/Include/wptFileManager.h
===================================================================
--- trunk/Include/wptFileManager.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptFileManager.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptFileManager.h - File manager routines
- *	Copyright (C) 2001-2006 Timo Schulz
+ *	Copyright (C) 2001-2006, 2008 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -32,7 +32,6 @@
     FM_VERIFY	    = 6,
     FM_IMPORT	    = 7,
     FM_LIST	    = 8,
-    FM_WIPE	    = 9,
     FM_ENCRYPT_DIR  = 10,
     FM_ENCRYPT_ZIP  = 11
 };
@@ -84,7 +83,6 @@
 	unsigned int revcert:1;
 	unsigned int has_seckey:1;
     } import;
-    unsigned int wipe:1;	/* 1=if original file should be wiped. */
     unsigned int req_signer:1;	/* 1=if user wants to select a signer. */
 };
 typedef struct fm_state_s *fm_state_t;
@@ -151,15 +149,13 @@
 void file_verify_wait (void);
 
 /*-- ccommands --*/
-int fm_encrypt_into_zip (fm_state_t ctx, listview_ctrl_t lv);
 int fm_encrypt (fm_state_t c, const char * name, int sign);
 int fm_sym_encrypt (fm_state_t c, const char * name);
 int fm_decrypt (fm_state_t c, const char * name);
 int fm_sign (fm_state_t c, const char * name);
 int fm_verify (fm_state_t c, int detached, const char * name);
 int fm_import(fm_state_t c, const char *name);
-int fm_list (const char * name, HWND dlg);
-int fm_encrypt_directory (fm_state_t c, const char * name);
+void fm_list (const char * name, HWND dlg);
 int fm_verify_pasted_detsig (listview_ctrl_t lv, HWND dlg);
 int fm_assume_onepass_sig (const char * fname);
 

Modified: trunk/Include/wptGPG.h
===================================================================
--- trunk/Include/wptGPG.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptGPG.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptGPG.h - GnuPG interface
- *	Copyright (C) 2000-2007 Timo Schulz
+ *	Copyright (C) 2000-2007, 2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -207,7 +207,7 @@
 char *request_passphrase2 (const char *title, int flags, int *ret_cancel);
 char *request_key_passphrase (gpgme_key_t key, const char *title, 
 			      int *ret_cancel);
-const char * passphrase_cb (void *opaque, const char * desc, void *r_hd);
+//const char * passphrase_cb (void *opaque, const char * desc, void *r_hd);
 char * get_key_userid (const char *keyid);
 int check_passwd_quality (const char *pass, int strict);
 
@@ -217,9 +217,17 @@
 gpgme_error_t gpg_clip_get_pgptype (int *r_type);
 gpgme_error_t gpg_clip_parse_pgpid (const char *data, int *r_type);
 
+gpgme_error_t gpg_data_utf8_new_from_clipboard (gpgme_data_t *r_dh, 
+						int wraplen, int *r_is_utf8);
+gpgme_error_t gpg_data_new_from_clipboard (gpgme_data_t *r_dh, 
+					   int wraplen);
+
+gpgme_error_t gpg_data_release_utf8_to_clipboard (gpgme_data_t dh);
+gpgme_error_t gpg_data_release_to_clipboard (gpgme_data_t dh, int chg_ver);
+						  
+
 /* wptGPGMEData.cpp --*/
-gpgme_error_t gpg_data_new_from_clipboard (gpgme_data_t *r_dh, int wraplen);
-void	     gpg_data_release_and_set_clipboard (gpgme_data_t dh, int chg_ver);
+
 size_t       gpg_data_readline (gpgme_data_t dh, char *line, size_t nbytes);
 
 gpgme_error_t gpg_data_release_and_set_file (gpgme_data_t dh, const char *fname);

Modified: trunk/Include/wptHotkey.h
===================================================================
--- trunk/Include/wptHotkey.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptHotkey.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -12,24 +12,23 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
  */
 #ifndef WPT_HOTKEY_H
 #define WPT_HOTKEY_H
 
 /* Hotkey IDs. */
 enum hotkey_id_t {
+    // clipboard based
     WPT_CLIP_ENCRYPT_ID	          = 0x3000,
     WPT_CLIP_DECRYPT_VERIFY_ID    = 0x3001,
     WPT_CLIP_SIGN_ID              = 0x3002,
     WPT_CLIP_SIGN_ENCRYPT_ID      = 0x3003,
+    // current window based
     WPT_CURRWND_ENCRYPT_ID        = 0x4000,
     WPT_CURRWND_DECRYPT_VERIFY_ID = 0x4001,
     WPT_CURRWND_SIGN_ID           = 0x4002,
     WPT_CURRWND_SIGN_ENCRYPT_ID   = 0x4003,
+    // 'agent' hotkey
     WPT_AGENT_FORGET_ID           = 0x5000,
 };
 

Modified: trunk/Include/wptKeyCache.h
===================================================================
--- trunk/Include/wptKeyCache.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptKeyCache.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -12,10 +12,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 #ifndef WPT_KEYCACHE_H
 #define WPT_KEYCACHE_H

Modified: trunk/Include/wptKeyEdit.h
===================================================================
--- trunk/Include/wptKeyEdit.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptKeyEdit.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptKeyEdit.h
- *	Copyright (C) 2003, 2004 Timo Schulz
+ *	Copyright (C) 2003, 2004, 2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -12,10 +12,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
  */
 
 #ifndef WPT_KEY_EDIT_H
@@ -100,7 +96,7 @@
     int key_index;  /* key index. */
     int uid_index;  /* userid index. */
 
-    int valid;
+    int valid;    
 
 public:
     int cnt;
@@ -134,6 +130,8 @@
     void setNoPassphrase (bool val);
     void setPassphrase (const char *_pass);
     void setPassphrase2 (const char *_pass2);
+    void setPassphraseCallback (gpgme_passphrase_cb_t cb, void *cb_value);
+    bool usePassphraseCallback (void);
     void setKey (gpgme_key_t key);
     void setKeyID (const char *keyid);
     void setLocalUser (gpgme_key_t locusr);

Modified: trunk/Include/wptKeyManager.h
===================================================================
--- trunk/Include/wptKeyManager.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptKeyManager.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -59,32 +59,33 @@
 int print_import_status (gpgme_import_result_t res);
 
 /*-- wptKeyManager.cpp --*/
-int km_check_for_seckey (listview_ctrl_t lv, int pos, int * utrust);
-int km_check_key_status( listview_ctrl_t lv, int pos );
-int km_get_key_status( listview_ctrl_t lv, int pos );
+int km_check_for_seckey (keylist_ctrl_t kl, int pos, int *utrust);
+int km_check_key_status (keylist_ctrl_t kl, int pos);
+int km_get_key_status (keylist_ctrl_t kl, int pos);
 char* km_key_get_info (winpt_key_t key, int is_sec);
-int km_clip_export( HWND dlg, listview_ctrl_t lv);
-int km_file_export( HWND dlg, listview_ctrl_t lv, const char *fname );
-int km_privkey_export(HWND dlg, listview_ctrl_t lv, const char *fname );
-int km_set_implicit_trust (HWND dlg, listview_ctrl_t lv, int pos);
+int km_clip_export( HWND dlg, keylist_ctrl_t kl);
+int km_file_export( HWND dlg, keylist_ctrl_t kl, const char *fname );
+int km_privkey_export(HWND dlg, keylist_ctrl_t kl, const char *fname );
+int km_set_implicit_trust (HWND dlg, keylist_ctrl_t kl, int pos);
 int km_clip_import (HWND dlg, int *r_newkeys, int *r_newsks);
 int km_file_import (HWND dlg, const char *fname, 
 		    int *r_newkeys, int *r_newsks);
 int km_http_import (HWND dlg, const char * url);
 int km_dropped_file_import (HWND dlg, HDROP hdrop, 
 			    int *r_newkeys, int *r_newsks);
-int km_delete_keys( listview_ctrl_t lv, HWND dlg );
-int km_send_to_keyserver( listview_ctrl_t lv, HWND dlg, const char * host, unsigned short port);
-int km_send_to_mail_recipient( listview_ctrl_t lv, HWND dlg );
-int km_refresh_from_keyserver(listview_ctrl_t lv, HWND dlg);
-int km_check_if_protected( listview_ctrl_t lv, int pos );
-int km_enable_disable_key( listview_ctrl_t lv, HWND dlg, int pos, int enable );
-void km_set_clip_info( const char *uid );
-int km_key_is_v3( listview_ctrl_t lv, int pos );
-void km_find_key (HWND dlg, listview_ctrl_t lv);
+int km_delete_keys( keylist_ctrl_t kl, HWND dlg );
+int km_send_to_keyserver (keylist_ctrl_t kl, HWND dlg, const char *host, 
+			  unsigned short port);
+int km_send_to_mail_recipient (keylist_ctrl_t kl, HWND dlg);
+int km_refresh_from_keyserver (keylist_ctrl_t kl, HWND dlg);
+int km_check_if_protected (keylist_ctrl_t kl, int pos);
+int km_enable_disable_key (keylist_ctrl_t kl, HWND dlg, int pos, int enable);
+void km_set_clip_info (const char *uid);
+int km_key_is_v3 (keylist_ctrl_t kl, int pos);
+void km_find_key (HWND dlg, keylist_ctrl_t kl);
 char* km_gen_export_filename (const char *keyid, int is_secret);
-int km_get_key (listview_ctrl_t lv, int pos, winpt_key_t k);
-gpgme_key_t km_get_key_ptr (listview_ctrl_t lv, int idx, 
+int km_get_key (keylist_ctrl_t kl, int pos, winpt_key_t k);
+gpgme_key_t km_get_key_ptr (keylist_ctrl_t kl, int idx, 
 			    struct keycache_s **r_ctx);
 void km_key_show_revoc_info (winpt_key_t k);
 

Modified: trunk/Include/wptKeylist.h
===================================================================
--- trunk/Include/wptKeylist.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptKeylist.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptKeylist.h - Keylist element
- *	Copyright (C) 2001-2006 Timo Schulz
+ *	Copyright (C) 2001-2006, 2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -12,10 +12,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
  */
 #ifndef WPT_KEYLIST_H
 #define WPT_KEYLIST_H
@@ -89,41 +85,53 @@
     KEY_IMG_SORT_UP
 };
 
-/*-- keylist.c --*/
+
+struct keylist_ctrl_s {
+    listview_ctrl_t lv;
+    gpgme_key_t     *keys;
+    unsigned int    nkeys;
+};
+typedef struct keylist_ctrl_s *keylist_ctrl_t;
+
+/*-- wptKeylist.cpp --*/
 const char* get_key_pubalgo2 (gpgme_pubkey_algo_t alg);
 const char* get_key_pubalgo (gpgme_pubkey_algo_t alg);
-const char* get_key_algo( gpgme_key_t key, int keyidx );
-const char* get_key_created( long timestamp );
-const char* get_key_expire_date( long timestamp );
-const char* get_key_type( gpgme_key_t key );
-const char* get_key_size( gpgme_key_t key, int keyidx );
-const char* get_key_fpr( gpgme_key_t key );
+const char* get_key_algo (gpgme_key_t key, int keyidx);
+const char* get_key_created (long timestamp);
+const char* get_key_expire_date (long timestamp);
+const char* get_key_type (gpgme_key_t key);
+const char* get_key_size (gpgme_key_t key, int keyidx);
+const char* get_key_fpr (gpgme_key_t key);
 const char* get_key_trust (gpgme_key_t key, int uididx, int listmode);
 const char* get_key_trust2 (gpgme_key_t key, int val, int uididx, int listmode);
 const char* get_key_trust_str (int val);
 const char* get_keyid_from_fpr (const char *fpr);
+char*       get_key_desc (gpgme_key_t key);
 
-char* get_key_desc (gpgme_key_t key);
-
 gpgme_user_id_t get_nth_userid (gpgme_key_t key, int idx);
 int             count_userids (gpgme_key_t key);
 gpgme_subkey_t  get_nth_key (gpgme_key_t key, int idx);
 int		count_subkeys (gpgme_key_t key);
-gpgme_key_sig_t get_selfsig (gpgme_key_sig_t sigs, const char *keyid, int first);
+gpgme_key_sig_t get_selfsig (gpgme_key_sig_t sigs, const char *keyid, 
+			     int first);
 
-listview_ctrl_t keylist_load( HWND ctrl, gpg_keycache_t pubkc, gpg_keycache_t seckc, 
-			     int mode, int sortby );
-int keylist_reload( listview_ctrl_t lv, gpg_keycache_t c, int mode, int sortby );
-void keylist_delete( listview_ctrl_t lv );
-int keylist_add_key (listview_ctrl_t lv, int mode, 
+keylist_ctrl_t keylist_load (HWND ctrl, gpg_keycache_t pubkc, 
+			      gpg_keycache_t seckc, 
+			     int mode, int sortby);
+int keylist_reload (keylist_ctrl_t lv, gpg_keycache_t c, int mode, 
+		    int sortby);
+void keylist_delete (keylist_ctrl_t lv);
+int keylist_add_key (keylist_ctrl_t lv, int mode, 
 		     struct keycache_s *ctx, gpgme_key_t key);
-void keylist_upd_key (listview_ctrl_t lv, int pos, 
+void keylist_upd_key (keylist_ctrl_t lv, int pos, 
 		      struct keycache_s *ctx, gpgme_key_t key);
-void keylist_upd_col (listview_ctrl_t lv, int col);
-gpgme_key_t* keylist_get_recipients (listview_ctrl_t lv, 
+void keylist_upd_col (keylist_ctrl_t lv, int col);
+gpgme_key_t* keylist_get_recipients (keylist_ctrl_t lv, 
 				        int *r_force_trust, size_t *r_count);
-gpgme_key_t* keylist_enum_recipients (listview_ctrl_t lv,  int listype, size_t *r_count);
-int keylist_sort( listview_ctrl_t lv, int sortby );
+gpgme_key_t* keylist_enum_recipients (keylist_ctrl_t lv, int listype, 
+				      size_t *r_count);
+int keylist_sort (keylist_ctrl_t lv, int sortby);
+void keylist_sync (keylist_ctrl_t kl);
 
 /*-- wptImportList.cpp --*/
 void implist_build (listview_ctrl_t *lv, HWND ctrl);
@@ -153,7 +161,7 @@
 
 /*-- seclist --*/
 struct keylist_s {
-    struct keylist_s * next;
+    struct keylist_s *next;
     gpgme_key_t key;
 };
 typedef struct keylist_s *keylist_t;
@@ -162,4 +170,8 @@
 void seclist_init (HWND dlg, int ctlid, int flags, keylist_t * ret_list);
 int  seclist_select_key (HWND dlg, int ctlid, gpgme_key_t * ret_key);
 
+/*-- notification handler --*/
+LRESULT keylist_listview_notify (HWND hwnd, gpgme_key_t *keys,
+				 int ctlid, LPARAM lparam);
+
 #endif /* WPT_KEYLIST_H */

Modified: trunk/Include/wptKeyserver.h
===================================================================
--- trunk/Include/wptKeyserver.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptKeyserver.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptKeyserver.h - Keyserver headerfile
- *	Copyright (C) 2000-2006 Timo Schulz
+ *	Copyright (C) 2000-2006, 2008 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -12,22 +12,18 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
  */
 
 #ifndef WPT_KEYSERVER_H
 #define WPT_KEYSERVER_H
 
-#define HKP_PORT     11371 /* Horowitz Keyserver Protocol */
-#define FINGER_PORT	79 /* Finger Protocol */
-#define LDAP_PORT      389 /* Light Weight Dir Access Protocol. */
 
 /* Default keyserver URL. */
-#define DEF_HKP_KEYSERVER "http://subkeys.pgp.net"
+#define DEF_HKP_KEYSERVER "hkp://subkeys.pgp.net"
 
+/* Horowitz Keyserver Protocol */
+#define HKP_PORT 11371 
+
 /* Valid proxy protocols. */
 enum proxy_proto_t {
     PROXY_PROTO_NONE = 0,
@@ -60,7 +56,7 @@
     char *name;	    /* name of the keyserver. */
     int   port;	    /* used tcp port. */
     int	  used;	    /* 1=entry will be used. */
-    int	  proto;    /* protocol (0..2). */
+    int   is_default;
 };
 
 /* Proxy configuration context. */
@@ -75,7 +71,7 @@
 };
 typedef struct keyserver_proxy_s *keyserver_proxy_t;
 
-#define MAX_KEYSERVERS 32
+#define MAX_KEYSERVERS 8
 extern keyserver server[MAX_KEYSERVERS]; /* runtime initialized */
 extern char *default_keyserver;
 extern WORD default_keyserver_port;
@@ -110,8 +106,7 @@
 const char* wsock_strerror (void);
 
 /*-- Keyserver config --*/
-int kserver_load_conf (const char *conf);
-int kserver_save_conf (const char *conf);
+int kserver_load_conf (void);
 const char* kserver_check_keyid (const char *keyid);
 void kserver_proxy_release (keyserver_proxy_t ctx);
 const char* kserver_get_hostname (int idx, int type, unsigned short *port);
@@ -133,12 +128,6 @@
 void kserver_search_end (int conn_fd);
 void kserver_release_key (keyserver_key_s *key);
 
-/*-- Finger/LDAP Protocol --*/
-int  ldap_recvkey (const char *hostname, const char *keyid, 
-		   char **r_key, size_t *r_keylen);
-int finger_recvkey (const char *host, const char *user, 
-		    char **r_key, size_t *r_keylen);
-
 /*-- Dialog support --*/
 int hkp_send_key (HWND dlg, const char *kserver, unsigned short port, 
 		  const char *pattern);

Deleted: trunk/Include/wptListView.h
===================================================================
--- trunk/Include/wptListView.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptListView.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,64 +0,0 @@
-/* wptListView.h - Dynamic list view control
- *	Copyright (C) 2001-2005 Timo Schulz
- *
- * This file is part of WinPT.
- *
- * WinPT is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License 
- * as published by the Free Software Foundation; either version 2 
- * of the License, or (at your option) any later version.
- *  
- * WinPT is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
- */
-
-#ifndef WPT_LISTVIEW_H
-#define WPT_LISTVIEW_H
-
-#define KEYLIST_SORT_DESC 0x8000
-
-typedef int (CALLBACK *listview_cmp) (LPARAM lParam1, LPARAM lParam2,
-				      LPARAM lParamSort);
-struct listview_column_s {
-    int pos;
-    int width;
-    char *fieldname;
-};
-typedef struct listview_column_s * listview_column_t;
-
-struct listview_ctrl_s {
-    HWND ctrl;
-    int cols;
-    int items;
-};
-typedef struct listview_ctrl_s * listview_ctrl_t;
-
-int  listview_new( listview_ctrl_t *ctx );
-void listview_release( listview_ctrl_t ctx );
-int  listview_add_column( listview_ctrl_t ctx, listview_column_t col );
-
-int  listview_add_item( listview_ctrl_t ctx, const char *text );
-int  listview_add_item2( listview_ctrl_t ctx, const char * text, void * magic );
-void listview_add_sub_item( listview_ctrl_t ctx, int pos, int col, 
-						    const char *text );
-int listview_count_items( listview_ctrl_t ctx, int curr_sel );
-int listview_del_item( listview_ctrl_t ctx, int pos );
-int listview_del_all( listview_ctrl_t ctx );
-int listview_get_item_state( listview_ctrl_t ctx, int pos );
-int listview_sort_items( listview_ctrl_t ctx, int sortby,
-			 listview_cmp sort_cb );
-int listview_get_curr_pos( listview_ctrl_t ctx );
-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 );
-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 );
-
-#endif /* WPT_LISTVIEW_H */

Modified: trunk/Include/wptNLS.h
===================================================================
--- trunk/Include/wptNLS.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptNLS.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptNLS.h - NLS headerfile
- *	Copyright (C) 2001, 2002 Timo Schulz
+ *	Copyright (C) 2001, 2002, 200, 2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -12,23 +12,14 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
 #ifndef WPT_NLS_H
 #define WPT_NLS_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define _(a) gettext (a)
 #define N_(a) (a)
 
-
 struct lang_table_s {
     const char *id;
     const char *name;
@@ -42,16 +33,14 @@
 
 extern struct lang_table_s lang_list[];
 
-void gettext_free_current_domain (void);
-int gettext_set_file (const char * filename, const char * nls_dir);
 const char *gettext (const char * msgid);
 const char *gettext_get_langid (void);
+char* get_locale_name(const char *file);   
 void gettext_localize_dialog (HWND dlg, struct gettext_tab_s *tab,
-			       const char *title);
+			      const char *title);
+int  gettext_set_file (const char * filename, const char * nls_dir);
+int  gettext_set_user_domain (void);
+int  gettext_domain_needs_refresh (void);
+void gettext_free_current_domain (void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* WPT_NLS_H */
-

Modified: trunk/Include/wptRegistry.h
===================================================================
--- trunk/Include/wptRegistry.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptRegistry.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -37,22 +37,7 @@
     CFG_KSERV_CONF,    
 };
 
-/* All valid configuration commands. */
-static const char *cfg [] = {
-    NULL,	
-    "CacheTime",
-    "WordWrap",
-    "DefaultExt",
-    "Viewer",
-    "AlwaysTrust",
-    "AutoBackup",
-    "BackupMode",
-    "DisableHotkeys",	
-    "NoCompressMultiMedia",	
-    "Expert",
-    "FMProgressBar",
-    "BackupSecring"
-};
+extern const char *cfg[];
 
 struct winpt_prefs_s {
     int no_hotkeys;	/* disable ALL hotkeys */
@@ -99,7 +84,6 @@
 int set_reg_key (HKEY root_key, const char * dir, const char * key,
 				 const char * value);
 int set_reg_entry_gpg (const char *key, const char *value);
-int set_reg_entry_mo (const char *value);
 char* get_reg_entry_gpg (const char * key);
 char* get_reg_entry_mo (void);
 int set_reg_entry_keyserver (const char * name, const char *val);

Modified: trunk/Include/wptVersion.h
===================================================================
--- trunk/Include/wptVersion.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptVersion.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptVersion.h - WinPT version handling
- *	Copyright (C) 2000-2005 Timo Schulz
+ *	Copyright (C) 2000-2005, 2008-2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -12,19 +12,15 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 #ifndef WPT_VERSION_H
 #define WPT_VERSION_H
 
 /* Application name */
-#define PGM_NAME PACKAGE_NAME
+#define PGM_NAME "WinPT"
 
 /* Application version */
-#define PGM_VERSION PACKAGE_VERSION
+#define PGM_VERSION "1.5.0"
 #define PGM_DATE "("__DATE__")"
 
 /* Full package version string */
@@ -36,10 +32,10 @@
 /*-- WinPT.cpp --*/
 extern HINSTANCE glob_hinst;	/* Global HINSTANCE for tray window */
 extern HWND glob_hwnd;		/* Global HWND for tray window */
-extern int admin_user;
 extern int debug;		/* Global debug mode */
 extern int scard_support;	/* Smartcard support available? */
 extern int gpg_read_only;	/* GPG read-only keyring access? */
+extern int emulate_utf8_bug;    /* Emulate the utf8 encoding failure for pwds*/
 
 extern char gpgver[];		/* Contains gpg version (3 bytes) */
 
@@ -49,7 +45,6 @@
 #endif
 BOOL	    PTD_initialize (void);   
 void	    PTD_delete (void);
-int	    PTD_jpg_show (HWND, POINT*, LPCSTR);
 HWND        PTD_get_curr_hwnd (void);
 int         PTD_is_used (void);
 BOOL        PTD_keyb_send (UINT *keys, UINT n_keys);
@@ -57,6 +52,8 @@
 }
 #endif
 
+int jpg_show (HWND, POINT*, LPCSTR);
+
 /*-- wptMainProc.cpp --*/
 LRESULT CALLBACK winpt_main_proc (HWND hwnd, UINT msg, WPARAM wparam,
 				  LPARAM lparam); /* Global main procedure */

Modified: trunk/Include/wptW32API.h
===================================================================
--- trunk/Include/wptW32API.h	2009-09-25 16:07:38 UTC (rev 328)
+++ trunk/Include/wptW32API.h	2009-09-25 16:08:14 UTC (rev 329)
@@ -1,5 +1,5 @@
 /* wptW32API.h - Common API interface
- *	Copyright (C) 2001-2006 Timo Schulz
+ *	Copyright (C) 2001-2009 Timo Schulz
  *
  * This file is part of WinPT.
  *
@@ -12,10 +12,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with WinPT; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
  */
 
 #ifndef WPT_W32_API_H
@@ -28,11 +24,6 @@
 #include "wptCrypto.h"
 #include "wptUtil.h"
 
-struct curr_wnd_ctx {
-    HWND main;
-    HWND focus;
-};
-
 /*-- wptMAPI.cpp --*/
 int mapi_init (void);
 int mapi_send_pubkey (const char *keyid, char *keyfile);
@@ -53,8 +44,9 @@
 int get_file_version (const char *fname, WORD *major, WORD *minor, 
 		      WORD *patch1, WORD *patch2);
 
-int get_window_contents( HWND old_hwnd, curr_wnd_ctx *ctx, int *r_hotkey );
-int set_window_contents( HWND old_hwnd, curr_wnd_ctx *ctx );
+int copy_window_content (HWND old, HWND *r_main, HWND *r_focus, 
+			 int use_hotkey);
+int paste_window_content (HWND old, HWND main, HWND focus);
 
 void center_window (HWND hwndChild, HWND hwndParent);
 void center_window2 (HWND hwndChild, HWND parent, HWND style);
@@ -85,7 +77,10 @@
 int get_temp_name (char *buf, DWORD buflen, const char *name);
 
 int GetDlgItemText_utf8 (HWND dlg, int id, char **r_txt);
+void ListBox_AddString_utf8 (HWND lb, const char *txt);
 
+BOOL user_is_admin (void);
+
 #define listbox_add_string(lb, string) \
     SendMessage( (lb), LB_ADDSTRING, 0, (LPARAM)(LPCSTR)(string) )
 
@@ -98,6 +93,7 @@
 #define item_get_text_length(dlg, itm) \
 	SendDlgItemMessage ((dlg), (itm), WM_GETTEXTLENGTH, 0, 0)
 
+int html_help_show (int map_id);
 #ifdef _MSC_VER
 #include <htmlhelp.h>
 



More information about the Winpt-commits mailing list