Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/Giko.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.515.2.19 by h677, Wed Jul 6 15:46:53 2005 UTC revision 1.515.2.20 by h677, Sat Jul 9 04:32:20 2005 UTC
# Line 3848  var Line 3848  var
3848          BBSID: string;          BBSID: string;
3849          FileName: string;          FileName: string;
3850          sTitle: string;          sTitle: string;
 //      HtmlName: string;  
3851          doc:  Variant;          doc:  Variant;
3852          s: string;          s: string;
 //      OldCursor: TCursor;  
3853          i: Integer;          i: Integer;
3854          idx: Integer;          idx: Integer;
3855          ThreadItem: TThreadItem;          ThreadItem: TThreadItem;
3856          Thread: TBrowserRecord;          Thread: TBrowserRecord;
3857          ThreadTitle, ThreadPTitle: string;          ThreadTitle, ThreadPTitle: string;
         //ThreadScrollTop: Integer;  
3858          ThreadIsLog, {ThreadUnRead,} ThreadNewArraical: boolean;          ThreadIsLog, {ThreadUnRead,} ThreadNewArraical: boolean;
3859  begin  begin
 //      AddMessageList('SetContent', nil, gmiWhat);  
3860          Thread := inThread;          Thread := inThread;
3861          idx := BrowserTab.TabIndex;          idx := BrowserTab.TabIndex;
3862          if (FActiveContent <> nil) and          if (FActiveContent <> nil) and
# Line 3869  begin Line 3865  begin
3865                  try                  try
3866                  try                  try
3867                          Sleep(1);                          Sleep(1);
                         //Application.ProcessMessages;  
3868                          FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;                          FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
                         //if FActiveContent.Browser <> BrowserNullTab.Browser then  
                         //      TOleControl(FActiveContent.Browser).Visible := false;  
3869                  except                  except
3870                          on E: Exception do                          on E: Exception do
3871                                  MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);                                  MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
# Line 3904  begin Line 3897  begin
3897                  FBrowsers.Move(BROWSER_COUNT - 1, 0);                  FBrowsers.Move(BROWSER_COUNT - 1, 0);
3898          end;          end;
3899    
         //MoveWindow(Thread.FBrowser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);  
           
3900          ThreadTitle := Thread.Thread.Title;          ThreadTitle := Thread.Thread.Title;
3901          ThreadPTitle := Thread.Thread.ParentBoard.Title;          ThreadPTitle := Thread.Thread.ParentBoard.Title;
3902          //ThreadScrollTop := Thread.Thread.ScrollTop;          //ThreadScrollTop := Thread.Thread.ScrollTop;
# Line 3923  begin Line 3914  begin
3914    
3915    
3916          try          try
                 {  
                 if ThreadItem.UnRead then begin  
                         ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;  
                         if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;  
                         TreeView.Refresh;  
                 end;  
                 }  
   
