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

Diff of /trunk/Src/wptKeyManagerDlg.cpp

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

revision 84 by twoaday, Tue Nov 15 08:54:44 2005 UTC revision 85 by twoaday, Fri Nov 18 07:20:40 2005 UTC
# Line 191  load_toolbar (HWND dlg, struct km_info * Line 191  load_toolbar (HWND dlg, struct km_info *
191  } /* load_toolbar */  } /* load_toolbar */
192    
193    
194    /* Center window @dlg. */
195  static void  static void
196  do_center_window (HWND dlg, struct km_info * kmi)  do_center_window (HWND dlg, struct km_info * kmi)
197  {  {
# Line 204  do_center_window (HWND dlg, struct km_in Line 205  do_center_window (HWND dlg, struct km_in
205    
206      kmi->ypos_sep = rect.bottom;      kmi->ypos_sep = rect.bottom;
207    
208      p = get_reg_entry( HKEY_CURRENT_USER, "Software\\WinPT", "KM_Pos_X" );      p = get_reg_entry (HKEY_CURRENT_USER, "Software\\WinPT", "KM_Pos_X");
209      if( p && !strcmp( p, " " ) ) {      if (p && !strcmp (p, " ")) {
210          free_if_alloc( p );              free_if_alloc (p);
211          center_window( dlg, NULL );          center_window (dlg, NULL);
212          return;          return;
213      }      }
214      else if( p )      else if (p)
215          pos_x = atol( p );          pos_x = atol (p);
216    
217      p = get_reg_entry( HKEY_CURRENT_USER, "Software\\WinPT", "KM_Pos_Y" );      p = get_reg_entry (HKEY_CURRENT_USER, "Software\\WinPT", "KM_Pos_Y");
218      if( p && !strcmp( p, " " ) ) {      if (p && !strcmp (p, " ")) {
219          free_if_alloc( p );          free_if_alloc (p);
220          center_window( dlg, NULL );          center_window(dlg, NULL);
221          return;          return;
222      }      }
223      else if( p )      else if (p)
224          pos_y = atol( p );          pos_y = atol (p);
225    
226      if( !pos_y && !pos_x ) {      if (!pos_y && !pos_x) {
227          center_window( dlg, NULL );          center_window (dlg, NULL);
228          return;          return;
229      }      }
230            
231      if( pos_x > GetSystemMetrics( SM_CXSCREEN )      if (pos_x < 0 || pos_y < 0)
232          || pos_y > GetSystemMetrics( SM_CYSCREEN ) ) {          pos_x = pos_y = 0;
233        if (pos_x > GetSystemMetrics (SM_CXSCREEN)
234            || pos_y > GetSystemMetrics (SM_CYSCREEN)) {
235          pos_x = pos_y = 0;          pos_x = pos_y = 0;
236      }      }
237      GetClientRect( dlg, &rect );      GetClientRect (dlg, &rect);
238      MoveWindow( dlg, pos_x, pos_y, rect.right, rect.bottom, TRUE );      MoveWindow (dlg, pos_x, pos_y, rect.right, rect.bottom, TRUE);
239  }  }
240    
241    
# Line 682  keymanager_dlg_proc (HWND dlg, UINT msg, Line 685  keymanager_dlg_proc (HWND dlg, UINT msg,
685          kmi->hwnd_sep = regist_sep_wnd (dlg, kmi);          kmi->hwnd_sep = regist_sep_wnd (dlg, kmi);
686          imagelist_load (dlg);          imagelist_load (dlg);
687    
 #ifndef LANG_DE  
688          SetWindowText( dlg, _("Key Manager") );          SetWindowText( dlg, _("Key Manager") );
 #endif          
689          menu = LoadMenu( glob_hinst, (LPCSTR)IDR_WINPT_KEYMISC );          menu = LoadMenu( glob_hinst, (LPCSTR)IDR_WINPT_KEYMISC );
690  #ifndef LANG_DE          set_menu_text_bypos (menu, 0, _("File"));
691            set_menu_text_bypos (menu, 1, _("Edit"));
692            set_menu_text_bypos (menu, 2, _("View"));
693            set_menu_text_bypos (menu, 3, _("Key"));
694            set_menu_text (menu, ID_KEYMISC_EDITKEY, _("Edit"));
695          set_menu_text (menu, ID_KEYMISC_MAIL, _("Send Mail..."));          set_menu_text (menu, ID_KEYMISC_MAIL, _("Send Mail..."));
696          set_menu_text (menu, ID_KEYMISC_OT, _("Ownertrust")); /* XXX */          set_menu_text (menu, ID_KEYMISC_OT, _("Ownertrust")); /* XXX */
697          set_menu_text (menu, ID_KEYMISC_COPY, _("&Copy\tCtrl+C"));          set_menu_text (menu, ID_KEYMISC_COPY, _("&Copy\tCtrl+C"));
# Line 715  keymanager_dlg_proc (HWND dlg, UINT msg, Line 720  keymanager_dlg_proc (HWND dlg, UINT msg,
720          set_menu_text (menu, ID_KEYMISC_REFRESH_KEYS, _("Refresh &Keys (Keyserver)"));          set_menu_text (menu, ID_KEYMISC_REFRESH_KEYS, _("Refresh &Keys (Keyserver)"));
721          set_menu_text (menu, ID_KEYMISC_INFO, _("Info") );          set_menu_text (menu, ID_KEYMISC_INFO, _("Info") );
722          set_menu_text (menu, ID_KEYMISC_HELP, _("&Help"));          set_menu_text (menu, ID_KEYMISC_HELP, _("&Help"));
723            
 #endif  
724          SetMenu (dlg, menu);          SetMenu (dlg, menu);
725          if( keyring_check_last_access() )          if( keyring_check_last_access() )
726              keycache_set_reload( 1 );              keycache_set_reload( 1 );

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26