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

Diff of /trunk/Src/wptClipEditDlg.cpp

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

revision 11 by twoaday, Mon Jan 31 11:02:21 2005 UTC revision 12 by twoaday, Thu Apr 14 12:56:25 2005 UTC
# Line 141  clip_edit_dlg_proc (HWND dlg, UINT msg, Line 141  clip_edit_dlg_proc (HWND dlg, UINT msg,
141                  p = new char[size+1];                  p = new char[size+1];
142                  if (!p)                  if (!p)
143                      BUG (0);                      BUG (0);
144                  fread( p, 1, size, fp );                  fread (p, 1, size, fp);
145                  p[size] = '\0';                  p[size] = '\0';
146                  fclose( fp );                  fclose (fp);
147                  SetDlgItemText( dlg, IDC_CLIPEDIT_CLIPTEXT2, p );                  SetDlgItemText (dlg, IDC_CLIPEDIT_CLIPTEXT2, p);
148                  free_if_alloc( p );                  free_if_alloc (p);
149                  PostMessage( dlg, WM_COMMAND, MAKEWPARAM(IDC_CLIPEDIT_SEND, 0), NULL );                  /* XXX: for some files the code produces a crash! */
150                    PostMessage (dlg, WM_COMMAND, MAKEWPARAM(IDC_CLIPEDIT_SEND, 0), NULL);
151                  return TRUE;                  return TRUE;
152              }              }
153              break;              break;
154                            
155          case IDC_CLIPEDIT_SAVE:          case IDC_CLIPEDIT_SAVE:
156              memset (&open, 0, sizeof (open));              memset (&open, 0, sizeof (open));
157              open.lStructSize = sizeof OPENFILENAME;              open.lStructSize = sizeof (OPENFILENAME);
158              open.hInstance = glob_hinst;              open.hInstance = glob_hinst;
159              open.lpstrTitle = _("File Save");              open.lpstrTitle = _("File Save");
160              open.lpstrFile = (char *)_("All Files (*.*)\0*.*");              open.lpstrFile = (char *)_("All Files (*.*)\0*.*");
# Line 163  clip_edit_dlg_proc (HWND dlg, UINT msg, Line 164  clip_edit_dlg_proc (HWND dlg, UINT msg,
164                            
165              if( GetSaveFileName( &open ) ) {              if( GetSaveFileName( &open ) ) {
166                  if( file_exist_check( file ) == 0 ) {                  if( file_exist_check( file ) == 0 ) {
167                      id = msg_box( dlg, _("File already exists!\nOverwrite?"),                      id = log_box (_("Clipboard"), MB_YESNO,
168                                   _("Clipboard"), MB_INFO|MB_YESNO );                                    _("\"%s\" already exists.\n"
169                                      "Replace existing file?"), file);
170                      if( id == IDNO )                      if( id == IDNO )
171                          return FALSE;                          return FALSE;
172                  }                  }

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26