OSDN Git Service

Rename szAppName to appName, szAppTitle to appTitle, and
authorKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Wed, 9 Nov 2011 03:26:07 +0000 (12:26 +0900)
committerKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Mon, 9 Jan 2012 00:47:52 +0000 (09:47 +0900)
m_szAppTitle to m_AppTitle in CProfile.

xkeymacs/profile.cpp
xkeymacs/profile.h

index 404ca2a..3e16077 100644 (file)
@@ -20,7 +20,7 @@ static char THIS_FILE[]=__FILE__;
 \r
 Config CProfile::m_Config;\r
 KeyString CProfile::m_KeyString(CProfile::Is106Keyboard() != FALSE);\r
-TCHAR CProfile::m_szAppTitle[MAX_APP][WINDOW_TEXT_LENGTH];\r
+TCHAR CProfile::m_AppTitle[MAX_APP][WINDOW_TEXT_LENGTH];\r
 TASK_LIST CProfile::m_TaskList[MAX_TASKS];\r
 DWORD CProfile::m_dwTasks;\r
 \r
@@ -122,13 +122,13 @@ void CProfile::LevelUp()
        AfxGetApp()->WriteProfileInt(_T(""), _T("Level"), 4);\r
 }\r
 \r
-void CProfile::AddKeyBind2C_(LPCSTR szAppName, BYTE bVk)\r
+void CProfile::AddKeyBind2C_(LPCSTR appName, BYTE bVk)\r
 {\r
        int nComID;\r
        for (nComID = 0; nComID < MAX_COMMAND; ++nComID)\r
                if (Commands[nComID].fCommand == CCommands::C_)\r
                        break;\r
-       SaveKeyBind(szAppName, nComID, NONE, bVk);\r
+       SaveKeyBind(appName, nComID, NONE, bVk);\r
 }\r
 \r
 void CProfile::LoadRegistry()\r
@@ -151,7 +151,7 @@ void CProfile::LoadRegistry()
                        bDialog = true;\r
                _tcsncpy_s(m_Config.szSpecialApp[nAppID], appName, _TRUNCATE);\r
                entry.LoadString(IDS_REG_ENTRY_APPLICATOIN_TITLE);\r
-               _tcsncpy_s(m_szAppTitle[nAppID], AfxGetApp()->GetProfileString(appName, entry), _TRUNCATE);\r
+               _tcsncpy_s(m_AppTitle[nAppID], AfxGetApp()->GetProfileString(appName, entry), _TRUNCATE);\r
                entry.LoadString(IDS_REG_ENTRY_WINDOW_TEXT);\r
                _tcsncpy_s(m_Config.szWindowText[nAppID], AfxGetApp()->GetProfileString(appName, entry, _T("*")), _TRUNCATE);\r
 \r
