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.580 by h677, Sat Dec 31 16:33:48 2005 UTC revision 1.581 by h677, Wed Jan 4 04:41:39 2006 UTC
# Line 588  type Line 588  type
588                  FIsHandledWheel : Boolean;                      ///< 既に受け取った WM_MOUSEWHEEL かどうか                  FIsHandledWheel : Boolean;                      ///< 既に受け取った WM_MOUSEWHEEL かどうか
589                                  DiffComp: Boolean;                      //Add by Genyakun スレが更新されたときにTrueになる                                  DiffComp: Boolean;                      //Add by Genyakun スレが更新されたときにTrueになる
590                  FOrigenCaption: String;                         //お気に入りツリーのアイテム編集時の編集前の文字列                  FOrigenCaption: String;                         //お気に入りツリーのアイテム編集時の編集前の文字列
591          FPreviewBrowserRect: TRect;                     ///< プレビューの表示位置を記憶する                  FPreviewBrowserRect: TRect;                     ///< プレビューの表示位置を記憶する
592                    FActionListGroupIndexes: array of Integer;      ///<GikoDM上のアクションリストの各アクションに設定されたGroupIndexを保存する配列
593                  procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);                  procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
594                  procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);                  procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
595                  procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);                  procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
# Line 648  type Line 649  type
649                  function GetScreenCursor(): TCursor;                  function GetScreenCursor(): TCursor;
650                  //カーソルを設定する                  //カーソルを設定する
651                  procedure SetScreenCursor(Cursor : TCursor);                  procedure SetScreenCursor(Cursor : TCursor);
                 //! アクションのチェック状態の初期化  
                 procedure InitActionChecked();  
652                  //! ダウンロードコントロールスレッドの生成                  //! ダウンロードコントロールスレッドの生成
653                  procedure CreateControlThread();                  procedure CreateControlThread();
654                  //! ブラウザの生成                  //! ブラウザの生成
655                  procedure CreateBrowsers(count: Integer);                  procedure CreateBrowsers(count: Integer);
656                    //! ActionListのGroupIndexの保存
657                    procedure GetGroupIndex(ActionList: TActionList);
658                    //! ActionListのGroupIndexの設定
659                    procedure SetGroupIndex(ActionList: TActionList);
660          protected          protected
661                  procedure CreateParams(var Params: TCreateParams); override;                  procedure CreateParams(var Params: TCreateParams); override;
662                  procedure WndProc(var Message: TMessage); override;                  procedure WndProc(var Message: TMessage); override;
# Line 875  begin Line 878  begin
878          FStartUp := true;          FStartUp := true;
879          Application.HookMainWindow(Hook);          Application.HookMainWindow(Hook);
880          FIsIgnoreResize := rtResizing;          FIsIgnoreResize := rtResizing;
881            //ActionListのGuoupIndexを保存して、0にクリアする。
882            //(起動時にツールボタンのDownプロパティを反映させる都合上GroupIndexは設定できない)
883            //これ以後Set〜で再設定するまで、ActionのCheckedをいじるときは注意!
884            GetGroupIndex(GikoDM.GikoFormActionList);
885          FSearchDialog := nil;          FSearchDialog := nil;
886          CreateBrowsers(BROWSER_COUNT);          CreateBrowsers(BROWSER_COUNT);
887    
# Line 945  begin Line 951  begin
951          //ViewNoButton.Down := GikoSys.Setting.ListViewNo;          //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
952          GikoDM.ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;          GikoDM.ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
953    
954            //ミュートの状態を設定
955            GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
956    
957            // レス表示範囲
958            FResRangeMenuSelect := GikoSys.ResRange;
959            case GikoSys.ResRange of
960            Ord( grrAll ):
961                    begin
962                            GikoDM.AllResAction.Execute;
963                    end;
964            Ord( grrSelect ):
965                    begin
966                            SelectComboBox.Text := SelectComboBox.Items[ 1 ];
967                            GikoDM.SelectResAction.Checked := True;
968                    end;
969            else
970                    case FResRangeMenuSelect of
971                    Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked        := True;
972                    Ord( grrNew ):  GikoDM.OnlyNewResAction.Checked := True;
973                    100:                    GikoDM.OnlyAHundredResAction.Checked            := True;
974                    end;
975            end;
976    
977            // スレッド一覧表示範囲
978            case GikoSys.Setting.ThreadRange of
979            gtrAll:
980                    begin
981                            GikoDM.AllItemAction.Checked := True;
982                            ViewType := gvtAll;
983                    end;
984            gtrLog:
985                    begin
986                            GikoDM.LogItemAction.Checked := True;
987                            ViewType := gvtLog;
988                    end;
989            gtrNew:
990                    begin
991                            GikoDM.NewItemAction.Checked := True;
992                            ViewType := gvtNew;
993                    end;
994            end;
995    
996    
997          //ブラウザタブフォント          //ブラウザタブフォント
998          BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;          BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
999          BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;          BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
# Line 956  begin Line 1005  begin
1005          FDragWFirst := false;          FDragWFirst := false;
1006          SetContent(BrowserNullTab);                                                                                                     //ブラウザを空白表示          SetContent(BrowserNullTab);                                                                                                     //ブラウザを空白表示
1007    
1008            //ブラウザタブ
1009            GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1010    
1011            if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1012                    GikoDM.BrowserTabTopAction.Checked := True;
1013            end else begin
1014                    GikoDM.BrowserTabBottomAction.Checked := True;
1015            end;
1016    
1017            if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1018                    GikoDM.BrowserTabTabStyleAction.Checked := True;
1019            end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1020                    GikoDM.BrowserTabButtonStyleAction.Checked := True;
1021            end else begin
1022                    GikoDM.BrowserTabFlatStyleAction.Checked := True;
1023            end;
1024    
1025          //プログレスバーの初期化          //プログレスバーの初期化
1026          ProgressBar.Parent := StatusBar;          ProgressBar.Parent := StatusBar;
1027          ProgressBar.Top := 2;          ProgressBar.Top := 2;
# Line 1347  begin Line 1413  begin
1413                  GikoDM.BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;                  GikoDM.BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1414                  GikoDM.BrowserNameBarVisibleActionExecute( nil );                  GikoDM.BrowserNameBarVisibleActionExecute( nil );
1415    
                 //ブラウザタブ  
                 GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;  
                 GikoDM.BrowserTabVisibleActionExecute(nil);  
   
                 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin  
                         GikoDM.BrowserTabTopAction.Checked := True;  
                         GikoDM.BrowserTabTopActionExecute(nil);  
                 end else begin  
                         GikoDM.BrowserTabBottomAction.Checked := True;  
                         GikoDM.BrowserTabBottomActionExecute(nil);  
                 end;  
   
                 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin  
                         GikoDM.BrowserTabTabStyleAction.Checked := True;  
                         GikoDM.BrowserTabTabStyleActionExecute(nil);  
                 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin  
                         GikoDM.BrowserTabButtonStyleAction.Checked := True;  
                         GikoDM.BrowserTabButtonStyleActionExecute(nil);  
                 end else begin  
                         GikoDM.BrowserTabFlatStyleAction.Checked := True;  
                         GikoDM.BrowserTabFlatStyleActionExecute(nil);  
                 end;  
   
                 // ListView のヘッダドラッグ  
 //              ListView.FullDrag := True;  
   
