From 3ec1483a9dd4e53a3a52e59d186d3373cbc0e591 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Tue, 21 Oct 2008 13:50:18 -0500 Subject: [PATCH] wine: add Run command to the start menu --- build.sh | 2 +- ...xplorer-add-Run-command-to-the-start-menu.patch | 63 ++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 patches/0031-explorer-add-Run-command-to-the-start-menu.patch diff --git a/build.sh b/build.sh index 9341dae..0ff5a8f 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ ORIG_DIR=${PWD} BUILD_DIR=$(mktemp -d) WINE_ORIGIN=git://source.winehq.org/git/wine.git WINE_BASE=04f11f20ad436c58b7de50ffe0352dc4250ce63f -WINE_COMMIT=a0d3a3dc1010ca443650424db9bcef99d163f8d6 +WINE_COMMIT=906ea2dda274c908f1e15a46c47c94aa04809414 mkdir "${BUILD_DIR}"/Wine.activity diff --git a/patches/0031-explorer-add-Run-command-to-the-start-menu.patch b/patches/0031-explorer-add-Run-command-to-the-start-menu.patch new file mode 100644 index 0000000..f0de413 --- /dev/null +++ b/patches/0031-explorer-add-Run-command-to-the-start-menu.patch @@ -0,0 +1,63 @@ +From 906ea2dda274c908f1e15a46c47c94aa04809414 Mon Sep 17 00:00:00 2001 +From: Vincent Povirk +Date: Tue, 21 Oct 2008 13:22:53 -0500 +Subject: [PATCH] explorer: add Run command to the start menu + +--- + programs/explorer/startmenu.c | 26 +++++++++++++++++++++++++- + 1 files changed, 25 insertions(+), 1 deletions(-) + +diff --git a/programs/explorer/startmenu.c b/programs/explorer/startmenu.c +index e5a781b..5965562 100644 +--- a/programs/explorer/startmenu.c ++++ b/programs/explorer/startmenu.c +@@ -399,6 +399,20 @@ static void exit_windows() + ExitWindows(0, 0); + } + ++static void run_dialog() ++{ ++ void WINAPI (*pRunFileDlg)(HWND hWndOwner, HICON hIcon, LPCSTR lpszDir, ++ LPCSTR lpszTitle, LPCSTR lpszDesc, DWORD dwFlags); ++ HMODULE hShell32; ++ ++ hShell32 = LoadLibraryA("shell32"); ++ pRunFileDlg = (void*)GetProcAddress(hShell32, (LPCSTR)61); ++ ++ pRunFileDlg(NULL, NULL, NULL, NULL, NULL, 0); ++ ++ FreeLibrary(hShell32); ++} ++ + static void destroy_menus() + { + if (!topmenu) +@@ -515,7 +529,8 @@ void do_startmenu(HWND hwnd, HWND button) + RECT rc={0,0,0,0}; + TPMPARAMS tpm; + static WCHAR Exit[] = {'E','x','i','t',0}; +- LPWSTR exit_str; ++ static WCHAR Run[] = {'R','u','n','.','.','.',0}; ++ LPWSTR exit_str, run_str; + + /* FIXME: Our existing menu is never destroyed if the user makes no + selection. It seems to be impossible to detect this situation. */ +@@ -561,6 +576,15 @@ void do_startmenu(HWND hwnd, HWND button) + /* separator */ + AppendMenuW(topmenu, MF_SEPARATOR, 0, NULL); + ++ /* since we'll be using LoadString for this, the "Run" caption will be ++ heap-allocated; for now I just make a copy of the string */ ++ run_str = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * (strlenW(Exit)+1)); ++ strcpyW(run_str, Run); ++ add_special_item(NULL, NULL, run_str, run_dialog, NULL, hwnd); ++ ++ /* separator */ ++ AppendMenuW(topmenu, MF_SEPARATOR, 0, NULL); ++ + /* since we'll be using LoadString for this, the "Exit" caption will be + heap-allocated; for now I just make a copy of the string */ + exit_str = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * (strlenW(Exit)+1)); +-- +1.5.6.5 + -- 2.11.4.GIT