@@ -219,50 +219,50 @@ void CProfile::SaveRegistry()
 {\r
        const CString section(MAKEINTRESOURCE(IDS_REG_SECTION_APPLICATION));    \r
        for (int nAppID = 0; nAppID < MAX_APP; ++nAppID) {\r
-               LPCTSTR szAppName = m_Config.szSpecialApp[nAppID];\r
+               LPCTSTR appName = m_Config.szSpecialApp[nAppID];\r
                CString entry;\r
                entry.Format(IDS_REG_ENTRY_APPLICATION, nAppID);\r
-               if (!szAppName[0]) {\r
+               if (!appName[0]) {\r
                        if (!AfxGetApp()->GetProfileString(section, entry).IsEmpty())\r
                                AfxGetApp()->WriteProfileString(section, entry, _T(""));\r
                        continue;\r
                }\r
-               AfxGetApp()->WriteProfileString(section, entry, szAppName);\r
+               AfxGetApp()->WriteProfileString(section, entry, appName);\r
 \r
                entry.LoadString(IDS_REG_ENTRY_APPLICATOIN_TITLE);\r
-               CString appTitle = m_szAppTitle[nAppID];\r
+               CString appTitle = m_AppTitle[nAppID];\r
                appTitle.TrimLeft(_T(' '));\r
-               AfxGetApp()->WriteProfileString(szAppName, entry, appTitle);\r
+               AfxGetApp()->WriteProfileString(appName, entry, appTitle);\r
                entry.LoadString(IDS_REG_ENTRY_WINDOW_TEXT);\r
-               AfxGetApp()->WriteProfileString(szAppName, entry, m_Config.szWindowText[nAppID]);\r
+               AfxGetApp()->WriteProfileString(appName, entry, m_Config.szWindowText[nAppID]);\r
 \r
                // Create all commands\r
                for (int nComID = 1; nComID < MAX_COMMAND; ++nComID)\r
-                       SaveKeyBind(szAppName, nComID, 0, 0);\r
+                       SaveKeyBind(appName, nComID, 0, 0);\r
                for (int nType = 0; nType < MAX_COMMAND_TYPE; ++nType)\r
                        for (int nKey = 0; nKey < MAX_KEY; ++nKey)\r
-                               SaveKeyBind(szAppName, m_Config.nCommandID[nAppID][nType][nKey], nType, nKey);\r
+                               SaveKeyBind(appName, m_Config.nCommandID[nAppID][nType][nKey], nType, nKey);\r
                for (int nFuncID = 0; nFuncID < CDotXkeymacs::GetFunctionNumber(); ++nFuncID)\r
                        for (int nKeyID = 0; nKeyID < CDotXkeymacs::GetKeyNumber(nFuncID, nAppID); ++nKeyID) {\r
                                int nType, nKey;\r
                                CDotXkeymacs::GetKey(nFuncID, nAppID, nKeyID, &nType, &nKey);\r
-                               SaveKeyBind(szAppName, CDotXkeymacs::GetFunctionSymbol(nFuncID), nType, nKey);\r
+                               SaveKeyBind(appName, CDotXkeymacs::GetFunctionSymbol(nFuncID), nType, nKey);\r
                        }\r
 \r
                entry.LoadString(IDS_REG_ENTRY_KILL_RING_MAX);\r
-               AfxGetApp()->WriteProfileInt(szAppName, entry, m_Config.nKillRingMax[nAppID]);\r
+               AfxGetApp()->WriteProfileInt(appName, entry, m_Config.nKillRingMax[nAppID]);\r
                entry.LoadString(IDS_REG_ENTRY_USE_DIALOG_SETTING);\r
-               AfxGetApp()->WriteProfileInt(szAppName, entry, m_Config.bUseDialogSetting[nAppID]);\r
+               AfxGetApp()->WriteProfileInt(appName, entry, m_Config.bUseDialogSetting[nAppID]);\r
                entry.LoadString(IDS_REG_ENTRY_DISABLE_XKEYMACS);\r
-               AfxGetApp()->WriteProfileInt(szAppName, entry, m_Config.nSettingStyle[nAppID] == SETTING_DISABLE);\r
+               AfxGetApp()->WriteProfileInt(appName, entry, m_Config.nSettingStyle[nAppID] == SETTING_DISABLE);\r
                entry.LoadString(IDC_REG_ENTRY_IGNORE_META_CTRL);\r
-               AfxGetApp()->WriteProfileInt(szAppName, entry, m_Config.bIgnoreUndefinedMetaCtrl[nAppID]);\r
+               AfxGetApp()->WriteProfileInt(appName, entry, m_Config.bIgnoreUndefinedMetaCtrl[nAppID]);\r
                entry.LoadString(IDC_REG_ENTRY_IGNORE_C_X);\r
-               AfxGetApp()->WriteProfileInt(szAppName, entry, m_Config.bIgnoreUndefinedC_x[nAppID]);\r
+               AfxGetApp()->WriteProfileInt(appName, entry, m_Config.bIgnoreUndefinedC_x[nAppID]);\r
                entry.LoadString(IDC_REG_ENTRY_ENABLE_CUA);\r
-               AfxGetApp()->WriteProfileInt(szAppName, entry, m_Config.bEnableCUA[nAppID]);\r
+               AfxGetApp()->WriteProfileInt(appName, entry, m_Config.bEnableCUA[nAppID]);\r
                entry.LoadString(IDS_REG_ENTRY_326_COMPATIBLE);\r
-               AfxGetApp()->WriteProfileInt(szAppName, entry, m_Config.b326Compatible[nAppID]);\r
+               AfxGetApp()->WriteProfileInt(appName, entry, m_Config.b326Compatible[nAppID]);\r
        }\r
 }\r
 \r
@@ -335,14 +335,14 @@ void CProfile::InitAppList(CProperties& cProperties)
        EnumWindows(EnumWindowsProc, reinterpret_cast<LPARAM>(&cProperties));\r
 \r
        for (int i = 0; i < MAX_APP; ++i) {\r
-               LPCTSTR szAppName = m_Config.szSpecialApp[i];\r
-               LPCTSTR szAppTitle = m_szAppTitle[i];\r
-               if (!szAppName[0] || !_tcscmp(szAppName, _T("IME")))\r
+               LPCTSTR appName = m_Config.szSpecialApp[i];\r
+               LPCTSTR appTitle = m_AppTitle[i];\r
+               if (!appName[0] || !_tcscmp(appName, _T("IME")))\r
                        continue;\r
-               if (CString(MAKEINTRESOURCE(IDS_DEFAULT)) == szAppName ||\r
-                               CString(MAKEINTRESOURCE(IDS_DIALOG)) == szAppName)\r
+               if (CString(MAKEINTRESOURCE(IDS_DEFAULT)) == appName ||\r
+                               CString(MAKEINTRESOURCE(IDS_DIALOG)) == appName)\r
                        continue;\r
-               cProperties.AddItem(szAppTitle, szAppName);\r
+               cProperties.AddItem(appTitle, appName);\r
        }\r
        AddIMEInfo(cProperties);\r
 }\r
