OSDN Git Service

Remove code handling unused AtIbeamCursorOnly.
authorKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Tue, 7 Jun 2011 08:12:02 +0000 (17:12 +0900)
committerKazuhiro Fujieda <fujieda@users.sourceforge.jp>
Sat, 11 Jun 2011 03:23:10 +0000 (12:23 +0900)
xkeymacs/data.cpp
xkeymacs/data.h
xkeymacs/profile.cpp
xkeymacsdll/xkeymacsdll.cpp
xkeymacsdll/xkeymacsdll.h

index d42ac1d..72df75c 100644 (file)
@@ -59,20 +59,6 @@ int CData::GetCommandID(int nCommandType, int nKey)
        return m_nCommandID[nCommandType][nKey];\r
 }\r
 \r
-void CData::SetAtIbeamCursorOnly(int nCommandType, int nKey, BOOL bAtIbeamCursorOnly)\r
-{\r
-       ASSERT(nCommandType >= 0 || nCommandType < MAX_COMMAND_TYPE);\r
-       ASSERT(nKey <= 0 || nKey < MAX_KEY);\r
-       m_bAtIbeamCursorOnly[nCommandType][nKey] = bAtIbeamCursorOnly;\r
-}\r
-\r
-BOOL CData::GetAtIbeamCursorOnly(int nCommandType, int nKey)\r
-{\r
-       ASSERT(nCommandType >= 0 || nCommandType < MAX_COMMAND_TYPE);\r
-       ASSERT(nKey <= 0 || nKey < MAX_KEY);\r
-       return m_bAtIbeamCursorOnly[nCommandType][nKey];\r
-}\r
-\r
 void CData::ClearAll()\r
 {\r
        ZeroMemory(m_nCommandID, sizeof(m_nCommandID));\r
index 7cfb37f..8df7fcb 100644 (file)
@@ -29,11 +29,8 @@ public:
        int GetKillRingMax();\r
        CString GetApplicationTitle();\r
        void SetApplicationTitle(LPCTSTR lpszApplicationTitle);\r
-\r
        int GetCommandID(int nCommandType, int nKey);\r
        void SetCommandID(int nCommandType, int nKey, int nCommandID);\r
-       BOOL GetAtIbeamCursorOnly(int nCommandType, int nKey);\r
-       void SetAtIbeamCursorOnly(int nCommandType, int nKey, BOOL bAtIbeamCursorOnly);\r
        CString GetApplicationName();\r
        void SetApplicationName(LPCTSTR lpszApplicationName);\r
        CData();\r
index 95fd9b5..e48a0cd 100644 (file)
@@ -605,14 +605,6 @@ void CProfile::UpdateRegistryData(const BOOL bSaveAndValidate)
                                                int nKey = 0;\r
                                                ReadKeyBind(&nCommandType, &nKey, szKeyBind);\r
                                                m_XkeymacsData[nApplicationID].SetCommandID(nCommandType, nKey, nCommandID);\r
-\r
-//                                             if (nCommandType == CONTROL && nKey == 'D') {\r
-//                                                     CUtils::Log("GetProfileInt(at ibeam cursor only): %s, %s", szSubKey, szKeyBind);\r
-//                                             }\r
-                                               const CString szSection = szSubKey.Right(szSubKey.GetLength() - CString(MAKEINTRESOURCE(IDS_REGSUBKEY_DATA)).GetLength() - _tcslen(_T("\\"))) + _T("\\") + szKeyBind;\r
-                                               const BOOL bAtIbeamCursorOnly = AfxGetApp()->GetProfileInt(szSection, CString(MAKEINTRESOURCE(IDS_REG_ENTRY_AT_IBEAM_CURSOR_ONLY)), FALSE);\r
-                                               m_XkeymacsData[nApplicationID].SetAtIbeamCursorOnly(nCommandType, nKey, bAtIbeamCursorOnly);\r
-\r
                                                memset(szKeyBind, 0, sizeof(szKeyBind));\r
                                                dwKeyBind = sizeof(szKeyBind);\r
                                        }\r
@@ -630,7 +622,6 @@ void CProfile::UpdateRegistryData(const BOOL bSaveAndValidate)
                                                        break;\r
                                                }\r
                                                m_XkeymacsData[nApplicationID].SetCommandID(nCommandType, nKey, nCommandID);\r
-                                               m_XkeymacsData[nApplicationID].SetAtIbeamCursorOnly(nCommandType, nKey, FALSE);\r
                                        }\r
                                }\r
                        }\r
@@ -785,17 +776,13 @@ void CProfile::SetDllData()
                CXkeymacsDll::SetApplicationName(nApplicationID, szApplicationName);\r
                CXkeymacsDll::SetWindowText(nApplicationID, m_XkeymacsData[nApplicationID].GetWindowText());\r
                CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 0);\r
