explorer: Implement the explorer using IExplorerBrowser.
diff --git a/configure b/configure
index 2456624..92586f2 100755
--- a/configure
+++ b/configure
@@ -15473,7 +15473,7 @@
wine_fn_config_program dxdiag enable_dxdiag install,po
wine_fn_config_program eject enable_eject install
wine_fn_config_program expand enable_expand install
-wine_fn_config_program explorer enable_explorer install
+wine_fn_config_program explorer enable_explorer install,po
wine_fn_config_program extrac32 enable_extrac32 install
wine_fn_config_program hh enable_hh install
wine_fn_config_program hostname enable_hostname install,po
diff --git a/configure.ac b/configure.ac
index 2ae64f7..2e20f24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2946,7 +2946,7 @@
WINE_CONFIG_PROGRAM(dxdiag,,[install,po])
WINE_CONFIG_PROGRAM(eject,,[install])
WINE_CONFIG_PROGRAM(expand,,[install])
-WINE_CONFIG_PROGRAM(explorer,,[install])
+WINE_CONFIG_PROGRAM(explorer,,[install,po])
WINE_CONFIG_PROGRAM(extrac32,,[install])
WINE_CONFIG_PROGRAM(hh,,[install])
WINE_CONFIG_PROGRAM(hostname,,[install,po])
diff --git a/po/ar.po b/po/ar.po
index 1a4e505..b812f5e 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -8085,6 +8085,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/bg.po b/po/bg.po
index 25523f8..fa6258d 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8261,6 +8261,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "&Разгледай"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/ca.po b/po/ca.po
index ab2397f..5d306e5 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -8008,6 +8008,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/cs.po b/po/cs.po
index ee5f2a1..7f230e7 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8640,6 +8640,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "P&rozkoumat"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/da.po b/po/da.po
index 31c7046..17309a2 100644
--- a/po/da.po
+++ b/po/da.po
@@ -8664,6 +8664,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/de.po b/po/de.po
index bb05407..c6e2ac0 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8653,6 +8653,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/el.po b/po/el.po
index ff22879..412cf0c 100644
--- a/po/el.po
+++ b/po/el.po
@@ -8132,6 +8132,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/en.po b/po/en.po
index 890dad6..9493c23 100644
--- a/po/en.po
+++ b/po/en.po
@@ -8309,6 +8309,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr "Wine Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/en_US.po b/po/en_US.po
index 9506241..17b165c 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -8401,6 +8401,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr "Wine Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "Usage: hostname\n"
diff --git a/po/eo.po b/po/eo.po
index 2676ae4..5c7a8f6 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -8252,6 +8252,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "E&sploru"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/es.po b/po/es.po
index b53a84f..1f096c1 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8842,6 +8842,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Internet Explorer de Wine"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/fa.po b/po/fa.po
index 417119a..60af20d 100644
--- a/po/fa.po
+++ b/po/fa.po
@@ -8087,6 +8087,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/fi.po b/po/fi.po
index 73face2..366610a 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -8333,6 +8333,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "&Selaa"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/fr.po b/po/fr.po
index caa316b..b84114a 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8482,6 +8482,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr "Usage : dxdiag [/whql:off | /whql:on] [/t fichier | /x fichier]"
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Internet Explorer de Wine"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "Usage : hostname\n"
diff --git a/po/he.po b/po/he.po
index 16ec7f5..d461383 100644
--- a/po/he.po
+++ b/po/he.po
@@ -8502,6 +8502,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/hi.po b/po/hi.po
index 03029db..dd4fe80 100644
--- a/po/hi.po
+++ b/po/hi.po
@@ -8005,6 +8005,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/hu.po b/po/hu.po
index 9d01317..45cdc85 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -8527,6 +8527,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/it.po b/po/it.po
index 4bd9a38..8ec758a 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8747,6 +8747,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Internet Explorer di Wine"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/ja.po b/po/ja.po
index 887e7bc..b994a2d 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8399,6 +8399,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine インターネット エクスプローラ"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "使い方: hostname\n"
diff --git a/po/ko.po b/po/ko.po
index 2469a0d..4f92679 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -8371,6 +8371,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr "사용법: dxdiag [/whql:off | /whql:on] [/t 파일이름 | /x 파일이름]"
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine 인터넷 익스폴로어r"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "사용법:hostname\n"
diff --git a/po/lt.po b/po/lt.po
index 0086355..18aede5 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -8417,6 +8417,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr "Naudojimas: dxdiag [/whql:off | /whql:on] [/t failas | /x failas]"
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine interneto naršyklė"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "Naudojimas: hostname\n"
diff --git a/po/ml.po b/po/ml.po
index a86eb91..f556691 100644
--- a/po/ml.po
+++ b/po/ml.po
@@ -8005,6 +8005,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/nb_NO.po b/po/nb_NO.po
index 439e5b9..1877d16 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -8669,6 +8669,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/nl.po b/po/nl.po
index 9d84d7b..349dfd5 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8555,6 +8555,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Verkenner"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/or.po b/po/or.po
index bae55f4..0ca1274 100644
--- a/po/or.po
+++ b/po/or.po
@@ -8005,6 +8005,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/pa.po b/po/pa.po
index b7ec717..b85cdc5 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -8005,6 +8005,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/pl.po b/po/pl.po
index e5ff81a..4757f34 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8419,6 +8419,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 64f4c44..ec1ba87 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8694,6 +8694,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 55d0c82..1eeb709 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -8747,6 +8747,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Explorador de Internet Wine"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/rm.po b/po/rm.po
index ddda491..ce20637 100644
--- a/po/rm.po
+++ b/po/rm.po
@@ -8055,6 +8055,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine ag�d"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/ro.po b/po/ro.po
index 4cc41a3..04c7a7c 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -8980,6 +8980,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/ru.po b/po/ru.po
index 69faa37..1f04849 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8416,6 +8416,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sk.po b/po/sk.po
index 6e8fa41..ac10f59 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8288,6 +8288,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "E&xplore"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sl.po b/po/sl.po
index ad452c8..799e24f 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -8449,6 +8449,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sr_RS@cyrillic.po b/po/sr_RS@cyrillic.po
index f8e76f8..7a5af82 100644
--- a/po/sr_RS@cyrillic.po
+++ b/po/sr_RS@cyrillic.po
@@ -8394,6 +8394,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po
index b99957e..4be5f25 100644
--- a/po/sr_RS@latin.po
+++ b/po/sr_RS@latin.po
@@ -8448,6 +8448,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sv.po b/po/sv.po
index 46cc06e..280730a 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8417,6 +8417,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/te.po b/po/te.po
index 6f52bc7..ce8996a 100644
--- a/po/te.po
+++ b/po/te.po
@@ -8005,6 +8005,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/th.po b/po/th.po
index 54f640a..2833692 100644
--- a/po/th.po
+++ b/po/th.po
@@ -8141,6 +8141,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/tr.po b/po/tr.po
index 0596a32..6e008d0 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -8788,6 +8788,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "A&raştır"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/uk.po b/po/uk.po
index 6ff64f6..fa58daf 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8426,6 +8426,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Оглядач Інтернету Wine"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/wa.po b/po/wa.po
index c60347c..a7b8a6e 100644
--- a/po/wa.po
+++ b/po/wa.po
@@ -8104,6 +8104,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "E&xplore"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/wine.pot b/po/wine.pot
index eed18ef..ca987ed 100644
--- a/po/wine.pot
+++ b/po/wine.pot
@@ -7981,6 +7981,10 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+msgid "Wine Explorer"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
index ae538b2..5523807 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -8381,6 +8381,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 269b4e6..7a1a597 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -8436,6 +8436,11 @@
msgid "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]"
msgstr ""
+#: explorer.rc:28
+#, fuzzy
+msgid "Wine Explorer"
+msgstr "Wine Internet Explorer"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/programs/explorer/Makefile.in b/programs/explorer/Makefile.in
index 5537bc4..6fe3fae 100644
--- a/programs/explorer/Makefile.in
+++ b/programs/explorer/Makefile.in
@@ -2,7 +2,7 @@
MODULE = explorer.exe
APPMODE = -mwindows -municode
IMPORTS = rpcrt4 user32 gdi32 advapi32
-DELAYIMPORTS = comctl32
+DELAYIMPORTS = comctl32 shell32 ole32
C_SRCS = \
appbar.c \
@@ -10,4 +10,7 @@
explorer.c \
systray.c
+RC_SRCS = explorer.rc
+PO_SRCS = explorer.rc
+
@MAKE_PROG_RULES@
diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c
index 16dcf72..91347eb 100644
--- a/programs/explorer/explorer.c
+++ b/programs/explorer/explorer.c
@@ -3,6 +3,7 @@
*
* Copyright 2004 CodeWeavers, Mike Hearn
* Copyright 2005,2006 CodeWeavers, Aric Stewart
+ * Copyright 2011 Jay Yang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -19,10 +20,30 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <windows.h>
+#define COBJMACROS
#include "wine/unicode.h"
+#include "wine/debug.h"
#include "explorer_private.h"
+#include "resource.h"
+
+#include <initguid.h>
+#include <windows.h>
+#include <shobjidl.h>
+#include <shlobj.h>
+
+
+WINE_DEFAULT_DEBUG_CHANNEL(explorer);
+
+#define EXPLORER_INFO_INDEX 0
+
+#define DEFAULT_WIDTH 640
+#define DEFAULT_HEIGHT 480
+
+
+static const WCHAR EXPLORER_CLASS[] = {'W','I','N','E','_','E','X','P','L','O','R','E','R','\0'};
+
+HINSTANCE explorer_hInstance;
typedef struct parametersTAG {
BOOL explorer_mode;
@@ -30,8 +51,116 @@
WCHAR selection[MAX_PATH];
} parameters_struct;
+typedef struct
+{
+ IExplorerBrowser *browser;
+} explorer_info;
-static int CopyPathString(LPWSTR target, LPWSTR source)
+static void make_explorer_window(IShellFolder* startFolder)
+{
+ RECT explorerRect;
+ HWND window;
+ FOLDERSETTINGS fs;
+ explorer_info *info;
+ HRESULT hres;
+ WCHAR explorer_title[100];
+ LoadStringW(explorer_hInstance,IDS_EXPLORER_TITLE,explorer_title,
+ sizeof(explorer_title)/sizeof(WCHAR));
+ info = HeapAlloc(GetProcessHeap(),0,sizeof(explorer_info));
+ if(!info)
+ {
+ WINE_ERR("Could not allocate a explorer_info struct\n");
+ return;
+ }
+ hres = CoCreateInstance(&CLSID_ExplorerBrowser,NULL,CLSCTX_INPROC_SERVER,
+ &IID_IExplorerBrowser,(LPVOID*)&info->browser);
+ if(!SUCCEEDED(hres))
+ {
+ WINE_ERR("Could not obtain an instance of IExplorerBrowser\n");
+ HeapFree(GetProcessHeap(),0,info);
+ return;
+ }
+
+ window = CreateWindowW(EXPLORER_CLASS,explorer_title,WS_OVERLAPPEDWINDOW,
+ CW_USEDEFAULT,CW_USEDEFAULT,DEFAULT_WIDTH,
+ DEFAULT_HEIGHT,NULL,NULL,explorer_hInstance,NULL);
+ fs.ViewMode = FVM_DETAILS;
+ fs.fFlags = FWF_AUTOARRANGE;
+ explorerRect.left = 0;
+ explorerRect.top = 0;
+ explorerRect.right = DEFAULT_WIDTH;
+ explorerRect.bottom = DEFAULT_HEIGHT;
+
+ IExplorerBrowser_Initialize(info->browser,window,&explorerRect,&fs);
+ IExplorerBrowser_SetOptions(info->browser,EBO_SHOWFRAMES);
+ SetWindowLongPtrW(window,EXPLORER_INFO_INDEX,(LONG_PTR)info);
+ IExplorerBrowser_BrowseToObject(info->browser,(IUnknown*)startFolder,
+ SBSP_ABSOLUTE);
+ ShowWindow(window,SW_SHOWDEFAULT);
+ UpdateWindow(window);
+}
+
+static void update_window_size(explorer_info *info, int height, int width)
+{
+ RECT new_rect;
+ new_rect.left = 0;
+ new_rect.top = 0;
+ new_rect.right = width;
+ new_rect.bottom = height;
+ IExplorerBrowser_SetRect(info->browser,NULL,new_rect);
+}
+
+static void do_exit(int code)
+{
+ OleUninitialize();
+ ExitProcess(code);
+}
+
+LRESULT CALLBACK explorer_wnd_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ explorer_info *info
+ = (explorer_info*)GetWindowLongPtrW(hwnd,EXPLORER_INFO_INDEX);
+ IExplorerBrowser *browser = NULL;
+
+ if(info)
+ browser = info->browser;
+ switch(uMsg)
+ {
+ case WM_DESTROY:
+ IExplorerBrowser_Release(browser);
+ HeapFree(GetProcessHeap(),0,info);
+ PostQuitMessage(0);
+ break;
+ case WM_QUIT:
+ do_exit(wParam);
+ case WM_SIZE:
+ update_window_size(info,HIWORD(lParam),LOWORD(lParam));
+ break;
+ default:
+ return DefWindowProcW(hwnd,uMsg,wParam,lParam);
+ }
+ return 0;
+}
+
+static void register_explorer_window_class(void)
+{
+ WNDCLASSEXW window_class;
+ window_class.cbSize = sizeof(WNDCLASSEXW);
+ window_class.style = 0;
+ window_class.cbClsExtra = 0;
+ window_class.cbWndExtra = sizeof(LONG_PTR);
+ window_class.lpfnWndProc = explorer_wnd_proc;
+ window_class.hInstance = explorer_hInstance;
+ window_class.hIcon = NULL;
+ window_class.hCursor = NULL;
+ window_class.hbrBackground = NULL;
+ window_class.lpszMenuName = NULL;
+ window_class.lpszClassName = EXPLORER_CLASS;
+ window_class.hIconSm = NULL;
+ RegisterClassExW(&window_class);
+}
+
+static int copy_path_string(LPWSTR target, LPWSTR source)
{
INT i = 0;
@@ -54,7 +183,7 @@
}
-static void CopyPathRoot(LPWSTR root, LPWSTR path)
+static void copy_path_root(LPWSTR root, LPWSTR path)
{
LPWSTR p,p2;
INT i = 0;
@@ -86,7 +215,7 @@
* [/root,object] Specifies the root level of the view
* [/select,object] parent folder is opened and specified object is selected
*/
-static void ParseCommandLine(LPWSTR commandline,parameters_struct *parameters)
+static void parse_command_line(LPWSTR commandline,parameters_struct *parameters)
{
static const WCHAR arg_n[] = {'/','n'};
static const WCHAR arg_e[] = {'/','e',','};
@@ -113,15 +242,15 @@
else if (strncmpW(p, arg_root, sizeof(arg_root)/sizeof(WCHAR))==0)
{
p += sizeof(arg_root)/sizeof(WCHAR);
- p+=CopyPathString(parameters->root,p);
+ p+=copy_path_string(parameters->root,p);
}
else if (strncmpW(p, arg_select, sizeof(arg_select)/sizeof(WCHAR))==0)
{
p += sizeof(arg_select)/sizeof(WCHAR);
- p+=CopyPathString(parameters->selection,p);
+ p+=copy_path_string(parameters->selection,p);
if (!parameters->root[0])
- CopyPathRoot(parameters->root,
- parameters->selection);
+ copy_path_root(parameters->root,
+ parameters->selection);
}
else if (strncmpW(p, arg_desktop, sizeof(arg_desktop)/sizeof(WCHAR))==0)
{
@@ -136,7 +265,7 @@
if (p2 && *p2)
{
/* left over command line is generally the path to be opened */
- CopyPathString(parameters->root,p2);
+ copy_path_string(parameters->root,p2);
}
}
@@ -145,56 +274,29 @@
LPWSTR cmdline,
int cmdshow)
{
- STARTUPINFOW si;
- PROCESS_INFORMATION info;
+
parameters_struct parameters;
- BOOL rc;
- static const WCHAR winefile[] = {'\\','w','i','n','e','f','i','l','e','.','e','x','e',0};
- static const WCHAR space[] = {' ',0};
- WCHAR app[MAX_PATH];
- LPWSTR winefile_commandline = NULL;
- DWORD len = 0;
+ HRESULT hres;
+ MSG msg;
+ IShellFolder *folder;
memset(¶meters,0,sizeof(parameters));
- memset(&si,0,sizeof(STARTUPINFOW));
-
- ParseCommandLine(cmdline,¶meters);
- len = GetSystemDirectoryW( NULL, 0 ) + sizeof(winefile)/sizeof(WCHAR);
-
- if (parameters.selection[0]) len += lstrlenW(parameters.selection) + 2;
- else if (parameters.root[0]) len += lstrlenW(parameters.root) + 3;
-
- winefile_commandline = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR));
- GetSystemDirectoryW( app, MAX_PATH - sizeof(winefile)/sizeof(WCHAR) );
- strcatW( app, winefile );
- strcpyW( winefile_commandline, app );
-
- if (parameters.selection[0])
+ explorer_hInstance = hinstance;
+ parse_command_line(cmdline,¶meters);
+ hres = OleInitialize(NULL);
+ if(!SUCCEEDED(hres))
{
- lstrcatW(winefile_commandline,space);
- lstrcatW(winefile_commandline,parameters.selection);
+ WINE_ERR("Could not initialize COM\n");
+ ExitProcess(EXIT_FAILURE);
}
- else if (parameters.root[0])
+ register_explorer_window_class();
+ SHGetDesktopFolder(&folder);
+ make_explorer_window(folder);
+ IShellFolder_Release(folder);
+ while(GetMessageW( &msg, NULL, 0, 0 ) != 0)
{
- lstrcatW(winefile_commandline,space);
- lstrcatW(winefile_commandline,parameters.root);
- if (winefile_commandline[lstrlenW(winefile_commandline)-1]!='\\')
- {
- static const WCHAR slash[] = {'\\',0};
- lstrcatW(winefile_commandline,slash);
- }
+ TranslateMessage(&msg);
+ DispatchMessageW(&msg);
}
-
- rc = CreateProcessW(app, winefile_commandline, NULL, NULL, FALSE, 0, NULL,
- parameters.root[0] ? parameters.root:NULL, &si, &info);
-
- HeapFree(GetProcessHeap(),0,winefile_commandline);
-
- if (!rc)
- return 0;
-
- CloseHandle(info.hThread);
- WaitForSingleObject(info.hProcess,INFINITE);
- CloseHandle(info.hProcess);
return 0;
}
diff --git a/programs/explorer/explorer.rc b/programs/explorer/explorer.rc
new file mode 100644
index 0000000..acac335
--- /dev/null
+++ b/programs/explorer/explorer.rc
@@ -0,0 +1,29 @@
+/*
+ * Explorer resources
+ *
+ * Copyright 2011 Jay Yang
+ *
+ * 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 "windef.h"
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ IDS_EXPLORER_TITLE "Wine Explorer"
+}
diff --git a/programs/explorer/resource.h b/programs/explorer/resource.h
new file mode 100644
index 0000000..f3813b0
--- /dev/null
+++ b/programs/explorer/resource.h
@@ -0,0 +1,26 @@
+/*
+ * Explorer resource definitions
+ *
+ * Copyright 2011 Jay Yang
+ *
+ * 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
+ */
+
+#ifndef __WINE_EXPLORER_RESOURCE_H
+#define __WINE_EXPLORER_RESOURCE_H
+
+#define IDS_EXPLORER_TITLE 1
+
+#endif