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.511 by h677, Sat Apr 2 03:08:05 2005 UTC revision 1.511.2.7 by h677, Wed May 18 14:36:11 2005 UTC
# Line 1255  implementation Line 1255  implementation
1255    
1256  uses  uses
1257          About, Option, Round, Splash, Sort, ListSelect, Imm,          About, Option, Round, Splash, Sort, ListSelect, Imm,
1258          NewBoard, MojuUtils, Clipbrd, GikoBayesian;          NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter;
1259    
1260  const  const
1261          CAPTION_NAME: string = 'ギコナビ';          CAPTION_NAME: string = 'ギコナビ';
# Line 1523  begin Line 1523  begin
1523          // 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと)          // 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと)
1524          InitializeBoardPlugIns;          InitializeBoardPlugIns;
1525    
1526          //巡回データ読み込み  {       //巡回データ読み込み
1527          RoundList := TRoundList.Create;          RoundList := TRoundList.Create;
1528          RoundList.LoadRoundBoardFile;          RoundList.LoadRoundBoardFile;
1529    }
1530          // ボードファイル列挙(ReadFavorite より先に行うこと)          // ボードファイル列挙(ReadFavorite より先に行うこと)
1531          GikoSys.ListBoardFile;          GikoSys.ListBoardFile;
1532    
1533          RoundList.LoadRoundThreadFile;  {       RoundList.LoadRoundThreadFile;
1534    
1535          if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then          if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1536                  GikoSys.ListBoardFile;                  GikoSys.ListBoardFile;
1537    }
1538    
1539          // メニューに追加          // メニューに追加
1540          SetBBSMenu;          SetBBSMenu;
# Line 1756  begin Line 1757  begin
1757          // 起動時に保存されてしまう対策 3          // 起動時に保存されてしまう対策 3
1758          FIsIgnoreResize := rtResizing;          FIsIgnoreResize := rtResizing;
1759    
1760            // すべてのBBSを読み込んでおく
1761            for i := Length(BBSs) - 1 downto 0 do begin
1762                    if not BBSs[i].IsBoardFileRead then
1763                            GikoSys.ReadBoardFile(BBSs[i]);
1764            end;
1765    
1766            //巡回データ読み込み
1767            RoundList := TRoundList.Create;
1768            RoundList.LoadRoundBoardFile;
1769            RoundList.LoadRoundThreadFile;
1770    
1771            //if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1772            //      GikoSys.ListBoardFile;
1773    
1774          //引数があったらスレを開く(未取得ならダウンロード)          //引数があったらスレを開く(未取得ならダウンロード)
1775          for i := 1 to ParamCount do     begin          for i := 1 to ParamCount do     begin
# Line 1791  begin Line 1805  begin
1805          if GikoSys.Setting.GestureEnabled then          if GikoSys.Setting.GestureEnabled then
1806                  MouseGesture.SetHook( Handle );                  MouseGesture.SetHook( Handle );
1807    
1808      //2ch言語読み出し          //2ch言語読み出し
1809      GikoSys.Setting.SetMessages;      GikoSys.Setting.SetMessages;
1810      {      {
1811          //2ch言語読み出し          //2ch言語読み出し
# Line 2178  begin Line 2192  begin
2192          // TBBS は保持している TCategory, TBoard, TThreadItem すべてを開放する          // TBBS は保持している TCategory, TBoard, TThreadItem すべてを開放する
2193          // TBoard, TThreadItem のデストラクタはプラグインに破棄を伝えるので          // TBoard, TThreadItem のデストラクタはプラグインに破棄を伝えるので
2194          // BoardPluteIns の開放より先に行うこと          // BoardPluteIns の開放より先に行うこと
2195        for i := Length(BoardGroups) - 1 downto 0 do begin
2196            BoardGroups[i].Clear;
2197        end;
2198    
2199          try          try
2200                  for i := Length( BBSs ) - 1 downto 0 do begin                  for i := Length( BBSs ) - 1 downto 0 do begin
2201                          if BBSs[ i ] <> nil then                          if BBSs[ i ] <> nil then
# Line 2187  begin Line 2205  begin
2205          except          except
2206          end;          end;
2207    
2208    
2209          try          try
2210                  for i := Length( BoardPlugIns ) - 1 downto  0 do begin                  for i := Length( BoardPlugIns ) - 1 downto  0 do begin
2211                          if BoardPlugIns[ i ] <> nil then                          if BoardPlugIns[ i ] <> nil then
# Line 2294  begin Line 2313  begin
2313          ActiveList := nil;          ActiveList := nil;
2314    
2315          FTreeType := gttNone;          FTreeType := gttNone;
2316      GikoSys.FBoardURLList.Clear;      //GikoSys.FBoardURLList.Clear;
2317        for i := Length(BoardGroups) - 1 downto 0 do begin
2318            BoardGroups[i].Clear;
2319        end;
2320          GikoSys.ListBoardFile;          //ボードファイル読込          GikoSys.ListBoardFile;          //ボードファイル読込
2321    
2322          // BBS メニューの更新          // BBS メニューの更新
# Line 2314  begin Line 2336  begin
2336    
2337          SetLinkBar;          SetLinkBar;
2338    
2339            // すべてのBBSを読み込んでおく
2340            for i := Length(BBSs) - 1 downto 0 do begin
2341                    if not BBSs[i].IsBoardFileRead then
2342                            GikoSys.ReadBoardFile(BBSs[i]);
2343            end;
2344    
2345            //巡回リスト保存&破棄
2346            try
2347                    RoundList.SaveRoundFile;
2348            except
2349            end;
2350            try
2351                    RoundList.Clear;
2352            except
2353            end;
2354            RoundList.LoadRoundBoardFile;
2355            RoundList.LoadRoundThreadFile;
2356    
2357          //          //
2358          TabsOpenAction.Execute;          TabsOpenAction.Execute;
2359  end;  end;
# Line 2508  begin Line 2548  begin
2548                  ListView.Items.Clear;                  ListView.Items.Clear;
2549                  ListView.Items.Count := Category.Count;                  ListView.Items.Count := Category.Count;
2550    
2551                    for i := Category.Count - 1 downto 0 do begin
2552                            if( Category.Items[i].ParentCategory <> Category ) then begin
2553                                    Category.Items[i].ParentCategory        := Category;
2554                                    Category.Items[i].No                            := i + 1;
2555                            end;
2556                    end;
2557  //              UpFolderAction.Enabled := True;  //              UpFolderAction.Enabled := True;
2558  //              AllItemAction.Enabled := False;  //              AllItemAction.Enabled := False;
2559  //              LogItemAction.Enabled := False;  //              LogItemAction.Enabled := False;
# Line 2580  begin Line 2626  begin
2626                  ListView.Items.Count := 0;                  ListView.Items.Count := 0;
2627                  ListView.Items.Clear;                  ListView.Items.Clear;
2628    
2629                  case GikoForm.ViewType of                  {case GikoForm.ViewType of
2630                          gvtAll: ListView.Items.Count := Board.Count;                          gvtAll: ListView.Items.Count := Board.Count;
2631                          gvtLog: ListView.Items.Count := Board.GetLogThreadCount;                          gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2632                          gvtNew: ListView.Items.Count := Board.GetNewThreadCount;                          gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2633                          gvtUser: ListView.Items.Count := Board.GetUserThreadCount;                          gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2634                  end;                  end;
2635                    }
2636    
2637                    Board.LogThreadCount := Board.GetLogThreadCount;
2638                    Board.NewThreadCount := Board.GetNewThreadCount;
2639                    Board.UserThreadCount:= Board.GetUserThreadCount;
2640    
2641                    case GikoForm.ViewType of
2642                            gvtAll: ListView.Items.Count := Board.Count;
2643                            gvtLog: ListView.Items.Count := Board.LogThreadCount;
2644                            gvtNew: ListView.Items.Count := Board.NewThreadCount;
2645                            gvtUser: ListView.Items.Count := Board.UserThreadCount;
2646                    end;
2647    
2648                  ListNameLabel.Caption := Board.Title;                  ListNameLabel.Caption := Board.Title;
2649                  FolderImage.Picture := nil;                  FolderImage.Picture := nil;
# Line 2669  begin Line 2727  begin
2727    
2728                  if ListNumberVisibleAction.Checked then                  if ListNumberVisibleAction.Checked then
2729                          Item.Caption := IntToStr(Board.No) + ': ' + Board.Title                          Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2730                            //Item.Caption := IntToStr(Item.Index + 1) + ': ' + Board.Title
2731                  else                  else
2732                          Item.Caption := Board.Title;                          Item.Caption := Board.Title;
2733    
# Line 2717  begin Line 2776  begin
2776                  else                  else
2777                          ListView.StateImages := nil;                          ListView.StateImages := nil;
2778    
2779    
2780                    case GikoForm.ViewType of
2781                            gvtAll: BoardCnt := Board.Count;
2782                            gvtLog: BoardCnt := Board.LogThreadCount;
2783                            gvtNew: BoardCnt := Board.NewThreadCount;
2784                            gvtUser: BoardCnt := Board.UserThreadCount;
2785                            else
2786                                    BoardCnt := 0;
2787                    end;
2788                    {
2789                  case GikoForm.ViewType of                  case GikoForm.ViewType of
2790                          gvtAll: BoardCnt := Board.Count;                          gvtAll: BoardCnt := Board.Count;
2791                          gvtLog: BoardCnt := Board.GetLogThreadCount;                          gvtLog: BoardCnt := Board.GetLogThreadCount;
# Line 2725  begin Line 2794  begin
2794                          else                          else
2795                                  BoardCnt := 0;                                  BoardCnt := 0;
2796                  end;                  end;
2797                    }
2798  //              if Board = nil then Exit;  //              if Board = nil then Exit;
2799                  if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt)                  if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt)
2800                          or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit;                          or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit;
                 //if Item = nil then Exit;  
                 //if Item.Index > BoardCnt then Exit;  
                 //if ListView.Items.Count = 0 then Exit;  
   
 //              if not (Board.Items[Item.Index] is TThreadItem) then Exit;  
