IDE: View Package Links: popup menu item to copy selection to clipboard

git-svn-id: trunk@39999 -
This commit is contained in:
mattias 2013-01-28 10:35:52 +00:00
parent 647c1b3b87
commit fdc85b3e79
2 changed files with 19 additions and 28 deletions

View File

@ -137,10 +137,8 @@ object PackageLinksDialog: TPackageLinksDialog
end> end>
FixedCols = 0 FixedCols = 0
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goEditing, goTabs, goColSpanning, goDblClickAutoSize, goSmoothScroll] Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goEditing, goTabs, goColSpanning, goDblClickAutoSize, goSmoothScroll]
PopupMenu = GridPopupMenu
TabOrder = 1 TabOrder = 1
OnCheckboxToggled = PkgStringGridCheckboxToggled
OnSelection = PkgStringGridSelection
OnValidateEntry = PkgStringGridValidateEntry
end end
object BtnPanel: TPanel object BtnPanel: TPanel
Left = 0 Left = 0
@ -194,4 +192,12 @@ object PackageLinksDialog: TPackageLinksDialog
left = 355 left = 355
top = 190 top = 190
end end
object GridPopupMenu: TPopupMenu
left = 206
top = 288
object CopyCellToClipboardMenuItem: TMenuItem
Caption = 'CopyCellToClipboard'
OnClick = CopyCellToClipboardMenuItemClick
end
end
end end

View File

@ -38,7 +38,7 @@ interface
uses uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons, Grids, ExtCtrls, ComCtrls, AvgLvlTree, LazUTF8, Buttons, Grids, ExtCtrls, ComCtrls, Menus, AvgLvlTree, LazUTF8,
FileProcs, PackageIntf, FileProcs, PackageIntf,
LazarusIDEStrConsts, PackageDefs, PackageLinks, LPKCache; LazarusIDEStrConsts, PackageDefs, PackageLinks, LPKCache;
@ -72,12 +72,15 @@ type
LPKFileValidCheckBox: TCheckBox; LPKFileValidCheckBox: TCheckBox;
LPKFileInvalidCheckBox: TCheckBox; LPKFileInvalidCheckBox: TCheckBox;
LPKParsingTimer: TTimer; LPKParsingTimer: TTimer;
CopyCellToClipboardMenuItem: TMenuItem;
GridPopupMenu: TPopupMenu;
ProgressBar1: TProgressBar; ProgressBar1: TProgressBar;
ShowUserLinksCheckBox: TCheckBox; ShowUserLinksCheckBox: TCheckBox;
ShowGlobalLinksCheckBox: TCheckBox; ShowGlobalLinksCheckBox: TCheckBox;
ScopeGroupBox: TGroupBox; ScopeGroupBox: TGroupBox;
PkgStringGrid: TStringGrid; PkgStringGrid: TStringGrid;
UpdateGlobalLinksButton: TButton; UpdateGlobalLinksButton: TButton;
procedure CopyCellToClipboardMenuItemClick(Sender: TObject);
procedure FilterEditChange(Sender: TObject); procedure FilterEditChange(Sender: TObject);
procedure FilterEditEnter(Sender: TObject); procedure FilterEditEnter(Sender: TObject);
procedure FilterEditExit(Sender: TObject); procedure FilterEditExit(Sender: TObject);
@ -87,11 +90,6 @@ type
procedure LPKFileInvalidCheckBoxChange(Sender: TObject); procedure LPKFileInvalidCheckBoxChange(Sender: TObject);
procedure LPKParsingTimerTimer(Sender: TObject); procedure LPKParsingTimerTimer(Sender: TObject);
procedure OnAllLPKParsed(Sender: TObject); procedure OnAllLPKParsed(Sender: TObject);
procedure PkgStringGridCheckboxToggled(sender: TObject; aCol,
aRow: Integer; aState: TCheckboxState);
procedure PkgStringGridSelection(Sender: TObject; aCol, aRow: Integer);
procedure PkgStringGridValidateEntry(sender: TObject; aCol, aRow: Integer;
const OldValue: string; var NewValue: String);
procedure ShowGlobalLinksCheckBoxChange(Sender: TObject); procedure ShowGlobalLinksCheckBoxChange(Sender: TObject);
procedure ShowUserLinksCheckBoxChange(Sender: TObject); procedure ShowUserLinksCheckBoxChange(Sender: TObject);
procedure UpdateGlobalLinksButtonClick(Sender: TObject); procedure UpdateGlobalLinksButtonClick(Sender: TObject);
@ -137,7 +135,7 @@ procedure TPackageLinksDialog.FormCreate(Sender: TObject);
begin begin
Caption:=lisPLDPackageLinks; Caption:=lisPLDPackageLinks;
ScopeGroupBox.Caption:=dlgScope; ScopeGroupBox.Caption:=dlgScope;
UpdateFacets; CopyCellToClipboardMenuItem.Caption:=srkmecCopy;
UpdateGlobalLinksButton.Caption:=lrsRescanLplFiles; UpdateGlobalLinksButton.Caption:=lrsRescanLplFiles;
CloseBitBtn.Caption:=lisClose; CloseBitBtn.Caption:=lisClose;
FilterEdit.Text:=lisCEFilter; FilterEdit.Text:=lisCEFilter;
@ -155,6 +153,11 @@ begin
UpdatePackageList; UpdatePackageList;
end; end;
procedure TPackageLinksDialog.CopyCellToClipboardMenuItemClick(Sender: TObject);
begin
PkgStringGrid.CopyToClipboard(true);
end;
procedure TPackageLinksDialog.FilterEditEnter(Sender: TObject); procedure TPackageLinksDialog.FilterEditEnter(Sender: TObject);
begin begin
if FilterEdit.Text=lisCEFilter then if FilterEdit.Text=lisCEFilter then
@ -196,24 +199,6 @@ begin
UpdatePackageList; UpdatePackageList;
end; end;
procedure TPackageLinksDialog.PkgStringGridCheckboxToggled(sender: TObject;
aCol, aRow: Integer; aState: TCheckboxState);
begin
end;
procedure TPackageLinksDialog.PkgStringGridSelection(Sender: TObject; aCol,
aRow: Integer);
begin
end;
procedure TPackageLinksDialog.PkgStringGridValidateEntry(sender: TObject; aCol,
aRow: Integer; const OldValue: string; var NewValue: String);
begin
end;
procedure TPackageLinksDialog.ShowGlobalLinksCheckBoxChange(Sender: TObject); procedure TPackageLinksDialog.ShowGlobalLinksCheckBoxChange(Sender: TObject);
begin begin
UpdatePackageList; UpdatePackageList;