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

Diff of /trunk/Src/wptGPGOptDlg.cpp

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

revision 85 by twoaday, Fri Nov 18 07:20:40 2005 UTC revision 248 by twoaday, Fri Jul 28 11:11:09 2006 UTC
# Line 17  Line 17 
17   * along with WinPT; if not, write to the Free Software Foundation,   * along with WinPT; if not, write to the Free Software Foundation,
18   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19   */   */
   
20  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
21  #include <config.h>  #include <config.h>
22  #endif  #endif
# Line 45  gpgopt_dlg_proc (HWND dlg, UINT msg, WPA Line 44  gpgopt_dlg_proc (HWND dlg, UINT msg, WPA
44      switch (msg)  {      switch (msg)  {
45      case WM_INITDIALOG:        case WM_INITDIALOG:  
46          optbuf = get_gnupg_config ();          optbuf = get_gnupg_config ();
47          if (!optbuf)          if (!optbuf) {
48              dlg_fatal_error (dlg,  _("Could not load GnuPG config file!"));              msg_box (dlg,  _("Could not load GnuPG config file!"),
49                         _("GPG Config"), MB_ERR);
50                EndDialog (dlg, FALSE);
51                return TRUE;
52            }
53          SetDlgItemText (dlg, IDC_GPGOPT_FILE, optbuf);          SetDlgItemText (dlg, IDC_GPGOPT_FILE, optbuf);
54          SetWindowText (dlg, _("GnuPG Configuration File" ));          SetWindowText (dlg, _("GnuPG Configuration File" ));
55          SetDlgItemText (dlg, IDC_GPGOPT_SAVE, _("&Save"));          SetDlgItemText (dlg, IDC_GPGOPT_SAVE, _("&Save"));
56          SetDlgItemText (dlg, IDC_GPGOPT_LOAD, _("&Load"));          SetDlgItemText (dlg, IDC_GPGOPT_LOAD, _("&Load"));
57          free_if_alloc( optbuf );          SetDlgItemText (dlg, IDCANCEL, _("&Exit"));
58          SetForegroundWindow( dlg );          free_if_alloc (optbuf);
59            SetForegroundWindow (dlg);
60          return TRUE;          return TRUE;
61                    
     case WM_SYSCOMMAND:  
         if( LOWORD (wparam) == SC_CLOSE )  
             EndDialog(dlg, TRUE);  
         return FALSE;  
           
62      case WM_COMMAND:      case WM_COMMAND:
63          switch( LOWORD( wparam ) ) {          switch( LOWORD( wparam ) ) {
64          case IDC_GPGOPT_SAVE:                        case IDC_GPGOPT_SAVE:              
65              optbuf = new char[nbytes + 1];              optbuf = new char[nbytes + 1];
66              if( !optbuf )              if (!optbuf)
67                  BUG( dlg);                  BUG (0);
68              nbytes = GetDlgItemText( dlg, IDC_GPGOPT_FILE, optbuf, nbytes );              nbytes = GetDlgItemText (dlg, IDC_GPGOPT_FILE, optbuf, nbytes);
69              if( !nbytes ) {              if (!nbytes) {
70                  msg_box( dlg, _("The 'gpg.conf' file is not loaded."), _("GPG Config"), MB_ERR );                  msg_box (dlg, _("The 'gpg.conf' file is not loaded."), _("GPG Config"), MB_ERR);
71                  free_if_alloc( optbuf );                  free_if_alloc (optbuf);
72                  return FALSE;                            return FALSE;          
73              }              }
74              optbuf[nbytes] = '\0';              optbuf[nbytes] = '\0';

Legend:
Removed from v.85  
changed lines
  Added in v.248

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26