OSDN Git Service

Change to specify explicitly code pages.
[ffftp/ffftp.git] / toolmenu.c
index b323e1b..4d58859 100644 (file)
@@ -254,7 +254,7 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                /* 2007/09/21 sunasunamix  ここから *********************/\r
                // 64ビット対応\r
 //             pOldTbarMainProc = (WNDPROC)SetWindowLong(hWndTbarMain, GWL_WNDPROC, (DWORD)CountermeasureTbarMainProc);\r
-               pOldTbarMainProc = (WNDPROC)SetWindowLongPtr(hWndTbarMain, GWL_WNDPROC, (LONG_PTR)CountermeasureTbarMainProc);\r
+               pOldTbarMainProc = (WNDPROC)SetWindowLongPtr(hWndTbarMain, GWLP_WNDPROC, (LONG_PTR)CountermeasureTbarMainProc);\r
                /********************************************* ここまで */\r
 \r
                GetClientRect(hWnd, &Rect1);\r
@@ -281,7 +281,7 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                /* 2007/09/21 sunasunamix  ここから *********************/\r
                // 64ビット対応\r
 //             pOldTbarLocalProc = (WNDPROC)SetWindowLong(hWndTbarLocal, GWL_WNDPROC, (DWORD)CountermeasureTbarLocalProc);\r
-               pOldTbarLocalProc = (WNDPROC)SetWindowLongPtr(hWndTbarLocal, GWL_WNDPROC, (LONG_PTR)CountermeasureTbarLocalProc);\r
+               pOldTbarLocalProc = (WNDPROC)SetWindowLongPtr(hWndTbarLocal, GWLP_WNDPROC, (LONG_PTR)CountermeasureTbarLocalProc);\r
                /********************************************* ここまで */\r
 \r
                MoveWindow(hWndTbarLocal, 0, TOOLWIN_HEIGHT, LocalWidth, TOOLWIN_HEIGHT, FALSE);\r
@@ -289,7 +289,7 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                /*===== ローカルのディレクトリ名ウインドウ =====*/\r
 \r
                SendMessage(hWndTbarLocal, TB_GETITEMRECT, 3, (LPARAM)&Rect1);\r
-#ifndef ENGLISH\r
+#ifndef FFFTP_ENGLISH\r
                DlgFont = CreateFont(Rect1.bottom-Rect1.top-8, 0, 0, 0, 0, FALSE,FALSE,FALSE,SHIFTJIS_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,MSGJPN254);\r
 #else\r
                DlgFont = CreateFont(Rect1.bottom-Rect1.top-8, 0, 0, 0, 0, FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,MSGJPN254);\r
@@ -308,14 +308,14 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                        if(hWndDirLocalEdit != NULL)\r
                                // 64ビット対応\r
 //                             HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirLocalEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc);\r
-                               HistEditBoxProcPtr = (WNDPROC)SetWindowLongPtr(hWndDirLocalEdit, GWL_WNDPROC, (LONG_PTR)HistEditBoxWndProc);\r
+                               HistEditBoxProcPtr = (WNDPROC)SetWindowLongPtr(hWndDirLocalEdit, GWLP_WNDPROC, (LONG_PTR)HistEditBoxWndProc);\r
 \r
                        SendMessage(hWndDirLocal, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE, 0));\r
                        SendMessage(hWndDirLocal, CB_LIMITTEXT, FMAX_PATH, 0);\r
 \r
                        /* ドライブ名をセットしておく */\r
                        GetLogicalDriveStrings(FMAX_PATH, Tmp);\r
-                       NoDrives = LoadHideDriveListRegistory();\r
+                       NoDrives = LoadHideDriveListRegistry();\r
                        Pos = Tmp;\r
                        while(*Pos != NUL)\r
                        {\r
@@ -348,7 +348,7 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                /* 2007/09/21 sunasunamix  ここから *********************/\r
                // 64ビット対応\r
 //             pOldTbarRemoteProc = (WNDPROC)SetWindowLong(hWndTbarRemote, GWL_WNDPROC, (DWORD)CountermeasureTbarRemoteProc);\r
-               pOldTbarRemoteProc = (WNDPROC)SetWindowLongPtr(hWndTbarRemote, GWL_WNDPROC, (LONG_PTR)CountermeasureTbarRemoteProc);\r
+               pOldTbarRemoteProc = (WNDPROC)SetWindowLongPtr(hWndTbarRemote, GWLP_WNDPROC, (LONG_PTR)CountermeasureTbarRemoteProc);\r
                /********************************************* ここまで */\r
 \r
                MoveWindow(hWndTbarRemote, LocalWidth + SepaWidth, TOOLWIN_HEIGHT, RemoteWidth, TOOLWIN_HEIGHT, FALSE);\r
@@ -369,7 +369,7 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                        if(hWndDirRemoteEdit != NULL)\r
                                // 64ビット対応\r
 //                             HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirRemoteEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc);\r
-                               HistEditBoxProcPtr = (WNDPROC)SetWindowLongPtr(hWndDirRemoteEdit, GWL_WNDPROC, (LONG_PTR)HistEditBoxWndProc);\r
+                               HistEditBoxProcPtr = (WNDPROC)SetWindowLongPtr(hWndDirRemoteEdit, GWLP_WNDPROC, (LONG_PTR)HistEditBoxWndProc);\r
 \r
                        SendMessage(hWndDirRemote, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE, 0));\r
                        SendMessage(hWndDirRemote, CB_LIMITTEXT, FMAX_PATH, 0);\r