1416                  // CoolBar 復元                  // CoolBar 復元
1417                  LoadCoolBarSettings;                  LoadCoolBarSettings;
1418    
1419                  //重要 これがないとツールボタンの更新がおかしくなる                  //重要 これがないとツールボタンの更新がおかしくなる
1420  //              ResetBandInfo( ListCoolBar, ListToolBar );  //              ResetBandInfo( ListCoolBar, ListToolBar );
1421                  FIsIgnoreResize := rtNone;                  FIsIgnoreResize := rtNone;
                 //ツールバーの更新を終えた後にやらないといけないのかも  
                 //アクションのチェック状態を初期化  
                 InitActionChecked();  
1422    
1423                  //FormCreteから移動。                  //FormCreteから移動。
1424                  if GikoSys.Setting.TabAutoLoadSave then begin                  if GikoSys.Setting.TabAutoLoadSave then begin
1425                          GikoDM.TabAutoLoadAction.Execute;                          GikoDM.TabAutoLoadAction.Execute;
1426                  end;                  end;
1427                  //にちゃん語案内サポート機能  
1428                  if GikoSys.Setting.GengoSupport then begin          //ActionListのGroupIndexを元に戻す
1429                  //予定地                  SetGroupIndex(GikoDM.GikoFormActionList);
                 //Test向け  
                 end;  
