• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FFFTPのソースコードです。


Commit MetaInfo

Revisão2bffe82de6811b380d280099f638dd7b4cbb3404 (tree)
Hora2012-02-11 17:24:12
Autors_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Mensagem de Log

Fix bugs of displaying icons in the local file list.

Mudança Sumário

Diff

Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
--- a/Resource/FFFTP.rc
+++ b/Resource/FFFTP.rc
@@ -73,6 +73,7 @@ main_toolbar_bmp BITMAP "toolbar1.bmp"
7373 remote_toolbar_bmp BITMAP "main_too.bmp"
7474 dirattr_bmp BITMAP "list_bmp.bmp"
7575 hlist_bmp BITMAP "bitmap1.bmp"
76+dirattr16_bmp BITMAP "list_16.bmp"
7677
7778 /////////////////////////////////////////////////////////////////////////////
7879 //
Binary files /dev/null and b/Resource/list_16.bmp differ
Binary files a/Resource/list_bmp.bmp and b/Resource/list_bmp.bmp differ
--- a/Resource/resource.h
+++ b/Resource/resource.h
@@ -20,6 +20,7 @@
2020 #define rename_dlg 110
2121 #define hlist_bmp 110
2222 #define delete_dlg 111
23+#define dirattr16_bmp 111
2324 #define hostlist_dlg 112
2425 #define hostset_dlg 113
2526 #define hset_main_dlg 113
--- a/Resource_eng/FFFTP-eng.rc
+++ b/Resource_eng/FFFTP-eng.rc
@@ -73,6 +73,7 @@ main_toolbar_bmp BITMAP "toolbar1.bmp"
7373 remote_toolbar_bmp BITMAP "main_too.bmp"
7474 dirattr_bmp BITMAP "list_bmp.bmp"
7575 hlist_bmp BITMAP "bitmap1.bmp"
76+dirattr16_bmp BITMAP "list_16.bmp"
7677
7778 /////////////////////////////////////////////////////////////////////////////
7879 //
Binary files /dev/null and b/Resource_eng/list_16.bmp differ
Binary files a/Resource_eng/list_bmp.bmp and b/Resource_eng/list_bmp.bmp differ
--- a/Resource_eng/resource.h
+++ b/Resource_eng/resource.h
@@ -20,6 +20,7 @@
2020 #define rename_dlg 110
2121 #define hlist_bmp 110
2222 #define delete_dlg 111
23+#define dirattr16_bmp 111
2324 #define hostlist_dlg 112
2425 #define hostset_dlg 113
2526 #define hset_main_dlg 113
--- a/filelist.c
+++ b/filelist.c
@@ -147,6 +147,8 @@ static WNDPROC LocalProcPtr;
147147 static WNDPROC RemoteProcPtr;
148148
149149 static HIMAGELIST ListImg = NULL;
150+// ファイルアイコン表示対応
151+static HIMAGELIST ListImgFileIcon = NULL;
150152
151153 static char FindStr[40+1] = { "*" }; /* 検索文字列 */
152154 static int IgnoreNew = NO;
@@ -1340,22 +1342,22 @@ void RefreshIconImageList(FLISTANCHOR *Anchor)
13401342 int i;
13411343 char Cur[FMAX_PATH+1];
13421344 SHFILEINFO FileInfo;
1343- SendMessage(hWndListLocal, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)NULL);
1344- ShowWindow(hWndListLocal, SW_SHOW);
1345- SendMessage(hWndListRemote, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)NULL);
1346- ShowWindow(hWndListRemote, SW_SHOW);
1347- ImageList_Destroy(ListImg);
1348- ListImg = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR24, 0, 1);
1349- hBitmap = LoadBitmap(GetFtpInst(), MAKEINTRESOURCE(dirattr_bmp));
1350- ImageList_AddMasked(ListImg, hBitmap, RGB(255,0,0));
1351- DeleteObject(hBitmap);
1352- ImageId = 0;
1353- Pos = Anchor->Top;
1354- for(i = 0; i < Anchor->Files; i++)
1345+ if(AskDispFileIcon() == YES)
13551346 {
1356- Pos->ImageId = -1;
1357- if(AskDispFileIcon() == YES)
1347+ SendMessage(hWndListLocal, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)NULL);
1348+ ShowWindow(hWndListLocal, SW_SHOW);
1349+ SendMessage(hWndListRemote, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)NULL);
1350+ ShowWindow(hWndListRemote, SW_SHOW);
1351+ ImageList_Destroy(ListImgFileIcon);
1352+ ListImgFileIcon = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 0, 1);
1353+ hBitmap = LoadBitmap(GetFtpInst(), MAKEINTRESOURCE(dirattr16_bmp));
1354+ ImageList_AddMasked(ListImgFileIcon, hBitmap, RGB(255, 0, 0));
1355+ DeleteObject(hBitmap);
1356+ ImageId = 0;
1357+ Pos = Anchor->Top;
1358+ for(i = 0; i < Anchor->Files; i++)
13581359 {
1360+ Pos->ImageId = -1;
13591361 if(Pos->Node == NODE_DRIVE)
13601362 strcpy(Cur, Pos->File);
13611363 else
@@ -1366,20 +1368,27 @@ void RefreshIconImageList(FLISTANCHOR *Anchor)
13661368 }
13671369 if(SHGetFileInfoM(Cur, 0, &FileInfo, sizeof(SHFILEINFO), SHGFI_SMALLICON | SHGFI_ICON) != 0)
13681370 {
1369- if(ImageList_AddIcon(ListImg, FileInfo.hIcon) >= 0)
1371+ if(ImageList_AddIcon(ListImgFileIcon, FileInfo.hIcon) >= 0)
13701372 {
13711373 Pos->ImageId = ImageId;
13721374 ImageId++;
13731375 }
13741376 DestroyIcon(FileInfo.hIcon);
13751377 }
1378+ Pos = Pos->Next;
13761379 }
1377- Pos = Pos->Next;
1380+ SendMessage(hWndListLocal, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ListImgFileIcon);
1381+ ShowWindow(hWndListLocal, SW_SHOW);
1382+ SendMessage(hWndListRemote, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ListImgFileIcon);
1383+ ShowWindow(hWndListRemote, SW_SHOW);
1384+ }
1385+ else
1386+ {
1387+ SendMessage(hWndListLocal, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ListImg);
1388+ ShowWindow(hWndListLocal, SW_SHOW);
1389+ SendMessage(hWndListRemote, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ListImg);
1390+ ShowWindow(hWndListRemote, SW_SHOW);
13781391 }
1379- SendMessage(hWndListLocal, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ListImg);
1380- ShowWindow(hWndListLocal, SW_SHOW);
1381- SendMessage(hWndListRemote, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)ListImg);
1382- ShowWindow(hWndListRemote, SW_SHOW);
13831392 }
13841393
13851394 void GetLocalDirForWnd(void)
@@ -1695,8 +1704,8 @@ static void AddListView(HWND hWnd, int Pos, char *Name, int Type, LONGLONG Size,
16951704 else
16961705 LvItem.iImage = 4;
16971706 // ファイルアイコン表示対応
1698- if(hWnd == GetLocalHwnd() && ImageId >= 0)
1699- LvItem.iImage = 5 + ImageId;
1707+ if(AskDispFileIcon() == YES && hWnd == GetLocalHwnd())
1708+ LvItem.iImage = ImageId + 5;
17001709 LvItem.iItem = SendMessage(hWnd, LVM_INSERTITEM, 0, (LPARAM)&LvItem);
17011710
17021711 /* 日付/時刻 */