/[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 23 by twoaday, Fri Sep 30 10:10:16 2005 UTC revision 25 by twoaday, Wed Oct 12 10:04:26 2005 UTC
# Line 1  Line 1 
1  /* wptClipEditDlg.cpp - Clipboard Editor dialog  /* wptClipEditDlg.cpp - Clipboard Editor dialog
2   *      Copyright (C) 2000-2004 Timo Schulz   *      Copyright (C) 2000-2005 Timo Schulz
3   *   *
4   * This file is part of WinPT.   * This file is part of WinPT.
5   *   *
# Line 30  Line 30 
30  #include "../resource.h"  #include "../resource.h"
31    
32    
33    /* Dialog box procedure for the clipboard editor. */
34  BOOL CALLBACK  BOOL CALLBACK
35  clip_edit_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)  clip_edit_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
36  {  {
# Line 103  clip_edit_dlg_proc (HWND dlg, UINT msg, Line 104  clip_edit_dlg_proc (HWND dlg, UINT msg,
104              return TRUE;              return TRUE;
105                            
106          case IDC_CLIPEDIT_CLEAR:          case IDC_CLIPEDIT_CLEAR:
107              if( OpenClipboard( NULL ) == FALSE ) {                    if (OpenClipboard (NULL) == FALSE) {
108                  msg_box( dlg,  winpt_strerror( WPTERR_CLIP_OPEN ), _("Clipboard"), MB_ERR );                  msg_box (dlg,  winpt_strerror (WPTERR_CLIP_OPEN), _("Clipboard"), MB_ERR);
109                  return FALSE;                  return FALSE;
110              }                                }                  
111              if (EmptyClipboard () == FALSE) {              if (EmptyClipboard () == FALSE) {
# Line 125  clip_edit_dlg_proc (HWND dlg, UINT msg, Line 126  clip_edit_dlg_proc (HWND dlg, UINT msg,
126              open.hwndOwner = dlg;              open.hwndOwner = dlg;
127              open.lpstrFile = file;                    open.lpstrFile = file;      
128              open.nMaxFile = sizeof (file)-1;                  open.nMaxFile = sizeof (file)-1;    
129              open.Flags = 0;              open.Flags = OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST;
130              if (GetOpenFileName (&open)) {              if (GetOpenFileName (&open)) {
131                  if( (size=get_file_size( file )) > MAX_CLIPTEXT_SIZE ) {                  if( (size=get_file_size (file)) > MAX_CLIPTEXT_SIZE) {
132                      id = msg_box( dlg, _("The file you want to add is very large.\n"                      id = msg_box (dlg, _("The file you want to add is very large.\n"
133                                          "Still proceed?"), _("Clipboard"), MB_INFO|MB_YESNO );                                          "Still proceed?"), _("Clipboard"), MB_INFO|MB_YESNO);
134                      if( id == IDNO )                      if (id == IDNO)
135                          return FALSE;                          return FALSE;
136                  }                  }
137                  fp = fopen( file, "rb" );                  fp = fopen (file, "rb");
138                  if (!fp) {                  if (!fp) {
139                      msg_box (dlg, winpt_strerror (WPTERR_FILE_OPEN), _("Clipboard"), MB_ERR);                      msg_box (dlg, winpt_strerror (WPTERR_FILE_OPEN), _("Clipboard"), MB_ERR);
140                      return FALSE;                      return FALSE;
# Line 161  clip_edit_dlg_proc (HWND dlg, UINT msg, Line 162  clip_edit_dlg_proc (HWND dlg, UINT msg,
162              open.hwndOwner = dlg;                    open.hwndOwner = dlg;      
163              open.lpstrFile = file;                    open.lpstrFile = file;      
164              open.nMaxFile = sizeof (file) - 1;              open.nMaxFile = sizeof (file) - 1;
165                open.Flags = OFN_OVERWRITEPROMPT;
166                            
167              if( GetSaveFileName( &open ) ) {              if( GetSaveFileName( &open ) ) {
168                  if( file_exist_check( file ) == 0 ) {                  if( file_exist_check( file ) == 0 ) {
# Line 192  clip_edit_dlg_proc (HWND dlg, UINT msg, Line 194  clip_edit_dlg_proc (HWND dlg, UINT msg,
194      }      }
195            
196      return FALSE;      return FALSE;
197  } /* clip_edit_dlg_proc */  }
198    

Legend:
Removed from v.23  
changed lines
  Added in v.25

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26