1430    
1431                  FStartUp := false;                  FStartUp := false;
1432          end;          end;
# Line 7587  begin Line 7622  begin
7622          MsgBox(Handle, s, '処理されなかった例外', MB_OK or MB_ICONSTOP);          MsgBox(Handle, s, '処理されなかった例外', MB_OK or MB_ICONSTOP);
7623  end;  end;
7624  // *************************************************************************  // *************************************************************************
 //! アクションのチェック状態の初期化 FormのCreateで呼び出しても反映しない  
 // *************************************************************************  
 procedure TGikoForm.InitActionChecked();  
 begin  
         //ログイン状態を再設定  
         GikoDM.LoginAction.Checked := GikoDM.LoginAction.Checked;  
         //ミュートの状態を設定  
         GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;  
         //画面の分割の状態を再設定  
         GikoDM.ArrangeAction.Checked := GikoDM.ArrangeAction.Checked;  
   
         //スレ全部表示ボタンを押された状態にする  
         GikoDM.AllItemAction.Checked := True;  
         GikoDM.AllResAction.Checked := True;  
   
         // レス表示範囲  
         FResRangeMenuSelect := GikoSys.ResRange;  
         case GikoSys.ResRange of  
         Ord( grrAll ):  
                 begin  
                         GikoDM.AllResAction.Execute;  
                 end;  
         Ord( grrSelect ):  
                 begin  
                         SelectComboBox.Text := SelectComboBox.Items[ 1 ];  
                         GikoDM.SelectResAction.Checked := True;  
                 end;  
         else  
                 case FResRangeMenuSelect of  
                 Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked        := True;  
                 Ord( grrNew ):  GikoDM.OnlyNewResAction.Checked := True;  
                 100:                    GikoDM.OnlyAHundredResAction.Checked            := True;  
                 end;  
         end;  
   
         // スレッド一覧表示範囲  
         case GikoSys.Setting.ThreadRange of  
         gtrAll:  
                 begin  
                         GikoDM.AllItemAction.Checked := True;  
                         ViewType := gvtAll;  
                 end;  
         gtrLog:  
                 begin  
                         GikoDM.LogItemAction.Checked := True;  
                         ViewType := gvtLog;  
                 end;  
         gtrNew:  
                 begin  
                         GikoDM.NewItemAction.Checked := True;  
                         ViewType := gvtNew;  
                 end;  
         end;  
         if GikoSys.Setting.BrowserTabPosition = gtpTop then begin  
                 GikoDM.BrowserTabTopAction.Checked := True;  
         end else begin  
                 GikoDM.BrowserTabBottomAction.Checked := True;  
         end;  
   
         if GikoSys.Setting.BrowserTabStyle = gtsTab then begin  
                 GikoDM.BrowserTabTabStyleAction.Checked := True;  
         end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin  
                 GikoDM.BrowserTabButtonStyleAction.Checked := True;  
         end else begin  
                 GikoDM.BrowserTabFlatStyleAction.Checked := True;  
         end;  
 end;  
 // *************************************************************************  
7625  //! ダウンロードコントロールスレッドの生成  //! ダウンロードコントロールスレッドの生成
7626  // *************************************************************************  // *************************************************************************
7627  procedure TGikoForm.CreateControlThread();  procedure TGikoForm.CreateControlThread();
# Line 7777  begin Line 7744  begin
7744                                  rect := TreeView.Selected.DisplayRect(true);                                  rect := TreeView.Selected.DisplayRect(true);
7745                                  if ((rect.Left <= X) and (rect.Right >= X)) and                                  if ((rect.Left <= X) and (rect.Right >= X)) and
7746                                          ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin                                          ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
7747                      // クリックとダブルクリックをココで判定                                          // クリックとダブルクリックをココで判定
7748                                          if ssDouble in Shift then begin                                          if ssDouble in Shift then begin
7749                                                  TreeDoubleClick( TreeView.Selected );                                                  TreeDoubleClick( TreeView.Selected );
7750                                          end else begin                                          end else begin
# Line 7786  begin Line 7753  begin
7753                                  end;                                  end;
7754                          end;                          end;
7755                  end;                  end;
7756            end;
7757    end;
7758    //! ActionListのGroupIndexの保存
7759    procedure TGikoForm.GetGroupIndex(ActionList: TActionList);
7760    var
7761            i: Integer;
7762    begin
7763            if ActionList <> nil then begin
7764                    SetLength(FActionListGroupIndexes, ActionList.ActionCount);
7765    
7766                    for i := 0 to ActionList.ActionCount - 1 do begin
7767                            try
7768                                    FActionListGroupIndexes[i] :=
7769                                            TCustomAction(ActionList.Actions[i]).GroupIndex;
7770                                    TCustomAction(ActionList.Actions[i]).GroupIndex
7771                                            := 0;
7772                            except
7773                                    ;//Castできないとき対策
7774                            end;
7775                    end;
7776    
7777            end;
7778    end;
7779    //! ActionListのGroupIndexの設定
7780    procedure TGikoForm.SetGroupIndex(ActionList: TActionList);
7781    var
7782            i: Integer;
7783    begin
7784            if ActionList <> nil then begin
7785                    if Length( FActionListGroupIndexes ) = ActionList.ActionCount then begin
7786                            for i := 0 to ActionList.ActionCount - 1 do begin
7787                                    try
7788                                            TCustomAction(ActionList.Actions[i]).GroupIndex
7789                                                    := FActionListGroupIndexes[i];
7790                                    except
7791                                            ;//Castできないとき対策
7792                                    end;
7793                            end;
7794                    end;
7795          end;          end;
7796  end;  end;
7797    

Legend:
Removed from v.1.580  
changed lines
  Added in v.1.581

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