/[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 87 by twoaday, Mon Nov 21 11:44:25 2005 UTC revision 102 by twoaday, Tue Nov 29 08:56:21 2005 UTC
# Line 407  WinMain (HINSTANCE hinst, HINSTANCE hpre Line 407  WinMain (HINSTANCE hinst, HINSTANCE hpre
407    
408      if (cmdline && (stristr (cmdline, "--keymanager")      if (cmdline && (stristr (cmdline, "--keymanager")
409                  || stristr (cmdline, "--cardmanager"))) {                  || stristr (cmdline, "--cardmanager"))) {
410            /* If an instance of WinPT is running, just send the command
411               to open the key manager. Otherwise start a new instance.
412             */
413            HWND tray = FindWindow ("WinPT", "WinPT");
414            if (tray != NULL) {
415                PostMessage (tray, WM_COMMAND, ID_WINPT_KEY, 0);
416                free_gnupg_table ();
417                return 0;
418            }
419          update_keycache (GetDesktopWindow ());          update_keycache (GetDesktopWindow ());
420          if (stristr (cmdline, "keymanager"))          if (stristr (cmdline, "keymanager"))
421              dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC,              dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC,
# Line 421  WinMain (HINSTANCE hinst, HINSTANCE hpre Line 430  WinMain (HINSTANCE hinst, HINSTANCE hpre
430                                    IDS_WINPT_CARD_EDIT);                                    IDS_WINPT_CARD_EDIT);
431              gpg_card_release (crd);              gpg_card_release (crd);
432          }          }
433            /*
434          keycache_release (0);          keycache_release (0);
435          free_gnupg_table ();          free_gnupg_table ();
436          return 0;          return 0;
437            */
438      }      }
439    
440      /* If we found another WinPT instance, just quit to avoid it      /* If we found another WinPT instance, just quit to avoid it

Legend:
Removed from v.87  
changed lines
  Added in v.102

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26