OSDN Git Service

Ignore minor differences in titles and file names
[xkeymacs/xkeymacs.git] / xkeymacs / properties.cpp
index 1a15614..2dc5733 100644 (file)
@@ -186,11 +186,12 @@ void CProperties::AddItem(const CString& appTitle, const CString& appName)
        for (int i = 0; i < m_cAppList.GetCount(); ++i) {\r
                CString tmpTitle, tmpName;\r
                GetAppTitleAndName(i, tmpTitle, tmpName);\r
-               if (appName == tmpName)\r
+               if (!appName.CompareNoCase(tmpName))\r
                        return;\r
        }\r
+       CString trimmed = CString(appTitle).Trim();\r
        CString item;\r
-       item.Format(IDS_APPLICATION_LIST_ITEM, appTitle, appName);\r
+       item.Format(IDS_APPLICATION_LIST_ITEM, trimmed, appName);\r
        m_cAppList.AddString(item);\r
 }\r
 \r