3917                  if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin                  if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
3918                          if (FActiveContent.Browser <> BrowserNullTab.Browser) then                          if (FActiveContent.Browser <> BrowserNullTab.Browser) then
3919                                  ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);                                  ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
# Line 3939  begin Line 3922  begin
3922                  if (not Assigned(Thread.Browser.Document)) then begin                  if (not Assigned(Thread.Browser.Document)) then begin
3923                          Thread.Browser.Navigate('about:blank');                          Thread.Browser.Navigate('about:blank');
3924                  end;                  end;
3925                  FActiveContent := Thread;  
3926                  while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and                  while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3927                                  (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin                                  (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3928                          Application.ProcessMessages;                          Application.ProcessMessages;
# Line 3947  begin Line 3930  begin
3930                                  Exit;                                  Exit;
3931                          end;                          end;
3932                  end;                  end;
3933    
3934                    //ActiveContent の更新
3935                    FActiveContent := Thread;
3936    
3937                  if not ThreadIsLog then begin                  if not ThreadIsLog then begin
3938                          Self.Caption := CAPTION_NAME ;                          Self.Caption := CAPTION_NAME ;
3939                          try                          try
# Line 3963  begin Line 3950  begin
3950                          //Thread.Repaintは、スキン等の設定を変更したとき、Threadをダウンロードしたとき                          //Thread.Repaintは、スキン等の設定を変更したとき、Threadをダウンロードしたとき
3951                          //新規にThreadを開いたときに真になっている。                          //新規にThreadを開いたときに真になっている。
3952                          if Thread.Repaint then begin                          if Thread.Repaint then begin
                                 //Thread.LastSize := ThreadItem.Size;  
3953                                  Thread.Repaint := false;                                  Thread.Repaint := false;
3954    
3955                                  Thread.Browser.OnStatusTextChange := nil;                                  Thread.Browser.OnStatusTextChange := nil;
# Line 3971  begin Line 3957  begin
3957    
3958                                  GikoSys.CreateHTML2(doc, ThreadItem, sTitle);                                  GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
3959                                  Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;                                  Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
3960                                  PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );                                  while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3961                                                    (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3962                                            Application.ProcessMessages;
3963                                    end;
3964                                  if ThreadItem = nil then begin                                  if ThreadItem = nil then begin
3965                                          FActiveContent := nil;                                          FActiveContent := nil;
3966                                          BrowserTab.Repaint;                                          BrowserTab.Repaint;
3967                                          Exit;                                          Exit;
3968                                  end;                                  end;
3969                                    PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
3970                          end;                          end;
                         ListView.Refresh;  
3971                  end;                  end;
3972                  if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin                  if (Thread <> nil) and (ThreadItem <>nil) then begin
                         //FActiveContent := Thread;  
   
3973                          BrowserBoardNameLabel.Caption := ThreadPTitle;                          BrowserBoardNameLabel.Caption := ThreadPTitle;
3974                          ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);                          ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3975                          BrowserNameLabel.Caption := ThreadTitle;                          BrowserNameLabel.Caption := ThreadTitle;
# Line 3997  begin Line 3984  begin
3984    
3985                          ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;                          ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3986                          BrowserNameLabel.Left := ItemImage.Left + 20;                          BrowserNameLabel.Left := ItemImage.Left + 20;
3987    
3988                            //Threadの板と表示している板が同じなら描画を更新する
3989                            if (FActiveList is TBoard) and (TBoard(ActiveList) = ThreadItem.ParentBoard) then
3990                                    ListView.Refresh;
3991                  end else begin                  end else begin
3992                          FActiveContent := nil;                          FActiveContent := nil;
3993                  end;                  end;
# Line 4008  end; Line 3999  end;
3999  function TGikoForm.GetActiveContent: TThreadItem;  function TGikoForm.GetActiveContent: TThreadItem;
4000  begin  begin
4001          try          try
4002                  if( Assigned(FActiveContent) ) and (FActiveContent <> nil)                  if FActiveContent <> nil then
                         and (Assigned(FActiveContent.Thread)) and (FActiveContent.Thread <> nil) then  
4003                          Result := FActiveContent.Thread                          Result := FActiveContent.Thread
4004                  else begin                  else
             FActiveContent := nil;  
4005                          Result := nil;                          Result := nil;
                 end;  
4006          except          except
                 FActiveContent := nil;  
4007                  Result := nil;                  Result := nil;
4008          end;          end;
4009    
4010  end;  end;
4011    
4012  procedure TGikoForm.SetActiveList(Obj: TObject);  procedure TGikoForm.SetActiveList(Obj: TObject);
# Line 4703  begin Line 4691  begin
4691                  end;                  end;
4692          mbLeft:          mbLeft:
4693                  begin                  begin
4694              //ここでDblClick拾わないと、Clickイベントが優先して起きてしまうので                          //ここでDblClick拾わないと、Clickイベントが優先して起きてしまうので
4695                          if (ssDouble in Shift) then                          if (ssDouble in Shift) then
4696                                  ListDoubleClick(Shift)                                  ListDoubleClick(Shift)
4697                          else                          else
# Line 4717  begin Line 4705  begin
4705                          ListPopupMenu.Popup( pos.X, pos.Y );                          ListPopupMenu.Popup( pos.X, pos.Y );
4706                  end;                  end;
4707          end;          end;
 {       if ssDouble in Shift then begin  
                 DoubleClickOccurred[Button] := True;  
         end else begin  
                 DoubleClickOccurred[Button] := False;  
                 t := GetTickCount+GetDoubleClickTime;  
                 while GetTickCount < t do begin  
                         Application.ProcessMessages;  
                         if DoubleClickOccurred[Button] then  
                                 Exit;  
                 end;  
         end;  
4708    
         if ssDouble in Shift then begin  
                 case Button of  
                         mbLeft: ListDoubleClick;  
 //                      mbMiddle: ;  
 //                      mbRight:        ;  
                 end;  
         end else begin  
                 case Button of  
                         mbLeft: ListClick;  
 //                      mbMiddle: ;  
 //                      mbRight:        ;  
                 end;  
         end;}  
4709  end;  end;
4710    
4711  procedure TGikoForm.ListClick;  procedure TGikoForm.ListClick;
# Line 4756  begin Line 4720  begin
4720    
4721          ThreadItem := TThreadItem(ListItem.Data);          ThreadItem := TThreadItem(ListItem.Data);
4722          if ThreadItem.IsLogFile then begin          if ThreadItem.IsLogFile then begin
 //              if AddHistory(ThreadItem) then  
 //              SetContent(ThreadItem);  
4723                  InsertBrowserTab(ThreadItem);                  InsertBrowserTab(ThreadItem);
4724                  ListView.UpdateItems(ListItem.Index, ListItem.Index);                  ListView.UpdateItems(ListItem.Index, ListItem.Index);
4725          end else begin          end else begin
 //              SetContent(ThreadItem);  
4726                  InsertBrowserTab(ThreadItem);                  InsertBrowserTab(ThreadItem);
4727          end;          end;
4728    
# Line 4791  begin Line 4752  begin
4752    
4753          if TObject(ListView.Selected.Data) is TCategory then begin          if TObject(ListView.Selected.Data) is TCategory then begin
4754                  SelectTreeNode(ListView.Selected.Data, True);                  SelectTreeNode(ListView.Selected.Data, True);
 //              TreeView.Selected.Expanded := True;  
 //              TreeView.Selected.Item[ListView.Selected.Index].Selected := True;  
                 //TreeViewChange(nil, TreeView.Selected);  
4755          end else if TObject(ListView.Selected.Data) is TBoard then begin          end else if TObject(ListView.Selected.Data) is TBoard then begin
4756                  if TBoard(ListView.Selected.Data).Multiplicity = 0 then                  if TBoard(ListView.Selected.Data).Multiplicity = 0 then
4757                          SelectTreeNode(ListView.Selected.Data, True)                          SelectTreeNode(ListView.Selected.Data, True)
# Line 4813  begin Line 4771  begin
4771                                  end;                                  end;
4772                          end;                          end;
4773                  end;                  end;
 //              TreeView.Selected.Expanded := True;  
 //              TreeView.Selected.Item[ListView.Selected.Index].Selected := True;  
                 //TreeViewChange(nil, TreeView.Selected);  
4774          end else if TObject(ListView.Selected.Data) is TThreadItem then begin          end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4775                  //if TObject(ListView.Selected.Data) is TThreadItem then begin                  Application.ProcessMessages;
4776                          Application.ProcessMessages;                  ThreadItem := TThreadItem(ListView.Selected.Data);
4777                          ThreadItem := TThreadItem(ListView.Selected.Data);                  DownloadContent(ThreadItem, shiftDown);
4778                          DownloadContent(ThreadItem, shiftDown);  
                 //end;  
                   
4779                  if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin                  if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
4780                          if GikoSys.Setting.ListOrientation = gloHorizontal then begin                          if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4781                                  if GikoSys.Setting.ListWidthState = glsMin then begin                                  if GikoSys.Setting.ListWidthState = glsMin then begin
 //                                      BrowserMaxAndFocusAction.Execute;  
4782                                          BrowserMaxAction.Execute;                                          BrowserMaxAction.Execute;
4783                                          SetFocusForBrowserAction.Execute;                                          SetFocusForBrowserAction.Execute;
4784                                  end;                                  end;
4785                          end else begin                          end else begin
4786                                  if GikoSys.Setting.ListHeightState = glsMin then begin                                  if GikoSys.Setting.ListHeightState = glsMin then begin
 //                                      BrowserMaxAndFocusAction.Execute;  
4787                                          BrowserMaxAction.Execute;                                          BrowserMaxAction.Execute;
4788                                          SetFocusForBrowserAction.Execute;                                          SetFocusForBrowserAction.Execute;
4789                                  end;                                  end;
# Line 4847  var Line 4798  var
4798          nm: OleVariant;          nm: OleVariant;
4799          activeBrower :TWebBrowser;          activeBrower :TWebBrowser;
4800  begin  begin
4801  //      OleVariant(Browser.Document).parentWindow.location.hash := AName;          //
   
4802          while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and          while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4803                                  (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin                                  (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4804          Sleep(1);                  Sleep(1);
4805                  Application.ProcessMessages;                  Application.ProcessMessages;
4806          end;          end;
4807    
# Line 4880  var Line 4830  var
4830          nm: OleVariant;          nm: OleVariant;
4831          activeBrower :TWebBrowser;          activeBrower :TWebBrowser;
4832  begin  begin
 //      OleVariant(Browser.Document).parentWindow.location.hash := AName;  
         {  
         while (Browser.ReadyState <> READYSTATE_COMPLETE) and  
                                 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin  
                 Application.ProcessMessages;  
         end;  
         }  
4833          // Access Violation が起きる事があるので今後要チェック          // Access Violation が起きる事があるので今後要チェック
4834          if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin          if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4835                  activeBrower := FActiveContent.Browser;                  activeBrower := FActiveContent.Browser;
# Line 4924  end; Line 4867  end;
4867    
4868  procedure TGikoForm.SelectListItem(List: TList);  procedure TGikoForm.SelectListItem(List: TList);
4869  var  var
 //      TmpTreeNode: TTreeNode;  
4870          TmpListItem: TListItem;          TmpListItem: TListItem;
4871  begin  begin
4872          List.Clear;          List.Clear;
4873            List.Capacity := 0;
4874          TmpListItem := ListView.Selected;          TmpListItem := ListView.Selected;
4875          while TmpListItem <> nil do begin          while TmpListItem <> nil do begin
4876                  List.Add(TmpListItem.Data);                  List.Add(TmpListItem.Data);
4877                  TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);                  TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4878          end;          end;
4879        
4880  end;  end;
4881    
4882  procedure TGikoForm.ExitActionExecute(Sender: TObject);  procedure TGikoForm.ExitActionExecute(Sender: TObject);
# Line 4955  begin Line 4898  begin
4898                  Exit;                  Exit;
4899          GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;          GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4900          CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;          CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
 //      StdToolBar.Visible := StdToolBarVisibleAction.Checked;  
 //      AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;  
   
         //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;  
4901          StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;          StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4902  end;  end;
4903    
# Line 4971  begin Line 4910  begin
4910                  Exit;                  Exit;
4911          GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;          GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4912          CoolBand.Visible := GikoSys.Setting.AddressBarVisible;          CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
         //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;  
4913          AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;          AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4914  end;  end;
4915    
# Line 4984  begin Line 4922  begin
4922                  Exit;                  Exit;
4923          GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;          GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4924          CoolBand.Visible := GikoSys.Setting.LinkBarVisible;          CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4925                                  //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;          LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
                                 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;  
4926  end;  end;
4927    
4928  procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);  procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
# Line 4996  begin Line 4933  begin
4933          if CoolBand = nil then          if CoolBand = nil then
4934                  Exit;                  Exit;
4935          CoolBand.Visible := ListToolBarVisibleAction.Checked;          CoolBand.Visible := ListToolBarVisibleAction.Checked;
 //      ListToolBar.Visible := ListToolBarVisibleAction.Checked;  
 //      AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;  
4936          GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;          GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4937    
4938  end;  end;
4939    
4940  procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);  procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
# Line 5020  begin Line 4956  begin
4956          if CoolBand = nil then          if CoolBand = nil then
4957                  Exit;                  Exit;
4958          CoolBand.Visible := BrowserToolBarVisibleAction.Checked;          CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
 //      BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;  