2801    
2802                    //改善すべきブロック/////////////////////////////////////////////////////
2803                  ThreadItem := nil;                  ThreadItem := nil;
2804                  case GikoForm.ViewType of                  case GikoForm.ViewType of
2805                          gvtAll: if Item.Index >= Board.Count then Exit else                          gvtAll: if Item.Index >= Board.Count then Exit else
2806                                                                  ThreadItem := TThreadItem(Board.Items[Item.Index]);                                                                  ThreadItem := TThreadItem(Board.Items[Item.Index]);
2807                          gvtLog:         ThreadItem := Board.GetLogThread(Item.Index);                          gvtLog:         ThreadItem := Board.GetLogThread(Item.Index);
2808                          gvtNew:         ThreadItem := Board.GetNewThread(Item.Index);                          gvtNew:         ThreadItem := Board.GetNewThread(Item.Index);
2809                          gvtUser:        ThreadItem := Board.GetUserThread(Item.Index);                          gvtUser:        ThreadItem := Board.GetUserThread(Item.Index);
2810                  end;                  end;
2811                    //////////////////////////////////////////////////////////////////////////
2812                    
2813                  if ThreadItem = nil then Exit;                  if ThreadItem = nil then Exit;
2814    
 //              if ListNumberVisibleAction.Checked then  
 //                      RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title  
 //              else  
                 //RepStr := ThreadItem.Title;  
