explorer: Add a path combobox to explorer.
diff --git a/po/ar.po b/po/ar.po
index b812f5e..4e2a621 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -8089,6 +8089,11 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "معلومات"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/bg.po b/po/bg.po
index fa6258d..fb388a6 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8266,6 +8266,11 @@
msgid "Wine Explorer"
msgstr "&Разгледай"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "LAN връзка"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/ca.po b/po/ca.po
index 5d306e5..0df1498 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -8012,6 +8012,10 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+msgid "Location:"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/cs.po b/po/cs.po
index 7f230e7..d1a4dcc8 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8645,6 +8645,11 @@
msgid "Wine Explorer"
msgstr "P&rozkoumat"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Volby"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/da.po b/po/da.po
index 17309a2..bee9753 100644
--- a/po/da.po
+++ b/po/da.po
@@ -8669,6 +8669,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Placering"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/de.po b/po/de.po
index c6e2ac0..5cb69d8 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8658,6 +8658,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Ort"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/el.po b/po/el.po
index 412cf0c..4abd6c8 100644
--- a/po/el.po
+++ b/po/el.po
@@ -8136,6 +8136,11 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Επιλογές"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/en.po b/po/en.po
index 9493c23..e54e248 100644
--- a/po/en.po
+++ b/po/en.po
@@ -8313,6 +8313,11 @@
msgid "Wine Explorer"
msgstr "Wine Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Location"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/en_US.po b/po/en_US.po
index 17b165c..cbdb264 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -8405,6 +8405,11 @@
msgid "Wine Explorer"
msgstr "Wine Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Location"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "Usage: hostname\n"
diff --git a/po/eo.po b/po/eo.po
index 5c7a8f6..260e673 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -8257,6 +8257,11 @@
msgid "Wine Explorer"
msgstr "E&sploru"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "LAN Interkonekto"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/es.po b/po/es.po
index 1f096c1..4d4e9a5 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8847,6 +8847,11 @@
msgid "Wine Explorer"
msgstr "Internet Explorer de Wine"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Ubicación"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/fa.po b/po/fa.po
index 60af20d..8d13612 100644
--- a/po/fa.po
+++ b/po/fa.po
@@ -8091,6 +8091,11 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "اطلاعات"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/fi.po b/po/fi.po
index 366610a..9563afa 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -8338,6 +8338,11 @@
msgid "Wine Explorer"
msgstr "&Selaa"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Sijainti"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/fr.po b/po/fr.po
index 6fd68b4..aff6a75 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8486,6 +8486,11 @@
msgid "Wine Explorer"
msgstr "Explorateur de Wine"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Emplacement"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "Usage : hostname\n"
diff --git a/po/he.po b/po/he.po
index d461383..1f41606 100644
--- a/po/he.po
+++ b/po/he.po
@@ -8507,6 +8507,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "מיקום"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/hi.po b/po/hi.po
index dd4fe80..cba84b1 100644
--- a/po/hi.po
+++ b/po/hi.po
@@ -8009,6 +8009,10 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+msgid "Location:"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/hu.po b/po/hu.po
index 45cdc85..b50d96e 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -8532,6 +8532,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Hely"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/it.po b/po/it.po
index 8ec758a..4e5c140 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8752,6 +8752,11 @@
msgid "Wine Explorer"
msgstr "Internet Explorer di Wine"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Locazione"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/ja.po b/po/ja.po
index 436a931..a892aa7 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8402,6 +8402,11 @@
msgid "Wine Explorer"
msgstr "Wine エクスプローラ"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "場所"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "使い方: hostname\n"
diff --git a/po/ko.po b/po/ko.po
index 8d64369..640b9c8 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -8374,6 +8374,11 @@
msgid "Wine Explorer"
msgstr "Wine 탐색기"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "랜 연결"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "사용법:hostname\n"
diff --git a/po/lt.po b/po/lt.po
index 76d5996..f760a63 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -8420,6 +8420,11 @@
msgid "Wine Explorer"
msgstr "Wine naršyklė"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Vieta"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "Naudojimas: hostname\n"
diff --git a/po/ml.po b/po/ml.po
index f556691..f3cdd83 100644
--- a/po/ml.po
+++ b/po/ml.po
@@ -8009,6 +8009,10 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+msgid "Location:"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/nb_NO.po b/po/nb_NO.po
index 1877d16..494698a 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -8674,6 +8674,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Plassering"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/nl.po b/po/nl.po
index 349dfd5..26d6023 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8560,6 +8560,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Verkenner"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Locatie"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/or.po b/po/or.po
index 0ca1274..e14bc52 100644
--- a/po/or.po
+++ b/po/or.po
@@ -8009,6 +8009,10 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+msgid "Location:"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/pa.po b/po/pa.po
index b85cdc5..b03e52f 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -8009,6 +8009,10 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+msgid "Location:"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/pl.po b/po/pl.po
index c89a475..c574d7f 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8424,6 +8424,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Położenie"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po
index ec1ba87..a80affa 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8699,6 +8699,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Localização"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 1eeb709..a1401ba 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -8752,6 +8752,11 @@
msgid "Wine Explorer"
msgstr "Explorador de Internet Wine"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Localização"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/rm.po b/po/rm.po
index ce20637..e51d93a 100644
--- a/po/rm.po
+++ b/po/rm.po
@@ -8060,6 +8060,11 @@
msgid "Wine Explorer"
msgstr "Wine ag�d"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "&Options"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/ro.po b/po/ro.po
index 04c7a7c..d083f5a 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -8985,6 +8985,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Locație"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/ru.po b/po/ru.po
index 6d6a80c..68104f8 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8415,6 +8415,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Размещение"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "Использование: hostname\n"
diff --git a/po/sk.po b/po/sk.po
index ac10f59..6c57365 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8293,6 +8293,11 @@
msgid "Wine Explorer"
msgstr "E&xplore"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Informácie"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sl.po b/po/sl.po
index 630978e..9f04787 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -2984,8 +2984,7 @@
#: winerror.mc:851
msgid "Nesting LoadModule calls not allowed\n"
-msgstr ""
-"Klici gnezdenega modula nalaganja niso dovoljeni\n"
+msgstr "Klici gnezdenega modula nalaganja niso dovoljeni\n"
#: winerror.mc:856
msgid "Machine type mismatch\n"
@@ -3061,8 +3060,7 @@
#: winerror.mc:946
msgid "Too many posts to semaphore\n"
-msgstr ""
-"Preveč objav na semaforju\n"
+msgstr "Preveč objav na semaforju\n"
#: winerror.mc:951
msgid "Read/WriteProcessMemory partially completed\n"
@@ -5058,18 +5056,15 @@
#: winerror.mc:3446
msgid "Can't logon with interdomain trust account\n"
-msgstr ""
-"Ni se mogoče prijaviti z računom meddomenskega zaupanja\n"
+msgstr "Ni se mogoče prijaviti z računom meddomenskega zaupanja\n"
#: winerror.mc:3451
msgid "Can't logon with workstation trust account\n"
-msgstr ""
-"Ni se mogoče prijaviti z računom zaupanja delovne postaja\n"
+msgstr "Ni se mogoče prijaviti z računom zaupanja delovne postaja\n"
#: winerror.mc:3456
msgid "Can't logon with server trust account\n"
-msgstr ""
-"Ni se mogoče prijaviti z računom zaupanja strežnika\n"
+msgstr "Ni se mogoče prijaviti z računom zaupanja strežnika\n"
#: winerror.mc:3461
msgid "Domain trust information inconsistent\n"
@@ -8449,6 +8444,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Mesto"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sr_RS@cyrillic.po b/po/sr_RS@cyrillic.po
index 7a5af82..cf15c34 100644
--- a/po/sr_RS@cyrillic.po
+++ b/po/sr_RS@cyrillic.po
@@ -8399,6 +8399,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Локација"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po
index 4be5f25..1cbe1ae 100644
--- a/po/sr_RS@latin.po
+++ b/po/sr_RS@latin.po
@@ -8453,6 +8453,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Lokacija"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/sv.po b/po/sv.po
index 5e7172b..1902e03 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8422,6 +8422,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Plats"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/te.po b/po/te.po
index ce8996a..8832f0b 100644
--- a/po/te.po
+++ b/po/te.po
@@ -8009,6 +8009,10 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+msgid "Location:"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/th.po b/po/th.po
index 2833692..4538d20 100644
--- a/po/th.po
+++ b/po/th.po
@@ -8145,6 +8145,11 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "รายละเอียด"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/tr.po b/po/tr.po
index 6e008d0..7b132e8 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -8793,6 +8793,11 @@
msgid "Wine Explorer"
msgstr "A&raştır"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "LAN Bağlantısı"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/uk.po b/po/uk.po
index 2bf6c90..0dc53aa 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -8401,6 +8401,11 @@
msgid "Wine Explorer"
msgstr "Оглядач Інтернету Wine"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Розміщення"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr "Використання: ім'я_хосту\n"
diff --git a/po/wa.po b/po/wa.po
index a7b8a6e..1411079 100644
--- a/po/wa.po
+++ b/po/wa.po
@@ -8109,6 +8109,11 @@
msgid "Wine Explorer"
msgstr "E&xplore"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "Informåcion"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/wine.pot b/po/wine.pot
index ca987ed..c4a251f 100644
--- a/po/wine.pot
+++ b/po/wine.pot
@@ -7985,6 +7985,10 @@
msgid "Wine Explorer"
msgstr ""
+#: explorer.rc:29
+msgid "Location:"
+msgstr ""
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
index fd0765f..42ad9f0 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -8386,6 +8386,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "位置"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 7a1a597..adf576b 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -8441,6 +8441,11 @@
msgid "Wine Explorer"
msgstr "Wine Internet Explorer"
+#: explorer.rc:29
+#, fuzzy
+msgid "Location:"
+msgstr "區域網路連線"
+
#: hostname.rc:27
msgid "Usage: hostname\n"
msgstr ""
diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c
index bcdfcff..0cb00a4 100644
--- a/programs/explorer/explorer.c
+++ b/programs/explorer/explorer.c
@@ -39,12 +39,14 @@
#define EXPLORER_INFO_INDEX 0
#define NAV_TOOLBAR_HEIGHT 30
+#define PATHBOX_HEIGHT 24
#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'};
+static const WCHAR PATH_BOX_NAME[] = {'\0'};
HINSTANCE explorer_hInstance;
@@ -57,8 +59,9 @@
typedef struct
{
IExplorerBrowser *browser;
- HWND main_window;
+ HWND main_window,path_box;
INT rebar_height;
+ LPCITEMIDLIST pidl;
} explorer_info;
enum
@@ -66,14 +69,100 @@
BACK_BUTTON,FORWARD_BUTTON,UP_BUTTON
};
+typedef struct
+{
+ IExplorerBrowserEvents IExplorerBrowserEvents_iface;
+ explorer_info* info;
+ LONG ref;
+} IExplorerBrowserEventsImpl;
+
+static IExplorerBrowserEventsImpl *impl_from_IExplorerBrowserEvents(IExplorerBrowserEvents *iface)
+{
+ return CONTAINING_RECORD(iface, IExplorerBrowserEventsImpl, IExplorerBrowserEvents_iface);
+}
+
+static HRESULT WINAPI IExplorerBrowserEventsImpl_fnQueryInterface(IExplorerBrowserEvents *iface, REFIID riid, void **ppvObject)
+{
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI IExplorerBrowserEventsImpl_fnAddRef(IExplorerBrowserEvents *iface)
+{
+ IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface);
+ return InterlockedIncrement(&This->ref);
+}
+
+static ULONG WINAPI IExplorerBrowserEventsImpl_fnRelease(IExplorerBrowserEvents *iface)
+{
+ IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+ if(!ref)
+ HeapFree(GetProcessHeap(),0,This);
+ return ref;
+}
+
+static void update_path_box(explorer_info *info)
+{
+ WCHAR path[MAX_PATH];
+ SHGetPathFromIDListW(info->pidl,path);
+ SetWindowTextW(info->path_box,path);
+}
+
+static HRESULT WINAPI IExplorerBrowserEventsImpl_fnOnNavigationComplete(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidl)
+{
+ IExplorerBrowserEventsImpl *This = impl_from_IExplorerBrowserEvents(iface);
+ This->info->pidl = pidl;
+ update_path_box(This->info);
+ return S_OK;
+}
+
+static HRESULT WINAPI IExplorerBrowserEventsImpl_fnOnNavigationFailed(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidl)
+{
+ return S_OK;
+}
+
+static HRESULT WINAPI IExplorerBrowserEventsImpl_fnOnNavigationPending(IExplorerBrowserEvents *iface, PCIDLIST_ABSOLUTE pidl)
+{
+ return S_OK;
+}
+
+static HRESULT WINAPI IExplorerBrowserEventsImpl_fnOnViewCreated(IExplorerBrowserEvents *iface, IShellView *psv)
+{
+ return S_OK;
+}
+
+static IExplorerBrowserEventsVtbl vt_IExplorerBrowserEvents =
+{
+ IExplorerBrowserEventsImpl_fnQueryInterface,
+ IExplorerBrowserEventsImpl_fnAddRef,
+ IExplorerBrowserEventsImpl_fnRelease,
+ IExplorerBrowserEventsImpl_fnOnNavigationPending,
+ IExplorerBrowserEventsImpl_fnOnViewCreated,
+ IExplorerBrowserEventsImpl_fnOnNavigationComplete,
+ IExplorerBrowserEventsImpl_fnOnNavigationFailed
+};
+
+static IExplorerBrowserEvents *make_explorer_events(explorer_info *info)
+{
+ IExplorerBrowserEventsImpl *ret
+ = HeapAlloc(GetProcessHeap(), 0, sizeof(IExplorerBrowserEventsImpl));
+ ret->IExplorerBrowserEvents_iface.lpVtbl = &vt_IExplorerBrowserEvents;
+ ret->info = info;
+ IExplorerBrowserEvents_AddRef(&ret->IExplorerBrowserEvents_iface);
+ return &ret->IExplorerBrowserEvents_iface;
+}
+
static void make_explorer_window(IShellFolder* startFolder)
{
RECT explorerRect;
HWND rebar,nav_toolbar;
FOLDERSETTINGS fs;
+ IExplorerBrowserEvents *events;
explorer_info *info;
HRESULT hres;
+ DWORD cookie;
WCHAR explorer_title[100];
+ WCHAR pathbox_label[50];
TBADDBITMAP bitmap_info;
TBBUTTON nav_buttons[3];
int hist_offset,view_offset;
@@ -81,6 +170,8 @@
memset(nav_buttons,0,sizeof(nav_buttons));
LoadStringW(explorer_hInstance,IDS_EXPLORER_TITLE,explorer_title,
sizeof(explorer_title)/sizeof(WCHAR));
+ LoadStringW(explorer_hInstance,IDS_PATHBOX_LABEL,pathbox_label,
+ sizeof(pathbox_label)/sizeof(WCHAR));
info = HeapAlloc(GetProcessHeap(),0,sizeof(explorer_info));
if(!info)
{
@@ -151,10 +242,26 @@
band_info.cyMinChild=NAV_TOOLBAR_HEIGHT;
band_info.cxMinChild=0;
SendMessageW(rebar,RB_INSERTBANDW,-1,(LPARAM)&band_info);
+ info->path_box = CreateWindowW(WC_COMBOBOXEXW,PATH_BOX_NAME,
+ WS_CHILD | WS_VISIBLE | CBS_DROPDOWN,
+ 0,0,DEFAULT_WIDTH,PATHBOX_HEIGHT,rebar,NULL,
+ explorer_hInstance,NULL);
+ band_info.cyChild=PATHBOX_HEIGHT;
+ band_info.cx=0;
+ band_info.cyMinChild=PATHBOX_HEIGHT;
+ band_info.cxMinChild=0;
+ band_info.fMask|=RBBIM_TEXT;
+ band_info.lpText=pathbox_label;
+ band_info.fStyle|=RBBS_BREAK;
+ band_info.hwndChild=info->path_box;
+ SendMessageW(rebar,RB_INSERTBANDW,-1,(LPARAM)&band_info);
+ events = make_explorer_events(info);
+ IExplorerBrowser_Advise(info->browser,events,&cookie);
IExplorerBrowser_BrowseToObject(info->browser,(IUnknown*)startFolder,
SBSP_ABSOLUTE);
ShowWindow(info->main_window,SW_SHOWDEFAULT);
UpdateWindow(info->main_window);
+ IExplorerBrowserEvents_Release(events);
}
static void update_window_size(explorer_info *info, int height, int width)
@@ -173,6 +280,37 @@
ExitProcess(code);
}
+static LRESULT explorer_on_end_edit(explorer_info *info,NMCBEENDEDITW *edit_info)
+{
+ LPITEMIDLIST pidl = NULL;
+
+ WINE_TRACE("iWhy=%x\n",edit_info->iWhy);
+ switch(edit_info->iWhy)
+ {
+ case CBENF_RETURN:
+ {
+ WCHAR path[MAX_PATH];
+ HWND edit_ctrl = (HWND)SendMessageW(edit_info->hdr.hwndFrom,
+ CBEM_GETEDITCONTROL,0,0);
+ *((WORD*)path)=MAX_PATH;
+ SendMessageW(edit_ctrl,EM_GETLINE,0,(LPARAM)path);
+ pidl = ILCreateFromPathW(path);
+ break;
+ }
+ case CBENF_ESCAPE:
+ /*make sure the that the path box resets*/
+ update_path_box(info);
+ return 0;
+ default:
+ return 0;
+ }
+ if(pidl)
+ IExplorerBrowser_BrowseToIDList(info->browser,pidl,SBSP_ABSOLUTE);
+ if(edit_info->iWhy==CBENF_RETURN)
+ ILFree(pidl);
+ return 0;
+}
+
static LRESULT update_rebar_size(explorer_info* info,NMRBAUTOSIZE *size_info)
{
RECT new_rect;
@@ -192,6 +330,8 @@
WINE_TRACE("code=%i\n",notification->code);
switch(notification->code)
{
+ case CBEN_ENDEDITW:
+ return explorer_on_end_edit(info,(NMCBEENDEDITW*)notification);
case RBN_AUTOSIZE:
return update_rebar_size(info,(NMRBAUTOSIZE*)notification);
default:
@@ -425,7 +565,7 @@
ExitProcess(EXIT_FAILURE);
}
init_info.dwSize = sizeof(INITCOMMONCONTROLSEX);
- init_info.dwICC = ICC_BAR_CLASSES | ICC_COOL_CLASSES;
+ init_info.dwICC = ICC_USEREX_CLASSES | ICC_BAR_CLASSES | ICC_COOL_CLASSES;
if(!InitCommonControlsEx(&init_info))
{
WINE_ERR("Could not initialize Comctl\n");
diff --git a/programs/explorer/explorer.rc b/programs/explorer/explorer.rc
index acac335..86d7ad0 100644
--- a/programs/explorer/explorer.rc
+++ b/programs/explorer/explorer.rc
@@ -25,5 +25,6 @@
STRINGTABLE
{
- IDS_EXPLORER_TITLE "Wine Explorer"
+ IDS_EXPLORER_TITLE "Wine Explorer"
+ IDS_PATHBOX_LABEL "Location:"
}
diff --git a/programs/explorer/resource.h b/programs/explorer/resource.h
index f3813b0..dc0e8d1 100644
--- a/programs/explorer/resource.h
+++ b/programs/explorer/resource.h
@@ -22,5 +22,6 @@
#define __WINE_EXPLORER_RESOURCE_H
#define IDS_EXPLORER_TITLE 1
+#define IDS_PATHBOX_LABEL 2
#endif