/[winpt]/trunk/Src/wptClipSignEncDlg.cpp
ViewVC logotype

Diff of /trunk/Src/wptClipSignEncDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 24 by twoaday, Sat Oct 8 10:43:08 2005 UTC revision 34 by twoaday, Wed Oct 26 11:20:09 2005 UTC
# Line 24  Line 24 
24  #include "../resource.h"  #include "../resource.h"
25  #include "wptErrors.h"  #include "wptErrors.h"
26  #include "wptAgent.h"  #include "wptAgent.h"
27    #include "wptCrypto.h"
28  #include "wptGPG.h"  #include "wptGPG.h"
29  #include "wptCommonCtl.h"  #include "wptCommonCtl.h"
30  #include "wptKeylist.h"  #include "wptKeylist.h"
# Line 82  leave: Line 83  leave:
83          gpgme_data_release (plain);          gpgme_data_release (plain);
84      if (ciph)      if (ciph)
85          gpgme_data_release (ciph);          gpgme_data_release (ciph);
     gpgme_key_release (key);  
86      return err;      return err;
87  }  }
88    
# Line 93  clip_signenc_dlg_proc (HWND dlg, UINT ms Line 93  clip_signenc_dlg_proc (HWND dlg, UINT ms
93  {  {
94      static listview_ctrl_t lv = NULL;      static listview_ctrl_t lv = NULL;
95      static keylist_t list = NULL;      static keylist_t list = NULL;
96      static int enable = 0;      gpg_keycache_t kc;
     gpgme_keycache_t kc;  
97      gpgme_key_t *rset;      gpgme_key_t *rset;
98      gpgme_error_t err;      gpgme_error_t err;
99      gpgme_ctx_t ctx;      gpgme_ctx_t ctx;
# Line 106  clip_signenc_dlg_proc (HWND dlg, UINT ms Line 105  clip_signenc_dlg_proc (HWND dlg, UINT ms
105            
106      switch( msg ) {      switch( msg ) {
107      case WM_INITDIALOG:      case WM_INITDIALOG:
108          enable = 0;          SetWindowText (dlg, _("Sign & Encrypt"));
109      #ifndef LANG_DE  
         SetWindowText( dlg, _("Sign & Encrypt") );  
     #endif  
110          kc = keycache_get_ctx( KEYCACHE_PUB );          kc = keycache_get_ctx( KEYCACHE_PUB );
111          if( !kc )          if( !kc )
112              BUG( NULL );              BUG( NULL );
# Line 128  clip_signenc_dlg_proc (HWND dlg, UINT ms Line 125  clip_signenc_dlg_proc (HWND dlg, UINT ms
125          seclist_destroy (&list);          seclist_destroy (&list);
126          reset_active_window ();          reset_active_window ();
127          if (lv) {          if (lv) {
128              keylist_delete( lv );              keylist_delete (lv);
129              lv = NULL;              lv = NULL;
130          }          }
131          return FALSE;          return FALSE;
# Line 136  clip_signenc_dlg_proc (HWND dlg, UINT ms Line 133  clip_signenc_dlg_proc (HWND dlg, UINT ms
133      case WM_NOTIFY:      case WM_NOTIFY:
134          NMHDR * notify;          NMHDR * notify;
135          notify = (NMHDR *)lparam;          notify = (NMHDR *)lparam;
136          if( notify && notify->code == NM_DBLCLK          if (notify && notify->code == NM_DBLCLK
137              && notify->idFrom == IDC_SIGNENC_KEYLIST )              && notify->idFrom == IDC_SIGNENC_KEYLIST)
138              PostMessage( dlg, WM_COMMAND, MAKEWPARAM(IDOK, 0), NULL );              PostMessage (dlg, WM_COMMAND, MAKEWPARAM (IDOK, 0), NULL);
139          return TRUE;          return TRUE;
140                    
141      case WM_SYSCOMMAND:      case WM_SYSCOMMAND:
# Line 147  clip_signenc_dlg_proc (HWND dlg, UINT ms Line 144  clip_signenc_dlg_proc (HWND dlg, UINT ms
144          return FALSE;          return FALSE;
145                    
146      case WM_COMMAND:      case WM_COMMAND:
147          /* fixme: the enable seems to have a sync problem */          if (HIWORD (wparam) == BN_CLICKED
148          if( HIWORD( wparam ) == BN_CLICKED              && LOWORD (wparam) == IDC_SIGNENC_SELKEY) {
149              && LOWORD( wparam ) == IDC_SIGNENC_SELKEY ) {              int enable = IsDlgButtonChecked (dlg, IDC_SIGNENC_SELKEY);
150              enable ^= 1;              EnableWindow (GetDlgItem (dlg, IDC_SIGNENC_SECLIST), enable? TRUE : FALSE);
             EnableWindow( GetDlgItem( dlg, IDC_SIGNENC_SECLIST ), enable? TRUE : FALSE );  
151          }          }
152          switch( LOWORD( wparam ) ) {          switch( LOWORD( wparam ) ) {
153          case IDOK:          case IDOK:

Legend:
Removed from v.24  
changed lines
  Added in v.34

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26