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

Diff of /trunk/Src/WinPT.cpp

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

revision 36 by werner, Thu Oct 27 15:25:13 2005 UTC revision 41 by twoaday, Fri Oct 28 07:15:26 2005 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   */   */
 #ifdef HAVE_CONFIG_H  
 #include <config.h>  
 #endif  
   
 #include <windows.h>  
20  #include <windows.h>  #include <windows.h>
21    
22  #include "../resource.h"  #include "../resource.h"
# Line 238  enable_mobile_mode (void) Line 233  enable_mobile_mode (void)
233    
234  char* multi_gnupg_path (void);  char* multi_gnupg_path (void);
235    
236    const char * fm_get_file_type (const char *fname, int *r_type);
237    
238  /* Main entry point. */  /* Main entry point. */
239  int WINAPI  int WINAPI
240  WinMain (HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int showcmd)  WinMain (HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int showcmd)
241  {  {
242      WNDCLASS wc = {0, winpt_main_proc, 0, 0, hinst, 0, 0, 0, 0, PGM_NAME};      WNDCLASS wc = {0, winpt_main_proc, 0, 0, hinst, 0, 0, 0, 0, PGM_NAME};
243      HACCEL accel_tab;      HACCEL accel_tab;
244      int rc, ec, created = 0, use_cwd = 0, nfiles = 0;      int rc, ec, created = 0, nfiles = 0;
245      int first_start = 0, start_gpgprefs = 0;      int first_start = 0, start_gpgprefs = 0;
246      int winpt_inst_found = 0;      int winpt_inst_found = 0;
247      const char *s;      const char *s;
# Line 308  WinMain (HINSTANCE hinst, HINSTANCE hpre Line 305  WinMain (HINSTANCE hinst, HINSTANCE hpre
305          get_reg_winpt_prefs (&reg_prefs);          get_reg_winpt_prefs (&reg_prefs);
306          if (!reg_prefs.no_hotkeys)          if (!reg_prefs.no_hotkeys)
307              hotkeys_modify ();              hotkeys_modify ();
308            gnupg_load_config ();
309      }      }
310    
311      rc = gnupg_check_homedir ();      rc = gnupg_check_homedir ();
# Line 478  WinMain (HINSTANCE hinst, HINSTANCE hpre Line 476  WinMain (HINSTANCE hinst, HINSTANCE hpre
476          char *ring;          char *ring;
477          size_t size = 0;          size_t size = 0;
478          DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_GPGPREFS, hwnd,          DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_GPGPREFS, hwnd,
479                          gpgprefs_dlg_proc, NULL);                          gpgprefs_dlg_proc, 0);
480          ring = get_gnupg_keyring (0, !NO_STRICT);          ring = get_gnupg_keyring (0, !NO_STRICT);
481          if (gnupg_access_keyring (0) == -1 && get_file_size (ring) == 0)          if (gnupg_access_keyring (0) == -1 && get_file_size (ring) == 0)
482              first_start = 1; /* The keyring is empty! */              first_start = 1; /* The keyring is empty! */
# Line 492  WinMain (HINSTANCE hinst, HINSTANCE hpre Line 490  WinMain (HINSTANCE hinst, HINSTANCE hpre
490  start:  start:
491          h = GetDesktopWindow ();          h = GetDesktopWindow ();
492          DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_GPGPREFS, h,          DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_GPGPREFS, h,
493                              gpgprefs_dlg_proc, NULL);                              gpgprefs_dlg_proc, 0);
494          DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_FIRST, h,          DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_FIRST, h,
495                          first_run_dlg_proc, (LPARAM)&fs);                          first_run_dlg_proc, (LPARAM)&fs);
496          switch (fs.choice) {          switch (fs.choice) {
# Line 535  start: Line 533  start:
533                              "WinPT", MB_INFO|MB_YESNO);                              "WinPT", MB_INFO|MB_YESNO);
534              if (ec == IDYES) {              if (ec == IDYES) {
535                  DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_GPGPREFS, hwnd,                  DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_GPGPREFS, hwnd,
536                                  gpgprefs_dlg_proc, NULL);                                  gpgprefs_dlg_proc, 0);
537                  update_keycache (hwnd);                  update_keycache (hwnd);
538              }              }
539              else {              else {
# Line 557  start: Line 555  start:
555          }          }
556          if (count_insecure_elgkeys ())          if (count_insecure_elgkeys ())
557              DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_ELGWARN, glob_hwnd,              DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_ELGWARN, glob_hwnd,
558                              elgamal_warn_dlg_proc, NULL);                              elgamal_warn_dlg_proc, 0);
559      }      }
560    
561      accel_tab = LoadAccelerators (glob_hinst, (LPCTSTR)IDR_WINPT_ACCELERATOR);      accel_tab = LoadAccelerators (glob_hinst, (LPCTSTR)IDR_WINPT_ACCELERATOR);

Legend:
Removed from v.36  
changed lines
  Added in v.41

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26