From 8cc571e583517b6513458da0691fa517152166b0 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 5 Nov 2008 13:54:20 -0600 Subject: [PATCH] wine: add "Run from Journal" to start menu --- build.sh | 2 +- ...plorer-add-Run-from-Journal-to-start-menu.patch | 59 ++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 patches/0033-explorer-add-Run-from-Journal-to-start-menu.patch diff --git a/build.sh b/build.sh index c4a7d2d..24a9788 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=07fafa26a318a3da3185fcac71bfa6d3fba82787 -WINE_COMMIT=be293087a0ab3be50437e45cfda8be49bc4abd67 +WINE_COMMIT=a97e85c91e1b3e38960df399a7a86349f16b5b03 mkdir "${BUILD_DIR}"/Wine.activity diff --git a/patches/0033-explorer-add-Run-from-Journal-to-start-menu.patch b/patches/0033-explorer-add-Run-from-Journal-to-start-menu.patch new file mode 100644 index 0000000..e8fa661 --- /dev/null +++ b/patches/0033-explorer-add-Run-from-Journal-to-start-menu.patch @@ -0,0 +1,59 @@ +From a97e85c91e1b3e38960df399a7a86349f16b5b03 Mon Sep 17 00:00:00 2001 +From: Vincent Povirk +Date: Wed, 5 Nov 2008 13:36:35 -0600 +Subject: [PATCH] explorer: add "Run from Journal" to start menu + +--- + programs/explorer/startmenu.c | 15 +++++++++++++++ + 1 files changed, 15 insertions(+), 0 deletions(-) + +diff --git a/programs/explorer/startmenu.c b/programs/explorer/startmenu.c +index f70ba79..c8976a4 100644 +--- a/programs/explorer/startmenu.c ++++ b/programs/explorer/startmenu.c +@@ -16,6 +16,9 @@ + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + ++#include "config.h" ++#include "wine/port.h" ++ + #define UNICODE + #define COBJMACROS + #define INITGUID +@@ -413,6 +416,13 @@ static void run_dialog() + FreeLibrary(hShell32); + } + ++static void run_from_journal() ++{ ++ static const char *argv[] = { "sugar-run-from-journal", NULL }; ++ ++ spawnvp(_P_NOWAITO, argv[0], argv); ++} ++ + static void destroy_menus() + { + if (!topmenu) +@@ -530,6 +540,7 @@ void do_startmenu(HWND hwnd, HWND button) + TPMPARAMS tpm; + static WCHAR Exit[] = {'E','x','i','t',0}; + static WCHAR Run[] = {'R','u','n','.','.','.',0}; ++ static WCHAR RunFromJournal[] = {'R','u','n',' ','f','r','o','m',' ','J','o','u','r','n','a','l','.','.','.',0}; + LPWSTR exit_str, run_str; + + /* FIXME: Our existing menu is never destroyed if the user makes no +@@ -577,6 +588,10 @@ void do_startmenu(HWND hwnd, HWND button) + strcpyW(run_str, Run); + add_special_item(NULL, NULL, run_str, run_dialog, NULL, hwnd); + ++ run_str = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * (strlenW(RunFromJournal)+1)); ++ strcpyW(run_str, RunFromJournal); ++ add_special_item(NULL, NULL, run_str, run_from_journal, NULL, hwnd); ++ + /* separator */ + AppendMenuW(topmenu, MF_SEPARATOR, 0, NULL); + +-- +1.5.6.5 + -- 2.11.4.GIT