Module: wine Branch: master Commit: 8e4aff7a4d7c8bc8c710d1c3347025a83daf19f8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8e4aff7a4d7c8bc8c710d1c334...
Author: Vincent Povirk madewokherd+8cd9@gmail.com Date: Wed Feb 25 19:14:30 2009 -0600
shell32: Add a message for opening files with no association.
---
dlls/shell32/shell32_En.rc | 2 ++ dlls/shell32/shlexec.c | 6 +++++- dlls/shell32/shresdef.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/shell32/shell32_En.rc b/dlls/shell32/shell32_En.rc index f752e6d..d7fa7c3 100644 --- a/dlls/shell32/shell32_En.rc +++ b/dlls/shell32/shell32_En.rc @@ -282,6 +282,8 @@ STRINGTABLE IDS_CPANEL_TITLE "Wine Control Panel" IDS_CPANEL_NAME "Name" IDS_CPANEL_DESCRIPTION "Description" + + IDS_SHLEXEC_NOASSOC "There is no Windows program configured to open this type of file." }
STRINGTABLE diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index 1fbaabb..67815ca 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -45,6 +45,7 @@ #include "wine/winbase16.h" #include "shell32_main.h" #include "pidl.h" +#include "shresdef.h"
#include "wine/debug.h"
@@ -1454,7 +1455,10 @@ static void do_error_dialog( UINT_PTR retval, HWND hwnd ) WCHAR msg[2048]; int error_code=GetLastError();
- FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, msg, sizeof(msg)/sizeof(WCHAR), NULL); + if (retval == SE_ERR_NOASSOC) + LoadStringW(shell32_hInstance, IDS_SHLEXEC_NOASSOC, msg, sizeof(msg)/sizeof(WCHAR)); + else + FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, 0, msg, sizeof(msg)/sizeof(WCHAR), NULL);
MessageBoxW(hwnd, msg, NULL, MB_ICONERROR); } diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h index 6353623..01ec977 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h @@ -106,6 +106,8 @@ #define IDS_RUNDLG_BROWSE_CAPTION 162 #define IDS_RUNDLG_BROWSE_FILTER 163
+#define IDS_SHLEXEC_NOASSOC 164 + #define IDS_LICENSE 256 #define IDS_LICENSE_CAPTION 257