OSDN Git Service

[ 831308 ] File filter selection text "<None>" hardcoded
authorLaurent Ganier <laoran@users.sourceforge.net>
Tue, 11 Nov 2003 09:32:13 +0000 (09:32 +0000)
committerLaurent Ganier <laoran@users.sourceforge.net>
Tue, 11 Nov 2003 09:32:13 +0000 (09:32 +0000)
Src/FileTransform.h
Src/Merge.cpp
Src/Merge.rc
Src/PropFilter.cpp
Src/SelectUnpackerDlg.cpp
Src/readme.txt
Src/resource.h

index 2984c18..0be0c8d 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef FileTransform_h
 #define FileTransform_h
 
+#include "resource.h"
 
 class CRegExp;
 typedef CTypedPtrList<CPtrList, CRegExp*>RegList;
@@ -57,13 +58,12 @@ public:
                fncUnpack = UnpackPass;
                // and init bAutomatic flag and name according to global variable
                if (bLocalUnpackerMode == UNPACK_MANUAL)
-               {
-                       pluginName = _T("<None>");
+               {                       
                        bToBeScanned = FALSE;
                }
                else
                {
-                       pluginName = _T("<Automatic>");
+                       VERIFY(pluginName.LoadString(IDS_USERCHOICE_AUTOMATIC));
                        bToBeScanned = TRUE;
                }
        };
index 469dcb9..0babed6 100644 (file)
@@ -661,7 +661,7 @@ void CMergeApp::GetFileFilters(StringPairArray * filters, CString & selected) co
 /** @brief Store current filter (if filter manager validates the name) */
 void CMergeApp::SetFileFilterPath(LPCTSTR szFileFilterPath)
 {
-       m_sFileFilterPath = _T("<None>");
+       VERIFY(m_sFileFilterPath.LoadString(IDS_USERCHOICE_NONE));
        if (!m_fileFilterMgr) return;
        m_currentFilter = m_fileFilterMgr->GetFilterByPath(szFileFilterPath);
        if (m_currentFilter)
index 2250615..aa9f82b 100644 (file)
@@ -1517,6 +1517,8 @@ STRINGTABLE DISCARDABLE
 BEGIN
     IDS_PLUGIN_FAILED       "An error occurred in plugin '%1'. The current operation is aborted."
     IDS_ERROR_FILE_NOT_UNPACKED "File not unpacked: %1"
+    IDS_USERCHOICE_NONE     "<None>"
+    IDS_USERCHOICE_AUTOMATIC "<Automatic>"
 END
 
 #endif    // English (U.S.) resources
index 758d9da..b1f6649 100644 (file)
@@ -88,7 +88,7 @@ int CPropFilter::AddFilter(int i)
        if (i>=0)
                name = m_Filters->GetAt(i).second;
        else
-               name = _T("<None>"); // TODO: Globalize
+               VERIFY(name.LoadString(IDS_USERCHOICE_NONE));
        int index = m_cboFileFilter.AddString(name);
        m_cboFileFilter.SetItemData(index, i);
        return index;
@@ -112,7 +112,7 @@ void CPropFilter::OnSelchangeFileFilter()
        if (index<=0) // Cannot edit #0 ("<None>")
        {
                m_btnEditFileFilter.EnableWindow(FALSE);
-               m_sFileFilterPath = _T("");
+               VERIFY(m_sFileFilterPath.LoadString(IDS_USERCHOICE_NONE));
        }
        else
        {
index f4caa3a..12ba9f5 100644 (file)
@@ -52,12 +52,12 @@ void CSelectUnpackerDlg::Initialize()
        noPlugin = new PluginInfo;
        noPlugin->lpDispatch = NULL;
        noPlugin->filters = NULL;
-       noPlugin->name = _T("<None>");
+       VERIFY(noPlugin->name.LoadString(IDS_USERCHOICE_NONE));
        automaticPlugin = new PluginInfo;
        automaticPlugin->lpDispatch = NULL;
        automaticPlugin->filters = NULL;
-       automaticPlugin->name = _T("<Automatic>");
-       automaticPlugin->description = _T("Employ the first adapted unpacker (rely on filenames filtering)");
+       VERIFY(automaticPlugin->name.LoadString(IDS_USERCHOICE_AUTOMATIC));
+       VERIFY(automaticPlugin->description.LoadString(ID_UNPACK_AUTO));
 
        m_pPlugin = noPlugin;
 
index 5d111ce..c0e4a54 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-11 Laoran
+ PATCH: [ 831308 ] File filter selection text "<None>" hardcoded
+  WinMerge: FileTransform.h Merge.cpp Merge.rc PropFilter.cpp SelectUnpackerDlg.cpp
+   resource.h
+
 2003-11-09 Laoran
  PATCH: [ 838574 ] SplitterWndEx OnHScroll
   common: SplitterWndEx.cpp SplitterWndEx.h
index f167dcd..dd875f2 100644 (file)
@@ -2,8 +2,6 @@
 // Microsoft Developer Studio generated include file.
 // Used by Merge.rc
 //
-// $Id$
-
 #define IDC_CUT                         3
 #define IDC_COPY                        4
 #define IDC_PASTE                       5
 #define IDS_QUICKHELP                   239
 #define IDS_PLUGIN_FAILED               240
 #define IDS_ERROR_FILE_NOT_UNPACKED     241
+#define IDS_USERCHOICE_NONE             242
+#define IDS_USERCHOICE_AUTOMATIC        243
 #define IDC_LEFT_EDIT                   1000
 #define IDC_FILE_EDIT                   1000
 #define IDC_LEFT_BUTTON                 1001