Author: kirilla Date: 2011-03-16 19:32:25 +0100 (Wed, 16 Mar 2011) New Revision: 40972 Changeset: http://dev.haiku-os.org/changeset/40972 Modified: haiku/trunk/src/kits/tracker/FilePanelPriv.cpp Log: Prepare BFilePanel for localized names. Modified: haiku/trunk/src/kits/tracker/FilePanelPriv.cpp =================================================================== --- haiku/trunk/src/kits/tracker/FilePanelPriv.cpp 2011-03-16 16:47:42 UTC (rev 40971) +++ haiku/trunk/src/kits/tracker/FilePanelPriv.cpp 2011-03-16 18:32:25 UTC (rev 40972) @@ -49,6 +49,7 @@ #include "PoseView.h" #include "Tracker.h" #include "tracker_private.h" +#include "Utilities.h" #include <Alert.h> #include <Application.h> @@ -174,6 +175,9 @@ else fMessage = new BMessage(B_REFS_RECEIVED); + gLocalizedNamePreferred + = BLocaleRoster::Default()->IsFilesystemTranslationPreferred(); + // check for legal starting directory Model *model = new Model(); bool useRoot = true; @@ -775,9 +779,12 @@ app_info info; BString title; - if (be_app->GetAppInfo(&info) == B_OK) - title << info.ref.name << ": "; - + if (be_app->GetAppInfo(&info) == B_OK) { + if (!gLocalizedNamePreferred + || GetLocalizedFileName(info.ref, title, false) != B_OK) + title = info.ref.name; + title << ": "; + } title << fButtonText; // Open or Save SetTitle(title.String());