| CODENOTIFIER | HelpYou are not signed inSign in |
Project: FAR manager
Revision: 1976
Author: drkns
Date: 05 Sep 2008 06:15:48
Changes:update for 1.8 panel api
Files:| ... | ...@@ -1,3 +1,7 @@ | |
| 1 | drkns 05.09.2008 10:14:39 +0200 - build 20 | |
| 2 | ||
| 3 | 1. |
| ... | ...@@ -1,6 +1,6 @@ | |
| 1 | 1 | #include "farversion.hpp" |
| 2 | 2 | |
| 3 | #define PLUGIN_BUILD 19 | |
| 3 | #define PLUGIN_BUILD 20 | |
| 4 | 4 | #define PLUGIN_DESC "Advanced File Compare for FAR Manager" |
| 5 | 5 | #define PLUGIN_NAME "Compare" |
| 6 | 6 | #define PLUGIN_FILENAME "Compare.dll" |
| ... | ...@@ -26,9 +26,11 @@ | |
| 26 | 26 | #ifndef UNICODE |
| 27 | 27 | #define GetCheck(i) DialogItems[i].Selected |
| 28 | 28 | #define GetDataPtr(i) DialogItems[i].Data |
| 29 | #define FreePanelInfo() | |
| 29 | 30 | #else |
| 30 | 31 | #define GetCheck(i) (int)Info.SendDlgMessage(hDlg,DM_GETCHECK,i,0) |
| 31 | 32 | #define GetDataPtr(i) ((const TCHAR *)Info.SendDlgMessage(hDlg,DM_GETCONSTTEXTPTR,i,0)) |
| 33 | #define FreePanelInfo() Info.Control(PANEL_ACTIVE,FCTL_FREEPANELINFO,&PInfo) | |
| 32 | 34 | #endif |
| 33 | 35 | |
| 34 | 36 | FARSTDCOPYTOCLIPBOARD CopyToClipboard; |
| ... | ...@@ -75,7 +77,7 @@ | |
| 75 | 77 | #ifndef UNICODE |
| 76 | 78 | return MAKEFARVERSION(1,70,1719); |
| 77 | 79 | #else |
| 78 | return MAKEFARVERSION(1,80,349); | |
| 80 | return MAKEFARVERSION(1,80,557); | |
| 79 | 81 | #endif |
| 80 | 82 | } |
| 81 | 83 | |
| ... | ...@@ -144,7 +146,10 @@ | |
| 144 | 146 | OpenFromCommandLine((TCHAR *)Item); |
| 145 | 147 | } |
| 146 | 148 | else if(OpenFrom == OPEN_PLUGINSMENU && !Item && PInfo.PanelType != PTYPE_FILEPANEL) |
| 149 | { | |
| 150 | FreePanelInfo(); | |
| 147 | 151 | return INVALID_HANDLE_VALUE; |
| 152 | } | |
| 148 | 153 | else |
| 149 | 154 | { |
| 150 | 155 | #ifdef UNICODE |
| ... | ...@@ -217,6 +222,7 @@ | |
| 217 | 222 | #undef _GETPANELINFO |
| 218 | 223 | #undef _SETPANELDIR |
| 219 | 224 | #undef _REDRAWPANEL |
| 225 | FreePanelInfo(); | |
| 220 | 226 | return(INVALID_HANDLE_VALUE); |
| 221 | 227 | } |
| 222 | 228 |
| ... | ...@@ -1,3 +1,7 @@ | |
| 1 | drkns 05.09.2008 10:15:19 +0200 - build 42 | |
| 2 | ||
| 3 | 1. |
| ... | ...@@ -600,6 +600,6 @@ | |
| 600 | 600 | #ifndef UNICODE |
| 601 | 601 | return(MAKEFARVERSION(1,70,1024)); |
| 602 | 602 | #else |
| 603 | return(MAKEFARVERSION(1,80,508)); | |
| 603 | return(MAKEFARVERSION(1,80,557)); | |
| 604 | 604 | #endif |
| 605 | 605 | } |
| ... | ...@@ -2,7 +2,7 @@ | |
| 2 | 2 | #include <windows.h> |
| 3 | 3 | #include "resource.h" |
| 4 | 4 | |
| 5 | #define PLUGIN_BUILD 20 | |
| 5 | #define PLUGIN_BUILD 21 | |
| 6 | 6 | #define PLUGIN_DESC "EMenu Plugin for FAR Manager" |
| 7 | 7 | #define PLUGIN_NAME "EMenu" |
| 8 | 8 | #define PLUGIN_FILENAME "EMenu.dll" |
| ... | ...@@ -1,6 +1,6 @@ | |
| 1 | 1 | #include "farversion.hpp" |
| 2 | 2 | |
| 3 | #define PLUGIN_BUILD 41 | |
| 3 | #define PLUGIN_BUILD 42 | |
| 4 | 4 | #define PLUGIN_DESC "Network Plugin for FAR Manager" |
| 5 | 5 | #define PLUGIN_NAME "Network" |
| 6 | 6 | #define PLUGIN_FILENAME "Network.dll" |
| ... | ...@@ -7,6 +7,14 @@ | |
| 7 | 7 | NetResourceList *CommonRootResources; |
| 8 | 8 | BOOL SavedCommonRootResources = FALSE; |
| 9 | 9 | |
| 10 | #ifndef UNICODE | |
| 11 | #define SelItems(n,m) SelectedItems[n].m | |
| 12 | #define FreePanelInfo() | |
| 13 | #else | |
| 14 | #define SelItems(n,m) SelectedItems[n]->m | |
| 15 | #define FreePanelInfo() Info.Control(this,FCTL_FREEPANELINFO,&PInfo) | |
| 16 | #endif | |
| 17 | ||
| 10 | 18 | // -- NetResourceList -------------------------------------------------------- |
| 11 | 19 | #ifdef NETWORK_LOGGING |
| 12 | 20 | FILE* NetBrowser::LogFile = NULL; |
| ... | ...@@ -251,11 +259,17 @@ | |
| 251 | 259 | { |
| 252 | 260 | // If the parent of the current folder is not a server |
| 253 | 261 | if(PCurResource->dwDisplayType != RESOURCEDISPLAYTYPE_SERVER) |
| 262 | { | |
| 263 | FreePanelInfo(); | |
| 254 | 264 | return TRUE; |
| 265 | } | |
| 255 | 266 | } |
| 256 | 267 | // If there are elements, check the first element |
| 257 | 268 | if((NetList[NetList.Count()-1].dwDisplayType) != RESOURCEDISPLAYTYPE_SHARE) |
| 269 | { | |
| 270 | FreePanelInfo(); | |
| 258 | 271 | return TRUE; |
| 272 | } | |
| 259 | 273 | } |
| 260 | 274 | |
| 261 | 275 | if (WinVer.dwPlatformId == VER_PLATFORM_WIN32_NT) |
| ... | ...@@ -263,6 +277,7 @@ | |
| 263 | 277 | else |
| 264 | 278 | GetHideShare95(); |
| 265 | 279 | } |
| 280 | FreePanelInfo(); | |
| 266 | 281 | } |
| 267 | 282 | |
| 268 | 283 | /* |
| ... | ...@@ -414,10 +429,10 @@ | |
| 414 | 429 | { |
| 415 | 430 | if (Event == FE_CLOSE) |
| 416 | 431 | { |
| 417 | struct PanelInfo pInfo; | |
| 418 | Info.Control(this, FCTL_GETPANELSHORTINFO, &pInfo); | |
| 419 | pInfo.ViewMode += 0x30; | |
| 420 | SetRegKey(HKEY_CURRENT_USER, _T(""), StrPanelMode, (TCHAR*)&pInfo.ViewMode); | |
| 432 | struct PanelInfo PInfo; | |
| 433 | Info.Control(this, FCTL_GETPANELSHORTINFO, &PInfo); | |
| 434 | PInfo.ViewMode += 0x30; | |
| 435 | SetRegKey(HKEY_CURRENT_USER, _T(""), StrPanelMode, (TCHAR*)&PInfo.ViewMode); | |
| 421 | 436 | if (PCurResource == NULL || IsMSNetResource (*PCurResource)) |
| 422 | 437 | { |
| 423 | 438 | NetResourceList::CopyNetResource (CommonCurResource, CurResource); |
| ... | ...@@ -428,6 +443,7 @@ | |
| 428 | 443 | *CommonRootResources = RootResources; |
| 429 | 444 | SavedCommonRootResources = true; |
| 430 | 445 | } |
| 446 | FreePanelInfo(); | |
| 431 | 447 | } |
| 432 | 448 | return FALSE; |
| 433 | 449 | } |
| ... | ...@@ -1234,9 +1250,10 @@ | |
| 1234 | 1250 | } |
| 1235 | 1251 | |
| 1236 | 1252 | NetResourceList::DeleteNetResource(nr); |
| 1253 | FreePanelInfo(); | |
| 1237 | 1254 | return TRUE; |
| 1238 | 1255 | } |
| 1239 | ||
| 1256 | FreePanelInfo(); | |
| 1240 | 1257 | return FALSE; |
| 1241 | 1258 | } |
| 1242 | 1259 | |
| ... | ...@@ -1253,12 +1270,13 @@ | |
| 1253 | 1270 | |
| 1254 | 1271 | for (int I=0;I<PInfo.SelectedItemsNumber;I++) |
| 1255 | 1272 | { |
| 1256 | if (!MapNetworkDrive (PInfo.SelectedItems[I].FindData.cFileName, | |
| 1273 | if (!MapNetworkDrive (PInfo.SelItems(I,FindData).cFileName, | |
| 1257 | 1274 | (Key == VK_F6), ((ControlState&PKF_SHIFT)==0))) |
| 1258 | 1275 | break; |
| 1259 | 1276 | } |
| 1260 | 1277 | Info.Control(this,FCTL_UPDATEPANEL,NULL); |
| 1261 | 1278 | Info.Control(this,FCTL_REDRAWPANEL,NULL); |
| 1279 | FreePanelInfo(); | |
| 1262 | 1280 | } |
| 1263 | 1281 | return(TRUE); |
| 1264 | 1282 | } |
| ... | ...@@ -1276,17 +1294,18 @@ | |
| 1276 | 1294 | { |
| 1277 | 1295 | struct PanelInfo PInfo; |
| 1278 | 1296 | Info.Control(this,FCTL_GETPANELINFO,&PInfo); |
| 1279 | if(lstrcmp(PInfo.SelectedItems[0].FindData.cFileName, _T(".."))) | |
| 1280 | if(ChangeToDirectory(PInfo.SelectedItems[0].FindData.cFileName, FALSE, TRUE)) | |
| 1281 | if(PointToName(PInfo.SelectedItems[0].FindData.cFileName) - | |
| 1282 | PInfo.SelectedItems[0].FindData.cFileName <= 2) | |
| 1297 | if(lstrcmp(PInfo.SelItems(0,FindData).cFileName, _T(".."))) | |
| 1298 | if(ChangeToDirectory(PInfo.SelItems(0,FindData).cFileName, FALSE, TRUE)) | |
| 1299 | if(PointToName(PInfo.SelItems(0,FindData).cFileName) - | |
| 1300 | PInfo.SelItems(0,FindData).cFileName <= 2) | |
| 1283 | 1301 | { |
| 1284 | 1302 | Info.Control(this,FCTL_UPDATEPANEL,(void*)1); |
| 1285 | 1303 | PanelRedrawInfo ri = {0}; |
| 1286 | 1304 | ri.CurrentItem = ri.TopPanelItem = 0; |
| 1287 | 1305 | Info.Control(this,FCTL_REDRAWPANEL,&ri); |
| 1288 | 1306 | } |
| 1289 | return TRUE; | |
| 1307 | FreePanelInfo(); | |
| 1308 | return TRUE; | |
| 1290 | 1309 | } |
| 1291 | 1310 | else if(Key == VK_F4 && ControlState & PKF_SHIFT) |
| 1292 | 1311 | { |
| ... | ...@@ -1738,6 +1757,7 @@ | |
| 1738 | 1757 | else |
| 1739 | 1758 | FSF.CopyToClipboard (CurFile); |
| 1740 | 1759 | } |
| 1760 | FreePanelInfo(); | |
| 1741 | 1761 | } |
| 1742 | 1762 | |
| 1743 | 1763 | |
| ... | ...@@ -1745,11 +1765,11 @@ | |
| 1745 | 1765 | { |
| 1746 | 1766 | PanelInfo PInfo; |
| 1747 | 1767 | Info.Control (this, FCTL_GETPANELINFO, &PInfo); |
| 1748 | if (PInfo.ItemsNumber == 0) | |
| 1749 | return; | |
| 1750 | ||
| 1751 | ChangeToDirectory (PInfo.PanelItems [PInfo.CurrentItem].FindData.cFileName, | |
| 1752 | FALSE, TRUE); | |
| 1768 | if (PInfo.ItemsNumber) | |
| 1769 | { | |
| 1770 | ChangeToDirectory (PInfo.PanelItems [PInfo.CurrentItem].FindData.cFileName, FALSE, TRUE); | |
| 1771 | } | |
| 1772 | FreePanelInfo(); | |
| 1753 | 1773 | } |
| 1754 | 1774 | |
| 1755 | 1775 | |
| ... | ...@@ -1934,23 +1954,24 @@ | |
| 1934 | 1954 | PanelInfo PInfo = {0}; |
| 1935 | 1955 | // this returns the items in sorted order, so we can position correctly |
| 1936 | 1956 | Info.Control (this, FCTL_GETPANELINFO, &PInfo); |
| 1937 | if (!PInfo.ItemsNumber) | |
| 1938 | return; | |
| 1939 | ||
| 1940 | // prevent recursion | |
| 1941 | for (int i=0; i<PInfo.ItemsNumber; i++) | |
| 1957 | if (PInfo.ItemsNumber) | |
| 1942 | 1958 | { |
| 1943 | TCHAR szAnsiName[MAX_PATH]; | |
| 1944 | OEMToChar(PInfo.PanelItems [i].FindData.cFileName, szAnsiName); | |
| 1945 | if (!FSF.LStricmp (szAnsiName, Opt.FullPathShares?Share:PointToName(Share))) | |
| 1946 | { | |
| 1947 | PanelRedrawInfo info; | |
| 1948 | info.CurrentItem = i; | |
| 1949 | info.TopPanelItem = 0; | |
| 1950 | Info.Control (this, FCTL_REDRAWPANEL, &info); | |
| 1951 | break; | |
| 1959 | // prevent recursion | |
| 1960 | for (int i=0; i<PInfo.ItemsNumber; i++) | |
| 1961 | { | |
| 1962 | TCHAR szAnsiName[MAX_PATH]; | |
| 1963 | OEMToChar(PInfo.PanelItems [i].FindData.cFileName, szAnsiName); | |
| 1964 | if (!FSF.LStricmp (szAnsiName, Opt.FullPathShares?Share:PointToName(Share))) | |
| 1965 | { | |
| 1966 | PanelRedrawInfo info; | |
| 1967 | info.CurrentItem = i; | |
| 1968 | info.TopPanelItem = 0; | |
| 1969 | Info.Control (this, FCTL_REDRAWPANEL, &info); | |
| 1970 | break; | |
| 1971 | } | |
| 1952 | 1972 | } |
| 1953 | 1973 | } |
| 1974 | FreePanelInfo(); | |
| 1954 | 1975 | } |
| 1955 | 1976 | |
| 1956 | 1977 | |
| ... | ...@@ -1971,10 +1992,13 @@ | |
| 1971 | 1992 | struct PanelInfo PInfo; |
| 1972 | 1993 | Info.Control(this,FCTL_GETPANELINFO,&PInfo); |
| 1973 | 1994 | if(PInfo.SelectedItemsNumber <= 0) // Something strange is happen |
| 1995 | { | |
| 1996 | FreePanelInfo(); | |
| 1974 | 1997 | return; |
| 1998 | } | |
| 1975 | 1999 | TCHAR szConfirmation[NM*2]; |
| 1976 | 2000 | if(PInfo.SelectedItemsNumber == 1) |
| 1977 | FSF.sprintf(szConfirmation, GetMsg(MRemoveFavItem), PInfo.SelectedItems[0].FindData.cFileName); | |
| 2001 | FSF.sprintf(szConfirmation, GetMsg(MRemoveFavItem), PInfo.SelItems(0,FindData).cFileName); | |
| 1978 | 2002 | else // PInfo.SelectedItemsNumber > 1 |
| 1979 | 2003 | FSF.sprintf(szConfirmation, GetMsg(MRemoveFavItems), PInfo.SelectedItemsNumber); |
| 1980 | 2004 | |
| ... | ...@@ -1986,7 +2010,10 @@ | |
| 1986 | 2010 | |
| 1987 | 2011 | if(0 != Info.Message(Info.ModuleNumber, FMSG_WARNING, _T("RemoveItemFav"), Msg, |
| 1988 | 2012 | ArraySize(Msg), 2)) |
| 2013 | { | |
| 2014 | FreePanelInfo(); | |
| 1989 | 2015 | return; // User canceled deletion |
| 2016 | } | |
| 1990 | 2017 | TCHAR szName[MAX_PATH*2] = {0}; |
| 1991 | 2018 | OEMToChar(PCurResource->lpRemoteName, szName); |
| 1992 | 2019 | TCHAR* p = szName + lstrlen(szName); |
| ... | ...@@ -1994,12 +2021,13 @@ | |
| 1994 | 2021 | *p++ = _T('\\'); |
| 1995 | 2022 | for(int i = 0; i < PInfo.SelectedItemsNumber; i++) |
| 1996 | 2023 | { |
| 1997 | OEMToChar(PInfo.SelectedItems[i].FindData.cFileName, p); | |
| 2024 | OEMToChar(PInfo.SelItems(i,FindData).cFileName, p); | |
| 1998 | 2025 | #undef cFileName |
| 1999 | 2026 | RemoveFromFavorites(szName, NULL, NULL); |
| 2000 | 2027 | } |
| 2001 | 2028 | Info.Control (this, FCTL_UPDATEPANEL, NULL); |
| 2002 | 2029 | Info.Control (this, FCTL_REDRAWPANEL, NULL); |
| 2030 | FreePanelInfo(); | |
| 2003 | 2031 | } |
| 2004 | 2032 | |
| 2005 | 2033 | void NetBrowser::CreateFavSubFolder() |
| ... | ...@@ -1,3 +1,7 @@ | |
| 1 | drkns 05.09.2008 10:16:03 +0200 - build 142 | |
| 2 | ||
| 3 | 1. |
| ... | ...@@ -1,9 +1,11 @@ | |
| 1 | 1 | #ifndef UNICODE |
| 2 | 2 | #define GetCheck(i) DialogItems[i].Param.Selected |
| 3 | 3 | #define GetDataPtr(i) DialogItems[i].Data.Data |
| 4 | #define SelItems(n,m) SelectedItems[n].m | |
| 4 | 5 | #else |
| 5 | 6 | #define GetCheck(i) (int)Info.SendDlgMessage(hDlg,DM_GETCHECK,i,0) |
| 6 | 7 | #define GetDataPtr(i) ((const TCHAR *)Info.SendDlgMessage(hDlg,DM_GETCONSTTEXTPTR,i,0)) |
| 8 | #define SelItems(n,m) SelectedItems[n]->m | |
| 7 | 9 | #endif |
| 8 | 10 | |
| 9 | 11 | void CaseConvertion() |
| ... | ...@@ -127,8 +129,8 @@ | |
| 127 | 129 | #define CurDir lpwszCurDir |
| 128 | 130 | #define cFileName lpwszFileName |
| 129 | 131 | #endif |
| 130 | GetFullName(FullName,PInfo.CurDir,PInfo.SelectedItems[I].FindData.cFileName); | |
| 131 | ProcessName(FullName,PInfo.SelectedItems[I].FindData.dwFileAttributes); | |
| 132 | GetFullName(FullName,PInfo.CurDir,PInfo.SelItems(I,FindData).cFileName); | |
| 133 | ProcessName(FullName,PInfo.SelItems(I,FindData).dwFileAttributes); | |
| 132 | 134 | #undef CurDir |
| 133 | 135 | #undef cFileName |
| 134 | 136 | } |
| ... | ...@@ -148,5 +150,8 @@ | |
| 148 | 150 | Info.RestoreScreen(hScreen); |
| 149 | 151 | Info.Control(INVALID_HANDLE_VALUE,FCTL_UPDATEPANEL,NULL); |
| 150 | 152 | Info.Control(INVALID_HANDLE_VALUE,FCTL_REDRAWPANEL,NULL); |
| 153 | #ifdef UNICODE | |
| 154 | Info.Control(PANEL_ACTIVE,FCTL_FREEPANELINFO,&PInfo); | |
| 155 | #endif | |
| 151 | 156 | goto done; |
| 152 | 157 | } |
| ... | ...@@ -72,7 +72,7 @@ | |
| 72 | 72 | /> |
| 73 | 73 | <Tool |
| 74 | 74 | Name="VCLinkerTool" |
| 75 | AdditionalDependencies="chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib $(NOINHERIT)" | |
| 75 | AdditionalDependencies="libCRT.lib chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib $(NOINHERIT)" | |
| 76 | 76 | LinkIncremental="2" |
| 77 | 77 | AdditionalLibraryDirectories="..\common" |
| 78 | 78 | GenerateManifest="false" |
| ... | ...@@ -107,7 +107,7 @@ | |
| 107 | 107 | /> |
| 108 | 108 | <Tool |
| 109 | 109 | Name="VCPostBuildEventTool" |
| 110 | CommandLine="copy /Y .\*.lng "$(OutDir)"\
copy /Y .\*.hlf "$(OutDir)"\" | |
| 110 | CommandLine="copy /Y .\*.lng "$(OutDir)"\
copy /Y .\*.hlf "$(OutDir)"\
" | |
| 111 | 111 | /> |
| 112 | 112 | </Configuration> |
| 113 | 113 | <Configuration |
| ... | ...@@ -165,7 +165,7 @@ | |
| 165 | 165 | /> |
| 166 | 166 | <Tool |
| 167 | 167 | Name="VCLinkerTool" |
| 168 | AdditionalDependencies="chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib $(NOINHERIT)" | |
| 168 | AdditionalDependencies="libCRT64.lib chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib $(NOINHERIT)" | |
| 169 | 169 | LinkIncremental="2" |
| 170 | 170 | AdditionalLibraryDirectories="..\common" |
| 171 | 171 | GenerateManifest="false" |
| ... | ...@@ -200,7 +200,7 @@ | |
| 200 | 200 | /> |
| 201 | 201 | <Tool |
| 202 | 202 | Name="VCPostBuildEventTool" |
| 203 | CommandLine="copy /Y .\*.lng "$(OutDir)"\
copy /Y .\*.hlf "$(OutDir)"\" | |
| 203 | CommandLine="copy /Y .\*.lng "$(OutDir)"\
copy /Y .\*.hlf "$(OutDir)"\
" | |
| 204 | 204 | /> |
| 205 | 205 | </Configuration> |
| 206 | 206 | <Configuration |
| ... | ...@@ -259,7 +259,7 @@ | |
| 259 | 259 | /> |
| 260 | 260 | <Tool |
| 261 | 261 | Name="VCLinkerTool" |
| 262 | AdditionalDependencies="chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib $(NOINHERIT)" | |
| 262 | AdditionalDependencies="libCRT.lib chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib $(NOINHERIT)" | |
| 263 | 263 | LinkIncremental="1" |
| 264 | 264 | AdditionalLibraryDirectories="..\common" |
| 265 | 265 | GenerateManifest="false" |
| ... | ...@@ -297,7 +297,7 @@ | |
| 297 | 297 | /> |
| 298 | 298 | <Tool |
| 299 | 299 | Name="VCPostBuildEventTool" |
| 300 | CommandLine="copy /Y .\*.lng "$(OutDir)"\
copy /Y .\*.hlf "$(OutDir)"\" | |
| 300 | CommandLine="copy /Y .\*.lng "$(OutDir)"\
copy /Y .\*.hlf "$(OutDir)"\
" | |
| 301 | 301 | /> |
| 302 | 302 | </Configuration> |
| 303 | 303 | <Configuration |
| ... | ...@@ -358,7 +358,7 @@ | |
| 358 | 358 | /> |
| 359 | 359 | <Tool |
| 360 | 360 | Name="VCLinkerTool" |
| 361 | AdditionalDependencies="chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib $(NOINHERIT)" | |
| 361 | AdditionalDependencies="libCRT64.lib chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib $(NOINHERIT)" | |
| 362 | 362 | LinkIncremental="1" |
| 363 | 363 | AdditionalLibraryDirectories="..\common" |
| 364 | 364 | GenerateManifest="false" |
| ... | ...@@ -396,7 +396,7 @@ | |
| 396 | 396 | /> |
| 397 | 397 | <Tool |
| 398 | 398 | Name="VCPostBuildEventTool" |
| 399 | CommandLine="copy /Y .\*.lng "$(OutDir)"\
copy /Y .\*.hlf "$(OutDir)"\" | |
| 399 | CommandLine="copy /Y .\*.lng "$(OutDir)"\
copy /Y .\*.hlf "$(OutDir)"\
" | |
| 400 | 400 | /> |
| 401 | 401 | </Configuration> |
| 402 | 402 | </Configurations> |
| ... | ...@@ -7,7 +7,6 @@ | |
| 7 | 7 | RootNamespace="pcre" |
| 8 | 8 | Keyword="Win32Proj" |
| 9 | 9 | TargetFrameworkVersion="196613" |
| 10 | ShowAllFiles="false" | |
| 11 | 10 | > |
| 12 | 11 | <Platforms> |
| 13 | 12 | <Platform |
| ... | ...@@ -75,7 +74,7 @@ | |
| 75 | 74 | /> |
| 76 | 75 | <Tool |
| 77 | 76 | Name="VCLibrarianTool" |
| 78 | OutputFile="libpcre.lib" | |
| 77 | OutputFile="$(IntDir)\libpcre.lib" | |
| 79 | 78 | IgnoreAllDefaultLibraries="true" |
| 80 | 79 | /> |
| 81 | 80 | <Tool |
| ... | ...@@ -151,7 +150,7 @@ | |
| 151 | 150 | /> |
| 152 | 151 | <Tool |
| 153 | 152 | Name="VCLibrarianTool" |
| 154 | OutputFile="libpcre.lib" | |
| 153 | OutputFile="$(IntDir)\libpcre.lib" | |
| 155 | 154 | IgnoreAllDefaultLibraries="true" |
| 156 | 155 | /> |
| 157 | 156 | <Tool |
| ... | ...@@ -230,7 +229,7 @@ | |
| 230 | 229 | /> |
| 231 | 230 | <Tool |
| 232 | 231 | Name="VCLibrarianTool" |
| 233 | OutputFile="libpcre.lib" | |
| 232 | OutputFile="$(IntDir)\libpcre.lib" | |
| 234 | 233 | IgnoreAllDefaultLibraries="true" |
| 235 | 234 | /> |
| 236 | 235 | <Tool |
| ... | ...@@ -318,7 +317,7 @@ | |
| 318 | 317 | <Tool |
| 319 | 318 | Name="VCLibrarianTool" |
| 320 | 319 | ExecutionBucket="9" |
| 321 | OutputFile="libpcre.lib" | |
| 320 | OutputFile="$(IntDir)\libpcre.lib" | |
| 322 | 321 | IgnoreAllDefaultLibraries="true" |
| 323 | 322 | /> |
| 324 | 323 | <Tool |
| ... | ...@@ -133,7 +133,7 @@ | |
| 133 | 133 | MIN_FAR_BUILD=1238 |
| 134 | 134 | #else |
| 135 | 135 | MIN_FAR_VERMINOR=80, |
| 136 | MIN_FAR_BUILD=349 | |
| 136 | MIN_FAR_BUILD=557 | |
| 137 | 137 | #endif |
| 138 | 138 | }; |
| 139 | 139 | HWND NULL_HWND; |
| ... | ...@@ -76,7 +76,7 @@ | |
| 76 | 76 | AdditionalDependencies="libCRT.lib chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib libpcre.lib" |
| 77 | 77 | OutputFile="$(OutDir)\$(ProjectName).fmt" |
| 78 | 78 | LinkIncremental="2" |
| 79 | AdditionalLibraryDirectories="..\common;.\libpcre" | |
| 79 | AdditionalLibraryDirectories="..\common;.\libpcre\obj.32.vc" | |
| 80 | 80 | GenerateManifest="false" |
| 81 | 81 | IgnoreAllDefaultLibraries="true" |
| 82 | 82 | ModuleDefinitionFile="custom.vc.def" |
| ... | ...@@ -170,7 +170,7 @@ | |
| 170 | 170 | AdditionalDependencies="libCRT64.lib chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib libpcre.lib" |
| 171 | 171 | OutputFile="$(OutDir)\$(ProjectName).fmt" |
| 172 | 172 | LinkIncremental="2" |
| 173 | AdditionalLibraryDirectories="..\common;.\libpcre" | |
| 173 | AdditionalLibraryDirectories="..\common;.\libpcre\obj.64.vc" | |
| 174 | 174 | GenerateManifest="false" |
| 175 | 175 | IgnoreAllDefaultLibraries="true" |
| 176 | 176 | ModuleDefinitionFile="custom.vc.def" |
| ... | ...@@ -266,7 +266,7 @@ | |
| 266 | 266 | AdditionalDependencies="libCRT.lib chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib libpcre.lib" |
| 267 | 267 | OutputFile="$(OutDir)\$(ProjectName).fmt" |
| 268 | 268 | LinkIncremental="1" |
| 269 | AdditionalLibraryDirectories="..\common;.\libpcre" | |
| 269 | AdditionalLibraryDirectories="..\common;.\libpcre\obj.32.vc" | |
| 270 | 270 | GenerateManifest="false" |
| 271 | 271 | IgnoreAllDefaultLibraries="true" |
| 272 | 272 | ModuleDefinitionFile="custom.vc.def" |
| ... | ...@@ -366,7 +366,7 @@ | |
| 366 | 366 | AdditionalDependencies="libCRT64.lib chkstk.obj kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib uuid.lib mpr.lib version.lib oleaut32.lib wbemuuid.lib libpcre.lib" |
| 367 | 367 | OutputFile="$(OutDir)\$(ProjectName).fmt" |
| 368 | 368 | LinkIncremental="1" |
| 369 | AdditionalLibraryDirectories="..\common;.\libpcre" | |
| 369 | AdditionalLibraryDirectories="..\common;.\libpcre\obj.64.vc" | |
| 370 | 370 | GenerateManifest="false" |
| 371 | 371 | IgnoreAllDefaultLibraries="true" |
| 372 | 372 | ModuleDefinitionFile="custom.vc.def" |
| ... | ...@@ -4,9 +4,13 @@ | |
| 4 | 4 | #include <CRT/crt.hpp> |
| 5 | 5 | |
| 6 | 6 | #ifndef UNICODE |
| 7 | #define _cFileName cFileName | |
| 7 | #define _cFileName cFileName | |
| 8 | #define SelItems(n,m) SelectedItems[n].m | |
| 9 | #define FreePanelInfo() | |
| 8 | 10 | #else |
| 9 | #define _cFileName lpwszFileName | |
| 11 | #define _cFileName lpwszFileName | |
| 12 | #define SelItems(n,m) SelectedItems[n]->m | |
| 13 | #define FreePanelInfo() Info.Control(PANEL_ACTIVE, FCTL_FREEPANELINFO, &AInfo); Info.Control(PANEL_PASSIVE, FCTL_FREEPANELINFO, &PInfo) | |
| 10 | 14 | #endif |
| 11 | 15 | |
| 12 | 16 | #ifndef UNICODE |
| ... | ...@@ -580,7 +584,7 @@ | |
| 580 | 584 | bool bProcessSelected; |
| 581 | 585 | pIndex->ppi = NULL; |
| 582 | 586 | pIndex->iCount = ( bProcessSelected = (Opt.ProcessSelected && pInfo->SelectedItemsNumber && |
| 583 | (pInfo->SelectedItems[0].Flags & PPIF_SELECTED)) ) ? pInfo->SelectedItemsNumber : | |
| 587 | (pInfo->SelItems(0,Flags) & PPIF_SELECTED)) ) ? pInfo->SelectedItemsNumber : | |
| 584 | 588 | pInfo->ItemsNumber; |
| 585 | 589 | if (!pIndex->iCount) |
| 586 | 590 | return true; |
| ... | ...@@ -1150,6 +1154,11 @@ | |
| 1150 | 1154 | |
| 1151 | 1155 | struct PanelInfo AInfo, PInfo; |
| 1152 | 1156 | |
| 1157 | #ifdef UNICODE | |
| 1158 | memset(&AInfo,0,sizeof(struct PanelInfo)); | |
| 1159 | memset(&PInfo,0,sizeof(struct PanelInfo)); | |
| 1160 | #endif | |
| 1161 | ||
| 1153 | 1162 | // |
| ... | ...@@ -1,6 +1,6 @@ | |
| 1 | 1 | #include "farversion.hpp" |
| 2 | 2 | |
| 3 | #define PLUGIN_BUILD 26 | |
| 3 | #define PLUGIN_BUILD 27 | |
| 4 | 4 | #define PLUGIN_DESC "FAR Commands Plugin for FAR Manager" |
| 5 | 5 | #define PLUGIN_NAME "FARCmds" |
| 6 | 6 | #define PLUGIN_FILENAME "FARCmds.dll" |
| ... | ...@@ -4,7 +4,7 @@ | |
| 4 | 4 | /* |
| 5 | 5 | plugin.hpp |
| 6 | 6 | |
| 7 | Plugin API for FAR Manager 1.80 build 552 | |
| 7 | Plugin API for FAR Manager 1.80 build 557 | |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | /* |
| ... | ...@@ -41,7 +41,7 @@ | |
| 41 | 41 | |
| 42 | 42 | #define FARMANAGERVERSION_MAJOR 1 |
| 43 | 43 | #define FARMANAGERVERSION_MINOR 80 |
| 44 | #define FARMANAGERVERSION_BUILD 552 | |
| 44 | #define FARMANAGERVERSION_BUILD 557 | |
| 45 | 45 | |
| 46 | 46 | #ifndef RC_INVOKED |
| 47 | 47 | |
| ... | ...@@ -712,7 +712,7 @@ | |
| 712 | 712 | RECT PanelRect; |
| 713 | 713 | struct PluginPanelItem *PanelItems; |
| 714 | 714 | int ItemsNumber; |
| 715 | struct PluginPanelItem *SelectedItems; | |
| 715 | struct PluginPanelItem **SelectedItems; | |
| 716 | 716 | int SelectedItemsNumber; |
| 717 | 717 | int CurrentItem; |
| 718 | 718 | int TopPanelItem; |
| ... | ...@@ -1,3 +1,7 @@ | |
| 1 | drkns 05.09.2008 10:17:59 +0200 - build 11 | |
| 2 | ||
| 3 | 1. |
| ... | ...@@ -1,6 +1,6 @@ | |
| 1 | 1 | #include "farversion.hpp" |
| 2 | 2 | |
| 3 | #define PLUGIN_BUILD 39 | |
| 3 | #define PLUGIN_BUILD 40 | |
| 4 | 4 | #define PLUGIN_DESC "Temp Panel for FAR Manager" |
| 5 | 5 | #define PLUGIN_NAME "TmpPanel" |
| 6 | 6 | #define PLUGIN_FILENAME "TmpPanel.dll" |
| ... | ...@@ -3,6 +3,12 @@ | |
| 3 | 3 | #include "perfthread.hpp" |
| 4 | 4 | #include "proclng.hpp" |
| 5 | 5 | |
| 6 | #ifndef UNICODE | |
| 7 | #define FreePanelInfo(i) | |
| 8 | #else | |
| 9 | #define FreePanelInfo(i) Control(FCTL_FREEPANELINFO,&i) | |
| 10 | #endif | |
| 11 | ||
| 6 | 12 | class StrTok { |
| 7 | 13 | LPCTSTR tok; |
| 8 | 14 | LPTSTR ptr; |
| ... | ...@@ -514,6 +520,7 @@ | |
| 514 | 520 | } |
| 515 | 521 | } |
| 516 | 522 | LastUpdateTime = GetTickCount(); |
| 523 | FreePanelInfo(pi); | |
| 517 | 524 | return TRUE; |
| 518 | 525 | } |
| 519 | 526 | |
| ... | ...@@ -873,6 +880,7 @@ | |
| 873 | 880 | Control(FCTL_GETPANELINFO, &pi); |
| 874 | 881 | SetRegKey(0,_T("StartPanelMode"), pi.ViewMode); |
| 875 | 882 | SetRegKey(0,_T("SortMode"), pi.SortMode==SM_CTIME ? SortMode : pi.SortMode); |
| 883 | FreePanelInfo(pi); | |
| 876 | 884 | } |
| 877 | 885 | if(Event==FE_CHANGEVIEWMODE) { |
| 878 | 886 | if(/*pPerfThread || */_tcschr((TCHAR*)Param,_T('Z')) || _tcschr((TCHAR*)Param,_T('C'))) |
| ... | ...@@ -902,6 +910,7 @@ | |
| 902 | 910 | Info.Control(PANEL_PASSIVE, FCTL_REDRAWPANEL, NULL); |
| 903 | 911 | #endif |
| 904 | 912 | } |
| 913 | FreePanelInfo(PInfo); | |
| 905 | 914 | } |
| 906 | 915 | |
| 907 | 916 | void Plist::PutToCmdLine(TCHAR* tmp) |
| ... | ...@@ -986,10 +995,13 @@ | |
| 986 | 995 | if (ControlState==0 && Key==VK_RETURN) |
| 987 | 996 | { |
| 988 | 997 | //check for the command line; if it's not empty, don't process Enter |
| 998 | #ifndef UNICODE | |
| 989 | 999 | TCHAR CmdLine[1024]; |
| 990 | ||
| 991 | 1000 | Control(FCTL_GETCMDLINE, CmdLine); |
| 992 | 1001 | if(*CmdLine) |
| 1002 | #else | |
| 1003 | if(Control(FCTL_GETCMDLINE, NULL)) | |
| 1004 | #endif | |
| 993 | 1005 | return FALSE; |
| 994 | 1006 | |
| 995 | 1007 | PanelInfo PInfo; |
| ... | ...@@ -1025,6 +1037,7 @@ | |
| 1025 | 1037 | ShowWindowAsync(hWnd,SW_RESTORE); |
| 1026 | 1038 | } |
| 1027 | 1039 | } |
| 1040 | FreePanelInfo(PInfo); | |
| 1028 | 1041 | return TRUE; |
| 1029 | 1042 | } |
| 1030 | 1043 | else if (ControlState==PKF_SHIFT && Key==VK_F3) |
| ... | ...@@ -1036,8 +1049,10 @@ | |
| 1036 | 1049 | #endif |
| 1037 | 1050 | if (pi.CurrentItem >= pi.ItemsNumber || |
| 1038 | 1051 | !lstrcmp(pi.PanelItems[pi.CurrentItem].FindData.cFileName, _T(".."))) |
| 1039 | return TRUE; | |
| 1040 | ||
| 1052 | { | |
| 1053 | FreePanelInfo(pi); | |
| 1054 | return TRUE; | |
| 1055 | } | |
| 1041 | 1056 | InitDialogItem InitItems[]={ DI_DOUBLEBOX,3,1,72,8,0,0,0,0,(TCHAR *)MViewWithOptions, }; |
| 1042 | 1057 | FarDialogItem DialogItems[NVIEWITEMS + 1]; |
| 1043 | 1058 | InitDialogItems(InitItems,DialogItems,ArraySize(InitItems)); |
| ... | ...@@ -1051,8 +1066,10 @@ | |
| 1051 | 1066 | HANDLE hDlg = Info.DialogInit(Info.ModuleNumber,-1,-1,76,NVIEWITEMS+3,_T("Config"), |
| 1052 | 1067 | DialogItems,ArraySize(DialogItems),0,0,NULL,0); |
| 1053 | 1068 | if(hDlg == INVALID_HANDLE_VALUE) |
| 1069 | { | |
| 1070 | FreePanelInfo(pi); | |
| 1054 | 1071 | return TRUE; |
| 1055 | ||
| 1072 | } | |
| 1056 | 1073 | int ExitCode = Info.DialogRun(hDlg); |
| 1057 | 1074 | #define _REF hDlg |
| 1058 | 1075 | #endif |
| ... | ...@@ -1063,8 +1080,10 @@ | |
| 1063 | 1080 | Info.DialogFree(hDlg); |
| 1064 | 1081 | #endif |
| 1065 | 1082 | if(ExitCode==-1) |
| 1083 | { | |
| 1084 | FreePanelInfo(pi); | |
| 1066 | 1085 | return TRUE; |
| 1067 | ||
| 1086 | } | |
| 1068 | 1087 | TCHAR FileName[MAX_PATH]; |
| 1069 | 1088 | #ifndef UNICODE |
| 1070 | 1089 | FSF.MkTemp(FileName, _T("prc")); |
| ... | ...@@ -1077,6 +1096,7 @@ | |
| 1077 | 1096 | return TRUE; |
| 1078 | 1097 | //TODO: viewer crashed on exit! |
| 1079 | 1098 | Info.Viewer (FileName, pi.PanelItems[pi.CurrentItem].FindData.cFileName, 0,0,-1,-1, VF_NONMODAL|VF_DELETEONCLOSE); |
| 1099 | FreePanelInfo(pi); | |
| 1080 | 1100 | return TRUE; |
| 1081 | 1101 | } |
| 1082 | 1102 | else if (ControlState==0 && Key==VK_F6) |
| ... | ...@@ -1184,12 +1204,16 @@ | |
| 1184 | 1204 | { |
| 1185 | 1205 | const TCHAR *MsgItems[]={GetMsg(MChangePriority),GetMsg(MConfirmChangePriority),GetMsg(MYes),GetMsg(MNo)}; |
| 1186 | 1206 | if(Message(0,NULL,MsgItems,ArraySize(MsgItems),2)!=0) |
| 1207 | { | |
| 1208 | FreePanelInfo(PInfo); | |
| 1187 | 1209 | return TRUE; |
| 1210 | } | |
| 1188 | 1211 | } |
| 1189 | 1212 | |
| 1190 | 1213 | if(*HostName && Opt.EnableWMI && !ConnectWMI()) |
| 1191 | 1214 | { |
| 1192 | 1215 | WmiError(); |
| 1216 | FreePanelInfo(PInfo); | |
| 1193 | 1217 | return TRUE; |
| 1194 | 1218 | } |
| 1195 | 1219 | |
| ... | ...@@ -1205,8 +1229,11 @@ | |
| 1205 | 1229 | |
| 1206 | 1230 | for(int i=0; i<PInfo.SelectedItemsNumber; i++) |
| 1207 | 1231 | { |
| 1208 | ||
| 1232 | #ifndef UNICODE | |
| 1209 | 1233 | PluginPanelItem& Item = PInfo.SelectedItems[i]; |
| 1234 | #else | |
| 1235 | PluginPanelItem& Item = *PInfo.SelectedItems[i]; | |
| 1236 | #endif | |
| 1210 | 1237 | SetLastError(0); |
| 1211 | 1238 | if(((ProcessData*)Item.UserData)->dwPID) { |
| 1212 | 1239 | |
| ... | ...@@ -1277,6 +1304,7 @@ | |
| 1277 | 1304 | if(pPerfThread) |
| 1278 | 1305 | pPerfThread->SmartReread(); |
| 1279 | 1306 | Reread(); |
| 1307 | FreePanelInfo(PInfo); | |
| 1280 | 1308 | return TRUE; |
| 1281 | 1309 | /* } else if (ControlState==(PKF_ALT|PKF_SHIFT) && Key==VK_F9) { |
| 1282 | 1310 | Config(); |
| ... | ...@@ -1291,6 +1319,7 @@ | |
| 1291 | 1319 | if(pData) |
| 1292 | 1320 | PutToCmdLine(pData->FullPath); |
| 1293 | 1321 | } |
| 1322 | FreePanelInfo(pi); | |
| 1294 | 1323 | return TRUE; |
| 1295 | 1324 | } else if(ControlState==PKF_CONTROL && Key==VK_F12) { |
| 1296 | 1325 | |
| ... | ...@@ -1413,6 +1442,7 @@ | |
| 1413 | 1442 | while(--nItems > NSTATICITEMS) |
| 1414 | 1443 | if(Flags[nItems].a) free((wchar_t*)Items[nItems].Text); |
| 1415 | 1444 | #endif |
| 1445 | FreePanelInfo(pi); | |
| 1416 | 1446 | return TRUE; |
| 1417 | 1447 | } |
| 1418 | 1448 | return FALSE; |
| ... | ...@@ -1,3 +1,7 @@ | |
| 1 | drkns 05.09.2008 10:11:28 +0200 - build 27 | |
| 2 | ||
| 3 | 1. |
| ... | ...@@ -146,7 +146,7 @@ | |
| 146 | 146 | #ifndef UNICODE |
| 147 |