• R/O
  • HTTP
  • SSH
  • HTTPS

gikonavi: Commit


Commit MetaInfo

Revision282ca5d14050f59f77b222db7e4eba1f2858d3af (tree)
Time2005-12-28 02:13:05
Authorcvs2git <cvs2git>
Commitercvs2git

Log Message

This commit was manufactured by cvs2svn to create tag 'v1_51_0_632'.

Change Summary

Incremental Difference

--- a/Editor.pas
+++ b/Editor.pas
@@ -967,7 +967,7 @@ begin
967967 if MsgResult = IDNO then begin
968968 Board.SPID := '';
969969 Board.PON := '';
970- FWork := false;
970+ FWork := false;
971971 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
972972 DrawMenuBar(Handle);
973973 Exit;
@@ -976,7 +976,7 @@ begin
976976 end;
977977
978978 if ResultType = grtOK then begin
979- if (GikoSys.Setting.UseSamba) and (Timer1.Enabled) then
979+ if GikoSys.Setting.UseSamba then
980980 WriteSambaTime(FHost, Now());
981981 State := gdsComplete;
982982 end else if ResultType = grtCookie then begin
@@ -1045,8 +1045,8 @@ begin
10451045 Exit;
10461046 end;
10471047 end else begin
1048- if (GikoSys.Setting.UseSamba) and (Timer1.Enabled) then
1049- WriteSambaTime(FHost, Now());
1048+ if GikoSys.Setting.UseSamba then
1049+ WriteSambaTime(FHost, Now());
10501050 State := gdsError;
10511051 raise Exception.Create('');
10521052 end;
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -1,6 +1,6 @@
11 object GikoForm: TGikoForm
2- Left = 363
3- Top = 92
2+ Left = 153
3+ Top = 68
44 HorzScrollBar.Visible = False
55 VertScrollBar.Visible = False
66 AutoScroll = False
@@ -98,6 +98,7 @@ object GikoForm: TGikoForm
9898 Height = 167
9999 BorderStyle = bsNone
100100 ChangeDelay = 50
101+ DragMode = dmAutomatic
101102 HideSelection = False
102103 Images = ItemIcon16
103104 Indent = 19
@@ -106,12 +107,16 @@ object GikoForm: TGikoForm
106107 RightClickSelect = True
107108 ShowRoot = False
108109 TabOrder = 0
110+ OnClick = TreeViewClick
109111 OnCollapsed = TreeViewCollapsed
112+ OnCollapsing = TreeViewCollapsing
110113 OnCustomDraw = TreeViewCustomDraw
111114 OnCustomDrawItem = TreeViewCustomDrawItem
115+ OnDblClick = TreeViewDblClick
116+ OnExpanding = TreeViewExpanding
112117 OnExpanded = TreeViewExpanded
113118 OnKeyDown = TreeViewKeyDown
114- OnMouseDown = TreeViewMouseDown
119+ OnMouseUp = TreeViewMouseUp
115120 end
116121 object Panel3: TPanel
117122 Left = 0
@@ -226,13 +231,18 @@ object GikoForm: TGikoForm
226231 RightClickSelect = True
227232 ShowRoot = False
228233 TabOrder = 3
234+ OnClick = FavoriteTreeViewClick
235+ OnCollapsing = FavoriteTreeViewCollapsing
236+ OnDblClick = FavoriteTreeViewDblClick
229237 OnDragDrop = FavoriteTreeViewDragDrop
230238 OnDragOver = FavoriteTreeViewDragOver
231239 OnEdited = FavoriteTreeViewEdited
232240 OnEditing = FavoriteTreeViewEditing
233241 OnEndDrag = FavoriteTreeViewEndDrag
242+ OnExpanding = FavoriteTreeViewExpanding
234243 OnKeyDown = FavoriteTreeViewKeyDown
235244 OnMouseDown = FavoriteTreeViewMouseDown
245+ OnMouseUp = FavoriteTreeViewMouseUp
236246 end
237247 object FavoriteToolBar: TToolBar
238248 Left = 0
--- a/Giko.pas
+++ b/Giko.pas
@@ -358,7 +358,7 @@ type
358358 N63: TMenuItem;
359359 N64: TMenuItem;
360360 dummy1: TMenuItem;
361- TreeSelectLogDeletePopupMenu: TMenuItem;
361+ TreeSelectLogDeletePopupMenu: TMenuItem;
362362 N65: TMenuItem;
363363 BBSSelectPopupMenu: TPopupMenu;
364364 PlugInMenu: TMenuItem;
@@ -378,7 +378,7 @@ type
378378 ResRangeKokoPMenuItem: TMenuItem;
379379 ResRangeNewPMenuItem: TMenuItem;
380380 ResRangeAllPMenuItem: TMenuItem;
381- BrowsBoradHeadAction1: TMenuItem;
381+ BrowsBoradHeadAction1: TMenuItem;
382382 ThreadRangePopupMenu: TPopupMenu;
383383 A15: TMenuItem;
384384 L8: TMenuItem;
@@ -398,7 +398,7 @@ type
398398 N73: TMenuItem;
399399 SelectComboBoxPanel: TPanel;
400400 SelectComboBoxSplitter: TImage;
401- ToolButton1: TToolButton;
401+ ToolButton1: TToolButton;
402402 N74: TMenuItem;
403403 WikiFAQ: TMenuItem;
404404 GikoApplicationEvents: TApplicationEvents;
@@ -423,6 +423,7 @@ type
423423 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
424424 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
425425 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
426+ procedure TreeViewDblClick(Sender: TObject);
426427 procedure ListViewCustomDraw(Sender: TCustomListView;
427428 const ARect: TRect; var DefaultDraw: Boolean);
428429 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
@@ -494,6 +495,7 @@ type
494495 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
495496 Shift: TShiftState);
496497 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
498+ procedure FavoriteTreeViewDblClick(Sender: TObject);
497499 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
498500 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
499501 Shift: TShiftState; X, Y: Integer);
@@ -512,12 +514,15 @@ type
512514 var Handled: Boolean);
513515 procedure BrowserTabPopupMenuPopup(Sender: TObject);
514516 procedure BrowserTabResize(Sender: TObject);
517+ procedure TreeViewClick(Sender: TObject);
515518 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
516519 Shift: TShiftState);
517520 procedure FavoriteTreeViewMouseDown(Sender: TObject;
518521 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
519522 procedure MessagePanelResize(Sender: TObject);
520523 procedure OnResized;
524+ procedure FavoriteTreeViewMouseUp(Sender: TObject;
525+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
521526 procedure SelectTimerTimer(Sender: TObject);
522527 procedure ListViewColumnRightClick(Sender: TObject;
523528 Column: TListColumn; Point: TPoint);
@@ -533,16 +538,27 @@ type
533538 Shift: TShiftState);
534539 procedure FavoriteTreeViewEditing(Sender: TObject; Node: TTreeNode;
535540 var AllowEdit: Boolean);
536- procedure CabinetCloseSpeedButtonClick(Sender: TObject);
541+ procedure CabinetCloseSpeedButtonClick(Sender: TObject);
537542 procedure FavoriteArrangeToolButtonClick(Sender: TObject);
538543 procedure GikoApplicationEventsMessage(var Msg: tagMSG;
539544 var Handled: Boolean);
540545 procedure GikoApplicationEventsDeactivate(Sender: TObject);
541546 procedure GikoApplicationEventsException(Sender: TObject; E: Exception);
542- procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
547+ procedure FavoriteTreeViewClick(Sender: TObject);
548+ procedure FavoriteTreeViewCollapsing(Sender: TObject; Node: TTreeNode;
549+ var AllowCollapse: Boolean);
550+ procedure FavoriteTreeViewExpanding(Sender: TObject; Node: TTreeNode;
551+ var AllowExpansion: Boolean);
552+ procedure TreeViewCollapsing(Sender: TObject; Node: TTreeNode;
553+ var AllowCollapse: Boolean);
554+ procedure TreeViewExpanding(Sender: TObject; Node: TTreeNode;
555+ var AllowExpansion: Boolean);
556+ procedure TreeViewMouseUp(Sender: TObject; Button: TMouseButton;
543557 Shift: TShiftState; X, Y: Integer);
544558 private
545559 { Private 宣言 }
560+ FSortIndex: Integer;
561+ FSortOrder: Boolean;
546562 FEnabledCloseButton: Boolean;
547563 FClickNode: TTreeNode;
548564 FHttpState: Boolean;
@@ -689,6 +705,8 @@ type
689705 property ToolBarSettingSender : TToolBarSettingSenderType
690706 read FToolBarSettingSender write FToolBarSettingSender;
691707 property ScreenCursor : TCursor read GetScreenCursor write SetScreenCursor;
708+ property SortIndex: Integer read FSortIndex write FSortIndex;
709+ property SortOrder: Boolean read FSortOrder write FSortOrder;
692710 property ActiveBBS : TBBS read FActiveBBS write FActiveBBS;
693711 property WorkCount: Integer read FWorkCount write FWorkCount;
694712 procedure SetContent(inThread: TBrowserRecord);
@@ -1200,7 +1218,6 @@ begin
12001218 FavoriteAddToolButton.Caption := '追加...';
12011219 AntiIndivAbonMenuItem.Caption := '個別あぼ〜ん解除';
12021220
1203-
12041221 end;
12051222
12061223 // CoolBar の設定を変数に保存
@@ -1985,35 +2002,27 @@ procedure TGikoForm.ListViewColumnClick(Sender: TObject;
19852002 var
19862003 id, idx : Integer;
19872004 orderList : TList;
1988- vSortIndex : Integer;
1989- vSortOrder : Boolean;
19902005 begin
19912006 idx := TListViewUtils.ActiveListTrueColumn( Column ).Tag;
1992- if TObject( FActiveList ) is TBBS then begin
1993- orderList := GikoSys.Setting.BBSColumnOrder;
1994- vSortIndex := GikoSys.Setting.BBSSortIndex;
1995- vSortOrder := GikoSys.Setting.BBSSortOrder;
1996- end else if TObject( FActiveList ) is TCategory then begin
1997- orderList := GikoSys.Setting.CategoryColumnOrder;
1998- vSortIndex := GikoSys.Setting.CategorySortIndex;
1999- vSortOrder := GikoSys.Setting.CategorySortOrder;
2000- end else if TObject( FActiveList ) is TBoard then begin
2001- orderList := GikoSys.Setting.BoardColumnOrder;
2002- vSortIndex := GikoSys.Setting.BoardSortIndex;
2003- vSortOrder := GikoSys.Setting.BoardSortOrder;
2004- end else
2007+
2008+ if TObject( FActiveList ) is TBBS then
2009+ orderList := GikoSys.Setting.BBSColumnOrder
2010+ else if TObject( FActiveList ) is TCategory then
2011+ orderList := GikoSys.Setting.CategoryColumnOrder
2012+ else if TObject( FActiveList ) is TBoard then
2013+ orderList := GikoSys.Setting.BoardColumnOrder
2014+ else
20052015 Exit;
20062016
20072017 id := Integer( orderList[ idx ] );
20082018
2009-
2010- if vSortIndex = id then
2011- vSortOrder := not vSortOrder
2019+ if FSortIndex = id then
2020+ FSortOrder := not FSortOrder
20122021 else begin
2013- vSortOrder := id = 0;
2022+ FSortOrder := id = 0;
20142023 end;
20152024
2016- TListViewUtils.ListViewSort(Sender, ListView, Column, GikoDM.ListNumberVisibleAction.Checked, vSortOrder);
2025+ TListViewUtils.ListViewSort(Sender, ListView, Column, GikoDM.ListNumberVisibleAction.Checked, FSortOrder, FSortIndex );
20172026 end;
20182027
20192028 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
@@ -2212,13 +2221,31 @@ begin
22122221 ListView.SetFocus;
22132222 ListView.SelectAll;
22142223 end;
2224+// *************************************************************************
2225+//! ツリービューのダブルクリックイベント
2226+// *************************************************************************
2227+procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2228+var
2229+ pos : TPoint;
2230+ rect: TRect;
2231+begin
2232+ pos := FMouseDownPos;
2233+ if (FClickNode <> nil) and (FClickNode = TreeView.GetNodeAt(pos.X, pos.Y)) then begin
2234+ //マウスがnodeの上にいるか
2235+ rect := FClickNode.DisplayRect(true);
2236+ if ((rect.Left <= pos.X) and (rect.Right >= pos.X)) and
2237+ ((rect.Bottom >= pos.Y) and (rect.Top <= pos.Y)) then begin
2238+ TreeDoubleClick( FClickNode );
2239+ FClickNode := nil;
2240+ end;
2241+ end;
2242+end;
2243+
22152244 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
22162245 begin
22172246 AddMessageList(Msg, nil, Icon);
22182247 end;
2219-// *************************************************************************
2220-//! ダウンロードが完了したときに発生するイベント
2221-// *************************************************************************
2248+
22222249 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
22232250 var
22242251 ATitle: string;
@@ -2244,11 +2271,9 @@ begin
22442271 AddMessageList(ATitle + ' ' + GikoSys.GetGikoMessage(gmSureItiran), nil, gmiOK);
22452272 if GetActiveList = Item.Board then begin
22462273 FActiveList := nil;
2247- //自動ソートの場合板一覧のソート順をクリアする
2248- if (GikoSys.Setting.AutoSortThreadList) then begin
2249- GikoSys.Setting.BoardSortIndex := 0;
2250- GikoSys.Setting.BoardSortOrder := True;
2251- end;
2274+ //板一覧のソート順をクリアする
2275+ GikoSys.Setting.BoardSortIndex := 0;
2276+ GikoSys.Setting.BoardSortOrder := True;
22522277 SetActiveList(Item.Board);
22532278 end;
22542279 Item.Board.Modified := True;
@@ -2524,9 +2549,6 @@ begin
25242549 BrowserNullTab := TBrowserRecord.Create;
25252550 BrowserNullTab.Browser := Browser;
25262551 end;
2527- if BrowserNullTab.thread <> ThreadItem then begin
2528- BrowserNullTab.Movement := '';
2529- end;
25302552 BrowserNullTab.thread := ThreadItem;
25312553 Result := BrowserNullTab;
25322554 BrowserTab.TabIndex := -1;
@@ -2556,7 +2578,6 @@ begin
25562578 idx := BrowserTab.TabIndex;
25572579 if (FActiveContent <> nil) and
25582580 (FActiveContent.Thread <> Thread.Thread) and
2559- (FActiveContent.Browser <> nil) and
25602581 (Assigned(FActiveContent.Browser.Document)) then begin
25612582 try
25622583 try
@@ -2728,19 +2749,9 @@ begin
27282749 ListView.Selected := nil;
27292750 // ListView.Columns.Clear;
27302751 if (FActiveContent <> nil) and (FActiveContent.Thread <> nil)
2731- and (FActiveContent.Thread.IsLogFile) then begin
2732- try
2733- Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
2734- except
2735- on E: Exception do begin
2736- //スレ一覧DL後などにFActiveContentの持つThreadが
2737- //削除されている場合があるのでここて処理する
2738- ReleaseBrowser(FActiveContent);
2739- FActiveContent.Thread := nil;
2740- Self.Caption := GikoDataModule.CAPTION_NAME;
2741- end;
2742- end;
2743- end else
2752+ and (FActiveContent.Thread.IsLogFile) then
2753+ Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
2754+ else
27442755 Self.Caption := GikoDataModule.CAPTION_NAME;
27452756 //Application.Title := CAPTION_NAME;
27462757
@@ -2749,11 +2760,14 @@ begin
27492760 Screen.Cursor := crHourGlass;
27502761 try
27512762 if Obj is TBBS then begin
2752- TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
2763+ TListViewUtils.SetCategoryListItem(TBBS(obj), ListView, GikoDM.ListNumberVisibleAction.Checked,
2764+ FSortIndex, FSortOrder);
27532765 end else if Obj is TCategory then begin
2754- TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
2766+ TListViewUtils.SetBoardListItem(TCategory(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked,
2767+ FSortIndex, FSortOrder);
27552768 end else if Obj is TBoard then begin
2756- TListViewUtils.SetThreadListItem(TBoard(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked);
2769+ TListViewUtils.SetThreadListItem(TBoard(Obj), ListView, GikoDM.ListNumberVisibleAction.Checked,
2770+ FSortIndex, FSortOrder);
27572771 end;
27582772 finally
27592773 Screen.Cursor := crDefault;
@@ -4431,7 +4445,9 @@ end;
44314445
44324446 procedure TGikoForm.FavoriteClick(Sender: TObject);
44334447 begin
4448+
44344449 FavoriteClick( Sender, True );
4450+
44354451 end;
44364452
44374453 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
@@ -6092,10 +6108,7 @@ begin
60926108 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
60936109 end;
60946110 VK_SPACE:
6095- begin
6096- FClickNode := FavoriteTreeView.Selected;
6097- GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
6098- end;
6111+ FavoriteTreeViewDblClick( Sender );
60996112 end;
61006113 end else begin
61016114 //編集中にESCを押したら、編集を終了して、元の文字列に戻す
@@ -6228,6 +6241,27 @@ begin
62286241 end;
62296242
62306243 end;
6244+// *************************************************************************
6245+//! お気に入りツリーのダブルクリックイベント
6246+// *************************************************************************
6247+procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
6248+var
6249+ pos : TPoint;
6250+ rect: TRect;
6251+begin
6252+ //クリック時の選択イベントと同じならダブルクリック実行
6253+ pos := FMouseDownPos;
6254+ if (FClickNode <> nil) and (FClickNode = FavoriteTreeView.GetNodeAt(pos.X, pos.Y)) then begin
6255+ //マウスがnodeの上にいるか
6256+ rect := FClickNode.DisplayRect(true);
6257+ if ((rect.Left <= pos.X) and (rect.Right >= pos.X)) and
6258+ ((rect.Bottom >= pos.Y) and (rect.Top <= pos.Y)) then begin
6259+ GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
6260+ FClickNode := nil;
6261+ end;
6262+ end;
6263+end;
6264+
62316265 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
62326266 var
62336267 Found: TTreeNode;
@@ -6658,8 +6692,13 @@ begin
66586692
66596693 end;
66606694 // *************************************************************************
6661-//! ツリービューのKeyDownイベント
6695+//! ツリービューのクリックイベント
66626696 // *************************************************************************
6697+procedure TGikoForm.TreeViewClick(Sender: TObject);
6698+begin
6699+ FClickNode := TreeView.Selected;
6700+ FMouseDownPos := TreeView.ScreenToClient(Mouse.CursorPos);
6701+end;
66636702 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
66646703 Shift: TShiftState);
66656704 begin
@@ -6672,35 +6711,21 @@ begin
66726711 TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
66736712 end;
66746713 end;
6675-//! お気に入りのMouseDownイベント
6714+
66766715 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
66776716 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
66786717 var
66796718 favItem : TTreeNode;
66806719 favThreadItem : TFavoriteThreadItem;
6681- rect: TRect;
66826720 begin
6721+
66836722 case Button of
6684- mbLeft:
6723+{ mbLeft:
66856724 begin
6686- if not (ssAlt in Shift) and (FavoriteTreeView.Selected <> nil) and
6687- (FavoriteTreeView.Selected = FavoriteTreeView.GetNodeAt(X, Y)) then begin
6688- //マウスがnodeの上にいるか
6689- rect := FavoriteTreeView.Selected.DisplayRect(true);
6690- if ((rect.Left <= X) and (rect.Right >= X)) and
6691- ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
6692- if ssDouble in Shift then begin
6693- FClickNode := FavoriteTreeView.Selected;
6694- GikoDM.FavoriteTreeViewReloadActionExecute(Sender);
6695- FClickNode := nil;
6696- end else begin
6697- FavoriteClick(
6698- TObject(FavoriteTreeView.Selected));
6699- end;
6700- end;
6701- end;
6725+ FMouseDownPos.X := X;
6726+ FMouseDownPos.Y := Y;
67026727 end;
6703- mbMiddle:
6728+} mbMiddle:
67046729 begin
67056730 favItem := FavoriteTreeView.GetNodeAt( X, Y );
67066731 if favItem = nil then Exit;
@@ -6760,6 +6785,16 @@ end;
67606785 // *************************************************************************
67616786 //! お気に入りツリーのマウスアップイベント
67626787 // *************************************************************************
6788+procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
6789+ Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6790+begin
6791+ if (Button = mbLeft) and not (ssDouble in Shift) then begin
6792+ if (FClickNode <> nil) and (FClickNode = FavoriteTreeView.GetNodeAt(X, Y)) then begin
6793+ FavoriteClick( TObject( FClickNode ) );
6794+ end;
6795+ end;
6796+end;
6797+
67636798 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
67646799 var
67656800 p : TPoint;
@@ -7635,6 +7670,61 @@ begin
76357670 end;
76367671 end;
76377672 // *************************************************************************
7673+//! お気に入りツリーのクリックイベント
7674+// *************************************************************************
7675+procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
7676+begin
7677+ //現在選択されているアイテムを保存
7678+ FClickNode := FavoriteTreeView.Selected;
7679+ FMouseDownPos := FavoriteTreeView.ScreenToClient(Mouse.CursorPos);
7680+end;
7681+// *************************************************************************
7682+//! お気に入りツリーのアイテムの縮小時イベント
7683+// *************************************************************************
7684+procedure TGikoForm.FavoriteTreeViewCollapsing(Sender: TObject;
7685+ Node: TTreeNode; var AllowCollapse: Boolean);
7686+begin
7687+ //縮小されたら保存されているクリック時選択アイテムをクリア
7688+ FClickNode := Node;
7689+end;
7690+// *************************************************************************
7691+//! お気に入りツリーのアイテムの展開時イベント
7692+// *************************************************************************
7693+procedure TGikoForm.FavoriteTreeViewExpanding(Sender: TObject;
7694+ Node: TTreeNode; var AllowExpansion: Boolean);
7695+begin
7696+ //展開されたら保存されているクリック時選択アイテムをクリア
7697+ FClickNode := Node;
7698+end;
7699+// *************************************************************************
7700+//! ツリービューのアイテムの縮小時イベント
7701+// *************************************************************************
7702+procedure TGikoForm.TreeViewCollapsing(Sender: TObject; Node: TTreeNode;
7703+ var AllowCollapse: Boolean);
7704+begin
7705+ FClickNode := nil;
7706+end;
7707+// *************************************************************************
7708+//! ツリービューのアイテムの展開時イベント
7709+// *************************************************************************
7710+procedure TGikoForm.TreeViewExpanding(Sender: TObject; Node: TTreeNode;
7711+ var AllowExpansion: Boolean);
7712+begin
7713+ FClickNode := nil;
7714+end;
7715+// *************************************************************************
7716+//! ツリービューのマウスアップイベント
7717+// *************************************************************************
7718+procedure TGikoForm.TreeViewMouseUp(Sender: TObject; Button: TMouseButton;
7719+ Shift: TShiftState; X, Y: Integer);
7720+begin
7721+ if (Button = mbLeft) and not (ssDouble in Shift) then begin
7722+ if (FClickNode <> nil) and (FClickNode = TreeView.GetNodeAt(X, Y)) then begin
7723+ TreeClick(FClickNode);
7724+ end;
7725+ end;
7726+end;
7727+// *************************************************************************
76387728 //! ダウンロードコントロールスレッドの生成
76397729 // *************************************************************************
76407730 procedure TGikoForm.CreateControlThread();
@@ -7742,32 +7832,6 @@ begin
77427832 except
77437833 end;
77447834 end;
7745-//! キャビネットのマウスダウンイベント
7746-procedure TGikoForm.TreeViewMouseDown(Sender: TObject;
7747- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7748-var
7749- rect : TRect;
7750-begin
7751- case Button of
7752- mbLeft:
7753- begin
7754- if (TreeView.Selected <> nil) and
7755- (TreeView.Selected = TreeView.GetNodeAt(X, Y)) then begin
7756- //マウスがnodeの上にいるか
7757- rect := TreeView.Selected.DisplayRect(true);
7758- if ((rect.Left <= X) and (rect.Right >= X)) and
7759- ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
7760- // クリックとダブルクリックをココで判定
7761- if ssDouble in Shift then begin
7762- TreeDoubleClick( TreeView.Selected );
7763- end else begin
7764- TreeClick(TreeView.Selected);
7765- end;
7766- end;
7767- end;
7768- end;
7769- end;
7770-end;
77717835
77727836 initialization
77737837 OleInitialize(nil);
--- a/GikoDataModule.dfm
+++ b/GikoDataModule.dfm
@@ -1195,12 +1195,6 @@ object GikoDM: TGikoDM
11951195 Hint = #12462#12467#12490#12499'Wiki'#12398'FAQ'#12434#34920#31034#12377#12427
11961196 OnExecute = WikiFAQWebPageActionExecute
11971197 end
1198- object ThreadSizeCalcForFileAction: TAction
1199- Category = #12484#12540#12523
1200- Caption = #12473#12524#12483#12489#12398#23481#37327#12434#12501#12449#12452#12523#12363#12425#20877#35336#31639#12377#12427
1201- Hint = #12473#12524#12483#12489#12398#23481#37327#12434#12501#12449#12452#12523#12363#12425#20877#35336#31639#12377#12427
1202- OnExecute = ThreadSizeCalcForFileActionExecute
1203- end
12041198 end
12051199 object ToobarImageList: TImageList
12061200 Left = 44
--- a/GikoDataModule.pas
+++ b/GikoDataModule.pas
@@ -211,7 +211,6 @@ type
211211 WikiFAQWebPageAction: TAction;
212212 ToobarImageList: TImageList;
213213 SaveDialog: TSaveDialog;
214- ThreadSizeCalcForFileAction: TAction;
215214 procedure EditNGActionExecute(Sender: TObject);
216215 procedure ReloadActionExecute(Sender: TObject);
217216 procedure GoFowardActionExecute(Sender: TObject);
@@ -393,7 +392,6 @@ type
393392 procedure MidokuActionExecute(Sender: TObject);
394393 procedure AllSelectActionExecute(Sender: TObject);
395394 procedure AllSelectActionUpdate(Sender: TObject);
396- procedure ThreadSizeCalcForFileActionExecute(Sender: TObject);
397395 private
398396 { Private 宣言 }
399397 procedure ClearResFilter;
@@ -404,8 +402,6 @@ type
404402 procedure SetThreadAreaVertical(gls : TGikoListState);
405403 procedure SetThreadReadProperty(read: Boolean);
406404 procedure SelectThreadSaveToFile(dat: Boolean);
407- function GetSortProperties(List: TObject;var vSortOrder: Boolean): Boolean;
408- procedure RecalcThreadSize(limit : Integer);
409405 public
410406 { Public 宣言 }
411407 procedure RepaintStatusBar;
@@ -695,21 +691,26 @@ end;
695691 // *************************************************************************
696692 procedure TGikoDM.FavoriteTreeViewReloadActionExecute(Sender: TObject);
697693 var
694+ ThreadItem: TThreadItem;
698695 FavThread: TFavoriteThreadItem;
696+ Board: TBoard;
699697 FavBoard: TFavoriteBoardItem;
700698 shiftDown: Boolean;
701699 begin
702- if (GikoForm.ClickNode = nil) then Exit;
700+
701+ if GikoForm.ClickNode = nil then Exit;
703702
704703 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
705704
706705 if TObject( GikoForm.ClickNode.Data ) is TFavoriteThreadItem then begin
707706 FavThread := TFavoriteThreadItem( GikoForm.ClickNode.Data );
708- if FavThread.Item <> nil then
709- GikoForm.DownloadContent(FavThread.Item, shiftDown);
707+ ThreadItem := FavThread.Item;
708+ if ThreadItem <> nil then
709+ GikoForm.DownloadContent(ThreadItem, shiftDown);
710710 end else if TObject( GikoForm.ClickNode.Data ) is TFavoriteBoardItem then begin
711711 FavBoard := TFavoriteBoardItem( GikoForm.ClickNode.Data );
712- GikoForm.DownloadList(FavBoard.Item, shiftDown);
712+ Board := FavBoard.Item;
713+ GikoForm.DownloadList(Board, shiftDown);
713714 end;
714715
715716 end;
@@ -3048,44 +3049,26 @@ begin
30483049
30493050 end;
30503051 // *************************************************************************
3051-//! スレ一覧の表示している内容にしたがって、ソートカラムの位置と方向を取得する
3052-// *************************************************************************
3053-function TGikoDM.GetSortProperties(List: TObject;
3054- var vSortOrder: Boolean): Boolean;
3055-begin
3056- Result := True;
3057- if (List <> nil) then begin
3058- if (List is TBBS) then begin
3059- vSortOrder := GikoSys.Setting.BBSSortOrder;
3060- end else if (List is TCategory) then begin
3061- vSortOrder := GikoSys.Setting.CategorySortOrder;
3062- end else if (List is TBoard) then begin
3063- vSortOrder := GikoSys.Setting.BoardSortOrder;
3064- end else begin
3065- Result := False;
3066- end;
3067- end else begin
3068- Result := False;
3069- end;
3070-end;
3071-// *************************************************************************
30723052 //! 現在のカラムをソートする
30733053 // *************************************************************************
30743054 procedure TGikoDM.SortActiveColumnActionExecute(Sender: TObject);
30753055 var
30763056 i : Integer;
30773057 so : boolean;
3058+ si : Integer;
30783059 begin
3079- if GetSortProperties(GikoForm.GetActiveList, so) then begin
3080- for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin
3081- if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
3082- (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin
3083- so := not so;
3084- TListViewUtils.ListViewSort(nil, GikoForm.ListView,
3085- GikoForm.ListView.Column[ i ], ListNumberVisibleAction.Checked,
3086- so);
3087- break;
3088- end;
3060+ for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin
3061+ if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
3062+ (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT2) then begin
3063+ GikoForm.SortOrder := not GikoForm.SortOrder;
3064+ so := GikoForm.SortOrder;
3065+ si := GikoForm.SortIndex;
3066+ TListViewUtils.ListViewSort(nil, GikoForm.ListView,
3067+ GikoForm.ListView.Column[ i ], ListNumberVisibleAction.Checked,
3068+ so, si );
3069+ GikoForm.SortIndex := si;
3070+ GikoForm.SortOrder := so;
3071+ break;
30893072 end;
30903073 end;
30913074 end;
@@ -3095,6 +3078,8 @@ end;
30953078 procedure TGikoDM.SortNextColumnActionExecute(Sender: TObject);
30963079 var
30973080 i, id : Integer;
3081+ so : boolean;
3082+ si : Integer;
30983083 begin
30993084 for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin
31003085 if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
@@ -3102,9 +3087,14 @@ begin
31023087 id := i + 1;
31033088 if id > GikoForm.ListView.Columns.Count - 1 then
31043089 id := 0;
3090+ GikoForm.SortOrder := id = 0;
3091+ so := GikoForm.SortOrder;
3092+ si := GikoForm.SortIndex;
31053093 TListViewUtils.ListViewSort( nil, GikoForm.ListView,
31063094 GikoForm.ListView.Column[ id ], ListNumberVisibleAction.Checked,
3107- id = 0);
3095+ so, si );
3096+ GikoForm.SortIndex := si;
3097+ GikoForm.SortOrder := so;
31083098 break;
31093099 end;
31103100 end;
@@ -3115,6 +3105,8 @@ end;
31153105 procedure TGikoDM.SortPrevColumnActionExecute(Sender: TObject);
31163106 var
31173107 i, id : Integer;
3108+ so : boolean;
3109+ si : Integer;
31183110 begin
31193111 for i := 0 to GikoForm.ListView.Columns.Count - 1 do begin
31203112 if (GikoForm.ListView.Column[ i ].ImageIndex = ITEM_ICON_SORT1) or
@@ -3122,9 +3114,14 @@ begin
31223114 id := i - 1;
31233115 if id < 0 then
31243116 id := GikoForm.ListView.Columns.Count - 1;
3117+ GikoForm.SortOrder := id = 0;
3118+ so := GikoForm.SortOrder;
3119+ si := GikoForm.SortIndex;
31253120 TListViewUtils.ListViewSort( nil, GikoForm.ListView,
31263121 GikoForm.ListView.Column[ id ], ListNumberVisibleAction.Checked,
3127- id = 0);
3122+ so, si );
3123+ GikoForm.SortIndex := si;
3124+ GikoForm.SortOrder := so;
31283125 break;
31293126 end;
31303127 end;
@@ -3700,88 +3697,5 @@ begin
37003697 AllSelectAction.Enabled := GikoForm.ListView.SelCount > 0;
37013698 end;
37023699 ////////////////////////////////編集までおしまい/////////////////////
3703-//! スレッドのサイズを再計算する
3704-procedure TGikoDM.ThreadSizeCalcForFileActionExecute(Sender: TObject);
3705-const
3706- RECALC_MES : String = 'スレッドの容量をファイルから再計算します。'#13#10 +
3707- 'この操作中、ギコナビの他の操作をするとデータが破壊される恐れがあります。' +
3708- 'またこの操作は、非常に時間がかかる場合がありますが、よろしいですか?';
3709- RECALC_TITLE : String = 'スレッドの容量をファイルから再計算';
3710- LIMIT_SIZE = 1024;
3711-var
3712- limitSize : Integer;
3713- limitStr : String;
3714-begin
3715-{ まず、時間がかかることを警告するメッセージを出力
3716- 再計算するスレッドのサイズの閾値(デフォルト1024B)を確認
3717- プラグインを利用しないところで全てのログ有りスレッドを検索
3718- 閾値以下のサイズの場合、DATのファイルサイズと比較、ずれていれば、
3719- DATのファイルサイズで更新する
3720-}
3721- if MsgBox(GikoForm.Handle, RECALC_MES,
3722- RECALC_TITLE, MB_YESNO or MB_ICONWARNING) = ID_YES then begin
3723- //閾値の確認
3724- limitSize := LIMIT_SIZE;
3725- limitStr := IntToStr(limitSize);
3726- if InputQuery('閾値入力', '指定した数値 B以下の容量のスレッドのみ再計算します', limitStr) then begin
3727- limitSize := StrToInt(MojuUtils.ZenToHan(limitStr));
3728- if (limitSize < 0) then begin
3729- ShowMessage('閾値に負は指定できません!');
3730- ThreadSizeCalcForFileActionExecute(nil);
3731- end else begin
3732- RecalcThreadSize(limitSize);
3733- end;
3734- end;
3735- end;
3736-end;
3737-//! limitよりもサイズの小さいスレッドの容量をDATファイルから計算
3738-procedure TGikoDM.RecalcThreadSize(limit : Integer);
3739-var
3740- i, j, tmpSize : Integer;
3741- Obj : TObject;
3742- Board : TBoard;
3743- Thread: TThreadItem;
3744- dat : TStringList;
3745-begin
3746- // 再計算スタート プラグインを利用しないところを全部見る!
3747- GikoForm.ScreenCursor := crHourGlass;
3748- try
3749- GikoForm.ProgressBar.Max := BoardGroups[0].Count;
3750- for i := 0 to BoardGroups[0].Count - 1 do begin
3751- Obj := BoardGroups[0].Objects[i];
3752- if (Obj <> nil) then begin
3753- Board := TBoard(Obj);
3754- if not Board.IsThreadDatRead then begin
3755- GikoSys.ReadSubjectFile(Board);
3756- end;
3757- for j := 0 to Board.Count - 1 do begin
3758- Thread := Board.Items[j];
3759- if (Thread <> nil) and (Thread.IsLogFile)
3760- and (Thread.Size <= limit) then begin
3761- dat := TStringList.Create;
3762- try
3763- tmpSize := Thread.Size;
3764- try
3765- dat.LoadFromFile(Thread.GetThreadFileName);
3766- tmpSize := Length(dat.Text);
3767- tmpSize := tmpSize - dat.Count;
3768- except
3769- end;
3770- Thread.Size := tmpSize;
3771- finally
3772- dat.Free;
3773- end;
3774- end;
3775- end;
3776- end;
3777- GikoForm.ProgressBar.StepBy(1);
3778- end;
3779- finally
3780- GikoForm.ScreenCursor := crDefault;
3781- end;
3782- GikoForm.ProgressBar.Position := 0;
3783- ShowMessage('計算終了しました。');
3784-end;
3785-
37863700 end.
37873701
--- a/ItemDownload.pas
+++ b/ItemDownload.pas
@@ -900,7 +900,6 @@ begin
900900 //1行目を削除
901901 if SList.Count > 1 then
902902 SList.Delete(0);
903- Item.Content := SList.Text;
904903 //改行コードをCRLF -> LFと考えて、行数分だけマイナス
905904 Item.ContentLength := Length(SList.Text) - SList.Count;
906905 finally
--- a/ListViewUtils.pas
+++ b/ListViewUtils.pas
@@ -19,14 +19,14 @@ type
1919 {Public 宣言}
2020 class procedure SetBoardTreeNode(inBBS : TBBS; treeView: TTreeView);
2121 class function SetCategoryListItem(ABBS2ch: TBBS; ListView: TListView;
22- NumberVisible: Boolean): Integer;
22+ NumberVisible: Boolean; var vSortIndex: Integer; var vSortOrder: Boolean): Integer;
2323 class procedure ListViewSort(Sender: TObject; ListView: TListView; Column: TListColumn;
24- NumberVisible: Boolean; vSortOrder: Boolean);
24+ NumberVisible: Boolean; var vSortOrder: Boolean; var vSortIndex: Integer);
2525 class function ActiveListTrueColumn( column : TListColumn ) : TListColumn;
2626 class function SetBoardListItem(Category: TCategory; ListView: TListView;
27- NumberVisible: Boolean): Integer;
27+ NumberVisible: Boolean; var vSortIndex: Integer; var vSortOrder: Boolean): Integer;
2828 class function SetThreadListItem(Board: TBoard; ListView: TListView;
29- NumberVisible: Boolean): Integer;
29+ NumberVisible: Boolean; var vSortIndex: Integer; var vSortOrder: Boolean): Integer;
3030 class procedure ListViewData(Sender: TObject; Item: TListItem);
3131 end;
3232
@@ -141,7 +141,9 @@ end;
141141 class function TListViewUtils.SetCategoryListItem(
142142 ABBS2ch: TBBS;
143143 ListView: TListView;
144- NumberVisible: Boolean
144+ NumberVisible: Boolean;
145+ var vSortIndex: Integer;
146+ var vSortOrder: Boolean
145147 ): Integer;
146148 var
147149 TitleColumn : TListColumn;
@@ -181,13 +183,12 @@ begin
181183 GikoForm.FolderImage.Picture := nil;
182184 GikoForm.ItemIcon16.GetBitmap(1, GikoForm.FolderImage.Picture.Bitmap);
183185
186+ vSortIndex := GikoSys.Setting.BBSSortIndex;
187+ vSortOrder := GikoSys.Setting.BBSSortOrder;
184188 for i := ListView.Columns.Count - 1 downto 0 do begin
185- if (GikoSys.Setting.BBSSortIndex
186- = Integer(GikoSys.Setting.BBSColumnOrder[ ListView.Column[ i ].Tag ])) then begin
187- ListViewSort( nil, ListView, ListView.Column[ i ],
188- NumberVisible, GikoSys.Setting.BBSSortOrder);
189- Break;
190- end;
189+ idx := ListView.Column[ i ].Tag;
190+ if vSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
191+ ListViewSort( nil, ListView, ListView.Column[ i ], NumberVisible, vSortOrder, vSortIndex );
191192 end;
192193
193194 Result := ABBS2ch.Count;
@@ -201,10 +202,11 @@ class procedure TListViewUtils.ListViewSort(
201202 ListView: TListView;
202203 Column: TListColumn;
203204 NumberVisible: Boolean;
204- vSortOrder: Boolean
205+ var vSortOrder: Boolean;
206+ var vSortIndex: Integer
205207 );
206208 var
207- i, idx : Integer;
209+ i, id, idx : Integer;
208210 orderList : TList;
209211 wkBBS: TBBS;
210212 wkCategory: TCategory;
@@ -215,41 +217,53 @@ begin
215217 for i := 0 to ListView.Columns.Count - 1 do begin
216218 ListView.Column[i].ImageIndex := -1;
217219 end;
218- if vSortOrder then
220+
221+ if SortOrder then
219222 ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT1
220223 else
221224 ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT2;
222225
223-
224226 Sort.SortNoFlag := NumberVisible;
225227
228+ //if TObject(TreeView.Selected.Data) is TBBS then begin
226229 if TObject( GikoForm.ActiveList ) is TBBS then begin
230+ //wkBBS := TBBS(TreeView.Selected.Data);
227231 wkBBS := TBBS( GikoForm.ActiveList );
228232 orderList := GikoSys.Setting.BBSColumnOrder;
233+ id := Integer( orderList[ idx ] );
229234 Sort.SortOrder := vSortOrder;
230- Sort.SortIndex := Integer( orderList[ idx ] );
231- GikoSys.Setting.BBSSortIndex := Sort.SortIndex;
232- GikoSys.Setting.BBSSortOrder := Sort.SortOrder;
235+ Sort.SortIndex := id;
236+ GikoSys.Setting.BBSSortIndex := id;
237+ GikoSys.Setting.BBSSortOrder := vSortOrder;
233238 wkBBS.Sort(Sort.CategorySortProc);
239+ //end else if TObject(TreeView.Selected.Data) is TCategory then begin
234240 end else if TObject( GikoForm.ActiveList ) is TCategory then begin
241+ //wkCategory := TCategory(TreeView.Selected.Data);
235242 wkCategory := TCategory( GikoForm.ActiveList );
236243 orderList := GikoSys.Setting.CategoryColumnOrder;
244+ id := Integer( orderList[ idx ] );
237245 Sort.SortOrder := vSortOrder;
238- Sort.SortIndex := Integer( orderList[ idx ] );
239- GikoSys.Setting.CategorySortIndex := Sort.SortIndex;
240- GikoSys.Setting.CategorySortOrder := Sort.SortOrder;
246+ Sort.SortIndex := id;
247+ GikoSys.Setting.CategorySortIndex := id;
248+ GikoSys.Setting.CategorySortOrder := vSortOrder;
241249 wkCategory.CustomSort(BoardSortProc);
250+ //end else if TObject(TreeView.Selected.Data) is TBoard then begin
242251 end else if TObject( GikoForm.ActiveList ) is TBoard then begin
252+ //wkBoard := TBoard(TreeView.Selected.Data);
243253 wkBoard := TBoard( GikoForm.ActiveList );
244254 orderList := GikoSys.Setting.BoardColumnOrder;
255+ id := Integer( orderList[ idx ] );
245256 Sort.SortOrder := vSortOrder;
246- Sort.SortIndex := Integer( orderList[ idx ] );
247- GikoSys.Setting.BoardSortIndex := Sort.SortIndex;
248- GikoSys.Setting.BoardSortOrder := Sort.SortOrder;
257+ Sort.SortIndex := id;
258+ GikoSys.Setting.BoardSortIndex := id;
259+ GikoSys.Setting.BoardSortOrder := vSortOrder;
249260 wkBoard.CustomSort(ThreadItemSortProc);
261+ end else begin
262+ id := 0;
250263 end;
251264
252265 ListView.Refresh;
266+ vSortIndex := id;
253267 end;
254268
255269 {!
@@ -259,16 +273,49 @@ Delphi 6 Personal
259273 正しいカラムが渡されないため、正しいカラムに変換します。
260274 }
261275 class function TListViewUtils.ActiveListTrueColumn( column : TListColumn ) : TListColumn;
276+{*
277+var
278+ i, idx : Integer;
279+ orderList : TList;
280+*}
262281 begin
282+
263283 // 正しく変換する方法が分からないので保留
264284 Result := column;
265285 Exit;
286+{*
287+ Result := column;
288+
289+ if TObject( FActiveList ) is TBBS then
290+ orderList := GikoSys.Setting.BBSColumnOrder
291+ else if TObject( FActiveList ) is TCategory then
292+ orderList := GikoSys.Setting.CategoryColumnOrder
293+ else if TObject( FActiveList ) is TBoard then
294+ orderList := GikoSys.Setting.BoardColumnOrder
295+ else
296+ Exit;
297+
298+ idx := column.Tag;
299+
300+ for i := 0 to ListView.Columns.Count - 1 do begin
301+ if Integer( orderList[ ListView.Column[ i ].Tag ] ) = 0 then begin
302+ if idx = 0 then
303+ Result := ListView.Column[ i ]
304+ else if idx <= i then
305+ Result := ListView.Column[ idx - 1 ];
306+ Exit;
307+ end;
308+ end;
309+*}
310+
266311 end;
267312 //ListViewにBoardItemを設定する
268313 class function TListViewUtils.SetBoardListItem(
269314 Category: TCategory;
270315 ListView: TListView;
271- NumberVisible: Boolean
316+ NumberVisible: Boolean;
317+ var vSortIndex: Integer;
318+ var vSortOrder: Boolean
272319 ): Integer;
273320 var
274321 TitleColumn : TListColumn;
@@ -323,13 +370,12 @@ begin
323370 GikoForm.FolderImage.Picture := nil;
324371 GikoForm.ItemIcon16.GetBitmap(3, GikoForm.FolderImage.Picture.Bitmap);
325372
373+ vSortIndex := GikoSys.Setting.CategorySortIndex;
374+ vSortOrder := GikoSys.Setting.CategorySortOrder;
326375 for i := ListView.Columns.Count - 1 downto 0 do begin
327- if (GikoSys.Setting.CategorySortIndex =
328- Integer( GikoSys.Setting.CategoryColumnOrder[ ListView.Columns[i].Tag ] )) then begin
329- ListViewSort( nil, ListView, ListView.Column[ i ],
330- NumberVisible, GikoSys.Setting.CategorySortOrder);
331- Break;
332- end;
376+ idx := ListView.Column[ i ].Tag;
377+ if vSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
378+ ListViewSort( nil, ListView, ListView.Column[ i ], NumberVisible, vSortOrder, vSortIndex );
333379 end;
334380
335381 Result := Category.Count;
@@ -341,7 +387,9 @@ end;
341387 class function TListViewUtils.SetThreadListItem(
342388 Board: TBoard;
343389 ListView: TListView;
344- NumberVisible: Boolean
390+ NumberVisible: Boolean;
391+ var vSortIndex: Integer;
392+ var vSortOrder: Boolean
345393 ): Integer;
346394 var
347395 TitleColumn : TListColumn;
@@ -416,13 +464,12 @@ begin
416464 GikoForm.FolderImage.Picture := nil;
417465 GikoForm.ItemIcon16.GetBitmap(5, GikoForm.FolderImage.Picture.Bitmap);
418466
467+ vSortIndex := GikoSys.Setting.BoardSortIndex;
468+ vSortOrder := GikoSys.Setting.BoardSortOrder;
419469 for i := ListView.Columns.Count - 1 downto 0 do begin
420- if (GikoSys.Setting.BoardSortIndex
421- = Integer( GikoSys.Setting.BoardColumnOrder[ ListView.Columns[ i ].Tag ] )) then begin
422- ListViewSort( nil, ListView, ListView.Column[ i ],
423- NumberVisible, GikoSys.Setting.BoardSortOrder);
424- Break;
425- end;
470+ idx := ListView.Column[ i ].Tag;
471+ if vSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
472+ ListViewSort( nil, ListView, ListView.Column[ i ], NumberVisible, vSortOrder, vSortIndex );
426473 end;
427474
428475 Result := Board.Count;
--- a/NewBoard.pas
+++ b/NewBoard.pas
@@ -63,7 +63,6 @@ var
6363 protocol, host, path, document, port, bookmark: String;
6464 begin
6565 try
66- MessageMemo.Clear;
6766 GikoSys.Setting.BoardURLSelected := BoardURLComboBox.ItemIndex + 1;
6867 FAbort := False;
6968 UpdateButton.Enabled := False;
@@ -72,6 +71,7 @@ begin
7271 EditIgnoreListsButton.Enabled := False;
7372 URL := BoardURLComboBox.Text;
7473 GikoSys.ParseURI(URL, protocol, host, path, document, port, bookmark);
74+ Writeln(protocol);
7575 if (protocol = '') then begin
7676 Item.FContent := BoardLoardFromFile(URL);
7777 end else if (AnsiPos('http', protocol) > 0) then begin
@@ -116,6 +116,7 @@ var
116116 s: string;
117117 i: Integer;
118118 begin
119+ MessageMemo.Clear;
119120 Indy.Request.Clear;
120121 Indy.RecvBufferSize := Gikosys.Setting.RecvBufferSize;
121122 Indy.ProxyParams.BasicAuthentication := False;
--- a/Option.dfm
+++ b/Option.dfm
@@ -61,9 +61,9 @@ object OptionDialog: TOptionDialog
6161 Top = 4
6262 Width = 509
6363 Height = 389
64- ActivePage = TabSheet3
64+ ActivePage = CSSTabSheet
6565 MultiLine = True
66- TabIndex = 3
66+ TabIndex = 2
6767 TabOrder = 3
6868 OnChange = OptionTabChange
6969 object ConnectSheet: TTabSheet
@@ -687,7 +687,7 @@ object OptionDialog: TOptionDialog
687687 Left = 12
688688 Top = 52
689689 Width = 477
690- Height = 45
690+ Height = 64
691691 Caption = #12473#12524#20316#25104#26085#26178#34920#31034#35373#23450
692692 TabOrder = 1
693693 object CreationTimeLogsCheckBox: TCheckBox
@@ -699,8 +699,8 @@ object OptionDialog: TOptionDialog
699699 TabOrder = 0
700700 end
701701 object FutureThreadCheckBox: TCheckBox
702- Left = 204
703- Top = 16
702+ Left = 12
703+ Top = 40
704704 Width = 265
705705 Height = 17
706706 Caption = #26085#20184#12364#26410#26469#12398#12418#12398#12399#34920#31034#12375#12394#12356#65288'492'#12473#12524#31995#65289
@@ -709,7 +709,7 @@ object OptionDialog: TOptionDialog
709709 end
710710 object GroupBox5: TGroupBox
711711 Left = 12
712- Top = 105
712+ Top = 121
713713 Width = 477
714714 Height = 86
715715 Caption = #12502#12521#12454#12470#12398#26368#22823#21270
@@ -737,35 +737,35 @@ object OptionDialog: TOptionDialog
737737 end
738738 object GroupBox17: TGroupBox
739739 Left = 12
740- Top = 196
740+ Top = 212
741741 Width = 477
742- Height = 45
742+ Height = 63
743743 Caption = #12502#12521#12454#12470#12479#12502#38750#34920#31034#26178#35373#23450
744744 TabOrder = 3
745745 object SelectIntervalLabel: TLabel
746- Left = 10
747- Top = 20
746+ Left = 13
747+ Top = 24
748748 Width = 199
749749 Height = 12
750750 Caption = #12459#12540#12477#12523#12461#12540#12391#12398#31227#21205#26178#12398#28961#21453#24540#26178#38291
751751 end
752752 object Label4: TLabel
753- Left = 271
754- Top = 20
753+ Left = 292
754+ Top = 24
755755 Width = 29
756756 Height = 12
757757 Caption = #12511#12522#31186
758758 end
759759 object Label6: TLabel
760- Left = 305
761- Top = 20
760+ Left = 14
761+ Top = 40
762762 Width = 164
763763 Height = 12
764764 Caption = #65288'55'#12511#12522#31186#20197#19978#12395#35373#23450#12375#12390#19979#12373#12356#65289
765765 end
766766 object SelectIntervalEdit: TEdit
767- Left = 214
768- Top = 16
767+ Left = 235
768+ Top = 20
769769 Width = 49
770770 Height = 20
771771 ImeMode = imClose
@@ -775,7 +775,7 @@ object OptionDialog: TOptionDialog
775775 end
776776 object GroupBox18: TGroupBox
777777 Left = 12
778- Top = 246
778+ Top = 278
779779 Width = 477
780780 Height = 43
781781 Caption = 'dat'#33853#12385#12473#12524#12477#12540#12488#38918
@@ -800,29 +800,6 @@ object OptionDialog: TOptionDialog
800800 #12473#12524#26368#32066#26356#26032#26085#26178#65288#38477#38918#65289)
801801 end
802802 end
803- object GroupBox20: TGroupBox
804- Left = 12
805- Top = 291
806- Width = 477
807- Height = 41
808- Caption = #12473#12524#12483#12489#19968#35239#12480#12454#12531#12525#12540#12489#24460#12398#21205#20316
809- TabOrder = 5
810- object Label24: TLabel
811- Left = 219
812- Top = 18
813- Width = 142
814- Height = 12
815- Caption = #65288#12481#12455#12483#12463#12375#12394#12356#22580#21512#28961#20966#29702#65289
816- end
817- object AutoSortCheckBox: TCheckBox
818- Left = 10
819- Top = 16
820- Width = 207
821- Height = 17
822- Caption = #33258#21205#12391#12473#12524#12483#12489#21517#12391#26119#38918#12477#12540#12488#12377#12427
823- TabOrder = 0
824- end
825- end
826803 end
827804 object ThreadSheet: TTabSheet
828805 Caption = #12473#12524#12483#12489#65297
--- a/Option.pas
+++ b/Option.pas
@@ -202,9 +202,6 @@ type
202202 UnFocusedBoldCheckBox: TCheckBox;
203203 IgnoreKanaCheckBox: TCheckBox;
204204 UseKatjuTypeSkinCheckBox: TCheckBox;
205- GroupBox20: TGroupBox;
206- AutoSortCheckBox: TCheckBox;
207- Label24: TLabel;
208205 procedure FormCreate(Sender: TObject);
209206 procedure FormDestroy(Sender: TObject);
210207 procedure ApplyButtonClick(Sender: TObject);
@@ -356,7 +353,7 @@ begin
356353 FClose := False;
357354 Exit;
358355 end;
359- SetAbonpropertys;
356+ SetAbonpropertys;
360357 SaveSetting;
361358 SettingApply;
362359
@@ -824,8 +821,7 @@ begin
824821 else
825822 DatOchiSortCombo.ItemIndex := 0;
826823 end;
827- AutoSortCheckBox.Checked := GikoSys.Setting.AutoSortThreadList;
828-
824+
829825 //あぼ〜ん
830826 RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
831827 ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
@@ -1102,7 +1098,6 @@ begin
11021098 GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified}
11031099 end;
11041100 end;
1105- GikoSys.Setting.AutoSortThreadList := AutoSortCheckBox.Checked;
11061101
11071102 GikoSys.Setting.WriteSystemSettingFile;
11081103 GikoSys.Setting.WriteBoardURLSettingFile;
--- a/Setting.pas
+++ b/Setting.pas
@@ -420,8 +420,6 @@ type
420420 //履歴の最大保存件数
421421 FMaxRecordCount : Integer;
422422
423- //スレッド一覧をダウンロード後にソートするか
424- FAutoSortThreadList : Boolean;
425423 function GetMainCoolSet(Index: Integer): TCoolSet;
426424 function GetBoardCoolSet(Index: Integer): TCoolSet;
427425 function GetBrowserCoolSet(Index: Integer): TCoolSet;
@@ -737,8 +735,7 @@ type
737735 property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin;
738736 property BeLogin: Boolean read FBeLogin write FBeLogin;
739737 property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount;
740- //! スレッド一覧ダウンロード後にスレッド名で昇順ソートするか
741- property AutoSortThreadList : Boolean read FAutoSortThreadList write FAutoSortThreadList;
738+
742739 end;
743740
744741
@@ -1256,8 +1253,6 @@ begin
12561253 FCategorySortOrder := ini.ReadBool('ThreadList', 'CategorySortOrder', True);
12571254 FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0);
12581255 FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True);
1259- // DL後の自動ソート
1260- FAutoSortThreadList := ini.ReadBool('ThreadList', 'AutoSort', True);
12611256 //Dat落ちスレソート順
12621257 FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1);
12631258 FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False);
@@ -1592,8 +1587,6 @@ begin
15921587 ini.WriteBool('ThreadList', 'BoardSortOrder', FBoardSortOrder);
15931588 ini.WriteInteger('ThreadList', 'DatOchiSortIndex', FDatOchiSortIndex);
15941589 ini.WriteBool('ThreadList', 'DatOchiSortOrder', FDatOchiSortOrder);
1595- // DL後の自動ソート
1596- ini.WriteBool('ThreadList', 'AutoSort', FAutoSortThreadList);
15971590
15981591 //書き込み時マシン時刻使用設定
15991592 ini.WriteBool('PostTime', 'UseMachineTime', FUseMachineTime);
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -119,9 +119,6 @@ LICENSE
119119  ステータスバーに現在表示しているスレッドの容量を表示するようにした
120120  DAT落ちしたスレの容量を取得できない不具合の修正
121121  板更新でローカルファイルを指定できるように変更
122- スレッド一覧ダウンロード後のソートをオプション化
123- NGワードに全半角ひらがなカタカナの違いを同一視するオプションの追加
124- レスの絞込みで全半角ひらがなカタカタの違いを無視するように変更
125122
126123 2005/10/10
127124 Version バタ50 リリース3
Show on old repository browser