2815                  RepStr := CustomStringReplace(ThreadItem.Title, '&lt;', '<' );                  RepStr := CustomStringReplace(ThreadItem.Title, '&lt;', '<' );
2816                  RepStr := CustomStringReplace(RepStr, '&gt;', '>' );                  RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2817                  RepStr := CustomStringReplace(RepStr, '&quot;', '"' );                  RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2818                  RepStr := CustomStringReplace(RepStr, '&amp;', '&' );                  RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
2819                  //RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]);                  //RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]);
   
2820                  if Item.SubItems.Count <> ListView.Columns.Count then begin                  if Item.SubItems.Count <> ListView.Columns.Count then begin
2821                          Item.SubItems.Clear;                          Item.SubItems.Clear;
2822                          Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count;                          Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count;
# Line 2832  begin Line 2893  begin
2893                                  end;                                  end;
2894                                  Inc( idx );                                  Inc( idx );
2895                          end;                          end;
2896    
2897                          if ThreadItem.NewArrival then                          if ThreadItem.NewArrival then
2898                                  Item.ImageIndex := ITEM_ICON_THREADNEW1                                  Item.ImageIndex := ITEM_ICON_THREADNEW1
2899                          else                          else
# Line 2872  begin Line 2934  begin
2934                          else                          else
2935                                  Item.ImageIndex := ITEM_ICON_THREAD1;                                  Item.ImageIndex := ITEM_ICON_THREAD1;
2936                  end;                  end;
2937    
2938                  Item.Data := ThreadItem;                  Item.Data := ThreadItem;
2939    
2940          end;          end;
# Line 2998  begin Line 3061  begin
3061                          end;                          end;
3062                  end else begin                  end else begin
3063                          threadItem := GetActiveContent;                          threadItem := GetActiveContent;
3064              URL := GetRespopupURL(Text, threadItem.URL);                          URL := GetRespopupURL(Text, threadItem.URL);
3065                          PathRec := Gikosys.Parse2chURL2(URL);                          PathRec := Gikosys.Parse2chURL2(URL);
3066                          if (PathRec.FNoParam) then begin                          if (PathRec.FNoParam) then begin
3067                                  PathRec.FSt := 1;                                  PathRec.FSt := 1;
# Line 3398  begin Line 3461  begin
3461                  end else if TObject(TreeView.Items[i].Data) is TBoard then begin                  end else if TObject(TreeView.Items[i].Data) is TBoard then begin
3462                          IsBoardNode := True;                          IsBoardNode := True;
3463                          Board := TBoard(TreeView.Items[i].Data);                          Board := TBoard(TreeView.Items[i].Data);
3464    
3465                          Cnt := Board.UnRead;                          Cnt := Board.UnRead;
3466                          if Cnt <= 0 then                          if Cnt <= 0 then
3467                                  continue;                                  continue;
# Line 3545  begin Line 3609  begin
3609                                  //スレ                                  //スレ
3610                                  Item.SaveItemFile;                                  Item.SaveItemFile;
3611                                  Item.ThreadItem.NewArrival := True;                                  Item.ThreadItem.NewArrival := True;
3612                                  if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin                                  //if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3613                                          boardPlugIn             := Item.ThreadItem.BoardPlugIn;                  if (Item.ThreadItem.ParentBoard.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3614                                            //boardPlugIn           := Item.ThreadItem.BoardPlugIn;
3615                        boardPlugIn         := Item.ThreadItem.ParentBoard.BoardPlugIn;
3616                                          Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;                                          Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
3617                                          ATitle := Item.ThreadItem.Title;                                          ATitle := Item.ThreadItem.Title;
3618                                  end else if ATitle = '(名称不明)' then begin                                  end else if ATitle = '(名称不明)' then begin
# Line 3578  begin Line 3644  begin
3644    
3645                                  if Item.State = gdsComplete then begin                                  if Item.State = gdsComplete then begin
3646                                          PlaySound('New');                                          PlaySound('New');
3647                                          AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK);                                                                                  AddMessageList(ATitle + ' ' + GikoSys.Setting.GetMessage(Ord(gmSureSyutoku)), nil, gmiOK);
3648                                          //Add by Genyakun                                          //Add by Genyakun
3649                                          DiffComp := True;                                          DiffComp := True;
3650                                  end else begin                                  end else begin
# Line 3591  begin Line 3657  begin
3657                                  //巡回ありの場合&1000超は巡回削除                                  //巡回ありの場合&1000超は巡回削除
3658                                  if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin                                  if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3659                                          Item.ThreadItem.Round := False;                                          Item.ThreadItem.Round := False;
3660                                          Item.ThreadItem.RoundName := '';                                          //Item.ThreadItem.RoundName := '';
3661                                          AddMessageList('★1000発言を超えたので巡回を削除しました - [' + Item.ThreadItem.Title + ']', nil, gmiOK);                                          AddMessageList('★1000発言を超えたので巡回を削除しました - [' + Item.ThreadItem.Title + ']', nil, gmiOK);
3662                                  end;                                  end;
3663    
# Line 3835  var Line 3901  var
3901          ThreadItem: TThreadItem;          ThreadItem: TThreadItem;
3902          Thread: TBrowserRecord;          Thread: TBrowserRecord;
3903          ThreadTitle, ThreadPTitle: string;          ThreadTitle, ThreadPTitle: string;
3904          ThreadScrollTop: Integer;          //ThreadScrollTop: Integer;
3905          ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;          ThreadIsLog, {ThreadUnRead,} ThreadNewArraical: boolean;
3906  begin  begin
3907  //      AddMessageList('SetContent', nil, gmiWhat);  //      AddMessageList('SetContent', nil, gmiWhat);
3908          Thread := inThread;          Thread := inThread;
# Line 3886  begin Line 3952  begin
3952                    
3953          ThreadTitle := Thread.Thread.Title;          ThreadTitle := Thread.Thread.Title;
3954          ThreadPTitle := Thread.Thread.ParentBoard.Title;          ThreadPTitle := Thread.Thread.ParentBoard.Title;
3955          ThreadScrollTop := Thread.Thread.ScrollTop;          //ThreadScrollTop := Thread.Thread.ScrollTop;
3956          ThreadIsLog := Thread.Thread.IsLogFile;          ThreadIsLog := Thread.Thread.IsLogFile;
3957          ThreadItem := Thread.Thread;          ThreadItem := Thread.Thread;
3958          ThreadNewArraical :=  Thread.Thread.NewArrival;          ThreadNewArraical :=  Thread.Thread.NewArrival;
3959          ThreadUnRead := Thread.Thread.UnRead;          //ThreadUnRead := Thread.Thread.UnRead;
3960          BBSID := ThreadItem.ParentBoard.BBSID;          BBSID := ThreadItem.ParentBoard.BBSID;
3961          FileName := ThreadItem.FileName;          FileName := ThreadItem.FileName;
3962    
# Line 4068  begin Line 4134  begin
4134          ViewType := AViewType;          ViewType := AViewType;
4135          if ActiveList is TBoard then begin          if ActiveList is TBoard then begin
4136                  Board := TBoard(ActiveList);                  Board := TBoard(ActiveList);
4137                    case ViewType of
4138                            //gvtAll: ListView.Items.Count := Board.Count;
4139                            gvtLog: Board.LogThreadCount := Board.GetLogThreadCount;
4140                            gvtNew: Board.NewThreadCount := Board.GetNewThreadCount;
4141                            gvtUser: Board.UserThreadCount:= Board.GetUserThreadCount;
4142                    end;
4143                    
4144                  SetActiveList(Board);                  SetActiveList(Board);
4145                    //
4146                  //SetThreadListItem(Board); //SetActiveList内で呼ばれるから2重に呼び出す必要なし                  //SetThreadListItem(Board); //SetActiveList内で呼ばれるから2重に呼び出す必要なし
4147          end;          end;
4148  end;  end;
# Line 5287  begin Line 5361  begin
5361  ////            if FTreeType = gtt2ch then  ////            if FTreeType = gtt2ch then
5362  //                      SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);  //                      SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
5363  //              //SetActiveList(TBoard(GetActiveList).ParentCategory);  //              //SetActiveList(TBoard(GetActiveList).ParentCategory);
5364                  if TreeView.Selected <> nil then begin                  //if TreeView.Selected <> nil then begin
5365                          if TObject(TreeView.Selected.Parent.Data) is TCategory then                  //      if TObject(TreeView.Selected.Parent.Data) is TCategory then
5366                                  SelectTreeNode(TCategory(TreeView.Selected.Parent.Data), True);                  //              SelectTreeNode(TCategory(TreeView.Selected.Parent.Data), True);
5367                  end;                  //end;
5368                    if TBoard(GetActiveList).ParentCategory <> nil then
5369                            SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
5370          end else if GetActiveList is TCategory then begin          end else if GetActiveList is TCategory then begin
5371  //              if FTreeType = gtt2ch then  //              if FTreeType = gtt2ch then
5372                          SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);                          SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
# Line 6855  begin Line 6931  begin
6931                  Dlg.ShowModal;                  Dlg.ShowModal;
6932                  if Dlg.ModalResult <> mrCancel then begin                  if Dlg.ModalResult <> mrCancel then begin
6933                          s := Trim(Dlg.RoundNameEdit.Text);                          s := Trim(Dlg.RoundNameEdit.Text);
6934                          RoundList.RoundNameList.Add(s);                          //RoundList.RoundNameList.Add(s);
6935                          SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);                          SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6936              ListView.Refresh;              ListView.Refresh;
6937                  end;                  end;
# Line 6872  begin Line 6948  begin
6948      end else begin      end else begin
6949          threadItem := GetActiveContent;          threadItem := GetActiveContent;
6950                  if threadItem <> nil then begin                  if threadItem <> nil then begin
6951                  threadItem.RoundName := RoundName;                          threadItem.RoundName := RoundName;
6952              threadItem.Round := RoundFlag;                          threadItem.Round := RoundFlag;
6953          end;          end;
6954      end;      end;
6955  end;  end;
# Line 7572  var Line 7648  var
7648          URL, protocol2, host2, path2, document2, port2, bookmark2 : string;          URL, protocol2, host2, path2, document2, port2, bookmark2 : string;
7649          tmp1, tmp2: string;          tmp1, tmp2: string;
7650          BBSID, BBSKey: string;          BBSID, BBSKey: string;
7651          tmpBoard, Board: TBoard;          {tmpBoard,} Board: TBoard;
7652          ThreadItem: TThreadItem;          ThreadItem: TThreadItem;
7653          i, bi                                   : Integer;          i, bi                                   : Integer;
7654          boardURL                        : string;          boardURL                        : string;
# Line 7603  begin Line 7679  begin
7679          //===== プラグイン          //===== プラグイン
7680          try          try
7681                  //作業中//                  //作業中//
7682                  bi := High( BoardPlugIns );                  //bi := High( BoardPlugIns );
7683                  for i := Low( BoardPlugIns ) to bi do begin                  bi := Length(BoardGroups) - 1;
7684                          if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin                  //for i := Low( BoardPlugIns ) to bi do begin
7685                                  case BoardPlugIns[ i ].AcceptURL( inURL ) of                  for i := 1 to bi do begin
7686                            //if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
7687                            if (BoardGroups[i].BoardPlugIn <> nil) and (Assigned(Pointer(BoardGroups[i].BoardPlugIn.Module))) then begin
7688                                    case BoardGroups[i].BoardPlugIn.AcceptURL( inURL ) of
7689                                  atThread:                                  atThread:
7690                                          begin                                          begin
7691                                                  tmpThread               := TThreadItem.Create( BoardPlugIns[ i ], inURL );                                                  boardURL        := BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL );
7692                                                  boardURL                := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );                                                  Board           := BBSsFindBoardFromURL( boardURL );
7693                                                  Board                           := BBSsFindBoardFromURL( boardURL );  
7694    
7695                                                  if Board = nil then begin                                                  if Board = nil then begin
7696                              //break;                                                          //break;
7697                                                          // ※作っても追加するところが無いので激しく保留                                                          // ※作っても追加するところが無いので激しく保留
7698                                                          //GikoSys.OpenBrowser(inURL, gbtUserApp);                                                          //GikoSys.OpenBrowser(inURL, gbtUserApp);
7699                                                          //Exit;                                                          //Exit;
# Line 7623  begin Line 7703  begin
7703                                                                  ShowBBSTree( BBSs[ 1 ] );                                                                  ShowBBSTree( BBSs[ 1 ] );
7704                                                          }                                                          }
7705                                                  end else begin                                                  end else begin
7706                                                            tmpThread               := TThreadItem.Create( BoardGroups[i].BoardPlugIn, Board, inURL );
7707                                                          if not Board.IsThreadDatRead then begin                                                          if not Board.IsThreadDatRead then begin
7708                                                                  GikoSys.ReadSubjectFile( Board );                                                                  GikoSys.ReadSubjectFile( Board );
7709                                                                    tmpThread.Free;
7710                                                                  Exit;                                                                  Exit;
7711                                                          end;                                                          end;
7712                                                          ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );                                                          ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7713                                                            tmpThread.Free;
7714                                                          if ThreadItem = nil then begin                                                          if ThreadItem = nil then begin
7715                                                                  ThreadItem := tmpThread;                                                                  ThreadItem := tmpThread;
7716                                                                  Board.Insert( 0, ThreadItem );                                                                  Board.Insert( 0, ThreadItem );
# Line 7660  begin Line 7743  begin
7743    
7744                                  atBoard:                                  atBoard:
7745                                          begin                                          begin
7746                                                  tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL);                                                  Board := BBSsFindBoardFromURL(
7747                                                  Board := BBSsFindBoardFromURL( tmpBoard.URL );                                                                          BoardGroups[i].BoardPlugIn.ExtractBoardURL( inURL )
7748                                                  tmpBoard.Free;                                                                          );
7749                                                  if Board <> nil then begin                                                  if Board <> nil then begin
7750                                                          if FActiveBBS <> Board.ParentCategory.ParenTBBS then                                                          if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7751                                                                  ShowBBSTree( Board.ParentCategory.ParenTBBS );                                                                  ShowBBSTree( Board.ParentCategory.ParenTBBS );
# Line 7724  begin Line 7807  begin
7807                                  GikoSys.OpenBrowser(URL1, gbtIE)                                  GikoSys.OpenBrowser(URL1, gbtIE)
7808                          else begin                          else begin
7809                          }                          }
7810                          ThreadItem := TThreadItem.Create( nil, URL );                          ThreadItem := TThreadItem.Create( nil, Board, URL );
7811                          ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');                          ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7812                          if AnsiPos(Host, Board.URL) = 0 then                          if AnsiPos(Host, Board.URL) = 0 then
7813                                  ThreadItem.DownloadHost := Host                                  ThreadItem.DownloadHost := Host
# Line 8135  begin Line 8218  begin
8218                                          FHint.Title := ThreadItem.Title;                                          FHint.Title := ThreadItem.Title;
8219    
8220          if ThreadItem <> nil then begin          if ThreadItem <> nil then begin
8221              if ThreadItem.IsBoardPlugInAvailable then begin              //if ThreadItem.IsBoardPlugInAvailable then begin
8222                if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
8223                  //===== プラグインによる表示                  //===== プラグインによる表示
8224                  boardPlugIn             := ThreadItem.BoardPlugIn;                  //boardPlugIn           := ThreadItem.BoardPlugIn;
8225                    boardPlugIn             := ThreadItem.ParentBoard.BoardPlugIn;
8226    
8227                  // フォントやサイズの設定                  // フォントやサイズの設定
8228                  // 文字コードはプラグインに任せる                  // 文字コードはプラグインに任せる
# Line 10305  begin Line 10390  begin
10390          ThreadItem := GetActiveContent;          ThreadItem := GetActiveContent;
10391    
10392          if ThreadItem <> nil then begin          if ThreadItem <> nil then begin
10393                  if ThreadItem.IsBoardPlugInAvailable then begin                  //if ThreadItem.IsBoardPlugInAvailable then begin
10394            if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
10395                          //===== プラグインによる表示                          //===== プラグインによる表示
10396                          boardPlugIn             := ThreadItem.BoardPlugIn;                          //boardPlugIn           := ThreadItem.BoardPlugIn;
10397                boardPlugIn         := ThreadItem.ParentBoard.BoardPlugIn;
10398    
10399                          // フォントやサイズの設定                          // フォントやサイズの設定
10400                          // 文字コードはプラグインに任せる                          // 文字コードはプラグインに任せる
# Line 10325  begin Line 10412  begin
10412                                  Header := CustomStringReplace(Header, '</b>', '',true);                                  Header := CustomStringReplace(Header, '</b>', '',true);
10413                                  Header := CustomStringReplace(Header, '<b>', '',true);                                  Header := CustomStringReplace(Header, '<b>', '',true);
10414                          end;                          end;
10415                          if ThreadItem.IsBoardPlugInAvailable then begin                          //if ThreadItem.IsBoardPlugInAvailable then begin
10416                if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
10417                                  Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);                                  Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
10418                                  Body := CustomStringReplace(Body, '<br>', #13#10,true);                                  Body := CustomStringReplace(Body, '<br>', #13#10,true);
10419                          end else begin                          end else begin
# Line 11982  var Line 12070  var
12070          msg : String;          msg : String;
12071          ReadList                : TStringList;          ReadList                : TStringList;
12072          wordCount               : TWordCount;          wordCount               : TWordCount;
12073          i : Integer;          {i : Integer;}
12074  begin  begin
12075          IndividualForm := TIndividualAbonForm.Create(Self);          IndividualForm := TIndividualAbonForm.Create(Self);
12076          try          try

Legend:
Removed from v.1.511  
changed lines
  Added in v.1.511.2.7

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