| 4016 |
begin |
begin |
| 4017 |
// if FActiveList <> Obj then begin |
// if FActiveList <> Obj then begin |
| 4018 |
FActiveList := Obj; |
FActiveList := Obj; |
| 4019 |
try |
try |
| 4020 |
if ListView.Selected <> nil then |
if ListView.Selected <> nil then |
| 4021 |
idx := ListView.Selected.Index |
idx := ListView.Selected.Index |
| 4022 |
else |
else |
| 4023 |
idx := -1; |
idx := -1; |
| 4024 |
except |
except |
| 4025 |
idx := -1; |
idx := -1; |
| 4026 |
end; |
end; |
| 4027 |
ListView.Items.Count := 0; |
ListView.Items.Count := 0; |
| 4028 |
ListView.Items.Clear; |
ListView.Items.Clear; |
| 4029 |
ListView.Selected := nil; |
ListView.Selected := nil; |
| 4085 |
gvtNew: Board.NewThreadCount := Board.GetNewThreadCount; |
gvtNew: Board.NewThreadCount := Board.GetNewThreadCount; |
| 4086 |
gvtUser: Board.UserThreadCount:= Board.GetUserThreadCount; |
gvtUser: Board.UserThreadCount:= Board.GetUserThreadCount; |
| 4087 |
end; |
end; |
| 4088 |
|
|
| 4089 |
SetActiveList(Board); |
SetActiveList(Board); |
| 4090 |
// |
// |
| 4091 |
//SetThreadListItem(Board); //SetActiveList内で呼ばれるから2重に呼び出す必要なし |
//SetThreadListItem(Board); //SetActiveList内で呼ばれるから2重に呼び出す必要なし |
| 4148 |
Item.Board := Board; |
Item.Board := Board; |
| 4149 |
Item.DownType := gdtBoard; |
Item.DownType := gdtBoard; |
| 4150 |
Item.ForceDownload := ForceDownload; |
Item.ForceDownload := ForceDownload; |
|
// AbortToolButton.Enabled := True; |
|
|
// Animate.Active := True; |
|
|
// FDownload.Add(Item); |
|
| 4151 |
FControlThread.AddItem(Item); |
FControlThread.AddItem(Item); |
|
// Animate.Active := False; |
|
|
// AbortToolButton.Enabled := False; |
|
| 4152 |
if FWorkCount = 0 then begin |
if FWorkCount = 0 then begin |
| 4153 |
try |
try |
| 4154 |
Animate.Active := True; |
Animate.Active := True; |
| 4171 |
Item.ThreadItem := ThreadItem; |
Item.ThreadItem := ThreadItem; |
| 4172 |
Item.DownType := gdtThread; |
Item.DownType := gdtThread; |
| 4173 |
Item.ForceDownload := ForceDownload; |
Item.ForceDownload := ForceDownload; |
|
// AbortToolButton.Enabled := True; |
|
|
// Animate.Active := True; |
|
|
// FDownload.Add(Item); |
|
| 4174 |
FControlThread.AddItem(Item); |
FControlThread.AddItem(Item); |
|
// Animate.Active := False; |
|
|
// AbortToolButton.Enabled := False; |
|
| 4175 |
if FWorkCount = 0 then begin |
if FWorkCount = 0 then begin |
| 4176 |
try |
try |
| 4177 |
Animate.Active := True; |
Animate.Active := True; |
| 4734 |
var |
var |
| 4735 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
| 4736 |
shiftDown: Boolean; |
shiftDown: Boolean; |
|
cNode : TTreeNode; |
|
|
bNode : TTreeNode; |
|
| 4737 |
begin |
begin |
| 4738 |
shiftDown := (ssShift in Shift); |
shiftDown := (ssShift in Shift); |
| 4739 |
|
|
| 5223 |
procedure TGikoForm.UpFolderActionExecute(Sender: TObject); |
procedure TGikoForm.UpFolderActionExecute(Sender: TObject); |
| 5224 |
begin |
begin |
| 5225 |
if GetActiveList is TBoard then begin |
if GetActiveList is TBoard then begin |
|
//// if FTreeType = gtt2ch then |
|
|
// SelectTreeNode(TBoard(GetActiveList).ParentCategory, True); |
|
|
// //SetActiveList(TBoard(GetActiveList).ParentCategory); |
|
|
//if TreeView.Selected <> nil then begin |
|
|
// if TObject(TreeView.Selected.Parent.Data) is TCategory then |
|
|
// SelectTreeNode(TCategory(TreeView.Selected.Parent.Data), True); |
|
|
//end; |
|
| 5226 |
if TBoard(GetActiveList).ParentCategory <> nil then |
if TBoard(GetActiveList).ParentCategory <> nil then |
| 5227 |
SelectTreeNode(TBoard(GetActiveList).ParentCategory, True); |
SelectTreeNode(TBoard(GetActiveList).ParentCategory, True); |
| 5228 |
end else if GetActiveList is TCategory then begin |
end else if GetActiveList is TCategory then begin |
| 5229 |
// if FTreeType = gtt2ch then |
SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True); |
| 5230 |
SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True); |
end; |
|
//SetActiveList(TCategory(GetActiveList).ParenTBBS); |
|
|
end; |
|
|
// if TreeView.Selected = nil then Exit; |
|
|
// if TreeView.Selected.Level = 0 then Exit; |
|
|
// TreeView.Selected.Parent.Selected := True; |
|
| 5231 |
end; |
end; |
| 5232 |
|
|
| 5233 |
procedure TGikoForm.RoundActionExecute(Sender: TObject); |
procedure TGikoForm.RoundActionExecute(Sender: TObject); |
| 6403 |
idx := BrowserTab.IndexOfTabAt(p.X, p.Y); |
idx := BrowserTab.IndexOfTabAt(p.X, p.Y); |
| 6404 |
if idx <> -1 then |
if idx <> -1 then |
| 6405 |
DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx])); |
DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx])); |
| 6406 |
//end else if Button = mbRight then begin |
end else if Button = mbLeft then begin |
|
//PopupMenuでBrowserTabPoupMenuを指定しているのでここでわざわざ呼び出すと2重になる |
|
|
//OnContextPopupでもしもActiveなTab以外で呼び出されたらTabを切り替えるようにした。 |
|
|
{ // マウス右ボタン |
|
|
GetCursorPos(p); |
|
|
p2 := p; |
|
|
// GetCursorPos(p2); |
|
|
p := BrowserTab.ScreenToClient(p); |
|
|
// idx := BrowserTab.ItemAtPos(p); |
|
|
idx := BrowserTab.IndexOfTabAt(p.X, p.Y); |
|
|
if idx <> -1 then begin |
|
|
OldIndex := BrowserTab.TabIndex; |
|
|
BrowserTab.TabIndex := idx; |
|
|
if OldIndex <> idx then |
|
|
BrowserTab.OnChange(nil); |
|
|
BrowserTabPopupMenu.Tag := idx; |
|
|
BrowserTabPopupMenu.Popup(p2.X, p2.Y); |
|
|
end; |
|
|
} |
|
|
end else if BUtton = mbLeft then begin |
|
| 6407 |
FDragWFirst := true; |
FDragWFirst := true; |
| 6408 |
FMouseDownPos.X := X; |
FMouseDownPos.X := X; |
| 6409 |
FMouseDownPos.Y := Y; |
FMouseDownPos.Y := Y; |
| 6893 |
try |
try |
| 6894 |
if Dlg.ShowModal = mrOk then begin |
if Dlg.ShowModal = mrOk then begin |
| 6895 |
GikoSys.SaveKeySetting(ActionList); |
GikoSys.SaveKeySetting(ActionList); |
| 6896 |
|
GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList); |
| 6897 |
GikoSys.Setting.Gestures.SaveGesture( GikoSys.Setting.GetGestureFileName ); |
GikoSys.Setting.Gestures.SaveGesture( GikoSys.Setting.GetGestureFileName ); |
| 6898 |
end; |
end; |
| 6899 |
GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList); |
|
| 6900 |
finally |
finally |
| 6901 |
Dlg.Release; |
Dlg.Release; |
| 6902 |
MouseGesture.UnHook; |
MouseGesture.UnHook; |
| 6903 |
MouseGesture.OnGestureStart := OnGestureStart; |
MouseGesture.OnGestureStart := OnGestureStart; |
| 6904 |
MouseGesture.OnGestureMove := OnGestureMove; |
MouseGesture.OnGestureMove := OnGestureMove; |
| 6905 |
MouseGesture.OnGestureEnd := OnGestureEnd; |
MouseGesture.OnGestureEnd := OnGestureEnd; |
| 6906 |
if GikoSys.Setting.GestureEnabled then |
if GikoSys.Setting.GestureEnabled then begin |
| 6907 |
|
GikoSys.Setting.Gestures.ClearGesture; |
| 6908 |
|
GikoSys.Setting.Gestures.LoadGesture( |
| 6909 |
|
GikoSys.Setting.GetGestureFileName, ActionList ); |
| 6910 |
MouseGesture.SetHook( Handle ); |
MouseGesture.SetHook( Handle ); |
| 6911 |
|
end; |
| 6912 |
end; |
end; |
| 6913 |
end; |
end; |
| 6914 |
|
|
| 8312 |
|
|
| 8313 |
LinkToolButton := TLinkToolButton( Sender ); |
LinkToolButton := TLinkToolButton( Sender ); |
| 8314 |
SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data ); |
SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data ); |
| 8315 |
|
SenderNode.Selected := False; |
| 8316 |
FavoriteDragDrop( SenderNode, Source ); |
FavoriteDragDrop( SenderNode, Source ); |
| 8317 |
|
|
| 8318 |
|
SetLinkBar; |
| 8319 |
|
|
| 8320 |
end; |
end; |
| 8321 |
|
|
| 8322 |
procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 9473 |
|
|
| 9474 |
end; |
end; |
| 9475 |
|
|
| 9476 |
SetLinkBar; |
|
| 9477 |
|
|
| 9478 |
end; |
end; |
| 9479 |
|
|
| 9483 |
SenderNode: TTreeNode; |
SenderNode: TTreeNode; |
| 9484 |
begin |
begin |
| 9485 |
|
|
| 9486 |
|
SenderNode := FavoriteTreeView.GetNodeAt(X, Y); |
| 9487 |
|
if SenderNode <> nil then begin |
| 9488 |
|
FavoriteDragDrop( SenderNode, Source ); |
| 9489 |
|
end; |
| 9490 |
|
|
| 9491 |
|
//空白項目がいたら削除する |
| 9492 |
if FDropSpaceNode <> nil then begin |
if FDropSpaceNode <> nil then begin |
| 9493 |
try |
try |
| 9494 |
FDropSpaceNode.Delete; |
FDropSpaceNode.Delete; |
| 9497 |
end; |
end; |
| 9498 |
end; |
end; |
| 9499 |
|
|
|
SenderNode := FavoriteTreeView.GetNodeAt(X, Y); |
|
|
if SenderNode <> nil then begin |
|
|
FavoriteDragDrop( SenderNode, Source ); |
|
|
end; |
|
| 9500 |
|
|
| 9501 |
|
SetLinkBar; |
| 9502 |
|
|
| 9503 |
end; |
end; |
| 9504 |
|
|
| 9998 |
Break; |
Break; |
| 9999 |
end; |
end; |
| 10000 |
end; |
end; |
| 10001 |
|
SenderNode.Selected := False; |
| 10002 |
|
|
| 10003 |
FavoriteDragDrop( SenderNode, Source ); |
FavoriteDragDrop( SenderNode, Source ); |
| 10004 |
|
|
| 10005 |
|
SetLinkBar; |
| 10006 |
end; |
end; |
| 10007 |
|
|
| 10008 |
procedure TGikoForm.BrowserTabMouseUp(Sender: TObject; |
procedure TGikoForm.BrowserTabMouseUp(Sender: TObject; |
| 10930 |
if TreeView.Visible then |
if TreeView.Visible then |
| 10931 |
TreeView.Refresh; |
TreeView.Refresh; |
| 10932 |
if ListView.Visible then |
if ListView.Visible then |
| 10933 |
ListView.Refresh; |
ListView.Refresh; |
| 10934 |
finally |
finally |
| 10935 |
List.Free; |
List.Free; |
| 10936 |
end; |
end; |
| 10955 |
if TreeView.Visible then |
if TreeView.Visible then |
| 10956 |
TreeView.Refresh; |
TreeView.Refresh; |
| 10957 |
if ListView.Visible then |
if ListView.Visible then |
| 10958 |
ListView.Refresh; |
ListView.Refresh; |
| 10959 |
finally |
finally |
| 10960 |
List.Free; |
List.Free; |
| 10961 |
end; |
end; |
| 11291 |
BoardOrder := TGikoBoardColumnList.Create; |
BoardOrder := TGikoBoardColumnList.Create; |
| 11292 |
try |
try |
| 11293 |
for i := 0 to ListView.Columns.Count - 1 do begin |
for i := 0 to ListView.Columns.Count - 1 do begin |
| 11294 |
// 順序の取得 |
// 順序の取得 |
| 11295 |
idx := ListView.Column[ i ].Tag; |
idx := ListView.Column[ i ].Tag; |
| 11296 |
id := Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ); |
id := Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ); |
| 11297 |
BoardOrder.Add( TGikoBoardColumnID( id ) ); |
BoardOrder.Add( TGikoBoardColumnID( id ) ); |
| 11305 |
BoardOrder.Free; |
BoardOrder.Free; |
| 11306 |
end; |
end; |
| 11307 |
end; |
end; |
| 11308 |
|
|
| 11309 |
end; |
end; |
| 11310 |
|
|
| 11311 |
procedure TGikoForm.ListViewColumnRightClick(Sender: TObject; |
procedure TGikoForm.ListViewColumnRightClick(Sender: TObject; |
| 11476 |
ActStr: string; |
ActStr: string; |
| 11477 |
P : TPoint; |
P : TPoint; |
| 11478 |
begin |
begin |
| 11479 |
//マウス位置の取得 |
//マウス位置の取得 |
| 11480 |
GetCursorPos(P); |
GetCursorPos(P); |
| 11481 |
//コンポーネント名取得 |
//コンポーネント名取得 |
| 11482 |
s := MouseGesture.GetGestureStr; |
s := MouseGesture.GetGestureStr; |
| 11483 |
ActStr := ''; |
ActStr := ''; |
| 11484 |
Action := GikoSys.Setting.Gestures.GetGestureAction(s); |
Action := GikoSys.Setting.Gestures.GetGestureAction(s); |
| 11492 |
var |
var |
| 11493 |
s: string; |
s: string; |
| 11494 |
Action: TAction; |
Action: TAction; |
|
Comp : TComponent; |
|
|
P : TPoint; |
|
| 11495 |
begin |
begin |
| 11496 |
//マウス位置の取得 |
s := MouseGesture.GetGestureStr; |
| 11497 |
GetCursorPos(P); |
Action := GikoSys.Setting.Gestures.GetGestureAction(s); |
| 11498 |
//コンポーネント名取得 |
if Action <> nil then |
| 11499 |
//ギコナビのフォーム外、もしくは、コンテキストメニュー上だとnilが返る |
Action.Execute; |
| 11500 |
Comp := FindDragTarget(P, True); |
StatusBar.Panels[1].Text := ''; |
|
if (Comp <> nil) then begin |
|
|
s := MouseGesture.GetGestureStr; |
|
|
Action := GikoSys.Setting.Gestures.GetGestureAction(s); |
|
|
if Action <> nil then |
|
|
Action.Execute; |
|
|
StatusBar.Panels[1].Text := ''; |
|
|
end; |
|
| 11501 |
end; |
end; |
| 11502 |
|
|
| 11503 |
procedure TGikoForm.ListViewCustomDrawItem(Sender: TCustomListView; |
procedure TGikoForm.ListViewCustomDrawItem(Sender: TCustomListView; |
| 11528 |
procedure TGikoForm.FormActivate(Sender: TObject); |
procedure TGikoForm.FormActivate(Sender: TObject); |
| 11529 |
begin |
begin |
| 11530 |
if GikoSys.Setting.GestureEnabled then begin |
if GikoSys.Setting.GestureEnabled then begin |
| 11531 |
|
GikoSys.Setting.Gestures.ClearGesture; |
| 11532 |
|
GikoSys.Setting.Gestures.LoadGesture( |
| 11533 |
|
GikoSys.Setting.GetGestureFileName, ActionList ); |
| 11534 |
MouseGesture.UnHook; |
MouseGesture.UnHook; |
| 11535 |
MouseGesture.OnGestureStart := OnGestureStart; |
MouseGesture.OnGestureStart := OnGestureStart; |
| 11536 |
MouseGesture.OnGestureMove := OnGestureMove; |
MouseGesture.OnGestureMove := OnGestureMove; |
| 12065 |
if Pos( '?', Copy( AText, wkInt, MaxInt ) ) = 0 then |
if Pos( '?', Copy( AText, wkInt, MaxInt ) ) = 0 then |
| 12066 |
// Text も PATH_INFO 渡し |
// Text も PATH_INFO 渡し |
| 12067 |
Result := Result + Copy( AText, LastDelimiter( '/', AText ) + 1, MaxInt ) |
Result := Result + Copy( AText, LastDelimiter( '/', AText ) + 1, MaxInt ) |
| 12068 |
else |
else |
| 12069 |
// Text は QUERY_STRING 渡し |
// Text は QUERY_STRING 渡し |
| 12070 |
Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt ); |
Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt ); |
| 12071 |
end else begin |
end else begin |
| 12072 |
// Thread.URL は QUERY_STRING 渡し |
// Thread.URL は QUERY_STRING 渡し |
| 12073 |
Result := Copy( AThreadURL, 1, LastDelimiter( '?', AThreadURL ) ); |
Result := Copy( AThreadURL, 1, LastDelimiter( '?', AThreadURL ) ); |
| 12074 |
wkInt := LastDelimiter( '/', AText ); |
wkInt := LastDelimiter( '/', AText ); |
| 12075 |
if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin |
if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin |
| 12076 |
// Text は PATH_INFO 渡し |
// Text は PATH_INFO 渡し |
| 12077 |
// URL に板とキーが足らないので Text から頂戴する |
// URL に板とキーが足らないので Text から頂戴する |
| 12078 |
wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) ); |
wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) ); |
| 12079 |
wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) ); |
wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) ); |
| 12080 |
Result := Copy( Result, 1, Length( Result ) - 1 ) + Copy( AText, wkInt, MaxInt ); |
Result := Copy( Result, 1, Length( Result ) - 1 ) + Copy( AText, wkInt, MaxInt ); |
| 12081 |
end else begin |
end else begin |
| 12082 |
// Text も QUERY_STRING 渡し |
// Text も QUERY_STRING 渡し |
| 12083 |
Result := Result + Copy( Text, LastDelimiter( '?', AText ) + 1, MaxInt ) |
Result := Result + Copy( Text, LastDelimiter( '?', AText ) + 1, MaxInt ) |
| 12084 |
end; |
end; |
| 12085 |
end; |
end; |
| 12086 |
end else if Pos('about:blank/bbs/', AText) = 1 then begin |
end else if Pos('about:blank/bbs/', AText) = 1 then begin |
| 12087 |
//したらばJBBSの仕変の吸収 |
//したらばJBBSの仕変の吸収 |
| 12088 |
AText := CustomStringReplace(AText, 'about:blank/bbs/', 'about:blank../../bbs/'); |
AText := CustomStringReplace(AText, 'about:blank/bbs/', 'about:blank../../bbs/'); |
| 12089 |
Result := GetRespopupURL(AText, AThreadURL); |
Result := GetRespopupURL(AText, AThreadURL); |
| 12090 |
end else begin |
end else begin |
| 12091 |
Result := AText; |
Result := AText; |
| 12092 |
end; |
end; |
| 12093 |
|
|
| 12094 |
end; |
end; |
| 12095 |
//ListViewの選択状態を解除する |
//ListViewの選択状態を解除する |
| 12158 |
procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject; |
procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject; |
| 12159 |
Node: TTreeNode; var AllowEdit: Boolean); |
Node: TTreeNode; var AllowEdit: Boolean); |
| 12160 |
begin |
begin |
| 12161 |
//編集前の文字列を一時保存する |
//編集前の文字列を一時保存する |
| 12162 |
FOrigenCaption := Node.Text; |
FOrigenCaption := Node.Text; |
| 12163 |
end; |
end; |
| 12164 |
//例外処理されなかった例外を処理する |
//例外処理されなかった例外を処理する |
| 12175 |
MsgBox(Handle, s, '処理されなかった例外', MB_OK or MB_ICONSTOP); |
MsgBox(Handle, s, '処理されなかった例外', MB_OK or MB_ICONSTOP); |
| 12176 |
end; |
end; |
| 12177 |
|
|
| 12178 |
|
|
| 12179 |
initialization |
initialization |
| 12180 |
OleInitialize(nil); |
OleInitialize(nil); |
| 12181 |
finalization |
finalization |