• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

ギコナビ


Commit MetaInfo

Revisionb7c226108fead3d5e914be8fed6ce2815f32e061 (tree)
Time2006-12-31 13:23:28
Authorh677 <h677>
Commiterh677

Log Message

HistoryListにメソッドを移動

Change Summary

Incremental Difference

--- a/Giko.pas
+++ b/Giko.pas
@@ -725,7 +725,6 @@ type
725725 procedure ShowBBSTree( inBBS : TBBS );
726726 procedure ShowBBSTreeOld( inBBS : TBBS );
727727 procedure ShowHistoryTree;
728- procedure SetHistoryTreeNode;
729728 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
730729 procedure SetBrowserTabState;
731730 procedure SetToolBarPopup;
@@ -848,8 +847,6 @@ const
848847 DandD_THRESHOLD = 5; //D&D‚Ì臒lipixcel)
849848 //ƒvƒŒƒrƒ…[ƒtƒ@ƒCƒ‹–¼
850849 HTML_FILE_NAME = 'temp_preview.html';
851- ITEM_ICON_THREADLOG1 = 6; //ƒXƒŒƒAƒCƒRƒ“iƒƒO‚ ‚èj
852- ITEM_ICON_THREADLOG2 = 7; //ƒXƒŒƒAƒCƒRƒ“iƒƒO‚ ‚èj
853850 //ƒƒbƒZ[ƒWID
854851 USER_TREECLICK = WM_USER + 2000;
855852 USER_RESIZED = WM_USER + 2001;
@@ -3182,43 +3179,11 @@ begin
31823179 FTreeType := gttHistory;
31833180 HistoryToolBar.Show;
31843181 FavoriteToolBar.Hide;
3185- SetHistoryTreeNode;
3182+ FHistoryList.SetTreeNode( TreeView );
31863183 CabinetSelectToolButton.Caption := '—š—ðƒŠƒXƒg';
31873184 end;
31883185 end;
31893186
3190-procedure TGikoForm.SetHistoryTreeNode;
3191-var
3192- i: Integer;
3193- Node: TTreeNode;
3194- Item: TFavoriteThreadItem;
3195-begin
3196- TreeView.Items.BeginUpdate;
3197- try
3198- TreeView.Items.Clear;
3199- for i := 0 to FHistoryList.Count - 1 do begin
3200- Item := TFavoriteThreadItem(FHistoryList[i]);
3201- Node := TreeView.Items.Add(nil, Item.Title);
3202- {
3203- if Item.Item.NewArrival then begin
3204- Node.ImageIndex := ITEM_ICON_THREADNEW1;
3205- Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3206- end else begin
3207- Node.ImageIndex := ITEM_ICON_THREADLOG1;
3208- Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3209- end;
3210- }
3211- // •‰‰×‚ð‚©‚¯‚½‚­‚È‚¢‚Ì‚Å NewArrival ‚̃`ƒFƒbƒN‚ðs‚í‚È‚¢
3212- // ¦Item.Item ƒvƒƒpƒeƒB‚Í dat ‚̓ǂݍž‚Ý‚ð•K—v‚Æ‚·‚é
3213- Node.ImageIndex := ITEM_ICON_THREADLOG1;
3214- Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3215- Node.Data := Item;
3216- end;
3217- finally
3218- TreeView.Items.EndUpdate;
3219- end;
3220-end;
3221-
32223187 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
32233188 var
32243189 ChangeEvent: TTVChangedEvent;
--- a/HistoryList.pas
+++ b/HistoryList.pas
@@ -19,6 +19,8 @@ type
1919 procedure SaveToFile(const FileName: String);
2020 procedure LoadFromFile(const FileName: String;
2121 TreeView : TTreeView; TreeType: TGikoTreeType);
22+ procedure SetTreeNode( TreeView : TTreeView );
23+
2224 end;
2325
2426
@@ -223,5 +225,37 @@ begin
223225 {$ENDIF}
224226
225227 end;
228+procedure THistoryList.SetTreeNode(
229+ TreeView : TTreeView );
230+var
231+ i: Integer;
232+ Node: TTreeNode;
233+ Item: TFavoriteThreadItem;
234+begin
235+ TreeView.Items.BeginUpdate;
236+ try
237+ TreeView.Items.Clear;
238+ for i := 0 to Self.Count - 1 do begin
239+ Item := TFavoriteThreadItem(Self[i]);
240+ Node := TreeView.Items.Add(nil, Item.Title);
241+ {
242+ if Item.Item.NewArrival then begin
243+ Node.ImageIndex := ITEM_ICON_THREADNEW1;
244+ Node.SelectedIndex := ITEM_ICON_THREADNEW2;
245+ end else begin
246+ Node.ImageIndex := ITEM_ICON_THREADLOG1;
247+ Node.SelectedIndex := ITEM_ICON_THREADLOG2;
248+ end;
249+ }
250+ // •‰‰×‚ð‚©‚¯‚½‚­‚È‚¢‚Ì‚Å NewArrival ‚̃`ƒFƒbƒN‚ðs‚í‚È‚¢
251+ // ¦Item.Item ƒvƒƒpƒeƒB‚Í dat ‚̓ǂݍž‚Ý‚ð•K—v‚Æ‚·‚é
252+ Node.ImageIndex := ITEM_ICON_THREADLOG1;
253+ Node.SelectedIndex := ITEM_ICON_THREADLOG2;
254+ Node.Data := Item;
255+ end;
256+ finally
257+ TreeView.Items.EndUpdate;
258+ end;
259+end;
226260
227261 end.