OSDN Git Service

Change behavior of automatic IPv4/IPv6 selection.
[ffftp/ffftp.git] / toolmenu.c
index 4753add..4d58859 100644 (file)
@@ -252,7 +252,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
        if(hWndTbarMain != NULL)\r
        {\r
                /* 2007/09/21 sunasunamix  ここから *********************/\r
-               pOldTbarMainProc = (WNDPROC)SetWindowLong(hWndTbarMain, GWL_WNDPROC, (DWORD)CountermeasureTbarMainProc);\r
+               // 64ビット対応\r
+//             pOldTbarMainProc = (WNDPROC)SetWindowLong(hWndTbarMain, GWL_WNDPROC, (DWORD)CountermeasureTbarMainProc);\r
+               pOldTbarMainProc = (WNDPROC)SetWindowLongPtr(hWndTbarMain, GWLP_WNDPROC, (LONG_PTR)CountermeasureTbarMainProc);\r
                /********************************************* ここまで */\r
 \r
                GetClientRect(hWnd, &Rect1);\r
@@ -277,7 +279,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
        if(hWndTbarLocal != NULL)\r
        {\r
                /* 2007/09/21 sunasunamix  ここから *********************/\r
-               pOldTbarLocalProc = (WNDPROC)SetWindowLong(hWndTbarLocal, GWL_WNDPROC, (DWORD)CountermeasureTbarLocalProc);\r
+               // 64ビット対応\r
+//             pOldTbarLocalProc = (WNDPROC)SetWindowLong(hWndTbarLocal, GWL_WNDPROC, (DWORD)CountermeasureTbarLocalProc);\r
+               pOldTbarLocalProc = (WNDPROC)SetWindowLongPtr(hWndTbarLocal, GWLP_WNDPROC, (LONG_PTR)CountermeasureTbarLocalProc);\r
                /********************************************* ここまで */\r
 \r
                MoveWindow(hWndTbarLocal, 0, TOOLWIN_HEIGHT, LocalWidth, TOOLWIN_HEIGHT, FALSE);\r
@@ -285,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
@@ -302,14 +306,16 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                        /* エディットコントロールを探す */\r
                        hWndDirLocalEdit = GetWindow(hWndDirLocal, GW_CHILD);\r
                        if(hWndDirLocalEdit != NULL)\r
-                               HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirLocalEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc);\r
+                               // 64ビット対応\r
+//                             HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirLocalEdit, GWL_WNDPROC, (LONG)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
@@ -340,7 +346,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
        if(hWndTbarRemote != NULL)\r
        {\r
                /* 2007/09/21 sunasunamix  ここから *********************/\r
-               pOldTbarRemoteProc = (WNDPROC)SetWindowLong(hWndTbarRemote, GWL_WNDPROC, (DWORD)CountermeasureTbarRemoteProc);\r
+               // 64ビット対応\r
+//             pOldTbarRemoteProc = (WNDPROC)SetWindowLong(hWndTbarRemote, GWL_WNDPROC, (DWORD)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
@@ -359,7 +367,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
                        /* エディットコントロールを探す */\r
                        hWndDirRemoteEdit = GetWindow(hWndDirRemote, GW_CHILD);\r
                        if(hWndDirRemoteEdit != NULL)\r
-                               HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirRemoteEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc);\r
+                               // 64ビット対応\r
+//                             HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirRemoteEdit, GWL_WNDPROC, (LONG)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
@@ -1836,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
@@ -1877,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
@@ -1899,7 +1920,9 @@ static LRESULT CALLBACK CountermeasureTbarMainProc(HWND hWnd,UINT uMessage,WPARA
 {\r
        switch (uMessage) {\r
        case WM_DESTROY :\r
-               SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarMainProc);\r
+               // 64ビット対応\r
+//             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarMainProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarMainProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r
@@ -1916,7 +1939,9 @@ static LRESULT CALLBACK CountermeasureTbarLocalProc(HWND hWnd,UINT uMessage,WPAR
 {\r
        switch (uMessage) {\r
        case WM_DESTROY :\r
-               SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarLocalProc);\r
+               // 64ビット対応\r
+//             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarLocalProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarLocalProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r
@@ -1933,7 +1958,9 @@ static LRESULT CALLBACK CountermeasureTbarRemoteProc(HWND hWnd,UINT uMessage,WPA
 {\r
        switch (uMessage) {\r
        case WM_DESTROY :\r
-               SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarRemoteProc);\r
+               // 64ビット対応\r
+//             SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarRemoteProc);\r
+               SetWindowLongPtr(hWnd,GWLP_WNDPROC,(LONG_PTR)pOldTbarRemoteProc);\r
                break;\r
        case WM_RBUTTONDBLCLK :\r
        case WM_RBUTTONDOWN :\r