From cfa89e7e3206ff7a8018efd5785daea0c08a21bd Mon Sep 17 00:00:00 2001 From: Jay Yang Date: Sun, 3 Jul 2011 21:36:01 -0400 Subject: [PATCH] explorer: Add a path combobox to explorer. --- po/ar.po | 5 ++ po/bg.po | 5 ++ po/ca.po | 4 + po/cs.po | 5 ++ po/da.po | 5 ++ po/de.po | 5 ++ po/el.po | 5 ++ po/en.po | 5 ++ po/en_US.po | 5 ++ po/eo.po | 5 ++ po/es.po | 5 ++ po/fa.po | 5 ++ po/fi.po | 5 ++ po/fr.po | 5 ++ po/he.po | 5 ++ po/hi.po | 4 + po/hu.po | 5 ++ po/it.po | 5 ++ po/ja.po | 5 ++ po/ko.po | 5 ++ po/lt.po | 5 ++ po/ml.po | 4 + po/nb_NO.po | 5 ++ po/nl.po | 5 ++ po/or.po | 4 + po/pa.po | 4 + po/pl.po | 5 ++ po/pt_BR.po | 5 ++ po/pt_PT.po | 5 ++ po/rm.po | 5 ++ po/ro.po | 5 ++ po/ru.po | 5 ++ po/sk.po | 5 ++ po/sl.po | 20 ++--- po/sr_RS@cyrillic.po | 5 ++ po/sr_RS@latin.po | 5 ++ po/sv.po | 5 ++ po/te.po | 4 + po/th.po | 5 ++ po/tr.po | 5 ++ po/uk.po | 5 ++ po/wa.po | 5 ++ po/wine.pot | 4 + po/zh_CN.po | 5 ++ po/zh_TW.po | 5 ++ programs/explorer/explorer.c | 144 +++++++++++++++++++++++++++++++++- programs/explorer/explorer.rc | 3 +- programs/explorer/resource.h | 1 + 48 files changed, 368 insertions(+), 13 deletions(-) diff --git a/po/ar.po b/po/ar.po index b812f5e4a15..4e2a621c8d0 100644 --- a/po/ar.po +++ b/po/ar.po @@ -8089,6 +8089,11 @@ msgstr "" 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 fa6258d1bfd..fb388a68d10 100644 --- a/po/bg.po +++ b/po/bg.po @@ -8266,6 +8266,11 @@ msgstr "" 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 5d306e5a879..0df1498f5f6 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8012,6 +8012,10 @@ msgstr "" 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 7f230e75c55..d1a4dcc81d6 100644 --- a/po/cs.po +++ b/po/cs.po @@ -8645,6 +8645,11 @@ msgstr "" 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 17309a2cf1b..bee9753167b 100644 --- a/po/da.po +++ b/po/da.po @@ -8669,6 +8669,11 @@ msgstr "" 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 c6e2ac0add8..5cb69d8bb9e 100644 --- a/po/de.po +++ b/po/de.po @@ -8658,6 +8658,11 @@ msgstr "" 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 412cf0c0a40..4abd6c8cbe4 100644 --- a/po/el.po +++ b/po/el.po @@ -8136,6 +8136,11 @@ msgstr "" 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 9493c23297a..e54e248058b 100644 --- a/po/en.po +++ b/po/en.po @@ -8313,6 +8313,11 @@ msgstr "" 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 17b165c4dd1..cbdb264e0fd 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -8405,6 +8405,11 @@ msgstr "Usage: dxdiag [/whql:off | /whql:on] [/t filename | /x filename]" 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 5c7a8f68014..260e6731446 100644 --- a/po/eo.po +++ b/po/eo.po @@ -8257,6 +8257,11 @@ msgstr "" 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 1f096c13adc..4d4e9a5e683 100644 --- a/po/es.po +++ b/po/es.po @@ -8847,6 +8847,11 @@ msgstr "" 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 60af20d38bf..8d13612ab55 100644 --- a/po/fa.po +++ b/po/fa.po @@ -8091,6 +8091,11 @@ msgstr "" 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 366610ad184..9563afab8f8 100644 --- a/po/fi.po +++ b/po/fi.po @@ -8338,6 +8338,11 @@ msgstr "" 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 6fd68b4971d..aff6a755f0a 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8486,6 +8486,11 @@ msgstr "Usage : dxdiag [/whql:off | /whql:on] [/t fichier | /x fichier]" 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 d4613838cc1..1f416067ed8 100644 --- a/po/he.po +++ b/po/he.po @@ -8507,6 +8507,11 @@ msgstr "" 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 dd4fe80960d..cba84b1e64b 100644 --- a/po/hi.po +++ b/po/hi.po @@ -8009,6 +8009,10 @@ msgstr "" 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 45cdc85743b..b50d96e8ea3 100644 --- a/po/hu.po +++ b/po/hu.po @@ -8532,6 +8532,11 @@ msgstr "" 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 8ec758aeeb7..4e5c1407d62 100644 --- a/po/it.po +++ b/po/it.po @@ -8752,6 +8752,11 @@ msgstr "" 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 436a93162a3..a892aa7d2c1 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8402,6 +8402,11 @@ msgstr "使い方: dxdiag [/whql:off | /whql:on] [/t ファイル名 | /x ファ 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 8d64369b825..640b9c889f3 100644 --- a/po/ko.po +++ b/po/ko.po @@ -8374,6 +8374,11 @@ msgstr "사용법: dxdiag [/whql:off | /whql:on] [/t 파일이름 | /x 파일이 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 76d599699af..f760a63ff9c 100644 --- a/po/lt.po +++ b/po/lt.po @@ -8420,6 +8420,11 @@ msgstr "Naudojimas: dxdiag [/whql:off | /whql:on] [/t failas | /x failas]" 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 f55669100f5..f3cdd83b11d 100644 --- a/po/ml.po +++ b/po/ml.po @@ -8009,6 +8009,10 @@ msgstr "" 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 1877d1632e6..494698a29ba 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -8674,6 +8674,11 @@ msgstr "" 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 349dfd5816d..26d602390cb 100644 --- a/po/nl.po +++ b/po/nl.po @@ -8560,6 +8560,11 @@ msgstr "" 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 0ca12742131..e14bc5230f1 100644 --- a/po/or.po +++ b/po/or.po @@ -8009,6 +8009,10 @@ msgstr "" 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 b85cdc5a30e..b03e52f7105 100644 --- a/po/pa.po +++ b/po/pa.po @@ -8009,6 +8009,10 @@ msgstr "" 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 c89a475b3f2..c574d7f6288 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8424,6 +8424,11 @@ msgstr "" 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 ec1ba87c5b3..a80affa5278 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -8699,6 +8699,11 @@ msgstr "" 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 1eeb7091440..a1401ba8cb5 100644 --- a/po/pt_PT.po +++ b/po/pt_PT.po @@ -8752,6 +8752,11 @@ msgstr "" 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 ce20637da2f..e51d93adcd7 100644 --- a/po/rm.po +++ b/po/rm.po @@ -8060,6 +8060,11 @@ msgstr "" 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 04c7a7c20d6..d083f5a9084 100644 --- a/po/ro.po +++ b/po/ro.po @@ -8985,6 +8985,11 @@ msgstr "" 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 6d6a80c5485..68104f8d399 100644 --- a/po/ru.po +++ b/po/ru.po @@ -8415,6 +8415,11 @@ msgstr "" 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 ac10f59f262..6c5736593db 100644 --- a/po/sk.po +++ b/po/sk.po @@ -8293,6 +8293,11 @@ msgstr "" 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 630978ea2e4..9f047878297 100644 --- a/po/sl.po +++ b/po/sl.po @@ -2984,8 +2984,7 @@ msgstr "Preveč modulov\n" #: 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 @@ msgstr "Klicatelj ne sme biti lastnik mutexa\n" #: 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 @@ msgstr "Ni več vezav\n" #: 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 @@ msgstr "" 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 7a5af827e57..cf15c34a5fa 100644 --- a/po/sr_RS@cyrillic.po +++ b/po/sr_RS@cyrillic.po @@ -8399,6 +8399,11 @@ msgstr "" 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 4be5f2551ef..1cbe1ae0672 100644 --- a/po/sr_RS@latin.po +++ b/po/sr_RS@latin.po @@ -8453,6 +8453,11 @@ msgstr "" 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 5e7172b6fc5..1902e03e7f3 100644 --- a/po/sv.po +++ b/po/sv.po @@ -8422,6 +8422,11 @@ msgstr "" 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 ce8996ad65b..8832f0b7710 100644 --- a/po/te.po +++ b/po/te.po @@ -8009,6 +8009,10 @@ msgstr "" 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 2833692aaed..4538d20ad51 100644 --- a/po/th.po +++ b/po/th.po @@ -8145,6 +8145,11 @@ msgstr "" 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 6e008d070b7..7b132e85b14 100644 --- a/po/tr.po +++ b/po/tr.po @@ -8793,6 +8793,11 @@ msgstr "" 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 2bf6c907dfe..0dc53aaedbc 100644 --- a/po/uk.po +++ b/po/uk.po @@ -8401,6 +8401,11 @@ msgstr "" 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 a7b8a6eafa5..1411079404c 100644 --- a/po/wa.po +++ b/po/wa.po @@ -8109,6 +8109,11 @@ msgstr "" 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 ca987ede4ca..c4a251f2083 100644 --- a/po/wine.pot +++ b/po/wine.pot @@ -7985,6 +7985,10 @@ msgstr "" 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 fd0765f51a3..42ad9f0e3e6 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -8386,6 +8386,11 @@ msgstr "" 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 7a1a5974a26..adf576bced9 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -8441,6 +8441,11 @@ msgstr "" 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 bcdfcffae39..0cb00a481a9 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -39,12 +39,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(explorer); #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 parametersTAG { typedef struct { IExplorerBrowser *browser; - HWND main_window; + HWND main_window,path_box; INT rebar_height; + LPCITEMIDLIST pidl; } explorer_info; enum @@ -66,14 +69,100 @@ enum 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 @@ static void make_explorer_window(IShellFolder* startFolder) 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 @@ static void make_explorer_window(IShellFolder* startFolder) 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 @@ static void do_exit(int code) 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 @@ static LRESULT explorer_on_notify(explorer_info* info,NMHDR* notification) 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 @@ int WINAPI wWinMain(HINSTANCE hinstance, 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 acac3351deb..86d7ad06beb 100644 --- a/programs/explorer/explorer.rc +++ b/programs/explorer/explorer.rc @@ -25,5 +25,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT 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 f3813b0e91b..dc0e8d1c963 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