| 1255 |
|
|
| 1256 |
uses |
uses |
| 1257 |
About, Option, Round, Splash, Sort, ListSelect, Imm, |
About, Option, Round, Splash, Sort, ListSelect, Imm, |
| 1258 |
NewBoard, MojuUtils, Clipbrd, GikoBayesian; |
NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter; |
| 1259 |
|
|
| 1260 |
const |
const |
| 1261 |
CAPTION_NAME: string = 'ギコナビ'; |
CAPTION_NAME: string = 'ギコナビ'; |
| 1523 |
// 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと) |
// 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと) |
| 1524 |
InitializeBoardPlugIns; |
InitializeBoardPlugIns; |
| 1525 |
|
|
| 1526 |
//巡回データ読み込み |
{ //巡回データ読み込み |
| 1527 |
RoundList := TRoundList.Create; |
RoundList := TRoundList.Create; |
| 1528 |
RoundList.LoadRoundBoardFile; |
RoundList.LoadRoundBoardFile; |
| 1529 |
|
} |
| 1530 |
// ボードファイル列挙(ReadFavorite より先に行うこと) |
// ボードファイル列挙(ReadFavorite より先に行うこと) |
| 1531 |
GikoSys.ListBoardFile; |
GikoSys.ListBoardFile; |
| 1532 |
|
|
| 1533 |
RoundList.LoadRoundThreadFile; |
{ RoundList.LoadRoundThreadFile; |
| 1534 |
|
|
| 1535 |
if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then |
if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then |
| 1536 |
GikoSys.ListBoardFile; |
GikoSys.ListBoardFile; |
| 1537 |
|
} |
| 1538 |
|
|
| 1539 |
// メニューに追加 |
// メニューに追加 |
| 1540 |
SetBBSMenu; |
SetBBSMenu; |
| 1758 |
FIsIgnoreResize := rtResizing; |
FIsIgnoreResize := rtResizing; |
| 1759 |
|
|
| 1760 |
|
|
| 1761 |
|
// すべてのBBSを読み込んでおく |
| 1762 |
|
for i := Length(BBSs) - 1 downto 0 do begin |
| 1763 |
|
if not BBSs[i].IsBoardFileRead then |
| 1764 |
|
GikoSys.ReadBoardFile(BBSs[i]); |
| 1765 |
|
|
| 1766 |
|
if SplashWindow <> nil then begin |
| 1767 |
|
SplashWindow.ProgressBar.StepBy(20); |
| 1768 |
|
Application.ProcessMessages; |
| 1769 |
|
end; |
| 1770 |
|
end; |
| 1771 |
|
|
| 1772 |
|
//巡回データ読み込み |
| 1773 |
|
RoundList := TRoundList.Create; |
| 1774 |
|
RoundList.LoadRoundBoardFile; |
| 1775 |
|
RoundList.LoadRoundThreadFile; |
| 1776 |
|
|
| 1777 |
|
//if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then |
| 1778 |
|
// GikoSys.ListBoardFile; |
| 1779 |
|
|
| 1780 |
//引数があったらスレを開く(未取得ならダウンロード) |
//引数があったらスレを開く(未取得ならダウンロード) |
| 1781 |
for i := 1 to ParamCount do begin |
for i := 1 to ParamCount do begin |
| 1782 |
MoveToURL(ParamStr(i)); |
MoveToURL(ParamStr(i)); |
| 1811 |
if GikoSys.Setting.GestureEnabled then |
if GikoSys.Setting.GestureEnabled then |
| 1812 |
MouseGesture.SetHook( Handle ); |
MouseGesture.SetHook( Handle ); |
| 1813 |
|
|
| 1814 |
//2ch言語読み出し |
//2ch言語読み出し |
| 1815 |
GikoSys.Setting.SetMessages; |
GikoSys.Setting.SetMessages; |
| 1816 |
{ |
{ |
| 1817 |
//2ch言語読み出し |
//2ch言語読み出し |
| 2198 |
// TBBS は保持している TCategory, TBoard, TThreadItem すべてを開放する |
// TBBS は保持している TCategory, TBoard, TThreadItem すべてを開放する |
| 2199 |
// TBoard, TThreadItem のデストラクタはプラグインに破棄を伝えるので |
// TBoard, TThreadItem のデストラクタはプラグインに破棄を伝えるので |
| 2200 |
// BoardPluteIns の開放より先に行うこと |
// BoardPluteIns の開放より先に行うこと |
| 2201 |
|
for i := Length(BoardGroups) - 1 downto 0 do begin |
| 2202 |
|
BoardGroups[i].Clear; |
| 2203 |
|
end; |
| 2204 |
|
|
| 2205 |
try |
try |
| 2206 |
for i := Length( BBSs ) - 1 downto 0 do begin |
for i := Length( BBSs ) - 1 downto 0 do begin |
| 2207 |
if BBSs[ i ] <> nil then |
if BBSs[ i ] <> nil then |
| 2211 |
except |
except |
| 2212 |
end; |
end; |
| 2213 |
|
|
| 2214 |
|
|
| 2215 |
try |
try |
| 2216 |
for i := Length( BoardPlugIns ) - 1 downto 0 do begin |
for i := Length( BoardPlugIns ) - 1 downto 0 do begin |
| 2217 |
if BoardPlugIns[ i ] <> nil then |
if BoardPlugIns[ i ] <> nil then |
| 2319 |
ActiveList := nil; |
ActiveList := nil; |
| 2320 |
|
|
| 2321 |
FTreeType := gttNone; |
FTreeType := gttNone; |
| 2322 |
GikoSys.FBoardURLList.Clear; |
//GikoSys.FBoardURLList.Clear; |
| 2323 |
|
for i := Length(BoardGroups) - 1 downto 0 do begin |
| 2324 |
|
BoardGroups[i].Clear; |
| 2325 |
|
end; |
| 2326 |
GikoSys.ListBoardFile; //ボードファイル読込 |
GikoSys.ListBoardFile; //ボードファイル読込 |
| 2327 |
|
|
| 2328 |
// BBS メニューの更新 |
// BBS メニューの更新 |
| 2342 |
|
|
| 2343 |
SetLinkBar; |
SetLinkBar; |
| 2344 |
|
|
| 2345 |
|
// すべてのBBSを読み込んでおく |
| 2346 |
|
for i := Length(BBSs) - 1 downto 0 do begin |
| 2347 |
|
if not BBSs[i].IsBoardFileRead then |
| 2348 |
|
GikoSys.ReadBoardFile(BBSs[i]); |
| 2349 |
|
end; |
| 2350 |
|
|
| 2351 |
|
//巡回リスト保存&破棄 |
| 2352 |
|
try |
| 2353 |
|
RoundList.SaveRoundFile; |
| 2354 |
|
except |
| 2355 |
|
end; |
| 2356 |
|
try |
| 2357 |
|
RoundList.Clear; |
| 2358 |
|
except |
| 2359 |
|
end; |
| 2360 |
|
RoundList.LoadRoundBoardFile; |
| 2361 |
|
RoundList.LoadRoundThreadFile; |
| 2362 |
|
|
| 2363 |
// |
// |
| 2364 |
TabsOpenAction.Execute; |
TabsOpenAction.Execute; |
| 2365 |
end; |
end; |
| 2385 |
GikoSys.ReadBoardFile( inBBS ); |
GikoSys.ReadBoardFile( inBBS ); |
| 2386 |
try |
try |
| 2387 |
if SplashWindow <> nil then |
if SplashWindow <> nil then |
| 2388 |
SplashWindow.ProgressBar.Max := inBBS.Count; |
//SplashWindow.ProgressBar.Max := inBBS.Count; |
| 2389 |
|
SplashWindow.ProgressBar.Max := inBBS.Count + Length(BBSs) * 20; |
| 2390 |
except |
except |
| 2391 |
end; |
end; |
| 2392 |
|
|
| 2555 |
ListView.Items.Clear; |
ListView.Items.Clear; |
| 2556 |
ListView.Items.Count := Category.Count; |
ListView.Items.Count := Category.Count; |
| 2557 |
|
|
| 2558 |
|
for i := Category.Count - 1 downto 0 do begin |
| 2559 |
|
if( Category.Items[i].ParentCategory <> Category ) then begin |
| 2560 |
|
Category.Items[i].ParentCategory := Category; |
| 2561 |
|
Category.Items[i].No := i + 1; |
| 2562 |
|
end; |
| 2563 |
|
end; |
| 2564 |
// UpFolderAction.Enabled := True; |
// UpFolderAction.Enabled := True; |
| 2565 |
// AllItemAction.Enabled := False; |
// AllItemAction.Enabled := False; |
| 2566 |
// LogItemAction.Enabled := False; |
// LogItemAction.Enabled := False; |
| 2633 |
ListView.Items.Count := 0; |
ListView.Items.Count := 0; |
| 2634 |
ListView.Items.Clear; |
ListView.Items.Clear; |
| 2635 |
|
|
| 2636 |
case GikoForm.ViewType of |
{case GikoForm.ViewType of |
| 2637 |
gvtAll: ListView.Items.Count := Board.Count; |
gvtAll: ListView.Items.Count := Board.Count; |
| 2638 |
gvtLog: ListView.Items.Count := Board.GetLogThreadCount; |
gvtLog: ListView.Items.Count := Board.GetLogThreadCount; |
| 2639 |
gvtNew: ListView.Items.Count := Board.GetNewThreadCount; |
gvtNew: ListView.Items.Count := Board.GetNewThreadCount; |
| 2640 |
gvtUser: ListView.Items.Count := Board.GetUserThreadCount; |
gvtUser: ListView.Items.Count := Board.GetUserThreadCount; |
| 2641 |
end; |
end; |
| 2642 |
|
} |
| 2643 |
|
|
| 2644 |
|
Board.LogThreadCount := Board.GetLogThreadCount; |
| 2645 |
|
Board.NewThreadCount := Board.GetNewThreadCount; |
| 2646 |
|
Board.UserThreadCount:= Board.GetUserThreadCount; |
| 2647 |
|
|
| 2648 |
|
case GikoForm.ViewType of |
| 2649 |
|
gvtAll: ListView.Items.Count := Board.Count; |
| 2650 |
|
gvtLog: ListView.Items.Count := Board.LogThreadCount; |
| 2651 |
|
gvtNew: ListView.Items.Count := Board.NewThreadCount; |
| 2652 |
|
gvtUser: ListView.Items.Count := Board.UserThreadCount; |
| 2653 |
|
end; |
| 2654 |
|
|
| 2655 |
ListNameLabel.Caption := Board.Title; |
ListNameLabel.Caption := Board.Title; |
| 2656 |
FolderImage.Picture := nil; |
FolderImage.Picture := nil; |
| 2734 |
|
|
| 2735 |
if ListNumberVisibleAction.Checked then |
if ListNumberVisibleAction.Checked then |
| 2736 |
Item.Caption := IntToStr(Board.No) + ': ' + Board.Title |
Item.Caption := IntToStr(Board.No) + ': ' + Board.Title |
| 2737 |
|
//Item.Caption := IntToStr(Item.Index + 1) + ': ' + Board.Title |
| 2738 |
else |
else |
| 2739 |
Item.Caption := Board.Title; |
Item.Caption := Board.Title; |
| 2740 |
|
|
| 2783 |
else |
else |
| 2784 |
ListView.StateImages := nil; |
ListView.StateImages := nil; |
| 2785 |
|
|
| 2786 |
|
|
| 2787 |
|
case GikoForm.ViewType of |
| 2788 |
|
gvtAll: BoardCnt := Board.Count; |
| 2789 |
|
gvtLog: BoardCnt := Board.LogThreadCount; |
| 2790 |
|
gvtNew: BoardCnt := Board.NewThreadCount; |
| 2791 |
|
gvtUser: BoardCnt := Board.UserThreadCount; |
| 2792 |
|
else |
| 2793 |
|
BoardCnt := 0; |
| 2794 |
|
end; |
| 2795 |
|
{ |
| 2796 |
case GikoForm.ViewType of |
case GikoForm.ViewType of |
| 2797 |
gvtAll: BoardCnt := Board.Count; |
gvtAll: BoardCnt := Board.Count; |
| 2798 |
gvtLog: BoardCnt := Board.GetLogThreadCount; |
gvtLog: BoardCnt := Board.GetLogThreadCount; |
| 2801 |
else |
else |
| 2802 |
BoardCnt := 0; |
BoardCnt := 0; |
| 2803 |
end; |
end; |
| 2804 |
|
} |
| 2805 |
// if Board = nil then Exit; |
// if Board = nil then Exit; |
| 2806 |
if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt) |
if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt) |
| 2807 |
or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit; |
or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit; |
|
//if Item = nil then Exit; |
|
|
//if Item.Index > BoardCnt then Exit; |
|
|
//if ListView.Items.Count = 0 then Exit; |
|
|
|
|
|
// if not (Board.Items[Item.Index] is TThreadItem) then Exit; |
|
| 2808 |
|
|
| 2809 |
|
//改善すべきブロック///////////////////////////////////////////////////// |
| 2810 |
ThreadItem := nil; |
ThreadItem := nil; |
| 2811 |
case GikoForm.ViewType of |
case GikoForm.ViewType of |
| 2812 |
gvtAll: if Item.Index >= Board.Count then Exit else |
gvtAll: if Item.Index >= Board.Count then Exit else |
| 2813 |
ThreadItem := TThreadItem(Board.Items[Item.Index]); |
ThreadItem := TThreadItem(Board.Items[Item.Index]); |
| 2814 |
gvtLog: ThreadItem := Board.GetLogThread(Item.Index); |
gvtLog: ThreadItem := Board.GetLogThread(Item.Index); |
| 2815 |
gvtNew: ThreadItem := Board.GetNewThread(Item.Index); |
gvtNew: ThreadItem := Board.GetNewThread(Item.Index); |
| 2816 |
gvtUser: ThreadItem := Board.GetUserThread(Item.Index); |
gvtUser: ThreadItem := Board.GetUserThread(Item.Index); |
| 2817 |
end; |
end; |
| 2818 |
|
////////////////////////////////////////////////////////////////////////// |
| 2819 |
|
|
| 2820 |
if ThreadItem = nil then Exit; |
if ThreadItem = nil then Exit; |
| 2821 |
|
|
|
// if ListNumberVisibleAction.Checked then |
|
|
// RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title |
|
|
// else |
|
|
//RepStr := ThreadItem.Title; |
|
| 2822 |
RepStr := CustomStringReplace(ThreadItem.Title, '<', '<' ); |
RepStr := CustomStringReplace(ThreadItem.Title, '<', '<' ); |
| 2823 |
RepStr := CustomStringReplace(RepStr, '>', '>' ); |
RepStr := CustomStringReplace(RepStr, '>', '>' ); |
| 2824 |
RepStr := CustomStringReplace(RepStr, '"', '"' ); |
RepStr := CustomStringReplace(RepStr, '"', '"' ); |
| 2825 |
RepStr := CustomStringReplace(RepStr, '&', '&' ); |
RepStr := CustomStringReplace(RepStr, '&', '&' ); |
| 2826 |
//RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]); |
//RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]); |
|
|
|
| 2827 |
if Item.SubItems.Count <> ListView.Columns.Count then begin |
if Item.SubItems.Count <> ListView.Columns.Count then begin |
| 2828 |
Item.SubItems.Clear; |
Item.SubItems.Clear; |
| 2829 |
Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count; |
Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count; |
| 2900 |
end; |
end; |
| 2901 |
Inc( idx ); |
Inc( idx ); |
| 2902 |
end; |
end; |
| 2903 |
|
|
| 2904 |
if ThreadItem.NewArrival then |
if ThreadItem.NewArrival then |
| 2905 |
Item.ImageIndex := ITEM_ICON_THREADNEW1 |
Item.ImageIndex := ITEM_ICON_THREADNEW1 |
| 2906 |
else |
else |
| 2941 |
else |
else |
| 2942 |
Item.ImageIndex := ITEM_ICON_THREAD1; |
Item.ImageIndex := ITEM_ICON_THREAD1; |
| 2943 |
end; |
end; |
| 2944 |
|
|
| 2945 |
Item.Data := ThreadItem; |
Item.Data := ThreadItem; |
| 2946 |
|
|
| 2947 |
end; |
end; |
| 3068 |
end; |
end; |
| 3069 |
end else begin |
end else begin |
| 3070 |
threadItem := GetActiveContent; |
threadItem := GetActiveContent; |
| 3071 |
URL := GetRespopupURL(Text, threadItem.URL); |
URL := GetRespopupURL(Text, threadItem.URL); |
| 3072 |
PathRec := Gikosys.Parse2chURL2(URL); |
PathRec := Gikosys.Parse2chURL2(URL); |
| 3073 |
if (PathRec.FNoParam) then begin |
if (PathRec.FNoParam) then begin |
| 3074 |
PathRec.FSt := 1; |
PathRec.FSt := 1; |
| 3468 |
end else if TObject(TreeView.Items[i].Data) is TBoard then begin |
end else if TObject(TreeView.Items[i].Data) is TBoard then begin |
| 3469 |
IsBoardNode := True; |
IsBoardNode := True; |
| 3470 |
Board := TBoard(TreeView.Items[i].Data); |
Board := TBoard(TreeView.Items[i].Data); |
| 3471 |
|
|
| 3472 |
Cnt := Board.UnRead; |
Cnt := Board.UnRead; |
| 3473 |
if Cnt <= 0 then |
if Cnt <= 0 then |
| 3474 |
continue; |
continue; |
| 3597 |
else |
else |
| 3598 |
ATitle := Item.ThreadItem.Title; |
ATitle := Item.ThreadItem.Title; |
| 3599 |
if ATitle = '' then |
if ATitle = '' then |
| 3600 |
ATitle := GikoSys.Setting.GetMessage(Ord(gmUnKnown)); |
ATitle := GikoSys.Setting.GetMessage(Ord(gmUnKnown)); |
| 3601 |
|
|
| 3602 |
if Item.State in [gdsComplete, gdsDiffComplete] then begin |
if Item.State in [gdsComplete, gdsDiffComplete] then begin |
| 3603 |
//正常終了 |
//正常終了 |
| 3604 |
if Item.DownType = gdtBoard then begin |
if Item.DownType = gdtBoard then begin |
| 3605 |
//板 |
//板 |
| 3606 |
Item.SaveListFile; |
Item.SaveListFile; |
| 3607 |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureItiran)), nil, gmiOK); |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureItiran)), nil, gmiOK); |
| 3608 |
if GetActiveList = Item.Board then begin |
if GetActiveList = Item.Board then begin |
| 3609 |
FActiveList := nil; |
FActiveList := nil; |
| 3610 |
SetActiveList(Item.Board); |
SetActiveList(Item.Board); |
| 3611 |
end; |
end; |
| 3616 |
//スレ |
//スレ |
| 3617 |
Item.SaveItemFile; |
Item.SaveItemFile; |
| 3618 |
Item.ThreadItem.NewArrival := True; |
Item.ThreadItem.NewArrival := True; |
| 3619 |
if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin |
//if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin |
| 3620 |
boardPlugIn := Item.ThreadItem.BoardPlugIn; |
if (Item.ThreadItem.ParentBoard.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin |
| 3621 |
|
//boardPlugIn := Item.ThreadItem.BoardPlugIn; |
| 3622 |
|
boardPlugIn := Item.ThreadItem.ParentBoard.BoardPlugIn; |
| 3623 |
Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle; |
Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle; |
| 3624 |
ATitle := Item.ThreadItem.Title; |
ATitle := Item.ThreadItem.Title; |
| 3625 |
end else if ATitle = '(名称不明)' then begin |
end else if ATitle = '(名称不明)' then begin |
| 3644 |
end; |
end; |
| 3645 |
end else begin |
end else begin |
| 3646 |
if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then |
if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then |
| 3647 |
InsertBrowserTab(Item.ThreadItem); |
InsertBrowserTab(Item.ThreadItem); |
| 3648 |
end; |
end; |
| 3649 |
|
|
| 3650 |
Application.ProcessMessages; |
Application.ProcessMessages; |
| 3651 |
|
|
| 3652 |
if Item.State = gdsComplete then begin |
if Item.State = gdsComplete then begin |
| 3653 |
PlaySound('New'); |
PlaySound('New'); |
| 3654 |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK); |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK); |
| 3655 |
//Add by Genyakun |
//Add by Genyakun |
| 3656 |
DiffComp := True; |
DiffComp := True; |
| 3657 |
end else begin |
end else begin |
| 3658 |
PlaySound('NewDiff'); |
PlaySound('NewDiff'); |
| 3659 |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureDiff)), nil, gmiOK); |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureDiff)), nil, gmiOK); |
| 3660 |
//Add by Genyakun |
//Add by Genyakun |
| 3661 |
DiffComp := True; |
DiffComp := True; |
| 3662 |
end; |
end; |
| 3663 |
|
|
| 3664 |
//巡回ありの場合&1000超は巡回削除 |
//巡回ありの場合&1000超は巡回削除 |
| 3665 |
if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin |
if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin |
| 3666 |
Item.ThreadItem.Round := False; |
Item.ThreadItem.Round := False; |
| 3667 |
Item.ThreadItem.RoundName := ''; |
//Item.ThreadItem.RoundName := ''; |
| 3668 |
AddMessageList('★1000発言を超えたので巡回を削除しました - [' + Item.ThreadItem.Title + ']', nil, gmiOK); |
AddMessageList('★1000発言を超えたので巡回を削除しました - [' + Item.ThreadItem.Title + ']', nil, gmiOK); |
| 3669 |
end; |
end; |
|
|
|
| 3670 |
TreeView.Refresh; |
TreeView.Refresh; |
| 3671 |
|
//ListViewでこのスレが含まれる板を表示しているときの更新処理 |
| 3672 |
|
if (ActiveList <> nil) and (ActiveList is TBoard) then begin |
| 3673 |
|
TBoard(ActiveList).LogThreadCount := TBoard(ActiveList).GetLogThreadCount; |
| 3674 |
|
TBoard(ActiveList).NewThreadCount := TBoard(ActiveList).GetNewThreadCount; |
| 3675 |
|
TBoard(ActiveList).UserThreadCount:= TBoard(ActiveList).GetUserThreadCount; |
| 3676 |
|
//ListViewのアイテムの個数も更新 |
| 3677 |
|
case GikoForm.ViewType of |
| 3678 |
|
gvtAll: ListView.Items.Count := TBoard(ActiveList).Count; |
| 3679 |
|
gvtLog: ListView.Items.Count := TBoard(ActiveList).LogThreadCount; |
| 3680 |
|
gvtNew: ListView.Items.Count := TBoard(ActiveList).NewThreadCount; |
| 3681 |
|
gvtUser: ListView.Items.Count := TBoard(ActiveList).UserThreadCount; |
| 3682 |
|
end; |
| 3683 |
|
end; |
| 3684 |
end; |
end; |
| 3685 |
ListView.Refresh; |
ListView.Refresh; |
| 3686 |
end else if Item.State = gdsNotModify then begin |
end else if Item.State = gdsNotModify then begin |
| 3689 |
//SetContent(Item.ThreadItem); |
//SetContent(Item.ThreadItem); |
| 3690 |
InsertBrowserTab(Item.ThreadItem); |
InsertBrowserTab(Item.ThreadItem); |
| 3691 |
end;} |
end;} |
| 3692 |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmNotMod)), nil, gmiSAD); |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmNotMod)), nil, gmiSAD); |
| 3693 |
PlaySound('NoChange'); |
PlaySound('NoChange'); |
| 3694 |
Screen.Cursor := crDefault; |
Screen.Cursor := crDefault; |
| 3695 |
end else if Item.State = gdsAbort then begin |
end else if Item.State = gdsAbort then begin |
| 3696 |
//中断 |
//中断 |
| 3697 |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiOK); |
AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmAbort)), nil, gmiOK); |
| 3698 |
end else if Item.State = gdsError then begin |
end else if Item.State = gdsError then begin |
| 3699 |
//エラー |
//エラー |
| 3700 |
s := Item.ErrText; |
s := Item.ErrText; |
| 3920 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
| 3921 |
Thread: TBrowserRecord; |
Thread: TBrowserRecord; |
| 3922 |
ThreadTitle, ThreadPTitle: string; |
ThreadTitle, ThreadPTitle: string; |
| 3923 |
ThreadScrollTop: Integer; |
//ThreadScrollTop: Integer; |
| 3924 |
ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean; |
ThreadIsLog, {ThreadUnRead,} ThreadNewArraical: boolean; |
| 3925 |
begin |
begin |
| 3926 |
// AddMessageList('SetContent', nil, gmiWhat); |
// AddMessageList('SetContent', nil, gmiWhat); |
| 3927 |
Thread := inThread; |
Thread := inThread; |
| 3971 |
|
|
| 3972 |
ThreadTitle := Thread.Thread.Title; |
ThreadTitle := Thread.Thread.Title; |
| 3973 |
ThreadPTitle := Thread.Thread.ParentBoard.Title; |
ThreadPTitle := Thread.Thread.ParentBoard.Title; |
| 3974 |
ThreadScrollTop := Thread.Thread.ScrollTop; |
//ThreadScrollTop := Thread.Thread.ScrollTop; |
| 3975 |
ThreadIsLog := Thread.Thread.IsLogFile; |
ThreadIsLog := Thread.Thread.IsLogFile; |
| 3976 |
ThreadItem := Thread.Thread; |
ThreadItem := Thread.Thread; |
| 3977 |
ThreadNewArraical := Thread.Thread.NewArrival; |
ThreadNewArraical := Thread.Thread.NewArrival; |
| 3978 |
ThreadUnRead := Thread.Thread.UnRead; |
//ThreadUnRead := Thread.Thread.UnRead; |
| 3979 |
BBSID := ThreadItem.ParentBoard.BBSID; |
BBSID := ThreadItem.ParentBoard.BBSID; |
| 3980 |
FileName := ThreadItem.FileName; |
FileName := ThreadItem.FileName; |
| 3981 |
|
|
| 4153 |
ViewType := AViewType; |
ViewType := AViewType; |
| 4154 |
if ActiveList is TBoard then begin |
if ActiveList is TBoard then begin |
| 4155 |
Board := TBoard(ActiveList); |
Board := TBoard(ActiveList); |
| 4156 |
|
case ViewType of |
| 4157 |
|
//gvtAll: ListView.Items.Count := Board.Count; |
| 4158 |
|
gvtLog: Board.LogThreadCount := Board.GetLogThreadCount; |
| 4159 |
|
gvtNew: Board.NewThreadCount := Board.GetNewThreadCount; |
| 4160 |
|
gvtUser: Board.UserThreadCount:= Board.GetUserThreadCount; |
| 4161 |
|
end; |
| 4162 |
|
|
| 4163 |
SetActiveList(Board); |
SetActiveList(Board); |
| 4164 |
|
// |
| 4165 |
//SetThreadListItem(Board); //SetActiveList内で呼ばれるから2重に呼び出す必要なし |
//SetThreadListItem(Board); //SetActiveList内で呼ばれるから2重に呼び出す必要なし |
| 4166 |
end; |
end; |
| 4167 |
end; |
end; |
| 5380 |
//// if FTreeType = gtt2ch then |
//// if FTreeType = gtt2ch then |
| 5381 |
// SelectTreeNode(TBoard(GetActiveList).ParentCategory, True); |
// SelectTreeNode(TBoard(GetActiveList).ParentCategory, True); |
| 5382 |
// //SetActiveList(TBoard(GetActiveList).ParentCategory); |
// //SetActiveList(TBoard(GetActiveList).ParentCategory); |
| 5383 |
if TreeView.Selected <> nil then begin |
//if TreeView.Selected <> nil then begin |
| 5384 |
if TObject(TreeView.Selected.Parent.Data) is TCategory then |
// if TObject(TreeView.Selected.Parent.Data) is TCategory then |
| 5385 |
SelectTreeNode(TCategory(TreeView.Selected.Parent.Data), True); |
// SelectTreeNode(TCategory(TreeView.Selected.Parent.Data), True); |
| 5386 |
end; |
//end; |
| 5387 |
|
if TBoard(GetActiveList).ParentCategory <> nil then |
| 5388 |
|
SelectTreeNode(TBoard(GetActiveList).ParentCategory, True); |
| 5389 |
end else if GetActiveList is TCategory then begin |
end else if GetActiveList is TCategory then begin |
| 5390 |
// if FTreeType = gtt2ch then |
// if FTreeType = gtt2ch then |
| 5391 |
SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True); |
SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True); |
| 6950 |
Dlg.ShowModal; |
Dlg.ShowModal; |
| 6951 |
if Dlg.ModalResult <> mrCancel then begin |
if Dlg.ModalResult <> mrCancel then begin |
| 6952 |
s := Trim(Dlg.RoundNameEdit.Text); |
s := Trim(Dlg.RoundNameEdit.Text); |
| 6953 |
RoundList.RoundNameList.Add(s); |
//RoundList.RoundNameList.Add(s); |
| 6954 |
SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name); |
SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name); |
| 6955 |
ListView.Refresh; |
ListView.Refresh; |
| 6956 |
end; |
end; |
| 6967 |
end else begin |
end else begin |
| 6968 |
threadItem := GetActiveContent; |
threadItem := GetActiveContent; |
| 6969 |
if threadItem <> nil then begin |
if threadItem <> nil then begin |
| 6970 |
threadItem.RoundName := RoundName; |
threadItem.RoundName := RoundName; |
| 6971 |
threadItem.Round := RoundFlag; |
threadItem.Round := RoundFlag; |
| 6972 |
end; |
end; |
| 6973 |
end; |
end; |
| 6974 |
end; |
end; |
| 7667 |
URL, protocol2, host2, path2, document2, port2, bookmark2 : string; |
URL, protocol2, host2, path2, document2, port2, bookmark2 : string; |
| 7668 |
tmp1, tmp2: string; |
tmp1, tmp2: string; |
| 7669 |
BBSID, BBSKey: string; |
BBSID, BBSKey: string; |
| 7670 |
tmpBoard, Board: TBoard; |
{tmpBoard,} Board: TBoard; |
| 7671 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
| 7672 |
i, bi : Integer; |
i, bi : Integer; |
| 7673 |
boardURL : string; |
boardURL : string; |
| 7698 |
//===== プラグイン |
//===== プラグイン |
| 7699 |
try |
try |
| 7700 |
//作業中// |
//作業中// |
| 7701 |
bi := High( BoardPlugIns ); |
//bi := High( BoardPlugIns ); |
| 7702 |
for i := Low( BoardPlugIns ) to bi do begin |
bi := Length(BoardGroups) - 1; |
| 7703 |
if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin |
//for i := Low( BoardPlugIns ) to bi do begin |
| 7704 |
case BoardPlugIns[ i ].AcceptURL( inURL ) of |
for i := 1 to bi do begin |
| 7705 |
|
//if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin |
| 7706 |
|
if (BoardGroups[i].BoardPlugIn <> nil) and (Assigned(Pointer(BoardGroups[i].BoardPlugIn.Module))) then begin |
| 7707 |
|
case BoardGroups[i].BoardPlugIn.AcceptURL( inURL ) of |
| 7708 |
atThread: |
atThread: |
| 7709 |
begin |
begin |
| 7710 |
tmpThread := TThreadItem.Create( BoardPlugIns[ i ], inURL ); |
boardURL := BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL ); |
| 7711 |
boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) ); |
Board := BBSsFindBoardFromURL( boardURL ); |
| 7712 |
Board := BBSsFindBoardFromURL( boardURL ); |
|
| 7713 |
|
|
| 7714 |
if Board = nil then begin |
if Board = nil then begin |
| 7715 |
//break; |
//break; |
| 7716 |
// ※作っても追加するところが無いので激しく保留 |
// ※作っても追加するところが無いので激しく保留 |
| 7717 |
//GikoSys.OpenBrowser(inURL, gbtUserApp); |
//GikoSys.OpenBrowser(inURL, gbtUserApp); |
| 7718 |
//Exit; |
//Exit; |
| 7722 |
ShowBBSTree( BBSs[ 1 ] ); |
ShowBBSTree( BBSs[ 1 ] ); |
| 7723 |
} |
} |
| 7724 |
end else begin |
end else begin |
| 7725 |
|
tmpThread := TThreadItem.Create( BoardGroups[i].BoardPlugIn, Board, inURL ); |
| 7726 |
if not Board.IsThreadDatRead then begin |
if not Board.IsThreadDatRead then begin |
| 7727 |
GikoSys.ReadSubjectFile( Board ); |
GikoSys.ReadSubjectFile( Board ); |
| 7728 |
|
tmpThread.Free; |
| 7729 |
Exit; |
Exit; |
| 7730 |
end; |
end; |
| 7731 |
ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName ); |
ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName ); |
| 7732 |
|
tmpThread.Free; |
| 7733 |
if ThreadItem = nil then begin |
if ThreadItem = nil then begin |
| 7734 |
ThreadItem := tmpThread; |
ThreadItem := tmpThread; |
| 7735 |
Board.Insert( 0, ThreadItem ); |
Board.Insert( 0, ThreadItem ); |
| 7744 |
DownloadContent( ThreadItem ); |
DownloadContent( ThreadItem ); |
| 7745 |
Exit; |
Exit; |
| 7746 |
end else begin |
end else begin |
|
tmpThread.Free; |
|
| 7747 |
GikoSys.GetPopupResNumber( inURL, stRes, edRes ); |
GikoSys.GetPopupResNumber( inURL, stRes, edRes ); |
| 7748 |
browserRec := InsertBrowserTab( ThreadItem ); |
browserRec := InsertBrowserTab( ThreadItem ); |
| 7749 |
if ThreadItem.IsLogFile then begin |
if ThreadItem.IsLogFile then begin |
| 7761 |
|
|
| 7762 |
atBoard: |
atBoard: |
| 7763 |
begin |
begin |
| 7764 |
tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL); |
Board := BBSsFindBoardFromURL( |
| 7765 |
Board := BBSsFindBoardFromURL( tmpBoard.URL ); |
BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL ) |
| 7766 |
tmpBoard.Free; |
); |
| 7767 |
if Board <> nil then begin |
if Board <> nil then begin |
| 7768 |
if FActiveBBS <> Board.ParentCategory.ParenTBBS then |
if FActiveBBS <> Board.ParentCategory.ParenTBBS then |
| 7769 |
ShowBBSTree( Board.ParentCategory.ParenTBBS ); |
ShowBBSTree( Board.ParentCategory.ParenTBBS ); |
| 7782 |
if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin |
if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin |
| 7783 |
boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL ); |
boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL ); |
| 7784 |
Board := BBSsFindBoardFromURL( boardURL ); |
Board := BBSsFindBoardFromURL( boardURL ); |
| 7785 |
if Board = nil then |
//if Board = nil then |
| 7786 |
Board := BBSsFindBoardFromBBSID( BBSID ); |
// Board := BBSsFindBoardFromBBSID( BBSID ); |
| 7787 |
|
|
| 7788 |
if Board = nil then begin |
if Board = nil then begin |
| 7789 |
// ※作っても追加するところが無いので激しく保留 |
// ※作っても追加するところが無いので激しく保留 |
| 7825 |
GikoSys.OpenBrowser(URL1, gbtIE) |
GikoSys.OpenBrowser(URL1, gbtIE) |
| 7826 |
else begin |
else begin |
| 7827 |
} |
} |
| 7828 |
ThreadItem := TThreadItem.Create( nil, URL ); |
ThreadItem := TThreadItem.Create( nil, Board, URL ); |
| 7829 |
ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat'); |
ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat'); |
| 7830 |
if AnsiPos(Host, Board.URL) = 0 then |
if AnsiPos(Host, Board.URL) = 0 then |
| 7831 |
ThreadItem.DownloadHost := Host |
ThreadItem.DownloadHost := Host |
| 8236 |
FHint.Title := ThreadItem.Title; |
FHint.Title := ThreadItem.Title; |
| 8237 |
|
|
| 8238 |
if ThreadItem <> nil then begin |
if ThreadItem <> nil then begin |
| 8239 |
if ThreadItem.IsBoardPlugInAvailable then begin |
//if ThreadItem.IsBoardPlugInAvailable then begin |
| 8240 |
|
if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin |
| 8241 |
//===== プラグインによる表示 |
//===== プラグインによる表示 |
| 8242 |
boardPlugIn := ThreadItem.BoardPlugIn; |
//boardPlugIn := ThreadItem.BoardPlugIn; |
| 8243 |
|
boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn; |
| 8244 |
|
|
| 8245 |
// フォントやサイズの設定 |
// フォントやサイズの設定 |
| 8246 |
// 文字コードはプラグインに任せる |
// 文字コードはプラグインに任せる |
| 10408 |
ThreadItem := GetActiveContent; |
ThreadItem := GetActiveContent; |
| 10409 |
|
|
| 10410 |
if ThreadItem <> nil then begin |
if ThreadItem <> nil then begin |
| 10411 |
if ThreadItem.IsBoardPlugInAvailable then begin |
//if ThreadItem.IsBoardPlugInAvailable then begin |
| 10412 |
|
if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin |
| 10413 |
//===== プラグインによる表示 |
//===== プラグインによる表示 |
| 10414 |
boardPlugIn := ThreadItem.BoardPlugIn; |
//boardPlugIn := ThreadItem.BoardPlugIn; |
| 10415 |
|
boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn; |
| 10416 |
|
|
| 10417 |
// フォントやサイズの設定 |
// フォントやサイズの設定 |
| 10418 |
// 文字コードはプラグインに任せる |
// 文字コードはプラグインに任せる |
| 10430 |
Header := CustomStringReplace(Header, '</b>', '',true); |
Header := CustomStringReplace(Header, '</b>', '',true); |
| 10431 |
Header := CustomStringReplace(Header, '<b>', '',true); |
Header := CustomStringReplace(Header, '<b>', '',true); |
| 10432 |
end; |
end; |
| 10433 |
if ThreadItem.IsBoardPlugInAvailable then begin |
//if ThreadItem.IsBoardPlugInAvailable then begin |
| 10434 |
|
if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin |
| 10435 |
Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true); |
Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true); |
| 10436 |
Body := CustomStringReplace(Body, '<br>', #13#10,true); |
Body := CustomStringReplace(Body, '<br>', #13#10,true); |
| 10437 |
end else begin |
end else begin |
| 12088 |
msg : String; |
msg : String; |
| 12089 |
ReadList : TStringList; |
ReadList : TStringList; |
| 12090 |
wordCount : TWordCount; |
wordCount : TWordCount; |
| 12091 |
i : Integer; |
{i : Integer;} |
| 12092 |
begin |
begin |
| 12093 |
IndividualForm := TIndividualAbonForm.Create(Self); |
IndividualForm := TIndividualAbonForm.Create(Self); |
| 12094 |
try |
try |