mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-29 11:22:50 +02:00
Opkman: ShowHintfrm: localize "description" and "license". OptionsFrm: GUI tweak.
git-svn-id: trunk@56814 -
This commit is contained in:
parent
e94bf52f12
commit
ee02d44114
@ -292,12 +292,13 @@ resourcestring
|
|||||||
rsOptions_lbDaysToShowNewPackages_Caption = 'Show different icon for newly added packages for (days):';
|
rsOptions_lbDaysToShowNewPackages_Caption = 'Show different icon for newly added packages for (days):';
|
||||||
rsOptions_cbRegular_Caption = 'Show regular icon for newly added packages after install';
|
rsOptions_cbRegular_Caption = 'Show regular icon for newly added packages after install';
|
||||||
rsOptions_cbUseDefaultTheme_Caption = 'Use default theme manager';
|
rsOptions_cbUseDefaultTheme_Caption = 'Use default theme manager';
|
||||||
rsOptions_lbHintFrm = 'Show quick info for repository packages';
|
rsOptions_rbHintFormOptions_Caption = 'Quick info for repository packages';
|
||||||
rsOptions_rbHintFormOptions_Item0 = 'Behaves like a regular hint window';
|
rsOptions_rbHintFormOptions_Item0 = 'Behaves like a regular hint window';
|
||||||
rsOptions_rbHintFormOptions_Item1 = 'It''s triggered by SHIFT, moves with the mouse';
|
rsOptions_rbHintFormOptions_Item1 = 'It''s triggered by SHIFT, moves with the mouse';
|
||||||
rsOptions_rbHintFormOptions_Item2 = 'Off';
|
rsOptions_rbHintFormOptions_Item2 = 'Off';
|
||||||
rsOptions_lbFilterFiles_Caption = 'Excluded files (packages)';
|
rsOptions_lbFilterFiles_Caption = 'Excluded files (packages)';
|
||||||
rsOptions_lbFilterDirs_Caption = 'Excluded folders (packages)';
|
rsOptions_lbFilterDirs_Caption = 'Excluded folders (packages)';
|
||||||
|
rsOptions_bpOptions_bHelp = 'Restore defaults';
|
||||||
rsOptions_bAdd_Caption = 'Add';
|
rsOptions_bAdd_Caption = 'Add';
|
||||||
rsOptions_bEdit_Caption = 'Edit';
|
rsOptions_bEdit_Caption = 'Edit';
|
||||||
rsOptions_bDelete_Caption = 'Delete';
|
rsOptions_bDelete_Caption = 'Delete';
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
object OptionsFrm: TOptionsFrm
|
object OptionsFrm: TOptionsFrm
|
||||||
Left = 428
|
Left = 428
|
||||||
Height = 555
|
Height = 556
|
||||||
Top = 141
|
Top = 141
|
||||||
Width = 590
|
Width = 635
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
Caption = 'Options'
|
Caption = 'Options'
|
||||||
ClientHeight = 555
|
ClientHeight = 556
|
||||||
ClientWidth = 590
|
ClientWidth = 635
|
||||||
Constraints.MinHeight = 300
|
Constraints.MinHeight = 300
|
||||||
Constraints.MinWidth = 475
|
Constraints.MinWidth = 475
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
@ -16,70 +16,40 @@ object OptionsFrm: TOptionsFrm
|
|||||||
LCLVersion = '1.9.0.0'
|
LCLVersion = '1.9.0.0'
|
||||||
object pnBottom: TPanel
|
object pnBottom: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 31
|
Height = 46
|
||||||
Top = 524
|
Top = 510
|
||||||
Width = 590
|
Width = 635
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 31
|
ClientHeight = 46
|
||||||
ClientWidth = 590
|
ClientWidth = 635
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object bOk: TButton
|
object bpOptions: TButtonPanel
|
||||||
AnchorSideRight.Control = bCancel
|
|
||||||
AnchorSideBottom.Control = bRestore
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 418
|
|
||||||
Height = 25
|
|
||||||
Top = 0
|
|
||||||
Width = 80
|
|
||||||
Anchors = [akTop, akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Right = 6
|
|
||||||
Caption = 'OK'
|
|
||||||
Constraints.MinWidth = 80
|
|
||||||
OnClick = bOkClick
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
object bCancel: TButton
|
|
||||||
AnchorSideRight.Control = pnBottom
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = bRestore
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 504
|
|
||||||
Height = 25
|
|
||||||
Top = 0
|
|
||||||
Width = 80
|
|
||||||
Anchors = [akTop, akRight, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Right = 6
|
|
||||||
Caption = 'Cancel'
|
|
||||||
Constraints.MinWidth = 80
|
|
||||||
ModalResult = 2
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
|
||||||
object bRestore: TButton
|
|
||||||
AnchorSideLeft.Control = pnBottom
|
|
||||||
AnchorSideBottom.Control = pnBottom
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 34
|
||||||
Top = 0
|
Top = 6
|
||||||
Width = 110
|
Width = 623
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
OKButton.Name = 'OKButton'
|
||||||
AutoSize = True
|
OKButton.DefaultCaption = True
|
||||||
BorderSpacing.Left = 6
|
OKButton.OnClick = OKButtonClick
|
||||||
BorderSpacing.Bottom = 6
|
HelpButton.Name = 'HelpButton'
|
||||||
Caption = 'Restore defaults'
|
HelpButton.Caption = '&Restore defaults'
|
||||||
OnClick = bRestoreClick
|
HelpButton.DefaultCaption = False
|
||||||
|
HelpButton.OnClick = HelpButtonClick
|
||||||
|
CloseButton.Name = 'CloseButton'
|
||||||
|
CloseButton.DefaultCaption = True
|
||||||
|
CancelButton.Name = 'CancelButton'
|
||||||
|
CancelButton.DefaultCaption = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pgOptions: TPageControl
|
object pgOptions: TPageControl
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 512
|
Height = 498
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 578
|
Width = 623
|
||||||
ActivePage = tsGeneral
|
ActivePage = tsGeneral
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -87,17 +57,17 @@ object OptionsFrm: TOptionsFrm
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object tsGeneral: TTabSheet
|
object tsGeneral: TTabSheet
|
||||||
Caption = 'General'
|
Caption = 'General'
|
||||||
ClientHeight = 484
|
ClientHeight = 470
|
||||||
ClientWidth = 570
|
ClientWidth = 615
|
||||||
object pnGeneral: TPanel
|
object pnGeneral: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 484
|
Height = 470
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 570
|
Width = 615
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 484
|
ClientHeight = 470
|
||||||
ClientWidth = 570
|
ClientWidth = 615
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object lbRemoteRepository: TLabel
|
object lbRemoteRepository: TLabel
|
||||||
@ -194,14 +164,14 @@ object OptionsFrm: TOptionsFrm
|
|||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 27
|
Top = 27
|
||||||
Width = 558
|
Width = 603
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 23
|
ClientHeight = 23
|
||||||
ClientWidth = 558
|
ClientWidth = 603
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object cbRemoteRepository: TComboBox
|
object cbRemoteRepository: TComboBox
|
||||||
AnchorSideLeft.Control = pnRepositories
|
AnchorSideLeft.Control = pnRepositories
|
||||||
@ -210,7 +180,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 495
|
Width = 540
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Right = 2
|
BorderSpacing.Right = 2
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
@ -225,7 +195,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = cbRemoteRepository
|
AnchorSideBottom.Control = cbRemoteRepository
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 497
|
Left = 542
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 61
|
Width = 61
|
||||||
@ -279,7 +249,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 419
|
Top = 399
|
||||||
Width = 116
|
Width = 116
|
||||||
BorderSpacing.Top = 7
|
BorderSpacing.Top = 7
|
||||||
Caption = 'Use default theme'
|
Caption = 'Use default theme'
|
||||||
@ -291,7 +261,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 2
|
Height = 2
|
||||||
Top = 152
|
Top = 152
|
||||||
Width = 566
|
Width = 611
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 25
|
BorderSpacing.Top = 25
|
||||||
end
|
end
|
||||||
@ -301,7 +271,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
Left = 4
|
Left = 4
|
||||||
Height = 2
|
Height = 2
|
||||||
Top = 285
|
Top = 285
|
||||||
Width = 566
|
Width = 611
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 25
|
BorderSpacing.Top = 25
|
||||||
end
|
end
|
||||||
@ -338,33 +308,20 @@ object OptionsFrm: TOptionsFrm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 2
|
Height = 2
|
||||||
Top = 410
|
Top = 390
|
||||||
Width = 566
|
Width = 611
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 10
|
BorderSpacing.Top = 10
|
||||||
end
|
end
|
||||||
object lbHintForm: TLabel
|
|
||||||
AnchorSideLeft.Control = lbDaysToShowNewPackages
|
|
||||||
AnchorSideTop.Control = Bevel2
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 6
|
|
||||||
Height = 15
|
|
||||||
Top = 292
|
|
||||||
Width = 211
|
|
||||||
BorderSpacing.Top = 5
|
|
||||||
Caption = 'Show quick info for repository packages'
|
|
||||||
ParentColor = False
|
|
||||||
end
|
|
||||||
object rbHintFormOptions: TRadioGroup
|
object rbHintFormOptions: TRadioGroup
|
||||||
AnchorSideLeft.Control = lbHintForm
|
AnchorSideTop.Control = Bevel2
|
||||||
AnchorSideTop.Control = lbHintForm
|
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = pnGeneral
|
AnchorSideRight.Control = pnGeneral
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 88
|
Height = 88
|
||||||
Top = 312
|
Top = 292
|
||||||
Width = 554
|
Width = 599
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
BorderSpacing.Top = 5
|
BorderSpacing.Top = 5
|
||||||
@ -378,7 +335,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 1
|
ChildSizing.ControlsPerLine = 1
|
||||||
ClientHeight = 68
|
ClientHeight = 68
|
||||||
ClientWidth = 550
|
ClientWidth = 595
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'Behaves like a regular hint window'
|
'Behaves like a regular hint window'
|
||||||
|
@ -30,9 +30,10 @@ unit opkman_optionsfrm;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Math, Graphics,
|
SysUtils, Math, Graphics, Classes,
|
||||||
// LCL
|
// LCL
|
||||||
Forms, Controls, Dialogs, StdCtrls, ExtCtrls, Spin, ComCtrls, EditBtn, Menus,
|
Forms, Controls, Dialogs, StdCtrls, ExtCtrls, Spin, ComCtrls, EditBtn, Menus,
|
||||||
|
ButtonPanel,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazFileUtils,
|
LazFileUtils,
|
||||||
// OpkMan
|
// OpkMan
|
||||||
@ -43,7 +44,6 @@ type
|
|||||||
{ TOptionsFrm }
|
{ TOptionsFrm }
|
||||||
|
|
||||||
TOptionsFrm = class(TForm)
|
TOptionsFrm = class(TForm)
|
||||||
bCancel: TButton;
|
|
||||||
Bevel1: TBevel;
|
Bevel1: TBevel;
|
||||||
Bevel2: TBevel;
|
Bevel2: TBevel;
|
||||||
Bevel3: TBevel;
|
Bevel3: TBevel;
|
||||||
@ -53,9 +53,8 @@ type
|
|||||||
bFoldersAdd: TButton;
|
bFoldersAdd: TButton;
|
||||||
bFoldersDelete: TButton;
|
bFoldersDelete: TButton;
|
||||||
bFoldersEdit: TButton;
|
bFoldersEdit: TButton;
|
||||||
bOk: TButton;
|
|
||||||
bOpen: TButton;
|
bOpen: TButton;
|
||||||
bRestore: TButton;
|
bpOptions: TButtonPanel;
|
||||||
cbProxy: TCheckBox;
|
cbProxy: TCheckBox;
|
||||||
cbForceDownloadExtract: TCheckBox;
|
cbForceDownloadExtract: TCheckBox;
|
||||||
cbDeleteZipAfterInstall: TCheckBox;
|
cbDeleteZipAfterInstall: TCheckBox;
|
||||||
@ -71,7 +70,6 @@ type
|
|||||||
edProxyServer: TEdit;
|
edProxyServer: TEdit;
|
||||||
edProxyUser: TEdit;
|
edProxyUser: TEdit;
|
||||||
gbProxySettings: TGroupBox;
|
gbProxySettings: TGroupBox;
|
||||||
lbHintForm: TLabel;
|
|
||||||
lbConTimeOut: TLabel;
|
lbConTimeOut: TLabel;
|
||||||
lbFilterDirs: TLabel;
|
lbFilterDirs: TLabel;
|
||||||
lbFilterFiles: TLabel;
|
lbFilterFiles: TLabel;
|
||||||
@ -112,13 +110,13 @@ type
|
|||||||
procedure bFilesAddClick(Sender: TObject);
|
procedure bFilesAddClick(Sender: TObject);
|
||||||
procedure bFilesDeleteClick(Sender: TObject);
|
procedure bFilesDeleteClick(Sender: TObject);
|
||||||
procedure bFilesEditClick(Sender: TObject);
|
procedure bFilesEditClick(Sender: TObject);
|
||||||
procedure bOkClick(Sender: TObject);
|
|
||||||
procedure bOpenClick(Sender: TObject);
|
procedure bOpenClick(Sender: TObject);
|
||||||
procedure bRestoreClick(Sender: TObject);
|
|
||||||
procedure cbProxyChange(Sender: TObject);
|
procedure cbProxyChange(Sender: TObject);
|
||||||
procedure cbSelectProfileChange(Sender: TObject);
|
procedure cbSelectProfileChange(Sender: TObject);
|
||||||
procedure edRemoteRepositoryKeyPress(Sender: TObject; var Key: char);
|
procedure edRemoteRepositoryKeyPress(Sender: TObject; var Key: char);
|
||||||
procedure FormKeyPress(Sender: TObject; var Key: char);
|
procedure FormKeyPress(Sender: TObject; var Key: char);
|
||||||
|
procedure HelpButtonClick(Sender: TObject);
|
||||||
|
procedure OKButtonClick(Sender: TObject);
|
||||||
procedure pnProfilesMainResize(Sender: TObject);
|
procedure pnProfilesMainResize(Sender: TObject);
|
||||||
procedure pnProfilesTopResize(Sender: TObject);
|
procedure pnProfilesTopResize(Sender: TObject);
|
||||||
private
|
private
|
||||||
@ -137,99 +135,6 @@ implementation
|
|||||||
|
|
||||||
{ TOptionsFrm }
|
{ TOptionsFrm }
|
||||||
|
|
||||||
procedure TOptionsFrm.bOkClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
I: Integer;
|
|
||||||
begin
|
|
||||||
if Trim(cbRemoteRepository.Text) = '' then
|
|
||||||
begin
|
|
||||||
MessageDlgEx(rsOptions_RemoteRepository_Information, mtInformation, [mbOk], Self);
|
|
||||||
cbRemoteRepository.SetFocus;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if cbProxy.Checked then
|
|
||||||
begin
|
|
||||||
if Trim(edProxyServer.Text) = '' then
|
|
||||||
begin
|
|
||||||
MessageDlgEx(rsOptions_ProxyServer_Info, mtInformation, [mbOk], Self);
|
|
||||||
edProxyServer.SetFocus;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
if seProxyPort.Value = 0 then
|
|
||||||
begin
|
|
||||||
MessageDlgEx(rsOptions_ProxyPort_Info, mtInformation, [mbOk], Self);
|
|
||||||
seProxyPort.SetFocus;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if Trim(edLocalRepositoryPackages.Text) = '' then
|
|
||||||
begin
|
|
||||||
MessageDlgEx(rsOptions_InvalidDirectory_Info, mtInformation, [mbOk], Self);
|
|
||||||
edLocalRepositoryPackages.SetFocus;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
if Trim(edLocalRepositoryArchive.Text) = '' then
|
|
||||||
begin
|
|
||||||
MessageDlgEx(rsOptions_InvalidDirectory_Info, mtInformation, [mbOk], Self);
|
|
||||||
edLocalRepositoryArchive.SetFocus;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
if Trim(edLocalRepositoryUpdate.Text) = '' then
|
|
||||||
begin
|
|
||||||
MessageDlgEx(rsOptions_InvalidDirectory_Info, mtInformation, [mbOk], Self);
|
|
||||||
edLocalRepositoryUpdate.SetFocus;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
if Options.RemoteRepositoryTmp.Count > 0 then
|
|
||||||
Options.RemoteRepository.Text := Options.RemoteRepositoryTmp.Text;
|
|
||||||
Options.ActiveRepositoryIndex := cbRemoteRepository.ItemIndex;
|
|
||||||
Options.ForceDownloadAndExtract := cbForceDownloadExtract.Checked;
|
|
||||||
Options.ConTimeOut := spConTimeOut.Value;
|
|
||||||
Options.DeleteZipAfterInstall := cbDeleteZipAfterInstall.Checked;
|
|
||||||
Options.CheckForUpdates := cbCheckForUpdates.ItemIndex;
|
|
||||||
Options.DaysToShowNewPackages := spDaysToShowNewPackages.Value;
|
|
||||||
Options.ShowRegularIcons := cbRegularIcons.Checked;
|
|
||||||
Options.HintFormOption := rbHintFormOptions.ItemIndex;
|
|
||||||
Options.UseDefaultTheme := cbUseDefaultTheme.Checked;
|
|
||||||
|
|
||||||
Options.ProxyEnabled := cbProxy.Checked;
|
|
||||||
Options.ProxyServer := edProxyServer.Text;
|
|
||||||
Options.ProxyPort := seProxyPort.Value;
|
|
||||||
Options.ProxyUser := edProxyUser.Text;
|
|
||||||
Options.ProxyPassword := edProxyPassword.Text;
|
|
||||||
|
|
||||||
Options.LocalRepositoryPackages := AppendPathDelim(edLocalRepositoryPackages.Text);
|
|
||||||
Options.LocalRepositoryArchive := AppendPathDelim(edLocalRepositoryArchive.Text);
|
|
||||||
Options.LocalRepositoryUpdate := AppendPathDelim(edLocalRepositoryUpdate.Text);
|
|
||||||
if not DirectoryExists(Options.LocalRepositoryPackages) then
|
|
||||||
ForceDirectories(Options.LocalRepositoryPackages);
|
|
||||||
if not DirectoryExists(Options.LocalRepositoryArchive) then
|
|
||||||
ForceDirectories(Options.LocalRepositoryArchive);
|
|
||||||
if not DirectoryExists(Options.LocalRepositoryUpdate) then
|
|
||||||
ForceDirectories(Options.LocalRepositoryUpdate);
|
|
||||||
|
|
||||||
Options.UserProfile := cbSelectProfile.ItemIndex;
|
|
||||||
for I := 0 to lbExcludeFiles.Items.Count - 1 do
|
|
||||||
begin
|
|
||||||
if I = 0 then
|
|
||||||
Options.ExcludedFiles := lbExcludeFiles.Items[I]
|
|
||||||
else
|
|
||||||
Options.ExcludedFiles := Options.ExcludedFiles + ',' + lbExcludeFiles.Items[I];
|
|
||||||
end;
|
|
||||||
for I := 0 to lbExcludeFolders.Items.Count - 1 do
|
|
||||||
begin
|
|
||||||
if I = 0 then
|
|
||||||
Options.ExcludedFolders := lbExcludeFolders.Items[I]
|
|
||||||
else
|
|
||||||
Options.ExcludedFolders := Options.ExcludedFolders + ',' + lbExcludeFolders.Items[I];
|
|
||||||
end;
|
|
||||||
|
|
||||||
Options.Save;
|
|
||||||
ModalResult := mrOk;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TOptionsFrm.bOpenClick(Sender: TObject);
|
procedure TOptionsFrm.bOpenClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
@ -382,16 +287,6 @@ begin
|
|||||||
ListBox.Items.Delete(Index);
|
ListBox.Items.Delete(Index);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOptionsFrm.bRestoreClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if MessageDlgEx(rsOptions_RestoreDefaults_Conf, mtInformation, [mbYes, mbNo], Self) = mrYes then
|
|
||||||
begin
|
|
||||||
Options.LoadDefault;
|
|
||||||
Options.CreateMissingPaths;
|
|
||||||
SetupControls;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TOptionsFrm.cbProxyChange(Sender: TObject);
|
procedure TOptionsFrm.cbProxyChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
gbProxySettings.Enabled:= cbProxy.Checked;
|
gbProxySettings.Enabled:= cbProxy.Checked;
|
||||||
@ -405,7 +300,7 @@ end;
|
|||||||
procedure TOptionsFrm.edRemoteRepositoryKeyPress(Sender: TObject; var Key: char);
|
procedure TOptionsFrm.edRemoteRepositoryKeyPress(Sender: TObject; var Key: char);
|
||||||
begin
|
begin
|
||||||
if Key = #13 then
|
if Key = #13 then
|
||||||
bOkClick(bOk);
|
OKButtonClick(bpOptions.OKButton);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOptionsFrm.FormKeyPress(Sender: TObject; var Key: char);
|
procedure TOptionsFrm.FormKeyPress(Sender: TObject; var Key: char);
|
||||||
@ -414,6 +309,110 @@ begin
|
|||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOptionsFrm.HelpButtonClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if MessageDlgEx(rsOptions_RestoreDefaults_Conf, mtInformation, [mbYes, mbNo], Self) = mrYes then
|
||||||
|
begin
|
||||||
|
Options.LoadDefault;
|
||||||
|
Options.CreateMissingPaths;
|
||||||
|
SetupControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TOptionsFrm.OKButtonClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
I: Integer;
|
||||||
|
begin
|
||||||
|
ModalResult := mrNone;
|
||||||
|
if Trim(cbRemoteRepository.Text) = '' then
|
||||||
|
begin
|
||||||
|
MessageDlgEx(rsOptions_RemoteRepository_Information, mtInformation, [mbOk], Self);
|
||||||
|
cbRemoteRepository.SetFocus;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if cbProxy.Checked then
|
||||||
|
begin
|
||||||
|
if Trim(edProxyServer.Text) = '' then
|
||||||
|
begin
|
||||||
|
MessageDlgEx(rsOptions_ProxyServer_Info, mtInformation, [mbOk], Self);
|
||||||
|
edProxyServer.SetFocus;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if seProxyPort.Value = 0 then
|
||||||
|
begin
|
||||||
|
MessageDlgEx(rsOptions_ProxyPort_Info, mtInformation, [mbOk], Self);
|
||||||
|
seProxyPort.SetFocus;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Trim(edLocalRepositoryPackages.Text) = '' then
|
||||||
|
begin
|
||||||
|
MessageDlgEx(rsOptions_InvalidDirectory_Info, mtInformation, [mbOk], Self);
|
||||||
|
edLocalRepositoryPackages.SetFocus;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(edLocalRepositoryArchive.Text) = '' then
|
||||||
|
begin
|
||||||
|
MessageDlgEx(rsOptions_InvalidDirectory_Info, mtInformation, [mbOk], Self);
|
||||||
|
edLocalRepositoryArchive.SetFocus;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Trim(edLocalRepositoryUpdate.Text) = '' then
|
||||||
|
begin
|
||||||
|
MessageDlgEx(rsOptions_InvalidDirectory_Info, mtInformation, [mbOk], Self);
|
||||||
|
edLocalRepositoryUpdate.SetFocus;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if Options.RemoteRepositoryTmp.Count > 0 then
|
||||||
|
Options.RemoteRepository.Text := Options.RemoteRepositoryTmp.Text;
|
||||||
|
Options.ActiveRepositoryIndex := cbRemoteRepository.ItemIndex;
|
||||||
|
Options.ForceDownloadAndExtract := cbForceDownloadExtract.Checked;
|
||||||
|
Options.ConTimeOut := spConTimeOut.Value;
|
||||||
|
Options.DeleteZipAfterInstall := cbDeleteZipAfterInstall.Checked;
|
||||||
|
Options.CheckForUpdates := cbCheckForUpdates.ItemIndex;
|
||||||
|
Options.DaysToShowNewPackages := spDaysToShowNewPackages.Value;
|
||||||
|
Options.ShowRegularIcons := cbRegularIcons.Checked;
|
||||||
|
Options.HintFormOption := rbHintFormOptions.ItemIndex;
|
||||||
|
Options.UseDefaultTheme := cbUseDefaultTheme.Checked;
|
||||||
|
|
||||||
|
Options.ProxyEnabled := cbProxy.Checked;
|
||||||
|
Options.ProxyServer := edProxyServer.Text;
|
||||||
|
Options.ProxyPort := seProxyPort.Value;
|
||||||
|
Options.ProxyUser := edProxyUser.Text;
|
||||||
|
Options.ProxyPassword := edProxyPassword.Text;
|
||||||
|
|
||||||
|
Options.LocalRepositoryPackages := AppendPathDelim(edLocalRepositoryPackages.Text);
|
||||||
|
Options.LocalRepositoryArchive := AppendPathDelim(edLocalRepositoryArchive.Text);
|
||||||
|
Options.LocalRepositoryUpdate := AppendPathDelim(edLocalRepositoryUpdate.Text);
|
||||||
|
if not DirectoryExists(Options.LocalRepositoryPackages) then
|
||||||
|
ForceDirectories(Options.LocalRepositoryPackages);
|
||||||
|
if not DirectoryExists(Options.LocalRepositoryArchive) then
|
||||||
|
ForceDirectories(Options.LocalRepositoryArchive);
|
||||||
|
if not DirectoryExists(Options.LocalRepositoryUpdate) then
|
||||||
|
ForceDirectories(Options.LocalRepositoryUpdate);
|
||||||
|
|
||||||
|
Options.UserProfile := cbSelectProfile.ItemIndex;
|
||||||
|
for I := 0 to lbExcludeFiles.Items.Count - 1 do
|
||||||
|
begin
|
||||||
|
if I = 0 then
|
||||||
|
Options.ExcludedFiles := lbExcludeFiles.Items[I]
|
||||||
|
else
|
||||||
|
Options.ExcludedFiles := Options.ExcludedFiles + ',' + lbExcludeFiles.Items[I];
|
||||||
|
end;
|
||||||
|
for I := 0 to lbExcludeFolders.Items.Count - 1 do
|
||||||
|
begin
|
||||||
|
if I = 0 then
|
||||||
|
Options.ExcludedFolders := lbExcludeFolders.Items[I]
|
||||||
|
else
|
||||||
|
Options.ExcludedFolders := Options.ExcludedFolders + ',' + lbExcludeFolders.Items[I];
|
||||||
|
end;
|
||||||
|
|
||||||
|
Options.Save;
|
||||||
|
ModalResult := mrOk;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TOptionsFrm.SetupControls(const AActivePageIndex: Integer = 0);
|
procedure TOptionsFrm.SetupControls(const AActivePageIndex: Integer = 0);
|
||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
@ -454,7 +453,7 @@ begin
|
|||||||
spDaysToShowNewPackages.Value := Options.DaysToShowNewPackages;
|
spDaysToShowNewPackages.Value := Options.DaysToShowNewPackages;
|
||||||
cbRegularIcons.Checked := Options.ShowRegularIcons;
|
cbRegularIcons.Checked := Options.ShowRegularIcons;
|
||||||
cbRegularIcons.Caption := rsOptions_cbRegular_Caption;
|
cbRegularIcons.Caption := rsOptions_cbRegular_Caption;
|
||||||
lbHintForm.Caption := rsOptions_lbHintFrm;
|
rbHintFormOptions.Caption := rsOptions_rbHintFormOptions_Caption;
|
||||||
rbHintFormOptions.Items.Clear;
|
rbHintFormOptions.Items.Clear;
|
||||||
rbHintFormOptions.Items.Add(rsOptions_rbHintFormOptions_Item0);
|
rbHintFormOptions.Items.Add(rsOptions_rbHintFormOptions_Item0);
|
||||||
rbHintFormOptions.Items.Add(rsOptions_rbHintFormOptions_Item1);
|
rbHintFormOptions.Items.Add(rsOptions_rbHintFormOptions_Item1);
|
||||||
@ -515,6 +514,7 @@ begin
|
|||||||
lbExcludeFolders.Items.StrictDelimiter := True;
|
lbExcludeFolders.Items.StrictDelimiter := True;
|
||||||
lbExcludeFolders.Items.DelimitedText := Options.ExcludedFolders;
|
lbExcludeFolders.Items.DelimitedText := Options.ExcludedFolders;
|
||||||
pnProfilesMain.Visible := Options.UserProfile = 1;
|
pnProfilesMain.Visible := Options.UserProfile = 1;
|
||||||
|
bpOptions.HelpButton.Caption := rsOptions_bpOptions_bHelp;
|
||||||
SetupColors;
|
SetupColors;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -29,8 +29,13 @@ unit opkman_showhint;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, Menus, Messages,
|
Classes, SysUtils, Forms,
|
||||||
LCLType, LCLIntf, opkman_virtualtrees;
|
//LCL
|
||||||
|
Controls, Graphics, Dialogs, ExtCtrls, Menus, Messages, LCLType,
|
||||||
|
//Interface
|
||||||
|
LCLIntf,
|
||||||
|
//OpkMan
|
||||||
|
opkman_virtualtrees;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -1,3 +1,26 @@
|
|||||||
|
{
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* This source is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This code is distributed in the hope that it will be useful, but *
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||||
|
* General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* A copy of the GNU General Public License is available on the World *
|
||||||
|
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||||
|
* obtain it by writing to the Free Software Foundation, *
|
||||||
|
* Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1335, USA. *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
|
||||||
|
Author: Balázs Székely
|
||||||
|
Abstract: Show hint for meta packages
|
||||||
|
}
|
||||||
unit opkman_showhintbase;
|
unit opkman_showhintbase;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
@ -27,6 +50,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
uses opkman_const;
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
@ -34,6 +58,8 @@ implementation
|
|||||||
|
|
||||||
procedure TfrShowHint.Init;
|
procedure TfrShowHint.Init;
|
||||||
begin
|
begin
|
||||||
|
lbDescription.Caption := rsMainFrm_VSTText_Description;
|
||||||
|
lbLicense.Caption := rsMainFrm_VSTText_License;
|
||||||
Self.DoubleBuffered := True;
|
Self.DoubleBuffered := True;
|
||||||
pnPackageName.Color := $00D9FFFF;
|
pnPackageName.Color := $00D9FFFF;
|
||||||
pnDescription.Color := $00E6FFE6;
|
pnDescription.Color := $00E6FFE6;
|
||||||
|
Loading…
Reference in New Issue
Block a user