| 145 |
|
|
| 146 |
function TFavoriteThreadItem.GetItem : TThreadItem; |
function TFavoriteThreadItem.GetItem : TThreadItem; |
| 147 |
var |
var |
|
threadItem : TThreadItem; |
|
| 148 |
board : TBoard; |
board : TBoard; |
| 149 |
boardURL : string; |
boardURL : string; |
|
i : Integer; |
|
| 150 |
begin |
begin |
| 151 |
|
|
| 152 |
if FItem = nil then begin |
if FItem = nil then begin |
| 265 |
procedure TFavoriteDM.ReadNode(Node: IXMLNode); |
procedure TFavoriteDM.ReadNode(Node: IXMLNode); |
| 266 |
var |
var |
| 267 |
i: Integer; |
i: Integer; |
|
j, jBound : Integer; |
|
| 268 |
|
|
| 269 |
ParentNode: TTreeNode; |
ParentNode: TTreeNode; |
| 270 |
CurrentNode: TTreeNode; |
CurrentNode: TTreeNode; |
| 273 |
FavThread: TFavoriteThreadItem; |
FavThread: TFavoriteThreadItem; |
| 274 |
board : TBoard; |
board : TBoard; |
| 275 |
threadItem : TThreadItem; |
threadItem : TThreadItem; |
|
url : string; |
|
| 276 |
begin |
begin |
| 277 |
if Node.NodeName = 'folder' then begin |
if Node.NodeName = 'folder' then begin |
| 278 |
ParentNode := FStack.Peek; |
ParentNode := FStack.Peek; |
| 294 |
ParentNode := FStack.Peek; |
ParentNode := FStack.Peek; |
| 295 |
if TObject(ParentNode.Data) is TFavoriteFolder then begin |
if TObject(ParentNode.Data) is TFavoriteFolder then begin |
| 296 |
if Node.Attributes['favtype'] = 'board' then begin |
if Node.Attributes['favtype'] = 'board' then begin |
| 297 |
|
FavBoard := nil; |
| 298 |
// 旧式のお気に入りとの互換性のため |
// 旧式のお気に入りとの互換性のため |
| 299 |
if Length( Node.Attributes[ 'bbs' ] ) > 0 then begin |
if Length( Node.Attributes[ 'bbs' ] ) > 0 then begin |
| 300 |
board := BBSsFindBoardFromBBSID( Node.Attributes[ 'bbs' ] ); |
board := BBSsFindBoardFromBBSID( Node.Attributes[ 'bbs' ] ); |
| 303 |
board.URL, Node.Attributes[ 'title' ], board ); |
board.URL, Node.Attributes[ 'title' ], board ); |
| 304 |
end else begin |
end else begin |
| 305 |
FavBoard := TFavoriteBoardItem.Create( |
FavBoard := TFavoriteBoardItem.Create( |
| 306 |
Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], board ); |
Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil ); |
| 307 |
end; |
end; |
| 308 |
CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavBoard); |
CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavBoard); |
| 309 |
CurrentNode.ImageIndex := 15; |
CurrentNode.ImageIndex := 15; |
| 329 |
threadItem.URL, Node.Attributes[ 'title' ], threadItem ); |
threadItem.URL, Node.Attributes[ 'title' ], threadItem ); |
| 330 |
end else begin |
end else begin |
| 331 |
FavThread := TFavoriteThreadItem.Create( |
FavThread := TFavoriteThreadItem.Create( |
| 332 |
Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], threadItem ); |
Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil ); |
| 333 |
end; |
end; |
| 334 |
CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavThread); |
CurrentNode := FTreeView.Items.AddChildObject(ParentNode, Node.Attributes['title'], FavThread); |
| 335 |
CurrentNode.ImageIndex := 16; |
CurrentNode.ImageIndex := 16; |