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

Legend:
Removed from v.1.519  
changed lines
  Added in v.1.520

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