4959          GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;          GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4960  end;  end;
4961    
# Line 5103  begin Line 5038  begin
5038                  FSearchDialog.Show;                  FSearchDialog.Show;
5039          except          except
5040          end;          end;
5041            
5042  end;  end;
5043    
5044  procedure TGikoForm.OptionActionExecute(Sender: TObject);  procedure TGikoForm.OptionActionExecute(Sender: TObject);
# Line 5658  end; Line 5593  end;
5593  //Actionで共通  //Actionで共通
5594  procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);  procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5595  begin  begin
5596    {$IFDEF ACTCHK}
5597          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
5598          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
5599    {$ENDIF}
5600                  if (GetActiveList is TCategory) and (ListView.SelCount > 0) then                  if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5601                          TAction(Sender).Enabled := True                          TAction(Sender).Enabled := True
5602                  else if GetActiveList is TBoard then                  else if GetActiveList is TBoard then
5603                          TAction(Sender).Enabled := True                          TAction(Sender).Enabled := True
5604                  else                  else
5605                          TAction(Sender).Enabled := False;                          TAction(Sender).Enabled := False;
5606    {$IFDEF ACTCHK}
5607          end;          end;
5608    {$ENDIF}
5609  end;  end;
5610  //ActiveListがTBoardでスレ一覧で1つ以上選択していると有効になるActionで共通  //ActiveListがTBoardでスレ一覧で1つ以上選択していると有効になるActionで共通
5611  procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);  procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5612  begin  begin
5613    {$IFDEF ACTCHK}
5614          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
5615          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
5616    {$ENDIF}
5617                  TAction(Sender).Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);                  TAction(Sender).Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
5618    {$IFDEF ACTCHK}
5619          end;          end;
5620    {$ENDIF}
5621  end;  end;
5622    
5623  procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);  procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
# Line 5717  end; Line 5660  end;
5660  //ブラウザタブが1つ以上で有効になるActionで共通化  //ブラウザタブが1つ以上で有効になるActionで共通化
5661  procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);  procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5662  begin  begin
5663    {$IFDEF ACTCHK}
5664          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
5665          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
5666    {$ENDIF}
5667                  TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0);                  TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0);
5668    {$IFDEF ACTCHK}
5669          end;          end;
5670    {$ENDIF}
5671  end;  end;
5672    
5673  procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);  procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
# Line 6056  end; Line 6003  end;
6003  //ActiveListがTBoardかTCategoryでスレ一覧で1つ以上選択していると有効になるActionde共通  //ActiveListがTBoardかTCategoryでスレ一覧で1つ以上選択していると有効になるActionde共通
6004  procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);  procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
6005  begin  begin
6006    {$IFDEF ACTCHK}
6007          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
6008          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
6009    {$ENDIF}
6010                  if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then                  if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
6011                          TAction(Sender).Enabled := True                          TAction(Sender).Enabled := True
6012                  else                  else
6013                          TAction(Sender).Enabled := False;                          TAction(Sender).Enabled := False;
6014    {$IFDEF ACTCHK}
6015          end;          end;
6016    {$ENDIF}
6017    
6018  end;  end;
6019    
# Line 7217  end; Line 7168  end;
7168  //ブラウザタブが1つ以上で左端でないActionで共通  //ブラウザタブが1つ以上で左端でないActionで共通
7169  procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);  procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
7170  begin  begin
7171    {$IFDEF ACTCHK}
7172          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
7173          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
7174    {$ENDIF}
7175                  TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> 0);                  TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> 0);
7176    {$IFDEF ACTCHK}
7177          end;          end;
7178    {$ENDIF}
7179  end;  end;
7180  //ブラウザタブが1つ以上で右端でないActionで共通  //ブラウザタブが1つ以上で右端でないActionで共通
7181  procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);  procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
7182  begin  begin
7183    {$IFDEF ACTCHK}
7184          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
7185          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
7186    {$ENDIF}
7187                  TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1);                  TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1);
7188    {$IFDEF ACTCHK}
7189          end;          end;
7190    {$ENDIF}
7191  end;  end;
7192    
7193  procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);  procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
# Line 10748  end; Line 10707  end;
10707  //ブラウザがあって、NULLタブ用のなければ有効になるActionで共通  //ブラウザがあって、NULLタブ用のなければ有効になるActionで共通
10708  procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);  procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
10709  begin  begin
10710    {$IFDEF ACTCHK}
10711          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
10712          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
10713    {$ENDIF}
10714                  if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and                  if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10715                          (FActiveContent.Browser <> BrowserNullTab.Browser) then                          (FActiveContent.Browser <> BrowserNullTab.Browser) then
10716                          TAction(Sender).Enabled := true                          TAction(Sender).Enabled := true
10717                  else                  else
10718                          TAction(Sender).Enabled := false;                          TAction(Sender).Enabled := false;
10719    {$IFDEF ACTCHK}
10720          end;          end;
10721    {$ENDIF}
10722  end;  end;
10723    
10724  procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);  procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
# Line 10808  end; Line 10771  end;
10771    
10772  procedure TGikoForm.SelectTimerTimer(Sender: TObject);  procedure TGikoForm.SelectTimerTimer(Sender: TObject);
10773  begin  begin
10774            SelectTimer.Interval := 0;
10775          if not (ListView.Selected = nil) then          if not (ListView.Selected = nil) then
10776                  if( FActiveContent = nil) or                  if( FActiveContent = nil) or
10777                                  (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin                                  (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
                         SelectTimer.Interval := 0;  
10778                          ListClick;                          ListClick;
10779                  end;                  end;
10780  end;  end;
# Line 11584  end; Line 11547  end;
11547    
11548  procedure TGikoForm.FormActivate(Sender: TObject);  procedure TGikoForm.FormActivate(Sender: TObject);
11549  begin  begin
         MouseGesture.UnHook;  
11550          if GikoSys.Setting.GestureEnabled then begin          if GikoSys.Setting.GestureEnabled then begin
11551                    MouseGesture.UnHook;
11552                  MouseGesture.OnGestureStart := OnGestureStart;                  MouseGesture.OnGestureStart := OnGestureStart;
11553                  MouseGesture.OnGestureMove := OnGestureMove;                  MouseGesture.OnGestureMove := OnGestureMove;
11554                  MouseGesture.OnGestureEnd := OnGestureEnd;                  MouseGesture.OnGestureEnd := OnGestureEnd;
11555                  MouseGesture.SetHook(Handle);                  MouseGesture.SetHook(Handle);
11556          end else begin          end else begin
11557                    //MouseGesture.UnHook;
11558                  MouseGesture.OnGestureStart := nil;                  MouseGesture.OnGestureStart := nil;
11559                  MouseGesture.OnGestureMove := nil;                  MouseGesture.OnGestureMove := nil;
11560                  MouseGesture.OnGestureEnd := nil;                  MouseGesture.OnGestureEnd := nil;
# Line 11723  end; Line 11687  end;
11687  //ブラウザタブが2つ以上あれば有効になるアクションで共通化  //ブラウザタブが2つ以上あれば有効になるアクションで共通化
11688  procedure TGikoForm.RightTabCloseActionUpdate(Sender: TObject);  procedure TGikoForm.RightTabCloseActionUpdate(Sender: TObject);
11689  begin  begin
11690    {$IFDEF ACTCHK}
11691          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
11692          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
11693    {$ENDIF}
11694                  TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 1);                  TAction(Sender).Enabled := (BrowserTab.Tabs.Count > 1);
11695    {$IFDEF ACTCHK}
11696          end;          end;
11697    {$ENDIF}
11698  end;  end;
11699    
11700  procedure TGikoForm.LeftTabCloseActionExecute(Sender: TObject);  procedure TGikoForm.LeftTabCloseActionExecute(Sender: TObject);
# Line 12155  procedure TGikoForm.ListViewKeyUp(Sender Line 12123  procedure TGikoForm.ListViewKeyUp(Sender
12123  begin  begin
12124          //ブラウザタブ無しで、キー移動で読み飛ばしを可能にするための          //ブラウザタブ無しで、キー移動で読み飛ばしを可能にするための
12125          //無効時間のTimerの処理          //無効時間のTimerの処理
12126            //とりあえず、タイマーを停止する。
12127            SelectTimer.Interval := 0;
12128          if not (GikoSys.Setting.BrowserTabVisible) then begin          if not (GikoSys.Setting.BrowserTabVisible) then begin
12129                  if (GetActiveList is TBoard) then begin                  if (GetActiveList is TBoard) then begin
12130                          //Shift Alt Ctrlが話されたときは、方向キーを離していても無視                          //Shift Alt Ctrlが話されたときは、方向キーを離していても無視
12131                          if (ssShift in Shift) or (ssAlt in Shift) or (ssCtrl in Shift) then                          if not ((ssShift in Shift) or (ssAlt in Shift) or (ssCtrl in Shift))  and
12132                                  SelectTimer.Interval := 0                                  (( Key = VK_LEFT) or (Key = VK_RIGHT) or
12133                          //方向キーならタイマー作動                                                  (Key = VK_UP) or (Key = VK_DOWN)) then
12134                          else if( Key = VK_LEFT) or (Key = VK_RIGHT) or                                          SelectTimer.Interval := GikoSys.Setting.SelectInterval;
                                 (Key = VK_UP) or (Key = VK_DOWN) then  
                                         SelectTimer.Interval := GikoSys.Setting.SelectInterval  
                         //一般のキーは、タイマー停止  
                         else  
                                 SelectTimer.Interval := 0;  
12135                  end;                  end;
12136          end;          end;
12137  end;  end;
12138  //TActionでGetActiveContentがnil以外で有効になる  //TActionでGetActiveContentがnil以外で有効になる
12139  procedure TGikoForm.DependActiveCntentActionUpdate(Sender: TObject);  procedure TGikoForm.DependActiveCntentActionUpdate(Sender: TObject);
12140  begin  begin
12141    {$IFDEF ACTCHK}
12142          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
12143          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
12144    {$ENDIF}
12145                  TAction(Sender).Enabled := (GetActiveContent <> nil);                  TAction(Sender).Enabled := (GetActiveContent <> nil);
12146    {$IFDEF ACTCHK}
12147          end;          end;
12148    {$ENDIF}
12149  end;  end;
12150  //TActionでGetActiveContentがnil以外かつログを持っている  //TActionでGetActiveContentがnil以外かつログを持っている
12151  procedure TGikoForm.DependActiveCntentLogActionUpdate(Sender: TObject);  procedure TGikoForm.DependActiveCntentLogActionUpdate(Sender: TObject);
12152  begin  begin
12153    {$IFDEF ACTCHK}
12154          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
12155          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
12156    {$ENDIF}
12157                  TAction(Sender).Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);                  TAction(Sender).Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
12158    {$IFDEF ACTCHK}
12159          end;          end;
12160    {$ENDIF}
12161  end;  end;
12162  //TActionでActiveListがTBoardで有効になる  //TActionでActiveListがTBoardで有効になる
12163  procedure TGikoForm.DependActiveListTBoardActionUpdate(Sender: TObject);  procedure TGikoForm.DependActiveListTBoardActionUpdate(Sender: TObject);
12164  begin  begin
12165    {$IFDEF ACTCHK}
12166          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…          //無くてもいいIF文 コードから無理やり呼ばないならチェックしなくても…
12167          if (Sender <> nil) and (Sender is TAction) then begin          if (Sender <> nil) and (Sender is TAction) then begin
12168    {$ENDIF}
12169                  TAction(Sender).Enabled := (GetActiveList is TBoard);                  TAction(Sender).Enabled := (GetActiveList is TBoard);
12170    {$IFDEF ACTCHK}
12171          end;          end;
12172    {$ENDIF}
12173  end;  end;
12174    
12175  procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject;  procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject;

Legend:
Removed from v.1.515.2.19  
changed lines
  Added in v.1.515.2.20

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26