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

Annotation of /trunk/Src/wptDateDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (hide annotations)
Mon Oct 24 08:03:48 2005 UTC (19 years, 4 months ago) by twoaday
File size: 2027 byte(s)
2005-10-23  Timo Schulz  <twoaday@g10code.com>
 
        * wptFileManager.cpp (fm_get_file_type): Detect detached sigs.
        * wptKeyList.cpp (keylist_cmp_cb): Take care of expired/revoked keys.
        (get_ext_validity): New.
        * wptFileVerifyDlg.cpp (file_verify_dlg_proc): Several cleanups.
        * wptClipEditDlg.cpp (load_clipboard): Factored out some code into
        this function.
        (load_clipboard_from_file): Likewise.
        (save_clipboard_to_file): New.
        * wptKeyManagerDlg.cpp (keyprops_dlg_proc): Fix stack overflow.

For complete details, see the ChangeLog files.

1 twoaday 2 /* wptDateDlg.cpp - Universal dialog to ask for a date
2     * Copyright (C) 2001, 2002, 2003 Timo Schulz
3     *
4     * This file is part of WinPT.
5     *
6     * WinPT is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (at your option) any later version.
10     *
11     * WinPT is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with WinPT; if not, write to the Free Software Foundation,
18     * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19     */
20    
21     #include <windows.h>
22     #include <commctrl.h>
23    
24 twoaday 32 #include "gpgme.h"
25 twoaday 2 #include "../resource.h"
26     #include "wptCommonCtl.h"
27     #include "wptContext.h"
28     #include "wptDlgs.h"
29     #include "wptTypes.h"
30    
31    
32 twoaday 32 /* (common) Dialog box procedure to select a date. */
33 twoaday 2 BOOL CALLBACK
34 twoaday 32 date_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
35 twoaday 2 {
36 twoaday 32 static date_s *udd;
37 twoaday 2
38     switch( msg ) {
39     case WM_INITDIALOG:
40     udd = (date_s *)lparam;
41     if( udd == NULL )
42     dlg_fatal_error( dlg, "Can't get dialog param" );
43     if( udd->text )
44     SetWindowText( dlg, udd->text );
45     SetForegroundWindow( dlg );
46     return TRUE;
47    
48     case WM_SYSCOMMAND:
49     if( LOWORD( wparam ) == SC_CLOSE ) {
50     udd->cancel = 1;
51     EndDialog( dlg, TRUE );
52     }
53     return FALSE;
54    
55     case WM_COMMAND:
56     switch( LOWORD( wparam) ) {
57     case IDOK:
58     DateTime_GetSystemtime( GetDlgItem( dlg, IDC_DATE_DTP ), &udd->st );
59     udd->cancel = 0;
60     EndDialog( dlg, TRUE );
61     return TRUE;
62     }
63     break;
64     }
65    
66     return FALSE;
67 twoaday 32 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26