| 1002 |
BrowserTab.Font.Style := [fsBold]; |
BrowserTab.Font.Style := [fsBold]; |
| 1003 |
if GikoSys.Setting.BrowserTabFontItalic then |
if GikoSys.Setting.BrowserTabFontItalic then |
| 1004 |
BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic]; |
BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic]; |
| 1005 |
|
BrowserTab.DoubleBuffered := True; |
| 1006 |
FDragWFirst := false; |
FDragWFirst := false; |
| 1007 |
SetContent(BrowserNullTab); //ブラウザを空白表示 |
SetContent(BrowserNullTab); //ブラウザを空白表示 |
| 1008 |
|
|
| 3602 |
FTabHintIndex := -1; |
FTabHintIndex := -1; |
| 3603 |
for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
| 3604 |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin |
|
BrowserTab.Tabs.BeginUpdate; |
|
| 3605 |
try |
try |
| 3606 |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin |
| 3607 |
doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document; |
doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document; |
| 3617 |
if j <> -1 then |
if j <> -1 then |
| 3618 |
FBrowsers.Move(j, BROWSER_COUNT - 1); |
FBrowsers.Move(j, BROWSER_COUNT - 1); |
| 3619 |
end; |
end; |
| 3620 |
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free; |
BrowserTab.Tabs.BeginUpdate; |
| 3621 |
BrowserTab.Tabs.Delete(i); |
try |
| 3622 |
if idx > i then begin |
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free; |
| 3623 |
BrowserTab.TabIndex := idx - 1; |
if ( BrowserTab.Tabs.Count - 1 = i ) and |
| 3624 |
end else begin |
( BrowserTab.TabRect(i).Left |
| 3625 |
if BrowserTab.Tabs.Count -1 >= idx then |
<= BrowserTab.DisplayRect.Left ) then begin |
| 3626 |
BrowserTab.TabIndex := idx |
BrowserTab.ScrollTabs(-1); |
| 3627 |
else |
end; |
| 3628 |
BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1; |
BrowserTab.Tabs.Delete(i); |
| 3629 |
|
if idx > i then begin |
| 3630 |
|
BrowserTab.TabIndex := idx - 1; |
| 3631 |
|
end else begin |
| 3632 |
|
if BrowserTab.Tabs.Count -1 >= idx then |
| 3633 |
|
BrowserTab.TabIndex := idx |
| 3634 |
|
else |
| 3635 |
|
BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1; |
| 3636 |
|
end; |
| 3637 |
|
finally |
| 3638 |
|
BrowserTab.Tabs.EndUpdate; |
| 3639 |
end; |
end; |
| 3640 |
if BrowserTab.Tabs.Count = 0 then begin |
if BrowserTab.Tabs.Count = 0 then begin |
| 3641 |
BrowserNullTab.Thread := nil; |
BrowserNullTab.Thread := nil; |
| 3655 |
TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true; |
TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true; |
| 3656 |
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
| 3657 |
end; |
end; |
|
BrowserTab.Tabs.EndUpdate; |
|
| 3658 |
if( FActiveContent = nil) then |
if( FActiveContent = nil) then |
| 3659 |
BrowserTab.OnChange(nil); |
BrowserTab.OnChange(nil); |
| 3660 |
Exit; |
Exit; |
| 3670 |
FTabHintIndex := -1; |
FTabHintIndex := -1; |
| 3671 |
for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
| 3672 |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin |
|
BrowserTab.Tabs.BeginUpdate; |
|
| 3673 |
try |
try |
| 3674 |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin |
| 3675 |
doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document; |
doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document; |
| 3686 |
if j <> -1 then |
if j <> -1 then |
| 3687 |
FBrowsers.Move(j, BROWSER_COUNT - 1); |
FBrowsers.Move(j, BROWSER_COUNT - 1); |
| 3688 |
end; |
end; |
| 3689 |
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free; |
BrowserTab.Tabs.BeginUpdate; |
| 3690 |
BrowserTab.Tabs.Delete(i); |
try |
| 3691 |
if idx > i then begin |
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free; |
| 3692 |
BrowserTab.TabIndex := idx - 1; |
if ( BrowserTab.Tabs.Count - 1 = i ) and |
| 3693 |
end else begin |
( BrowserTab.TabRect(i).Left |
| 3694 |
if BrowserTab.Tabs.Count -1 >= idx then |
<= BrowserTab.DisplayRect.Left ) then begin |
| 3695 |
BrowserTab.TabIndex := idx |
BrowserTab.ScrollTabs(-1); |
| 3696 |
else |
end; |
| 3697 |
BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1; |
BrowserTab.Tabs.Delete(i); |
| 3698 |
|
if idx > i then begin |
| 3699 |
|
BrowserTab.TabIndex := idx - 1; |
| 3700 |
|
end else begin |
| 3701 |
|
if BrowserTab.Tabs.Count -1 >= idx then |
| 3702 |
|
BrowserTab.TabIndex := idx |
| 3703 |
|
else |
| 3704 |
|
BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1; |
| 3705 |
|
end; |
| 3706 |
|
finally |
| 3707 |
|
BrowserTab.Tabs.EndUpdate; |
| 3708 |
end; |
end; |
| 3709 |
if(BrowserTab.TabIndex <> -1) and |
if(BrowserTab.TabIndex <> -1) and |
| 3710 |
( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin |
( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin |
| 3722 |
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
| 3723 |
end; |
end; |
| 3724 |
|
|
|
BrowserTab.Tabs.EndUpdate; |
|
| 3725 |
if( FActiveContent = nil) then |
if( FActiveContent = nil) then |
| 3726 |
BrowserTab.OnChange(nil); |
BrowserTab.OnChange(nil); |
| 3727 |
Exit; |
Exit; |
| 4060 |
|
|
| 4061 |
procedure TGikoForm.SetBrowserTabState; |
procedure TGikoForm.SetBrowserTabState; |
| 4062 |
var |
var |
|
// i: Integer; |
|
| 4063 |
CoolBand: TCoolBand; |
CoolBand: TCoolBand; |
| 4064 |
begin |
begin |
| 4065 |
BrowserBottomPanel.AutoSize := False; |
BrowserBottomPanel.AutoSize := False; |
| 4066 |
if GikoSys.Setting.BrowserTabVisible then begin |
if GikoSys.Setting.BrowserTabVisible then begin |
| 4067 |
if GikoSys.Setting.BrowserTabStyle = gtsTab then begin |
BrowserTab.Hide; |
| 4068 |
BrowserTab.Style := tsTabs; |
BrowserTab.Tabs.BeginUpdate; |
| 4069 |
if GikoSys.Setting.BrowserTabPosition = gtpTop then |
try |
| 4070 |
BrowserTab.TabPosition := tpTop |
if GikoSys.Setting.BrowserTabStyle = gtsTab then begin |
| 4071 |
else |
BrowserTab.Style := tsTabs; |
| 4072 |
BrowserTab.TabPosition := tpBottom; |
if GikoSys.Setting.BrowserTabPosition = gtpTop then |
| 4073 |
end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin |
BrowserTab.TabPosition := tpTop |
| 4074 |
BrowserTab.TabPosition := tpTop; |
else |
| 4075 |
BrowserTab.Style := tsButtons; |
BrowserTab.TabPosition := tpBottom; |
| 4076 |
end else begin |
end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin |
| 4077 |
BrowserTab.TabPosition := tpTop; |
BrowserTab.TabPosition := tpTop; |
| 4078 |
BrowserTab.Style := tsFlatButtons |
BrowserTab.Style := tsButtons; |
| 4079 |
end; |
end else begin |
| 4080 |
|
BrowserTab.TabPosition := tpTop; |
| 4081 |
if GikoSys.Setting.BrowserTabPosition = gtpTop then begin |
BrowserTab.Style := tsFlatButtons |
| 4082 |
BrowserTab.Parent := BrowserTabToolBar; |
end; |
|
BrowserBottomPanel.Hide; |
|
|
CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar); |
|
|
if CoolBand <> nil then |
|
|
CoolBand.Visible := True; |
|
|
// BrowserTab.Parent := BrowserTopPanel; |
|
|
// BrowserTab.Parent := BrowserCoolBar; |
|
|
// BrowserTab.Top := 26; |
|
|
// BrowserTopPanel.Height := 44; |
|
| 4083 |
|
|
| 4084 |
end else begin |
if GikoSys.Setting.BrowserTabPosition = gtpTop then begin |
| 4085 |
BrowserTab.Parent := BrowserBottomPanel; |
BrowserTab.Parent := BrowserTabToolBar; |
| 4086 |
BrowserTab.Top := 0; |
BrowserBottomPanel.Hide; |
| 4087 |
BrowserTab.Left := 0; |
CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar); |
| 4088 |
BrowserBottomPanel.Show; |
if CoolBand <> nil then |
| 4089 |
CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar); |
CoolBand.Visible := True; |
| 4090 |
if CoolBand <> nil then |
end else begin |
| 4091 |
CoolBand.Visible := False; |
BrowserTab.Parent := BrowserBottomPanel; |
| 4092 |
// BrowserTopPanel.Height := 26; |
BrowserTab.Top := 0; |
| 4093 |
|
BrowserTab.Left := 0; |
| 4094 |
|
BrowserBottomPanel.Show; |
| 4095 |
|
CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar); |
| 4096 |
|
if CoolBand <> nil then |
| 4097 |
|
CoolBand.Visible := False; |
| 4098 |
|
end; |
| 4099 |
|
finally |
| 4100 |
|
BrowserTab.Tabs.EndUpdate; |
| 4101 |
|
BrowserTab.Show; |
| 4102 |
end; |
end; |
|
BrowserTab.Show; |
|
| 4103 |
end else begin |
end else begin |
| 4104 |
CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar); |
CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar); |
| 4105 |
if CoolBand <> nil then |
if CoolBand <> nil then |
| 4106 |
CoolBand.Visible := False; |
CoolBand.Visible := False; |
| 4107 |
BrowserBottomPanel.Visible := False; |
BrowserBottomPanel.Visible := False; |
|
// BrowserTab.Visible := False; |
|
|
// BrowserTopPanel.Height := 26; |
|
| 4108 |
GikoDM.AllTabCloseAction.Execute; |
GikoDM.AllTabCloseAction.Execute; |
| 4109 |
end; |
end; |
| 4110 |
end; |
end; |