Skip to content

Commit

Permalink
Disable warnings about multi file drop.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Aug 12, 2018
1 parent d6aa2f1 commit 026e82f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions metapath/src/metapath.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
DragQueryFile(hDrop, 0, szBuf, COUNTOF(szBuf));
DisplayPath(szBuf, IDS_ERR_DROP1);

if (DragQueryFile(hDrop, (UINT)(-1), NULL, 0) > 1) {
ErrorMessage(1, IDS_ERR_DROP2);
}
//if (DragQueryFile(hDrop, (UINT)(-1), NULL, 0) > 1) {
// ErrorMessage(1, IDS_ERR_DROP2);
//}

DragFinish(hDrop);
}
Expand Down
2 changes: 1 addition & 1 deletion metapath/src/metapath.rc
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ BEGIN
IDS_ERR_CMDLINE "metapath\nError accessing file or directory specified in command line."
IDS_ERR_STARTUPDIR "metapath\nNo access to startup directory."
IDS_ERR_DROP1 "metapath\nNo access to dropped file or directory."
IDS_ERR_DROP2 "metapath\nOnly a single file or directory can be dropped at a time."
//IDS_ERR_DROP2 "metapath\nOnly a single file or directory can be dropped at a time."
IDS_ERR_FAVORITES "Favorites\nNo access to ""Favorites"" folder.\nSpecify a valid directory in the ""Options"" dialog box."
IDS_ERR_LNK_GETPATH "Link Error\nNo valid filesystem-path available for linked object.\nProbably the link doesn't refer to a file or directory."
IDS_ERR_LNK_NOACCESS "Link Error\nNo access to filesystem-path of linked object.\nCheck the disk or the network connection."
Expand Down
2 changes: 1 addition & 1 deletion metapath/src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
#define IDS_ERR_CMDLINE 50006
#define IDS_ERR_STARTUPDIR 50007
#define IDS_ERR_DROP1 50008
#define IDS_ERR_DROP2 50009
//#define IDS_ERR_DROP2 50009
#define IDS_ERR_FAVORITES 50010
#define IDS_ERR_LNK_GETPATH 50011
#define IDS_ERR_LNK_NOACCESS 50012
Expand Down
8 changes: 5 additions & 3 deletions src/Notepad2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
// PostMessage(hwnd, APPM_CHANGENOTIFY, 0, 0);
break;

#if 0 // SCN_URIDROPPED is used to handle drag and drop
case WM_DROPFILES: {
WCHAR szBuf[MAX_PATH + 40];
HDROP hDrop = (HDROP)wParam;
Expand All @@ -1063,13 +1064,14 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
FileLoad(FALSE, FALSE, FALSE, FALSE, szBuf);
}

if (DragQueryFile(hDrop, (UINT)(-1), NULL, 0) > 1) {
MsgBox(MBWARN, IDS_ERR_DROP);
}
//if (DragQueryFile(hDrop, (UINT)(-1), NULL, 0) > 1) {
// MsgBox(MBWARN, IDS_ERR_DROP);
//}

DragFinish(hDrop);
}
break;
#endif

case WM_COPYDATA: {
PCOPYDATASTRUCT pcds = (PCOPYDATASTRUCT)lParam;
Expand Down
2 changes: 1 addition & 1 deletion src/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ STRINGTABLE
BEGIN
IDS_ERR_UNICODE2 "Certain characters in the current text are not supported by the selected encoding, and may be replaced by default placeholders when saving. It's recommended to choose another file encoding. Continue?"
IDS_WARNLOADBIGFILE "Are you sure you want to open this large file?"
IDS_ERR_DROP "Only one file can be dropped at the same time!"
//IDS_ERR_DROP "Only one file can be dropped at the same time!"
IDS_ASK_SAVE "Save changes to ""%s""?"
IDS_ASK_REVERT "Revert file to last saved state? Your changes will be lost!"
IDS_ASK_RECODE "Recoding requires reloading file from disk, unsaved changes will be lost!"
Expand Down
2 changes: 1 addition & 1 deletion src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
#define IDS_ERR_UNICODE 50015
#define IDS_ERR_UNICODE2 50016
#define IDS_WARNLOADBIGFILE 50017
#define IDS_ERR_DROP 50018
//#define IDS_ERR_DROP 50018
#define IDS_ASK_SAVE 50019
#define IDS_ASK_REVERT 50020
#define IDS_ASK_RECODE 50021
Expand Down

0 comments on commit 026e82f

Please sign in to comment.