@@ -489,14 +489,14 @@ void CProfile::CopyData(const CString szDstApp, const CString szSrcApp)
 #undef CopyMember\r
 }\r
 \r
-int CProfile::AssignAppID(LPCSTR szAppName)\r
+int CProfile::AssignAppID(LPCSTR appName)\r
 {\r
-       int nAppID = GetAppID(szAppName);\r
+       int nAppID = GetAppID(appName);\r
        if (nAppID != MAX_APP)\r
                return nAppID;\r
        for (nAppID = 0; nAppID < MAX_APP; ++nAppID)\r
                if (!m_Config.szSpecialApp[nAppID][0]) {\r
-                       _tcsncpy_s(m_Config.szSpecialApp[nAppID], szAppName, _TRUNCATE);\r
+                       _tcsncpy_s(m_Config.szSpecialApp[nAppID], appName, _TRUNCATE);\r
                        return nAppID;\r
                }\r
        return nAppID;\r
@@ -511,11 +511,11 @@ int CProfile::DefaultAppID()
        return MAX_APP;\r
 }\r
 \r
-int CProfile::GetAppID(LPCSTR szAppName)\r
+int CProfile::GetAppID(LPCSTR appName)\r
 {\r
        int nAppID = 0;\r
        for (nAppID = 0; nAppID < MAX_APP; ++nAppID)\r
-               if (!_tcscmp(szAppName, m_Config.szSpecialApp[nAppID]))\r
+               if (!_tcscmp(appName, m_Config.szSpecialApp[nAppID]))\r
                        break;\r
        return nAppID;\r
 }\r
@@ -536,7 +536,7 @@ void CProfile::SetSettingStyle(int nAppID, int nSettingStyle)
 \r
 void CProfile::SetAppTitle(int nAppID, const CString& appTitle)\r
 {\r
-       _tcsncpy_s(m_szAppTitle[nAppID], appTitle, _TRUNCATE);\r
+       _tcsncpy_s(m_AppTitle[nAppID], appTitle, _TRUNCATE);\r
 }\r
 \r
 int CProfile::GetCommandID(int nAppID, int nType, int nKey)\r
index 8079c8e..4404af0 100644 (file)
@@ -37,9 +37,9 @@ public:
        static void InitAppList(CProperties& cProperties);\r
        static void CopyData(CString szDestinationApplication, CString szSourceApplication);\r
        static void ClearData(CString szCurrentApplication);\r
-       static int AssignAppID(LPCSTR szAppName);\r
+       static int AssignAppID(LPCSTR appName);\r
        static int DefaultAppID();\r
-       static int GetAppID(LPCSTR szAppName);\r
+       static int GetAppID(LPCSTR appName);\r
        static int GetSettingStyle(int nAppID);\r
        static void SetSettingStyle(int nAppID, int nSettingStyle);\r
        static void SetAppTitle(int nAppID, const CString& appTitle);\r
@@ -63,7 +63,7 @@ public:
 private:\r
        static Config m_Config;\r
        static KeyString m_KeyString;\r
-       static TCHAR m_szAppTitle[MAX_APP][WINDOW_TEXT_LENGTH];\r
+       static TCHAR m_AppTitle[MAX_APP][WINDOW_TEXT_LENGTH];\r
        static void DeleteAllRegistryData();\r
        static void LevelUp();\r
        static void AddKeyBind2C_(LPCTSTR szApplicationName, BYTE bVk);\r