-               CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', FALSE);\r
 \r
                for (int nCommandType = 0; nCommandType < MAX_COMMAND_TYPE; ++nCommandType) {\r
                        for (int nKey = 0; nKey < MAX_KEY; ++nKey) {\r
                                const int nCommandID = m_XkeymacsData[nApplicationID].GetCommandID(nCommandType, nKey);\r
                                CXkeymacsDll::SetCommandID(nApplicationID, nCommandType, nKey, nCommandID);\r
-                               const BOOL bAtIbeamCursorOnly = m_XkeymacsData[nApplicationID].GetAtIbeamCursorOnly(nCommandType, nKey);\r
-                               CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, nCommandType, nKey, bAtIbeamCursorOnly);\r
                                if ((nCommandType & CONTROLX) && nCommandID) {\r
                                        CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 1);                    // Commands[1] is C-x\r
-                                       CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', bAtIbeamCursorOnly);\r
                                }\r
                        }\r
                }\r
@@ -808,8 +795,6 @@ void CProfile::SetDllData()
                                CXkeymacsDll::SetFunctionKey(nFunctionID, nApplicationID, nCommandType, nKey);\r
                                if (nCommandType & CONTROLX) {\r
                                        CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 1);                    // Commands[1] is C-x\r
-                                       const BOOL bAtIbeamCursorOnly = m_XkeymacsData[nApplicationID].GetAtIbeamCursorOnly(nCommandType, nKey);\r
-                                       CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', bAtIbeamCursorOnly);\r
                                }\r
                        }\r
                }\r
index 9760904..420b997 100644 (file)
@@ -998,13 +998,6 @@ LRESULT CALLBACK CXkeymacsDll::KeyboardProc(int nCode, WPARAM wParam, LPARAM lPa
                goto DO_NOTHING;\r
        }\r
 \r
-       if (m_Config.bAtIbeamCursorOnly[m_nApplicationID][nCommandType][nKey]) {\r
-               CURSORINFO cursorinfo = { sizeof(cursorinfo) };\r
-               if (GetCursorInfo(&cursorinfo) && cursorinfo.flags && cursorinfo.hCursor != LoadCursor(NULL, IDC_IBEAM)) {\r
-                       goto DO_NOTHING;\r
-               }\r
-       }\r
-\r
        m_bRightControl = IsDown(VK_RCONTROL, FALSE);\r
        m_bRightAlt = IsDown(VK_RMENU, FALSE);\r
        m_bRightShift = IsDown(VK_RSHIFT, FALSE);\r
@@ -1103,11 +1096,6 @@ void CXkeymacsDll::SetCommandID(int nApplicationID, int nCommandType, int nKey,
        m_Config.nCommandID[nApplicationID][nCommandType][nKey] = nCommandID;\r
 }\r
 \r
-void CXkeymacsDll::SetAtIbeamCursorOnly(int nApplicationID, int nCommandType, int nKey, BOOL bAtIbeamCursorOnly)\r
-{\r
-       m_Config.bAtIbeamCursorOnly[nApplicationID][nCommandType][nKey] = bAtIbeamCursorOnly;\r
-}\r
-\r
 void CXkeymacsDll::SetKillRingMax(int nApplicationID, int nKillRingMax)\r
 {\r
        m_Config.nKillRingMax[nApplicationID] = nKillRingMax;\r
@@ -1124,7 +1112,6 @@ void CXkeymacsDll::Clear(int nApplicationID)
        if (0 <= nApplicationID && nApplicationID < MAX_APP) {\r
                ZeroMemory(m_Config.szSpecialApp[nApplicationID], sizeof(m_Config.szSpecialApp[nApplicationID]));\r
                ZeroMemory(m_Config.nCommandID[nApplicationID], sizeof(m_Config.nCommandID[nApplicationID]));\r
-               ZeroMemory(m_Config.bAtIbeamCursorOnly[nApplicationID], sizeof(m_Config.bAtIbeamCursorOnly[nApplicationID]));\r
                m_Config.nKillRingMax[nApplicationID] = 0;\r
                m_Config.bUseDialogSetting[nApplicationID] = FALSE;\r
                m_Config.nSettingStyle[nApplicationID] = 0;\r
index e3cfcaa..0af4b49 100644 (file)
@@ -78,7 +78,6 @@ public:
        static void Clear(int nApplicationID);\r
        static BOOL IsKeyboardHook();\r
        static void SetCommandID(int nApplicationID, int nCommandType, int nKey, int nCommandID);\r
-       static void SetAtIbeamCursorOnly(int nApplicationID, int nCommandType, int nKey, BOOL bAtIbeamCursorOnly);\r
        static void SetApplicationName(int nApplicationID, CString szApplicationName);\r
        static void ReleaseHooks();\r
        static void SetEnableCUA(int nApplicationID, BOOL bEnableCUA);\r