OSDN Git Service

Merge with stable
[winmerge-jp/winmerge-jp.git] / Src / OpenView.cpp
index 598cf01..0102094 100644 (file)
@@ -245,7 +245,7 @@ void COpenView::OnInitialUpdate()
 
        if (!bMask)
        {
-               String filterPrefix = theApp.LoadString(IDS_FILTER_PREFIX);
+               String filterPrefix = _("[F] ");
                filterNameOrMask = filterPrefix + filterNameOrMask;
        }
 
@@ -449,7 +449,7 @@ void COpenView::OnSwapButton()
 void COpenView::OnOK() 
 {
        int pathsType; // enum from PATH_EXISTENCE in paths.h
-       const String filterPrefix = theApp.LoadString(IDS_FILTER_PREFIX);
+       const String filterPrefix = _("[F] ");
 
        UpdateData(TRUE);
        TrimPaths();
@@ -492,10 +492,7 @@ void COpenView::OnOK()
        
                        // Add trailing '\' for directories if its missing
                        if (paths_DoesPathExist(m_files[index]) == IS_EXISTING_DIR)
-                       {
-                               if (!paths_EndsWithSlash(m_files[index]))
-                                       m_files[index] += '\\';
-                       }
+                               m_files[index] = paths_AddTrailingSlash(m_files[index]);
                }
        }
 
@@ -847,7 +844,7 @@ void COpenView::OnSelectUnpacker()
                return;
 
        // let the user select a handler
-       CSelectUnpackerDlg dlg(m_files[0].c_str(), this);
+       CSelectUnpackerDlg dlg(m_files[0], this);
        PackingInfo infoUnpacker(PLUGIN_AUTO);
        dlg.SetInitialInfoHandler(&infoUnpacker);
 
@@ -904,7 +901,7 @@ void COpenView::SetUnpackerStatus(UINT msgID)
  */
 void COpenView::OnSelectFilter()
 {
-       String filterPrefix = theApp.LoadString(IDS_FILTER_PREFIX);
+       String filterPrefix = _("[F] ");
        CString curFilter;
 
        const BOOL bUseMask = theApp.m_pGlobalFileFilter->IsUsingMask();
@@ -942,7 +939,7 @@ void COpenView::OnSelectFilter()
  */
 BOOL COpenView::LoadProjectFile(const String &path)
 {
-       String filterPrefix = theApp.LoadString(IDS_FILTER_PREFIX);
+       String filterPrefix = _("[F] ");
        ProjectFile prj;
 
        if (!theApp.LoadProjectFile(path, prj))