Author: janderwald
Date: Sun Oct 28 00:09:38 2007
New Revision: 29921
URL:
http://svn.reactos.org/svn/reactos?rev=29921&view=rev
Log:
- start implementing "Open With" shell extension
- see
http://windowsxp.mvps.org/OpenWith.htm
Added:
trunk/reactos/dll/win32/shell32/she_ocmenu.c (with props)
Modified:
trunk/reactos/dll/win32/shell32/lang/bg-BG.rc
trunk/reactos/dll/win32/shell32/lang/ca-ES.rc
trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc
trunk/reactos/dll/win32/shell32/lang/da-DK.rc
trunk/reactos/dll/win32/shell32/lang/de-DE.rc
trunk/reactos/dll/win32/shell32/lang/en-US.rc
trunk/reactos/dll/win32/shell32/lang/eo-EO.rc
trunk/reactos/dll/win32/shell32/lang/es-ES.rc
trunk/reactos/dll/win32/shell32/lang/fi-FI.rc
trunk/reactos/dll/win32/shell32/lang/fr-FR.rc
trunk/reactos/dll/win32/shell32/lang/hu-HU.rc
trunk/reactos/dll/win32/shell32/lang/it-IT.rc
trunk/reactos/dll/win32/shell32/lang/ja-JP.rc
trunk/reactos/dll/win32/shell32/lang/ko-KO.rc
trunk/reactos/dll/win32/shell32/lang/nb-NO.rc
trunk/reactos/dll/win32/shell32/lang/nl-NL.rc
trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
trunk/reactos/dll/win32/shell32/lang/pt-BR.rc
trunk/reactos/dll/win32/shell32/lang/pt-PT.rc
trunk/reactos/dll/win32/shell32/lang/ru-RU.rc
trunk/reactos/dll/win32/shell32/lang/sk-SK.rc
trunk/reactos/dll/win32/shell32/lang/sl-SI.rc
trunk/reactos/dll/win32/shell32/lang/sv-SE.rc
trunk/reactos/dll/win32/shell32/lang/tr-TR.rc
trunk/reactos/dll/win32/shell32/lang/uk-UA.rc
trunk/reactos/dll/win32/shell32/lang/wa-WA.rc
trunk/reactos/dll/win32/shell32/lang/zh-CN.rc
trunk/reactos/dll/win32/shell32/lang/zh-TW.rc
trunk/reactos/dll/win32/shell32/shell32.rbuild
trunk/reactos/dll/win32/shell32/shell32_main.h
trunk/reactos/dll/win32/shell32/shellole.c
trunk/reactos/dll/win32/shell32/shresdef.h
trunk/reactos/dll/win32/shell32/shv_item_cmenu.c
trunk/reactos/dll/win32/shell32/undocshell.h
Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/bg-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/bg-BG.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/bg-BG.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,7 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ca-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ca-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ca-ES.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/ca-ES.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/cs-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc Sun Oct 28 00:09:38 2007
@@ -413,4 +413,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/da-DK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/da-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/da-DK.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/da-DK.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/de-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/de-DE.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/de-DE.rc Sun Oct 28 00:09:38 2007
@@ -413,4 +413,6 @@
IDS_DRIVE_FIXED "Lokaler Datenträger"
IDS_DRIVE_CDROM "CD-Laufwerk"
IDS_DRIVE_NETWORK "Netzlaufwerk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/en-US.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/en-US.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/eo-EO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/eo-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/eo-EO.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/eo-EO.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/es-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/es-ES.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/es-ES.rc Sun Oct 28 00:09:38 2007
@@ -413,4 +413,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/fi-FI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fi-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/fi-FI.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/fi-FI.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fr-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/fr-FR.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/fr-FR.rc Sun Oct 28 00:09:38 2007
@@ -415,4 +415,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/hu-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/hu-HU.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/hu-HU.rc Sun Oct 28 00:09:38 2007
@@ -415,4 +415,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/it-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/it-IT.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/it-IT.rc Sun Oct 28 00:09:38 2007
@@ -413,4 +413,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ja-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ja-JP.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/ja-JP.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ko-KO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ko-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ko-KO.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/ko-KO.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/nb-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/nb-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/nb-NO.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/nb-NO.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/nl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/nl-NL.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/nl-NL.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pl-PL.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/pl-PL.rc Sun Oct 28 00:09:38 2007
@@ -413,4 +413,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pt-BR.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/pt-BR.rc Sun Oct 28 00:09:38 2007
@@ -414,4 +414,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pt-PT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pt-PT.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/pt-PT.rc Sun Oct 28 00:09:38 2007
@@ -414,4 +414,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ru-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ru-RU.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/ru-RU.rc Sun Oct 28 00:09:38 2007
@@ -413,4 +413,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sk-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sk-SK.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/sk-SK.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Choose Program..."
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sl-SI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sl-SI.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/sl-SI.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Select Program"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sv-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sv-SE.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/sv-SE.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Select Program"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/tr-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/tr-TR.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/tr-TR.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Select Program"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/uk-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/uk-UA.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/uk-UA.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Select Program"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/wa-WA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/wa-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/wa-WA.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/wa-WA.rc Sun Oct 28 00:09:38 2007
@@ -412,4 +412,6 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
-END
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Select Program"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/zh-CN.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/zh-CN.rc Sun Oct 28 00:09:38 2007
@@ -413,6 +413,8 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Select Program"
END
#pragma code_page(default)
Modified: trunk/reactos/dll/win32/shell32/lang/zh-TW.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/zh-TW.rc (original)
+++ trunk/reactos/dll/win32/shell32/lang/zh-TW.rc Sun Oct 28 00:09:38 2007
@@ -412,6 +412,8 @@
IDS_DRIVE_FIXED "Local Disk"
IDS_DRIVE_CDROM "CDROM"
IDS_DRIVE_NETWORK "Network Disk"
+ IDS_OPEN_WITH "Open With"
+ IDS_OPEN_WITH_CHOOSE "Select Program"
END
#pragma code_page(default)
Added: trunk/reactos/dll/win32/shell32/she_ocmenu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/she_ocme…
==============================================================================
--- trunk/reactos/dll/win32/shell32/she_ocmenu.c (added)
+++ trunk/reactos/dll/win32/shell32/she_ocmenu.c Sun Oct 28 00:09:38 2007
@@ -1,0 +1,315 @@
+/*
+ * IContextMenu for items in the shellview
+ *
+ * Copyright 1998, 2000 Juergen Schmied <juergen.schmied(a)debitel.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <string.h>
+
+#define COBJMACROS
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+#define YDEBUG
+#include "winerror.h"
+#include "wine/debug.h"
+
+#include "windef.h"
+#include "wingdi.h"
+#include "pidl.h"
+#include "undocshell.h"
+#include "shlobj.h"
+#include "objbase.h"
+
+#include "shell32_main.h"
+#include "shellfolder.h"
+#include "shresdef.h"
+
+const GUID CLSID_OpenWith = { 0x09799AFB, 0xAD67, 0x11d1,
{0xAB,0xCD,0x00,0xC0,0x4F,0xC3,0x09,0x36} };
+
+typedef struct
+{
+ const IContextMenu2Vtbl *lpVtblContextMenu;
+ const IShellExtInitVtbl *lpvtblShellExtInit;
+ LONG wId;
+ volatile LONG ref;
+} SHEOWImpl;
+
+
+static const IShellExtInitVtbl eivt;
+static const IContextMenu2Vtbl cmvt;
+static HRESULT WINAPI SHEOWCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID
*ppvObj);
+static ULONG WINAPI SHEOWCm_fnRelease(IContextMenu2 *iface);
+
+HRESULT WINAPI SHEOW_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv)
+{
+ SHEOWImpl * ow;
+ HRESULT res;
+
+ ow = LocalAlloc(LMEM_ZEROINIT, sizeof(SHEOWImpl));
+ if (!ow)
+ {
+ return E_OUTOFMEMORY;
+ }
+
+ ow->ref = 1;
+ ow->lpVtblContextMenu = &cmvt;
+ ow->lpvtblShellExtInit = &eivt;
+
+ TRACE("(%p)->()\n",ow);
+
+ res = SHEOWCm_fnQueryInterface( (IContextMenu2*)&ow->lpVtblContextMenu, riid,
ppv );
+ SHEOWCm_fnRelease( (IContextMenu2*)&ow->lpVtblContextMenu );
+ return res;
+}
+
+static inline SHEOWImpl *impl_from_IShellExtInit( IShellExtInit *iface )
+{
+ return (SHEOWImpl *)((char*)iface - FIELD_OFFSET(SHEOWImpl, lpvtblShellExtInit));
+}
+
+static inline SHEOWImpl *impl_from_IContextMenu( IContextMenu2 *iface )
+{
+ return (SHEOWImpl *)((char*)iface - FIELD_OFFSET(SHEOWImpl, lpVtblContextMenu));
+}
+
+static HRESULT WINAPI SHEOWCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID
*ppvObj)
+{
+ SHEOWImpl *This = impl_from_IContextMenu(iface);
+
+ TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj);
+
+ *ppvObj = NULL;
+
+ if(IsEqualIID(riid, &IID_IUnknown) ||
+ IsEqualIID(riid, &IID_IContextMenu) ||
+ IsEqualIID(riid, &IID_IContextMenu2))
+ {
+ *ppvObj = &This->lpVtblContextMenu;
+ }
+ else if(IsEqualIID(riid, &IID_IShellExtInit))
+ {
+ *ppvObj = &This->lpvtblShellExtInit;
+ }
+
+ if(*ppvObj)
+ {
+ IUnknown_AddRef((IUnknown*)*ppvObj);
+ TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj);
+ return S_OK;
+ }
+ TRACE("-- Interface: E_NOINTERFACE\n");
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI SHEOWCm_fnAddRef(IContextMenu2 *iface)
+{
+ SHEOWImpl *This = impl_from_IContextMenu(iface);
+ ULONG refCount = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p)->(count=%u)\n", This, refCount - 1);
+
+ return refCount;
+}
+
+static ULONG WINAPI SHEOWCm_fnRelease(IContextMenu2 *iface)
+{
+ SHEOWImpl *This = impl_from_IContextMenu(iface);
+ ULONG refCount = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p)->(count=%i)\n", This, refCount + 1);
+
+ if (!refCount)
+ {
+ TRACE(" destroying IContextMenu(%p)\n",This);
+ HeapFree(GetProcessHeap(),0,This);
+ }
+ return refCount;
+}
+
+static UINT
+AddItems(SHEOWImpl *This, HMENU hMenu, UINT idCmdFirst)
+{
+ UINT count = 0;
+ MENUITEMINFOW mii;
+ WCHAR szBuffer[50];
+ static const WCHAR szChoose[] = {
'C','h','o','o','s','e','
','P','r','o','g','r','a','m','.','.','.',0
};
+
+ ZeroMemory(&mii, sizeof(mii));
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
+ mii.fType = MFT_STRING;
+ mii.fState = MFS_ENABLED;
+ mii.wID = idCmdFirst;
+
+ if (!LoadStringW(shell32_hInstance, IDS_OPEN_WITH_CHOOSE, szBuffer, sizeof(szBuffer)
/ sizeof(WCHAR)))
+ {
+ ERR("Failed to load string\n");
+ wcscpy(szBuffer, szChoose);
+ }
+
+ mii.dwItemData = (LPWSTR)szBuffer;
+ if (InsertMenuItemW(hMenu, 0, TRUE, &mii))
+ count++;
+
+ return count;
+}
+
+
+static HRESULT WINAPI SHEOWCm_fnQueryContextMenu(
+ IContextMenu2 *iface,
+ HMENU hmenu,
+ UINT indexMenu,
+ UINT idCmdFirst,
+ UINT idCmdLast,
+ UINT uFlags)
+{
+ MENUITEMINFOW mii;
+ USHORT items = 0;
+ WCHAR szBuffer[100];
+
+ HMENU hSubMenu = NULL;
+ SHEOWImpl *This = impl_from_IContextMenu(iface);
+
+ if (LoadStringW(shell32_hInstance, IDS_OPEN_WITH, szBuffer, 100) < 0)
+ {
+ TRACE("failed to load string\n");
+ return E_FAIL;
+ }
+
+
+ hSubMenu = CreatePopupMenu();
+ if (hSubMenu == NULL)
+ {
+ ERR("failed to create submenu");
+ return E_FAIL;
+ }
+ items = AddItems(This, hSubMenu, idCmdFirst);
+
+ ZeroMemory(&mii, sizeof(mii));
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
+ if (hSubMenu)
+ {
+ mii.fMask |= MIIM_SUBMENU;
+ mii.hSubMenu = hSubMenu;
+ }
+ mii.dwTypeData = (LPWSTR) szBuffer;
+ mii.fState = MFS_ENABLED;
+ mii.wID = idCmdFirst + items;
+ mii.fType = MFT_STRING;
+ if (InsertMenuItemW( hmenu, 0, TRUE, &mii))
+ items++;
+
+ TRACE("items %x\n",items);
+ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, items);
+}
+
+static HRESULT WINAPI
+SHEOWCm_fnInvokeCommand( IContextMenu2* iface, LPCMINVOKECOMMANDINFO lpici )
+{
+ SHEOWImpl *This = impl_from_IContextMenu(iface);
+
+ TRACE("This %p\n", This);
+
+ return E_FAIL;
+}
+
+static HRESULT WINAPI
+SHEOWCm_fnGetCommandString( IContextMenu2* iface, UINT_PTR idCmd, UINT uType,
+ UINT* pwReserved, LPSTR pszName, UINT cchMax )
+{
+ SHEOWImpl *This = impl_from_IContextMenu(iface);
+
+ FIXME("%p %lu %u %p %p %u\n", This,
+ idCmd, uType, pwReserved, pszName, cchMax );
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI SHEOWCm_fnHandleMenuMsg(
+ IContextMenu2 *iface,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ SHEOWImpl *This = impl_from_IContextMenu(iface);
+
+ TRACE("This %p uMsg %x\n",This, uMsg);
+
+ return E_NOTIMPL;
+}
+
+static const IContextMenu2Vtbl cmvt =
+{
+ SHEOWCm_fnQueryInterface,
+ SHEOWCm_fnAddRef,
+ SHEOWCm_fnRelease,
+ SHEOWCm_fnQueryContextMenu,
+ SHEOWCm_fnInvokeCommand,
+ SHEOWCm_fnGetCommandString,
+ SHEOWCm_fnHandleMenuMsg
+};
+
+static HRESULT WINAPI
+SHEOW_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder,
+ IDataObject *pdtobj, HKEY hkeyProgID )
+{
+ SHEOWImpl *This = impl_from_IShellExtInit(iface);
+
+ TRACE("This %p\n", This);
+
+ return S_OK;
+}
+
+static ULONG WINAPI SHEOW_ExtInit_AddRef(IShellExtInit *iface)
+{
+ SHEOWImpl *This = impl_from_IShellExtInit(iface);
+ ULONG refCount = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p)->(count=%u)\n", This, refCount - 1);
+
+ return refCount;
+}
+
+static ULONG WINAPI SHEOW_ExtInit_Release(IShellExtInit *iface)
+{
+ SHEOWImpl *This = impl_from_IShellExtInit(iface);
+ ULONG refCount = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p)->(count=%i)\n", This, refCount + 1);
+
+ if (!refCount)
+ {
+ HeapFree(GetProcessHeap(),0,This);
+ }
+ return refCount;
+}
+
+static HRESULT WINAPI
+SHEOW_ExtInit_QueryInterface( IShellExtInit* iface, REFIID riid, void** ppvObject )
+{
+ SHEOWImpl *This = impl_from_IShellExtInit(iface);
+ return SHEOWCm_fnQueryInterface((IContextMenu2*)This, riid, ppvObject);
+}
+
+static const IShellExtInitVtbl eivt =
+{
+ SHEOW_ExtInit_QueryInterface,
+ SHEOW_ExtInit_AddRef,
+ SHEOW_ExtInit_Release,
+ SHEOW_ExtInit_Initialize
+};
Propchange: trunk/reactos/dll/win32/shell32/she_ocmenu.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/shell32/shell32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32.rbuild (original)
+++ trunk/reactos/dll/win32/shell32/shell32.rbuild Sun Oct 28 00:09:38 2007
@@ -69,4 +69,5 @@
<file>fprop.c</file>
<file>drive.c</file>
<file>recyclebin.c</file>
+ <file>she_ocmenu.c</file>
</module>
Modified: trunk/reactos/dll/win32/shell32/shell32_main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32_main.h (original)
+++ trunk/reactos/dll/win32/shell32/shell32_main.h Sun Oct 28 00:09:38 2007
@@ -100,6 +100,7 @@
HRESULT WINAPI FolderShortcut_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID
*ppv);
HRESULT WINAPI MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv);
HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID *ppv);
+HRESULT WINAPI SHEOW_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID *ppv);
HRESULT WINAPI ShellFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID
*ppv);
extern HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST, LPWSTR, UINT, int*);
HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex,
HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize);
Modified: trunk/reactos/dll/win32/shell32/shellole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellole…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellole.c (original)
+++ trunk/reactos/dll/win32/shell32/shellole.c Sun Oct 28 00:09:38 2007
@@ -77,6 +77,7 @@
#endif
{&CLSID_Printers, &ISF_Printers_Constructor},
{&CLSID_RecycleBin, &RecycleBin_Constructor},
+ {&CLSID_OpenWith, &SHEOW_Constructor},
{NULL,NULL}
};
Modified: trunk/reactos/dll/win32/shell32/shresdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shresdef.h (original)
+++ trunk/reactos/dll/win32/shell32/shresdef.h Sun Oct 28 00:09:38 2007
@@ -96,6 +96,8 @@
#define IDS_TRASHMULTIPLE_TEXT 139
#define IDS_CANTTRASH_TEXT 140
#define IDS_OVERWRITEFOLDER_TEXT 141
+#define IDS_OPEN_WITH 142
+#define IDS_OPEN_WITH_CHOOSE 143
/* Note: this string is referenced from the registry*/
#define IDS_RECYCLEBIN_FOLDER_NAME 8964
Modified: trunk/reactos/dll/win32/shell32/shv_item_cmenu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shv_item_cmenu.c (original)
+++ trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Sun Oct 28 00:09:38 2007
@@ -23,7 +23,7 @@
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
-//#define YDEBUG
+#define YDEBUG
#include "winerror.h"
#include "wine/debug.h"
@@ -378,9 +378,10 @@
if(!(uFlags & CMF_EXPLORE))
_InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING,
"&Select", MFS_ENABLED);
+ TRACE("rfg %x\n", This->rfg);
if (This->rfg & SFGAO_BROWSABLE)
{
- if(This->bAllValues)
+ if(This->bAllValues)
{
_InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING,
"&Open", MFS_ENABLED);
_InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_EXPLORE, MFT_STRING,
"&Explore", MFS_ENABLED);
Modified: trunk/reactos/dll/win32/shell32/undocshell.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/undocshe…
==============================================================================
--- trunk/reactos/dll/win32/shell32/undocshell.h (original)
+++ trunk/reactos/dll/win32/shell32/undocshell.h Sun Oct 28 00:09:38 2007
@@ -560,6 +560,8 @@
/* policy functions */
BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey);
+DEFINE_GUID(CLSID_OpenWith, 0x09799AFB, 0xAD67, 0x11d1,
0xAB,0xCD,0x00,0xC0,0x4F,0xC3,0x09,0x36);
+
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */