[Winpt-commits] r320 - trunk/Src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Aug 3 15:54:56 CEST 2007


Author: twoaday
Date: 2007-08-03 15:54:55 +0200 (Fri, 03 Aug 2007)
New Revision: 320

Modified:
   trunk/Src/ChangeLog
   trunk/Src/wptKeyEdit.cpp
   trunk/Src/wptMainProc.cpp
Log:


Modified: trunk/Src/ChangeLog
===================================================================
--- trunk/Src/ChangeLog	2007-07-23 17:13:38 UTC (rev 319)
+++ trunk/Src/ChangeLog	2007-08-03 13:54:55 UTC (rev 320)
@@ -1,3 +1,11 @@
+2007-08-03  Timo Schulz  <twoaday at gmx.net>
+
+	* wptMainproc.cpp (wpt_main_proc): A single click
+	with the mouse, left button, also shows the menu.
+	* wptKeyEdit.cpp (uid_inf_colon_handler): uid is always
+	allocated and thus remove the additional check before free().
+
+	
 2007-05-25  Timo Schulz  <twoaday at gmx.net>
 
 	* wptGPGPrefsDlg.cpp (gpgprefs_dlg_proc): Issue a warning

Modified: trunk/Src/wptKeyEdit.cpp
===================================================================
--- trunk/Src/wptKeyEdit.cpp	2007-07-23 17:13:38 UTC (rev 319)
+++ trunk/Src/wptKeyEdit.cpp	2007-08-03 13:54:55 UTC (rev 320)
@@ -85,8 +85,7 @@
 	    break;
 	}	
     }
-    if (p)
-	free (p);
+    free (p);
     return 0;
 }
 
@@ -178,8 +177,7 @@
             break;
         }
     }
-    if (p)
-	free (p);
+    free (p);
     return 0;
 }
 
@@ -240,8 +238,8 @@
 static gpgme_error_t
 list_handler (void *opaque, gpgme_status_code_t code, const char *key, int fd)
 {
-    static int step=0;
-    const char *s="";
+    static int step = 0;
+    const char *s = "";
     DWORD n;
 
     if (!strcmp (key, "keyedit.prompt") && step == 0) {
@@ -276,7 +274,6 @@
     err = gpgme_data_new (&out);
     if (err)
 	goto leave;
-
     err = gpgme_op_edit (ctx, key, list2_handler, NULL, out);
     if (err)
 	goto leave;
@@ -314,7 +311,6 @@
     err = gpgme_data_new (&out);
     if (err)
 	goto leave;
-
     err = gpgme_op_edit (ctx, key, list_handler, NULL, out);
     if (err)
 	goto leave;
@@ -340,7 +336,7 @@
 void
 GpgKeyEdit::clear (void)
 {
-    pass = NULL;    
+    pass = NULL;
     name = NULL;
     cmt = NULL;
     email = NULL;
@@ -373,8 +369,8 @@
 GpgKeyEdit::GpgKeyEdit (const char *_keyid)
 {
     clear ();
-    get_pubkey (_keyid, &this->key);
-    gpgme_new (&ctx); /* FIXME */    
+    get_pubkey (_keyid, &this->key); /*FIXME: check return code*/
+    gpgme_new (&ctx); /* FIXME */
 }
 
 /* Delete the given object. */
@@ -466,7 +462,7 @@
 {
     if (!_keyid)
 	return;
-    get_pubkey (_keyid, &this->key);
+    get_pubkey (_keyid, &this->key); /* FIXME: check return code */
 }
 
 

Modified: trunk/Src/wptMainProc.cpp
===================================================================
--- trunk/Src/wptMainProc.cpp	2007-07-23 17:13:38 UTC (rev 319)
+++ trunk/Src/wptMainProc.cpp	2007-08-03 13:54:55 UTC (rev 320)
@@ -22,7 +22,10 @@
 #include <config.h>
 #endif
 
+/* Only define the constant if needed. */
+#ifndef _WIN32_IE
 #define _WIN32_IE 0x0600
+#endif
 
 #include <windows.h>
 #include <commctrl.h>
@@ -383,6 +386,7 @@
     case WM_USER:
         switch (lparam) {
         case WM_RBUTTONUP:
+	case WM_LBUTTONUP:
             HMENU hm, popup;
             POINT p;
 



More information about the Winpt-commits mailing list