1 From 2f2786fc8cf90e04040d94f7965b9144c84f74f9 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
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
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 +#include "wine/port.h"
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()
38 @@ -530,6 +540,7 @@ void do_startmenu(HWND hwnd, HWND button)
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);
55 AppendMenuW(topmenu, MF_SEPARATOR, 0, NULL);