update wine to wine-1.1.19
[sugaredwine.git] / patches / 0029-explorer-add-Run-from-Journal-to-start-menu.patch
blob4e8367f2d91aee83e3125e0808acf4372f1bb589
1 From 19ed4f94f506844be2d066a83a9248fbc3f0702f Mon Sep 17 00:00:00 2001
2 From: Vincent Povirk <vincent@codeweavers.com>
3 Date: Wed, 5 Nov 2008 13:36:35 -0600
4 Subject: [PATCH] explorer: add "Run from Journal" to start menu
6 ---
7 programs/explorer/startmenu.c | 15 +++++++++++++++
8 1 files changed, 15 insertions(+), 0 deletions(-)
10 diff --git a/programs/explorer/startmenu.c b/programs/explorer/startmenu.c
11 index a9d6a05..0780f7b 100644
12 --- a/programs/explorer/startmenu.c
13 +++ b/programs/explorer/startmenu.c
14 @@ -16,6 +16,9 @@
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 +#include "config.h"
19 +#include "wine/port.h"
21 #define UNICODE
22 #define COBJMACROS
23 #define INITGUID
24 @@ -413,6 +416,13 @@ static void run_dialog()
25 FreeLibrary(hShell32);
28 +static void run_from_journal()
30 + static const char *argv[] = { "sugar-run-from-journal", NULL };
32 + spawnvp(_P_NOWAITO, argv[0], argv);
35 static void destroy_menus()
37 if (!topmenu)
38 @@ -530,6 +540,7 @@ void do_startmenu(HWND hwnd, HWND button)
39 TPMPARAMS tpm;
40 static WCHAR Exit[] = {'E','x','i','t',0};
41 static WCHAR Run[] = {'R','u','n','.','.','.',0};
42 + static WCHAR RunFromJournal[] = {'R','u','n',' ','f','r','o','m',' ','J','o','u','r','n','a','l','.','.','.',0};
43 LPWSTR exit_str, run_str;
45 /* FIXME: Our existing menu is never destroyed if the user makes no
46 @@ -577,6 +588,10 @@ void do_startmenu(HWND hwnd, HWND button)
47 strcpyW(run_str, Run);
48 add_special_item(NULL, NULL, run_str, run_dialog, NULL, hwnd);
50 + run_str = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * (strlenW(RunFromJournal)+1));
51 + strcpyW(run_str, RunFromJournal);
52 + add_special_item(NULL, NULL, run_str, run_from_journal, NULL, hwnd);
54 /* separator */
55 AppendMenuW(topmenu, MF_SEPARATOR, 0, NULL);
57 --
58 1.5.6.5