• R/O
  • HTTP
  • SSH
  • HTTPS

gikonavi: Commit


Commit MetaInfo

Revisiondb9771e921009db0db43558ce4bc759242d62f26 (tree)
Time2005-12-28 02:13:07
Authorcvs2git <cvs2git>
Commitercvs2git

Log Message

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

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
@@ -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,17 @@ object GikoForm: TGikoForm
226231 RightClickSelect = True
227232 ShowRoot = False
228233 TabOrder = 3
234+ OnDblClick = FavoriteTreeViewDblClick
229235 OnDragDrop = FavoriteTreeViewDragDrop
230236 OnDragOver = FavoriteTreeViewDragOver
231237 OnEdited = FavoriteTreeViewEdited
232238 OnEditing = FavoriteTreeViewEditing
233239 OnEndDrag = FavoriteTreeViewEndDrag
240+ OnExit = FavoriteTreeViewExit
234241 OnKeyDown = FavoriteTreeViewKeyDown
235242 OnMouseDown = FavoriteTreeViewMouseDown
243+ OnMouseMove = FavoriteTreeViewMouseMove
244+ OnStartDrag = FavoriteTreeViewStartDrag
236245 end
237246 object FavoriteToolBar: TToolBar
238247 Left = 0
--- a/Giko.pas
+++ b/Giko.pas
@@ -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,6 +514,7 @@ 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;
@@ -539,8 +542,17 @@ type
539542 var Handled: Boolean);
540543 procedure GikoApplicationEventsDeactivate(Sender: TObject);
541544 procedure GikoApplicationEventsException(Sender: TObject; E: Exception);
542- procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
545+ procedure TreeViewCollapsing(Sender: TObject; Node: TTreeNode;
546+ var AllowCollapse: Boolean);
547+ procedure TreeViewExpanding(Sender: TObject; Node: TTreeNode;
548+ var AllowExpansion: Boolean);
549+ procedure TreeViewMouseUp(Sender: TObject; Button: TMouseButton;
543550 Shift: TShiftState; X, Y: Integer);
551+ procedure FavoriteTreeViewStartDrag(Sender: TObject;
552+ var DragObject: TDragObject);
553+ procedure FavoriteTreeViewMouseMove(Sender: TObject;
554+ Shift: TShiftState; X, Y: Integer);
555+ procedure FavoriteTreeViewExit(Sender: TObject);
544556 private
545557 { Private 宣言 }
546558 FEnabledCloseButton: Boolean;
@@ -2212,13 +2224,31 @@ begin
22122224 ListView.SetFocus;
22132225 ListView.SelectAll;
22142226 end;
2227+// *************************************************************************
2228+//! ツリービューのダブルクリックイベント
2229+// *************************************************************************
2230+procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2231+var
2232+ pos : TPoint;
2233+ rect: TRect;
2234+begin
2235+ pos := FMouseDownPos;
2236+ if (FClickNode <> nil) and (FClickNode = TreeView.GetNodeAt(pos.X, pos.Y)) then begin
2237+ //マウスがnodeの上にいるか
2238+ rect := FClickNode.DisplayRect(true);
2239+ if ((rect.Left <= pos.X) and (rect.Right >= pos.X)) and
2240+ ((rect.Bottom >= pos.Y) and (rect.Top <= pos.Y)) then begin
2241+ TreeDoubleClick( FClickNode );
2242+ FClickNode := nil;
2243+ end;
2244+ end;
2245+end;
2246+
22152247 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
22162248 begin
22172249 AddMessageList(Msg, nil, Icon);
22182250 end;
2219-// *************************************************************************
2220-//! ダウンロードが完了したときに発生するイベント
2221-// *************************************************************************
2251+
22222252 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
22232253 var
22242254 ATitle: string;
@@ -2524,9 +2554,6 @@ begin
25242554 BrowserNullTab := TBrowserRecord.Create;
25252555 BrowserNullTab.Browser := Browser;
25262556 end;
2527- if BrowserNullTab.thread <> ThreadItem then begin
2528- BrowserNullTab.Movement := '';
2529- end;
25302557 BrowserNullTab.thread := ThreadItem;
25312558 Result := BrowserNullTab;
25322559 BrowserTab.TabIndex := -1;
@@ -2556,7 +2583,6 @@ begin
25562583 idx := BrowserTab.TabIndex;
25572584 if (FActiveContent <> nil) and
25582585 (FActiveContent.Thread <> Thread.Thread) and
2559- (FActiveContent.Browser <> nil) and
25602586 (Assigned(FActiveContent.Browser.Document)) then begin
25612587 try
25622588 try
@@ -2728,19 +2754,9 @@ begin
27282754 ListView.Selected := nil;
27292755 // ListView.Columns.Clear;
27302756 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
2757+ and (FActiveContent.Thread.IsLogFile) then
2758+ Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
2759+ else
27442760 Self.Caption := GikoDataModule.CAPTION_NAME;
27452761 //Application.Title := CAPTION_NAME;
27462762
@@ -4431,7 +4447,9 @@ end;
44314447
44324448 procedure TGikoForm.FavoriteClick(Sender: TObject);
44334449 begin
4450+
44344451 FavoriteClick( Sender, True );
4452+
44354453 end;
44364454
44374455 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
@@ -6092,10 +6110,7 @@ begin
60926110 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
60936111 end;
60946112 VK_SPACE:
6095- begin
6096- FClickNode := FavoriteTreeView.Selected;
6097- GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
6098- end;
6113+ FavoriteTreeViewDblClick( Sender );
60996114 end;
61006115 end else begin
61016116 //編集中にESCを押したら、編集を終了して、元の文字列に戻す
@@ -6228,6 +6243,26 @@ begin
62286243 end;
62296244
62306245 end;
6246+// *************************************************************************
6247+//! お気に入りツリーのダブルクリックイベント
6248+// *************************************************************************
6249+procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
6250+var
6251+ pos : TPoint;
6252+ rect: TRect;
6253+begin
6254+ pos := FMouseDownPos;
6255+ if (FClickNode <> nil) and (FClickNode = FavoriteTreeView.GetNodeAt(pos.X, pos.Y)) then begin
6256+ //マウスがnodeの上にいるか
6257+ rect := FClickNode.DisplayRect(true);
6258+ if ((rect.Left <= pos.X) and (rect.Right >= pos.X)) and
6259+ ((rect.Bottom >= pos.Y) and (rect.Top <= pos.Y)) then begin
6260+ GikoDM.FavoriteTreeViewReloadActionExecute( Sender );
6261+ FClickNode := nil;
6262+ end;
6263+ end;
6264+end;
6265+
62316266 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
62326267 var
62336268 Found: TTreeNode;
@@ -6658,8 +6693,13 @@ begin
66586693
66596694 end;
66606695 // *************************************************************************
6661-//! ツリービューのKeyDownイベント
6696+//! ツリービューのクリックイベント
66626697 // *************************************************************************
6698+procedure TGikoForm.TreeViewClick(Sender: TObject);
6699+begin
6700+ FClickNode := TreeView.Selected;
6701+ FMouseDownPos := TreeView.ScreenToClient(Mouse.CursorPos);
6702+end;
66636703 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
66646704 Shift: TShiftState);
66656705 begin
@@ -6678,27 +6718,13 @@ procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
66786718 var
66796719 favItem : TTreeNode;
66806720 favThreadItem : TFavoriteThreadItem;
6681- rect: TRect;
66826721 begin
66836722 case Button of
66846723 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+ //現在選択されているアイテムを保存
6726+ FClickNode := FavoriteTreeView.Selected;
6727+ FMouseDownPos := FavoriteTreeView.ScreenToClient(Mouse.CursorPos);
67026728 end;
67036729 mbMiddle:
67046730 begin
@@ -7635,6 +7661,34 @@ begin
76357661 end;
76367662 end;
76377663 // *************************************************************************
7664+//! ツリービューのアイテムの縮小時イベント
7665+// *************************************************************************
7666+procedure TGikoForm.TreeViewCollapsing(Sender: TObject; Node: TTreeNode;
7667+ var AllowCollapse: Boolean);
7668+begin
7669+ FClickNode := nil;
7670+end;
7671+// *************************************************************************
7672+//! ツリービューのアイテムの展開時イベント
7673+// *************************************************************************
7674+procedure TGikoForm.TreeViewExpanding(Sender: TObject; Node: TTreeNode;
7675+ var AllowExpansion: Boolean);
7676+begin
7677+ FClickNode := nil;
7678+end;
7679+// *************************************************************************
7680+//! ツリービューのマウスアップイベント
7681+// *************************************************************************
7682+procedure TGikoForm.TreeViewMouseUp(Sender: TObject; Button: TMouseButton;
7683+ Shift: TShiftState; X, Y: Integer);
7684+begin
7685+ if (Button = mbLeft) and not (ssDouble in Shift) then begin
7686+ if (FClickNode <> nil) and (FClickNode = TreeView.GetNodeAt(X, Y)) then begin
7687+ TreeClick(FClickNode);
7688+ end;
7689+ end;
7690+end;
7691+// *************************************************************************
76387692 //! ダウンロードコントロールスレッドの生成
76397693 // *************************************************************************
76407694 procedure TGikoForm.CreateControlThread();
@@ -7742,32 +7796,42 @@ begin
77427796 except
77437797 end;
77447798 end;
7745-//! キャビネットのマウスダウンイベント
7746-procedure TGikoForm.TreeViewMouseDown(Sender: TObject;
7747- Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7799+//! ドラッグスタートイベント
7800+procedure TGikoForm.FavoriteTreeViewStartDrag(Sender: TObject;
7801+ var DragObject: TDragObject);
7802+begin
7803+ FClickNode := nil;
7804+end;
7805+//MouseMoveでクリックイベントを起こすという気持悪い実装...
7806+procedure TGikoForm.FavoriteTreeViewMouseMove(Sender: TObject;
7807+ Shift: TShiftState; X, Y: Integer);
77487808 var
7749- rect : TRect;
7809+ pos : TPoint;
7810+ rect: TRect;
77507811 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;
7812+ if (FClickNode <> nil) then begin
7813+ //クリック時の選択イベントと同じならダブルクリック実行
7814+ pos := FMouseDownPos;
7815+ if (FClickNode = FavoriteTreeView.GetNodeAt(pos.X, pos.Y)) then begin
7816+ //マウスがnodeの上にいるか
7817+ rect := FClickNode.DisplayRect(true);
7818+ if ((rect.Left <= pos.X) and (rect.Right >= pos.X)) and
7819+ ((rect.Bottom >= pos.Y) and (rect.Top <= pos.Y)) then begin
7820+ FavoriteClick( TObject( FClickNode ) );
7821+ //DBClickが続くかもしれないのでFClickNodはクリアしない
7822+ end else begin
7823+ FClickNode := nil;
77677824 end;
7825+ end else begin
7826+ FClickNode := nil;
77687827 end;
77697828 end;
77707829 end;
7830+//! クリックしたアイテムが残っているのを消す
7831+procedure TGikoForm.FavoriteTreeViewExit(Sender: TObject);
7832+begin
7833+ FClickNode := nil;
7834+end;
77717835
77727836 initialization
77737837 OleInitialize(nil);
--- a/GikoDataModule.pas
+++ b/GikoDataModule.pas
@@ -695,21 +695,26 @@ end;
695695 // *************************************************************************
696696 procedure TGikoDM.FavoriteTreeViewReloadActionExecute(Sender: TObject);
697697 var
698+ ThreadItem: TThreadItem;
698699 FavThread: TFavoriteThreadItem;
700+ Board: TBoard;
699701 FavBoard: TFavoriteBoardItem;
700702 shiftDown: Boolean;
701703 begin
702- if (GikoForm.ClickNode = nil) then Exit;
704+
705+ if GikoForm.ClickNode = nil then Exit;
703706
704707 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
705708
706709 if TObject( GikoForm.ClickNode.Data ) is TFavoriteThreadItem then begin
707710 FavThread := TFavoriteThreadItem( GikoForm.ClickNode.Data );
708- if FavThread.Item <> nil then
709- GikoForm.DownloadContent(FavThread.Item, shiftDown);
711+ ThreadItem := FavThread.Item;
712+ if ThreadItem <> nil then
713+ GikoForm.DownloadContent(ThreadItem, shiftDown);
710714 end else if TObject( GikoForm.ClickNode.Data ) is TFavoriteBoardItem then begin
711715 FavBoard := TFavoriteBoardItem( GikoForm.ClickNode.Data );
712- GikoForm.DownloadList(FavBoard.Item, shiftDown);
716+ Board := FavBoard.Item;
717+ GikoForm.DownloadList(Board, shiftDown);
713718 end;
714719
715720 end;
--- 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;
@@ -116,6 +115,7 @@ var
116115 s: string;
117116 i: Integer;
118117 begin
118+ MessageMemo.Clear;
119119 Indy.Request.Clear;
120120 Indy.RecvBufferSize := Gikosys.Setting.RecvBufferSize;
121121 Indy.ProxyParams.BasicAuthentication := False;
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -120,8 +120,6 @@ LICENSE
120120  DAT落ちしたスレの容量を取得できない不具合の修正
121121  板更新でローカルファイルを指定できるように変更
122122  スレッド一覧ダウンロード後のソートをオプション化
123- NGワードに全半角ひらがなカタカナの違いを同一視するオプションの追加
124- レスの絞込みで全半角ひらがなカタカタの違いを無視するように変更
125123
126124 2005/10/10
127125 Version バタ50 リリース3
Show on old repository browser