@@ -1846,9 +1846,18 @@ void RemoteRbuttonMenu(int Pos)
                AppendMenu(hMenu, MF_STRING | Flg1, MENU_DOWNLOAD_ALL, MSGJPN266);\r
                AppendMenu(hMenu, MF_STRING | Flg1 | Flg2, MENU_DELETE, MSGJPN267);\r
                AppendMenu(hMenu, MF_STRING | Flg1 | Flg2, MENU_RENAME, MSGJPN268);\r
+#if defined(HAVE_TANDEM)\r
+               /* HP NonStop Server では CHMOD の仕様が異なるため使用不可 */\r
+               if (AskRealHostType() != HTYPE_TANDEM)\r
+#endif\r
                AppendMenu(hMenu, MF_STRING | Flg1 | Flg2, MENU_CHMOD, MSGJPN269);\r
                AppendMenu(hMenu, MF_STRING | Flg1, MENU_MKDIR, MSGJPN270);\r
                AppendMenu(hMenu, MF_STRING | Flg1 | Flg2, MENU_URL_COPY, MSGJPN271);\r
+#if defined(HAVE_TANDEM)\r
+               /* OSS モードのときに表示されるように AskRealHostType() を使用する */\r
+               if (AskRealHostType() == HTYPE_TANDEM)\r
+                       AppendMenu(hMenu, MF_STRING | Flg1, MENU_SWITCH_OSS, MSGJPN2001);\r
+#endif\r
                AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);\r
                AppendMenu(hMenu, MF_STRING | Flg1, MENU_FILESIZE, MSGJPN272);\r
                AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);\r
@@ -1887,7 +1896,9 @@ static void AddOpenMenu(HMENU hMenu, UINT Flg)
        char Tmp[FMAX_PATH+1];\r
        int i;\r
 \r
-       AppendMenu(hMenu, MF_STRING | Flg, MENU_DCLICK, MSGJPN274);\r
+       // ローカルフォルダを開く\r
+//     AppendMenu(hMenu, MF_STRING | Flg, MENU_DCLICK, MSGJPN274);\r
+       AppendMenu(hMenu, MF_STRING | Flg, MENU_OPEN, MSGJPN274);\r
        for(i = 0; i < VIEWERS; i++)\r
        {\r
                if(strlen(ViewerName[i]) != 0)\r
@@ -1911,7 +1922,7 @@ static LRESULT CALLBACK CountermeasureTbarMainProc(HWND hWnd,UINT uMessage,WPARA
        case WM_DESTROY :\r
                // 64ビット対応\r
 //             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarMainProc);\r
-               SetWindowLongPtr(hWnd,GWL_WNDPROC,(LONG_PTR)pOldTbarMainProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarMainProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r
@@ -1930,7 +1941,7 @@ static LRESULT CALLBACK CountermeasureTbarLocalProc(HWND hWnd,UINT uMessage,WPAR
        case WM_DESTROY :\r
                // 64ビット対応\r
 //             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarLocalProc);\r
-               SetWindowLongPtr(hWnd,GWL_WNDPROC,(LONG_PTR)pOldTbarLocalProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarLocalProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r
@@ -1949,7 +1960,7 @@ static LRESULT CALLBACK CountermeasureTbarRemoteProc(HWND hWnd,UINT uMessage,WPA
        case WM_DESTROY :\r
                // 64ビット対応\r
 //             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarRemoteProc);\r
-               SetWindowLongPtr(hWnd,GWL_WNDPROC,(LONG_PTR)pOldTbarRemoteProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarRemoteProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r