/[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 12 by twoaday, Thu Apr 14 12:56:25 2005 UTC revision 20 by twoaday, Wed Jul 27 11:17:22 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   */   */
   
20  #include <windows.h>  #include <windows.h>
21    
22  #include "../resource.h"  #include "../resource.h"
# Line 45  int mobile = 0; Line 44  int mobile = 0;
44  int gpg_read_only = 0;  int gpg_read_only = 0;
45  char gpgver[3];  char gpgver[3];
46    
47    /* Internal IPC */
48    int start_keymanager = 0;
49    
50  static void  static void
51  update_keycache (HWND hwnd)  update_keycache (HWND hwnd)
# Line 142  get_prog_part (const char * fname, int u Line 143  get_prog_part (const char * fname, int u
143  static int  static int
144  check_crypto_engine (void)  check_crypto_engine (void)
145  {  {
146      int ma=1, mi=2, pa=4; /* GPG 1.2.4 */      int ma=1, mi=4, pa=0; /* GPG 1.4.0 */
147      int rc;      int rc;
148    
149      rc = check_gnupg_engine (&ma, &mi, &pa);      rc = check_gnupg_engine (&ma, &mi, &pa);
# Line 153  check_crypto_engine (void) Line 154  check_crypto_engine (void)
154      else if (rc) {      else if (rc) {
155          log_box (_("WinPT Error"), MB_ERR,          log_box (_("WinPT Error"), MB_ERR,
156                   _("Sorry, you need a newer GPG version.\n"                   _("Sorry, you need a newer GPG version.\n"
157                     "GPG version %d.%d.%d requred GPG version 1.2.4"),                     "GPG version %d.%d.%d required GPG version 1.4.0"),
158                     ma, mi, pa);                     ma, mi, pa);
159          return rc;          return rc;
160      }      }
# Line 206  enable_mobile_mode (void) Line 207  enable_mobile_mode (void)
207  char* get_subkey_fingerprint (gpgme_ctx_t ctx, const char *keyid);  char* get_subkey_fingerprint (gpgme_ctx_t ctx, const char *keyid);
208    
209  int WINAPI  int WINAPI
210    #ifndef WINPT_IPC
211  WinMain (HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int showcmd)  WinMain (HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int showcmd)
212    #else
213    win_main (HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int showcmd)
214    #endif
215  {  {
216      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};
217      HACCEL accel_tab;      HACCEL accel_tab;
# Line 238  WinMain (HINSTANCE hinst, HINSTANCE hpre Line 243  WinMain (HINSTANCE hinst, HINSTANCE hpre
243          return 0;          return 0;
244      }      }
245    
246      if (cmdline && stristr (cmdline, "--mobile"))      if (cmdline && stristr (cmdline, "--mobile")) {
247            msg_box (NULL, "WARNING: mobile modus is not fully implemented yet!", "WinPT", MB_INFO);
248          mobile = 1;          mobile = 1;
249        }
250    
251      set_default_kserver ();      set_default_kserver ();
252    
# Line 358  WinMain (HINSTANCE hinst, HINSTANCE hpre Line 365  WinMain (HINSTANCE hinst, HINSTANCE hpre
365      }      }
366    
367      load_keyserver_conf (cmdline? 1 : 0);      load_keyserver_conf (cmdline? 1 : 0);
368        if (start_keymanager) {
369            dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC,
370                                GetDesktopWindow(), keymanager_dlg_proc, NULL,
371                                _("Key Manager"), IDS_WINPT_KEYMISC);
372            keycache_release ();
373            free_gnupg_table ();
374            return 0;
375        }
376    
377      if (cmdline && (stristr (cmdline, "--keymanager")      if (cmdline && (stristr (cmdline, "--keymanager")
378                  || stristr (cmdline, "--cardmanager"))) {                  || stristr (cmdline, "--cardmanager"))) {
379          update_keycache (GetDesktopWindow ());          update_keycache (GetDesktopWindow ());
380          if (stristr (cmdline, "keymanager"))          if (stristr (cmdline, "keymanager"))
381              dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC,              dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC,
382                              GetDesktopWindow(), keymanager_dlg_proc, NULL,                              GetDesktopWindow(), keymanager_dlg_proc, NULL,
383                              _("Key Manager"), IDS_WINPT_KEYMISC);                              _("Key Manager"), IDS_WINPT_KEYMISC);  
384          else {          else {
385              gpgme_card_t crd = smartcard_init ();              gpgme_card_t crd = smartcard_init ();
386              if (crd)              if (crd)

Legend:
Removed from v.12  
changed lines
  Added in v.20

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26