| CODENOTIFIER | HelpYou are not signed inSign in |
Project: FAR manager
Revision: 1952
Author: drkns
Date: 12 Aug 2008 08:42:49
Changes:| ... | ...@@ -1918,7 +1918,7 @@ | |
| 1918 | 1918 | { |
| 1919 | 1919 | struct OpenPluginInfo Info; |
| 1920 | 1920 | GetOpenPluginInfo(&Info); |
| 1921 | strTitleDir = NullToEmpty(Info.PanelTitle); | |
| 1921 | strTitleDir = Info.PanelTitle; | |
| 1922 | 1922 | RemoveExternalSpaces(strTitleDir); |
| 1923 | 1923 | TruncStr(strTitleDir,SubLen-TruncSize); |
| 1924 | 1924 | } |
| ... | ...@@ -1982,7 +1982,7 @@ | |
| 1982 | 1982 | break; |
| 1983 | 1983 | |
| 1984 | 1984 | case FCTL_CLOSEPLUGIN: |
| 1985 | strPluginParam = NullToEmpty((const wchar_t *)Param); | |
| 1985 | strPluginParam = (const wchar_t *)Param; | |
| 1986 | 1986 | Result=TRUE; |
| 1987 | 1987 | //if(Opt.CPAJHefuayor) |
| 1988 | 1988 | // CtrlObject->Plugins.ProcessCommandLine((char *)PluginParam); |
| ... | ...@@ -3752,7 +3752,7 @@ | |
| 3752 | 3752 | Data->Flags = Item->Flags; |
| 3753 | 3753 | Data->DefaultButton = Item->DefaultButton; |
| 3754 | 3754 | |
| 3755 | Data->strData = NullToEmpty (Item->PtrData); | |
| 3755 | Data->strData = Item->PtrData; | |
| 3756 | 3756 | Data->Type = Item->Type; |
| 3757 | 3757 | Data->nMaxLength = Item->MaxLen; |
| 3758 | 3758 | if (Data->nMaxLength > 0) |
| ... | ...@@ -172,7 +172,6 @@ | |
| 172 | 172 | if (RootKey) xf_free(RootKey); |
| 173 | 173 | FreePluginInfo(); |
| 174 | 174 | FreeOpenPluginInfo(); |
| 175 | memset(&OPIA,0,sizeof(oldfar::OpenPluginInfo)); | |
| 176 | 175 | Lang.Close(); |
| 177 | 176 | } |
| 178 | 177 | |
| ... | ...@@ -1276,8 +1275,8 @@ | |
| 1276 | 1275 | } |
| 1277 | 1276 | |
| 1278 | 1277 | FreeOpenPluginInfo(); |
| 1279 | memset(&OPIA,0,sizeof(oldfar::OpenPluginInfo)); | |
| 1280 | // m_pManager->m_pCurrentPlugin = (Plugin*)-1; | |
| 1278 | ||
| 1279 | // m_pManager->m_pCurrentPlugin = (Plugin*)-1; | |
| 1281 | 1280 | } |
| 1282 | 1281 | |
| 1283 | 1282 | |
| ... | ...@@ -1351,56 +1350,53 @@ | |
| 1351 | 1350 | |
| 1352 | 1351 | void PluginA::ConvertOpenPluginInfo(oldfar::OpenPluginInfo &Src, OpenPluginInfo *Dest) |
| 1353 | 1352 | { |
| 1354 | if(memcmp(&OPIA,&Src,sizeof(oldfar::OpenPluginInfo))) | |
| 1355 | { | |
| 1356 | FreeOpenPluginInfo(); | |
| 1357 | ||
| 1358 | OPI.StructSize = sizeof(OPI); | |
| 1359 | OPI.Flags = Src.Flags; | |
| 1353 | FreeOpenPluginInfo(); | |
| 1360 | 1354 | |
| 1361 | if (Src.CurDir) | |
| 1362 | OPI.CurDir = AnsiToUnicode(Src.CurDir); | |
| 1355 | OPI.StructSize = sizeof(OPI); | |
| 1356 | OPI.Flags = Src.Flags; | |
| 1363 | 1357 | |
| 1364 | if (Src.HostFile) | |
| 1365 | OPI.HostFile = AnsiToUnicode(Src.HostFile); | |
| 1358 | if (Src.CurDir) | |
| 1359 | OPI.CurDir = AnsiToUnicode(Src.CurDir); | |
| 1366 | 1360 | |
| 1367 | if (Src.Format) | |
| 1368 | OPI.Format = AnsiToUnicode(Src.Format); | |
| 1361 | if (Src.HostFile) | |
| 1362 | OPI.HostFile = AnsiToUnicode(Src.HostFile); | |
| 1369 | 1363 | |
| 1370 | if (Src.PanelTitle) | |
| 1371 | OPI.PanelTitle = AnsiToUnicode(Src.PanelTitle); | |
| 1364 | if (Src.Format) | |
| 1365 | OPI.Format = AnsiToUnicode(Src.Format); | |
| 1372 | 1366 | |
| 1373 | if (Src.InfoLines && Src.InfoLinesNumber) | |
| 1374 | { | |
| 1375 | ConvertInfoPanelLinesA(Src.InfoLines, (InfoPanelLine**)&OPI.InfoLines, Src.InfoLinesNumber); | |
| 1376 | OPI.InfoLinesNumber = Src.InfoLinesNumber; | |
| 1377 | } | |
| 1367 | if (Src.PanelTitle) | |
| 1368 | OPI.PanelTitle = AnsiToUnicode(Src.PanelTitle); | |
| 1378 | 1369 | |
| 1379 | if (Src.DescrFiles && Src.DescrFilesNumber) | |
| 1380 | { | |
| 1381 | OPI.DescrFiles = ArrayAnsiToUnicode((char**)Src.DescrFiles, Src.DescrFilesNumber); | |
| 1382 | OPI.DescrFilesNumber = Src.DescrFilesNumber; | |
| 1383 | } | |
| 1370 | if (Src.InfoLines && Src.InfoLinesNumber) | |
| 1371 | { | |
| 1372 | ConvertInfoPanelLinesA(Src.InfoLines, (InfoPanelLine**)&OPI.InfoLines, Src.InfoLinesNumber); | |
| 1373 | OPI.InfoLinesNumber = Src.InfoLinesNumber; | |
| 1374 | } | |
| 1384 | 1375 | |
| 1385 | if (Src.PanelModesArray && Src.PanelModesNumber) | |
| 1386 | { | |
| 1387 | ConvertPanelModesA(Src.PanelModesArray, (PanelMode**)&OPI.PanelModesArray, Src.PanelModesNumber); | |
| 1388 | OPI.PanelModesNumber = Src.PanelModesNumber; | |
| 1389 | OPI.StartPanelMode = Src.StartPanelMode; | |
| 1390 | OPI.StartSortMode = Src.StartSortMode; | |
| 1391 | OPI.StartSortOrder = Src.StartSortOrder; | |
| 1392 | } | |
| 1376 | if (Src.DescrFiles && Src.DescrFilesNumber) | |
| 1377 | { | |
| 1378 | OPI.DescrFiles = ArrayAnsiToUnicode((char**)Src.DescrFiles, Src.DescrFilesNumber); | |
| 1379 | OPI.DescrFilesNumber = Src.DescrFilesNumber; | |
| 1380 | } | |
| 1393 | 1381 | |
| 1394 | if (Src.KeyBar) | |
| 1395 | { | |
| 1396 | OPI.KeyBar=(KeyBarTitles*) xf_malloc (sizeof(KeyBarTitles)); | |
| 1397 | ConvertKeyBarTitlesA(Src.KeyBar, (KeyBarTitles*)OPI.KeyBar, Src.StructSize>=(int)sizeof(oldfar::OpenPluginInfo)); | |
| 1398 | } | |
| 1382 | if (Src.PanelModesArray && Src.PanelModesNumber) | |
| 1383 | { | |
| 1384 | ConvertPanelModesA(Src.PanelModesArray, (PanelMode**)&OPI.PanelModesArray, Src.PanelModesNumber); | |
| 1385 | OPI.PanelModesNumber = Src.PanelModesNumber; | |
| 1386 | OPI.StartPanelMode = Src.StartPanelMode; | |
| 1387 | OPI.StartSortMode = Src.StartSortMode; | |
| 1388 | OPI.StartSortOrder = Src.StartSortOrder; | |
| 1389 | } | |
| 1399 | 1390 | |
| 1400 | //if (Src.ShortcutData) | |
| 1401 | //OPI.ShortcutData = AnsiToUnicode(Src.ShortcutData); | |
| 1402 | memcpy(&OPIA,&Src,sizeof(oldfar::OpenPluginInfo)); | |
| 1391 | if (Src.KeyBar) | |
| 1392 | { | |
| 1393 | OPI.KeyBar=(KeyBarTitles*) xf_malloc (sizeof(KeyBarTitles)); | |
| 1394 | ConvertKeyBarTitlesA(Src.KeyBar, (KeyBarTitles*)OPI.KeyBar, Src.StructSize>=(int)sizeof(oldfar::OpenPluginInfo)); | |
| 1403 | 1395 | } |
| 1396 | ||
| 1397 | //if (Src.ShortcutData) | |
| 1398 | //OPI.ShortcutData = AnsiToUnicode(Src.ShortcutData); | |
| 1399 | ||
| 1404 | 1400 | memcpy(Dest,&OPI,sizeof(OpenPluginInfo)); |
| 1405 | 1401 | } |
| 1406 | 1402 |
| ... | ...@@ -1185,7 +1185,7 @@ | |
| 1185 | 1185 | switch(Command) |
| 1186 | 1186 | { |
| 1187 | 1187 | case FCTL_CLOSEPLUGIN: |
| 1188 | g_strDirToSet = NullToEmpty((wchar_t *)Param); | |
| 1188 | g_strDirToSet = (wchar_t *)Param; | |
| 1189 | 1189 | |
| 1190 | 1190 | case FCTL_GETPANELINFO: |
| 1191 | 1191 | case FCTL_GETPANELSHORTINFO: |
| ... | ...@@ -91,6 +91,7 @@ | |
| 91 | 91 | return; |
| 92 | 92 | } |
| 93 | 93 | string strTitle; |
| 94 | string strInfoCurDir; | |
| 94 | 95 | int Length; |
| 95 | 96 | struct OpenPluginInfo Info; |
| 96 | 97 | |
| ... | ...@@ -99,6 +100,7 @@ | |
| 99 | 100 | if (ProcessPluginEvent(FE_REDRAW,NULL)) |
| 100 | 101 | return; |
| 101 | 102 | CtrlObject->Plugins.GetOpenPluginInfo(hPlugin,&Info); |
| 103 | strInfoCurDir=Info.CurDir; | |
| 102 | 104 | } |
| 103 | 105 | |
| 104 | 106 | int CurFullScreen=IsFullScreen(); |
| ... | ...@@ -285,8 +287,6 @@ | |
| 285 | 287 | if (!Opt.ShowColumnTitles && Opt.ShowSortMode && Filter!=NULL && Filter->IsEnabledOnPanel()) |
| 286 | 288 | TruncSize-=2; |
| 287 | 289 | |
| 288 | // BUGBUG - |
| ... | ...@@ -96,7 +96,6 @@ | |
| 96 | 96 | |
| 97 | 97 | PluginInfo PI; |
| 98 | 98 | OpenPluginInfo OPI; |
| 99 | oldfar::OpenPluginInfo OPIA; | |
| 100 | 99 | |
| 101 | 100 | oldfar::PluginPanelItem *pFDPanelItemA; |
| 102 | 101 |
| ... | ...@@ -1,3 +1,10 @@ | |
| 1 | drkns 12.08.2008 16:29:00 +0200 - build 548 | |
| 2 | ||
| 3 | 1. |
| ... | ...@@ -539,7 +539,7 @@ | |
| 539 | 539 | struct OpenPluginInfo Info; |
| 540 | 540 | DestPanel->GetOpenPluginInfo(&Info); |
| 541 | 541 | |
| 542 | string strFormat = NullToEmpty(Info.Format); | |
| 542 | string strFormat = Info.Format; | |
| 543 | 543 | |
| 544 | 544 | CopyDlg[ID_SC_TARGETEDIT].strData = strFormat+L":"; |
| 545 | 545 | while (CopyDlg[ID_SC_TARGETEDIT].strData.GetLength ()<2) |
| ... | ...@@ -568,9 +568,9 @@ | |
| 568 | 568 | struct OpenPluginInfo Info; |
| 569 | 569 | CtrlObject->Plugins.GetOpenPluginInfo(hPlugin,&Info); |
| 570 | 570 | |
| 571 | strPluginFile = NullToEmpty(Info.HostFile); | |
| 572 | strShortcutFolder = NullToEmpty(Info.CurDir); | |
| 573 | strPluginData = NullToEmpty(Info.ShortcutData); | |
| 571 | strPluginFile = Info.HostFile; | |
| 572 | strShortcutFolder = Info.CurDir; | |
| 573 | strPluginData = Info.ShortcutData; | |
| 574 | 574 | } |
| 575 | 575 | else |
| 576 | 576 | { |
| ... | ...@@ -864,7 +864,7 @@ | |
| 864 | 864 | CreateFullPathName(CurPtr->strName,CurPtr->strShortName,CurPtr->FileAttr, strFileName, Key==KEY_CTRLALTF); |
| 865 | 865 | else |
| 866 | 866 | { |
| 867 | string strFullName = NullToEmpty(Info.CurDir); | |
| 867 | string strFullName = Info.CurDir; | |
| 868 | 868 | |
| 869 | 869 | if (Opt.PanelCtrlFRule && ViewSettings.FolderUpperCase) |
| 870 | 870 | strFullName.Upper (); |
| ... | ...@@ -1112,6 +1112,9 @@ | |
| 1112 | 1112 | string strFileName; |
| 1113 | 1113 | string strShortFileName; |
| 1114 | 1114 | |
| 1115 | string strHostFile=Info.HostFile; | |
| 1116 | string strCurDir=Info.CurDir; | |
| 1117 | ||
| 1115 | 1118 | int PluginMode=PanelMode==PLUGIN_PANEL && |
| 1116 | 1119 | !CtrlObject->Plugins.UseFarCommand(hPlugin,PLUGIN_FARGETFILE); |
| 1117 | 1120 | |
| ... | ...@@ -1120,7 +1123,7 @@ | |
| 1120 | 1123 | if(Info.Flags & OPIF_REALNAMES) |
| 1121 | 1124 | PluginMode=FALSE; |
| 1122 | 1125 | else |
| 1123 | strPluginData.Format (L"<%s:%s>",NullToEmpty(Info.HostFile),NullToEmpty(Info.CurDir)); | |
| 1126 | strPluginData.Format (L"<%s:%s>",(const wchar_t*)strHostFile,(const wchar_t*)strCurDir); | |
| 1124 | 1127 | } |
| 1125 | 1128 | |
| 1126 | 1129 | if(!PluginMode) |
| ... | ...@@ -2127,12 +2130,9 @@ | |
| 2127 | 2130 | /* $ 16.01.2002 VVM |
| 2128 | 2131 | + |
| ... | ...@@ -81,6 +81,7 @@ | |
| 81 | 81 | |
| 82 | 82 | const UnicodeString& UnicodeString::SetData(const wchar_t *lpwszData) |
| 83 | 83 | { |
| 84 | lpwszData=NullToEmpty(lpwszData); | |
| 84 | 85 | size_t nLength = StrLength(lpwszData); |
| 85 | 86 | if (m_pData && m_pData->GetRef() == 1 && nLength + 1 <= m_pData->GetSize()) |
| 86 | 87 | { |
| ... | ...@@ -50,7 +50,7 @@ | |
| 50 | 50 | { |
| 51 | 51 | PluginsStackItem *stItem = new PluginsStackItem; |
| 52 | 52 | stItem->hPlugin=hPlugin; |
| 53 | stItem->strHostFile = NullToEmpty(HostFile); //??NULL?? | |
| 53 | stItem->strHostFile = HostFile; //??NULL?? | |
| 54 | 54 | stItem->Modified=FALSE; |
| 55 | 55 | stItem->PrevViewMode=ViewMode; |
| 56 | 56 | stItem->PrevSortMode=SortMode; |
| ... | ...@@ -206,10 +206,10 @@ | |
| 206 | 206 | |
| 207 | 207 | void FileList::PluginToFileListItem(struct PluginPanelItem *pi,struct FileListItem *fi) |
| 208 | 208 | { |
| 209 | fi->strName = NullToEmpty(pi->FindData.lpwszFileName); | |
| 210 | fi->strShortName = NullToEmpty(pi->FindData.lpwszAlternateFileName); | |
| 209 | fi->strName = pi->FindData.lpwszFileName; | |
| 210 | fi->strShortName = pi->FindData.lpwszAlternateFileName; | |
| 211 | 211 | |
| 212 | fi->strOwner = NullToEmpty(pi->Owner); | |
| 212 | fi->strOwner = pi->Owner; | |
| 213 | 213 | if (pi->Description) |
| 214 | 214 | { |
| 215 | 215 | fi->DizText=new wchar_t[StrLength(pi->Description)+1]; |
| ... | ...@@ -2960,10 +2960,10 @@ | |
| 2960 | 2960 | |
| 2961 | 2961 | ArcList[ArcListCount] = new _ARCLIST; |
| 2962 | 2962 | |
| 2963 | ArcList[ArcListCount]->strArcName = NullToEmpty(ArcName); | |
| 2963 | ArcList[ArcListCount]->strArcName = ArcName; | |
| 2964 | 2964 | ArcList[ArcListCount]->hPlugin = hPlugin; |
| 2965 | 2965 | ArcList[ArcListCount]->Flags = dwFlags; |
| 2966 | ArcList[ArcListCount]->strRootPath = NullToEmpty(RootPath); | |
| 2966 | ArcList[ArcListCount]->strRootPath = RootPath; | |
| 2967 | 2967 | AddEndSlash(ArcList[ArcListCount]->strRootPath); |
| 2968 | 2968 | return(ArcListCount++); |
| 2969 | 2969 | } |
| ... | ...@@ -1157,7 +1157,7 @@ | |
| 1157 | 1157 | MenuItemEx ListItem; |
| 1158 | 1158 | |
| 1159 | 1159 | ListItem.Clear(); |
| 1160 | string strName = NullToEmpty(Info.PluginConfigStrings[J]); | |
| 1160 | string strName = Info.PluginConfigStrings[J]; | |
| 1161 | 1161 | if (!HotKeysPresent) |
| 1162 | 1162 | ListItem.strName = strName; |
| 1163 | 1163 | else |
| ... | ...@@ -1361,7 +1361,7 @@ | |
| 1361 | 1361 | GetRegKey(strHotRegKey,L"Hotkey",strHotKey,L""); |
| 1362 | 1362 | MenuItemEx ListItem; |
| 1363 | 1363 | ListItem.Clear(); |
| 1364 | string strName = NullToEmpty(Info.PluginMenuStrings[J]); | |
| 1364 | string strName = Info.PluginMenuStrings[J]; | |
| 1365 | 1365 | if (!HotKeysPresent) |
| 1366 | 1366 | ListItem.strName.Format (L" %s", (const wchar_t*)strName);//strcpy(ListItem.Name,Name); |
| 1367 | 1367 | else |
| ... | ...@@ -1739,7 +1739,7 @@ | |
| 1739 | 1739 | PluginInfo Info; |
| 1740 | 1740 | if (GetPluginInfo(PData,&Info)) |
| 1741 | 1741 | { |
| 1742 | strPluginPrefix = NullToEmpty(Info.CommandPrefix); | |
| 1742 | strPluginPrefix = Info.CommandPrefix; | |
| 1743 | 1743 | PluginFlags = Info.Flags; |
| 1744 | 1744 | } |
| 1745 | 1745 | else |
| ... | ...@@ -1 +1 @@ | |
| 0 | m4_define(BUILD,547)m4_dnl | |
| 0 | m4_define(BUILD,548)m4_dnl |
| ... | ...@@ -2123,7 +2123,7 @@ | |
| 2123 | 2123 | |
| 2124 | 2124 | void FileEditor::SetTitle(const wchar_t *Title) |
| 2125 | 2125 | { |
| 2126 | strTitle = NullToEmpty(Title); | |
| 2126 | strTitle = Title; | |
| 2127 | 2127 | } |
| 2128 | 2128 | |
| 2129 | 2129 | void FileEditor::ChangeEditKeyBar() |
| ... | ...@@ -2276,7 +2276,7 @@ | |
| 2276 | 2276 | |
| 2277 | 2277 | void FileEditor::SetPluginData(const wchar_t *PluginData) |
| 2278 | 2278 | { |
| 2279 | FileEditor::strPluginData = NullToEmpty(PluginData); | |
| 2279 | FileEditor::strPluginData = PluginData; | |
| 2280 | 2280 | } |
| 2281 | 2281 | |
| 2282 | 2282 | /* $ 14.06.2002 IS |
| ... | ...@@ -2417,7 +2417,7 @@ | |
| 2417 | 2417 | |
| 2418 | 2418 | case ECTL_SETTITLE: |
| 2419 | 2419 | { |
| 2420 | strPluginTitle = NullToEmpty((const wchar_t*)Param); | |
| 2420 | strPluginTitle = (const wchar_t*)Param; | |
| 2421 | 2421 | |
| 2422 | 2422 | ShowStatus(); |
| 2423 | 2423 | ScrBuf.Flush(); //??? |
| ... | ...@@ -207,7 +207,7 @@ | |
| 207 | 207 | |
| 208 | 208 | CtrlTabSize = 8; |
| 209 | 209 | |
| 210 | StackData.strHelpMask = NullToEmpty(Mask); // |
| ... | ...@@ -256,7 +256,7 @@ | |
| 256 | 256 | MenuItemEx ListItem; |
| 257 | 257 | ListItem.Clear (); |
| 258 | 258 | |
| 259 | strPrinterName = NullToEmpty(pi[I].pPrinterName); | |
| 259 | strPrinterName = pi[I].pPrinterName; | |
| 260 | 260 | |
| 261 | 261 | strMenuText.Format (L"%-22.22s %c %-10s %3d %s %s", (const wchar_t*)strPrinterName,BoxSymbols[0x0B3-0x0B0], |
| 262 | 262 | NullToEmpty(pi[I].pPortName),pi[I].cJobs,UMSG(MJobs), |
| ... | ...@@ -1832,7 +1832,7 @@ | |
| 1832 | 1832 | CtrlObject->Plugins.GetOpenPluginInfo(SrcFilePanel->GetPluginHandle(),&Info); |
| 1833 | 1833 | FileList::AddPluginPrefix(SrcFilePanel,strPathName); |
| 1834 | 1834 | |
| 1835 | strPathName += NullToEmpty(Info.CurDir); | |
| 1835 | strPathName += Info.CurDir; | |
| 1836 | 1836 | |
| 1837 | 1837 | } |
| 1838 | 1838 | AddEndSlash(strPathName); |
| ... | ...@@ -245,7 +245,7 @@ | |
| 245 | 245 | |
| 246 | 246 | void ConvertNameToShort(const wchar_t *Src, string &strDest) |
| 247 | 247 | { |
| 248 | string strCopy = NullToEmpty(Src); | |
| 248 | string strCopy = Src; | |
| 249 | 249 | |
| 250 | 250 | int nSize = GetShortPathNameW (strCopy, NULL, 0); |
| 251 | 251 | |
| ... | ...@@ -265,7 +265,7 @@ | |
| 265 | 265 | |
| 266 | 266 | void ConvertNameToLong(const wchar_t *Src, string &strDest) |
| 267 | 267 | { |
| 268 | string strCopy = NullToEmpty(Src); | |
| 268 | string strCopy = Src; | |
| 269 | 269 | |
| 270 | 270 | int nSize = GetLongPathNameW (strCopy, NULL, 0); |
| 271 | 271 |