Skip to content

Commit

Permalink
Menu and toolbar are written and read from the file transgui.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
leonsoft-kras committed Sep 7, 2017
1 parent 88e4e33 commit cc29950
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 72 deletions.
72 changes: 9 additions & 63 deletions about.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ inherited AboutForm: TAboutForm
Cursor = crHandPoint
Left = 124
Height = 42
Top = 213
Top = 221
Width = 102
Anchors = [akLeft, akBottom]
AutoSize = True
Expand Down Expand Up @@ -278,7 +278,7 @@ inherited AboutForm: TAboutForm
Cursor = crHandPoint
Left = 6
Height = 47
Top = 208
Top = 216
Width = 102
Anchors = [akLeft, akBottom]
AutoSize = True
Expand Down Expand Up @@ -488,7 +488,7 @@ inherited AboutForm: TAboutForm
object txAuthor: TLabel
Left = 86
Height = 32
Top = 74
Top = 104
Width = 307
AutoSize = False
Caption = 'Copyright (c) 2008-2017 by Yury Sidorov, '#13#10'Alexander Petrov'
Expand All @@ -505,69 +505,16 @@ inherited AboutForm: TAboutForm
object Bevel1: TBevel
Left = 6
Height = 7
Top = 187
Top = 200
Width = 416
Anchors = [akLeft, akRight, akBottom]
Shape = bsTopLine
end
object imgDonate: TImage
Cursor = crHandPoint
Left = 86
Height = 26
Hint = 'Donate via PayPal,WebMoney,Credit card'
Top = 138
Width = 92
AutoSize = True
OnClick = imgDonateClick
ParentShowHint = False
Picture.Data = {
1754506F727461626C654E6574776F726B477261706869638404000089504E47
0D0A1A0A0000000D494844520000005C0000001A08030000000D30CB1B000001
80504C5445909187EC8B35F4AA9EFFCA782F6CB3D7DADC2399D5FFBE5AE53632
FFAC2C81ABD1FEE1A8E2E3E4284A6C5E7287D5E7F4B6B9BA7A8785B7D2E68A6D
4DF9D4D1FFEFD3FFB23C49B2E3FFF6E5E75B35777063D6C9A8D89A376AC4EF8D
CCEC4853543F5577FEE9C0CADDEEBBB0922F3C726193C7E5F4FB6D3A5C49647C
B83741B88B3EEC625FB97A46A17E49153A67CF87454083BCFFECC9FEDE9EF2A9
76FED287686451F7C0BF8D9AAFF1E6E5ADAA9EEC9842B5BDC9FEB745528ABF2B
200C5EA4D5A4ACB6403727ABB2B8BEC1C1FEF5F2F5C6A8F29C6AE2EDF6F6C298
F3FAFDCACED378879FF1F6FA2B7DC15EBDEBFFA926FFF3DCFFD696FFE2B4FFF9
EEFEE7BAFFFDF8FEE6B5FFAF34FEE4B0FEDFA20057A0C9C6C1C8CCCDC3C7C8C7
CACCBD6728C5BB9E4E4535F2F3F6EFA635EED8A8EEDCB297BBDAF1F1EF70A1CA
9B9D9C847E73EED39AFEDA981062A6FBE4D0BA4E41FFE0B0A69D8DE7DBD7D1D2
D3DCCDCF9DA6B3DECA9D5E5163F9D1B7AEB0A4EAA121003366000000FF9933FF
FFFFFFFFFF7B0ABBB20000008074524E53FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0038054B67000000097048597300000B
1200000B1201D2DD7EFC0000000974455874436F6D6D656E740000892A8D0600
00020949444154789CB5964D8BA34010861B3C4810031246161474F1D208D310
D143C0FF904C7657939BA01EC2E4305E02CB4B337F7DABFD984DA2CC491FB0AC
AED2A789C16ED9678F9C91C1C906B5763CFC9987EDDBA0EFE4323EFC9A930FF9
5F2E8F3F66E62007B9DC1E66E745767219BD2C816CE5E976112A2597F1CF3117
10C2AA275AF7387FBF694A92DBDAEF31164CCE05F844EB8E8B28BEE9DA9F4CA6
7A3686A3C8B25AC0A1BC2E8AA1EC1475765711A8DBA23361C8AEA924791A9F46
0015450B4C057A4097D3A980B9A6CCE92BCEC9518FEE525111BC1A2BF44E9E5E
8D270AF8EA64C132D6F0778DC0CD60E4087CAAECE00716B811709856C5B1A62A
7B36185ADACBD3F8A9C3B0EEE537884A258C66E10685A6BDA051033537FD1EC3
08D4E881484F5BB9ADD0E3F33D6B30753251D03494908606415B3917F44F830A
671FBB3383F0B90FFFE1F6484B957490DB76AAC77134E023A0C86046A4A58CA3
7907A248857701AB206F1499B851DFB788E6EBD66BACE9BD92E4F904409E971B
20CC5FE1E5B90B51862A51411DA580ABAA39F5132ABB53929CE4AB31213A5E57
2BD22489A06C8364D50617484C405D25366E69521F66396159497A4327E49E62
E3AADCF5003324AF17EEFB4063CFA31675DCB69FB8936EF5FAEF1742B6ABA2BD
08DDAA480BC012C87EB3D016407E6D73F1DBDCC8FB0DFA382B917CFCB488B7B3
6D701F72FFF0DDB2CC47D13F947E4C789D660D2C0000000049454E44AE426082
}
ShowHint = True
Transparent = True
Visible = False
end
object txHomePage: TLabel
Cursor = crHandPoint
Left = 86
Height = 15
Top = 96
Top = 134
Width = 62
Caption = 'Home page'
Font.Color = clBlue
Expand All @@ -576,14 +523,13 @@ inherited AboutForm: TAboutForm
ParentFont = False
OnClick = txHomePageClick
end
object txDonate: TLabel
object txVersFPC: TLabel
Left = 86
Height = 15
Top = 118
Width = 211
Caption = 'Donate to support further development:'
Top = 72
Width = 57
Caption = 'Version %s'
ParentColor = False
Visible = False
end
end
object tabLicense: TTabSheet
Expand Down
8 changes: 5 additions & 3 deletions about.pas
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
interface

uses
BaseForm, Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, ExtCtrls, ButtonPanel,
BaseForm, Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, ExtCtrls, ButtonPanel, lclversion,
ssl_openssl, ssl_openssl_lib;

resourcestring
Expand All @@ -43,18 +43,17 @@ TAboutForm = class(TBaseForm)
Bevel1: TBevel;
Buttons: TButtonPanel;
edLicense: TMemo;
imgDonate: TImage;
imgTransmission: TImage;
imgSynapse: TImage;
imgLazarus: TImage;
txDonate: TLabel;
txHomePage: TLabel;
txAuthor: TLabel;
txVersion: TLabel;
txAppName: TLabel;
Page: TPageControl;
tabAbout: TTabSheet;
tabLicense: TTabSheet;
txVersFPC: TLabel;
procedure FormCreate(Sender: TObject);
procedure imgDonateClick(Sender: TObject);
procedure imgLazarusClick(Sender: TObject);
Expand Down Expand Up @@ -234,6 +233,9 @@ procedure TAboutForm.FormCreate(Sender: TObject);
txAppName.Caption:=AppName;
txVersion.Caption:=Format(txVersion.Caption, [AppVersion]);
Page.ActivePageIndex:=0;

txVersFPC.caption := 'Fpc : ' + {$I %FPCVERSION%} + ' Lazarus : ' +lcl_version;

{$ifdef lclcarbon}
s:=edLicense.Text;
edLicense.Text:='';
Expand Down
17 changes: 13 additions & 4 deletions main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
interface

uses
Classes, SysUtils, FileUtil, zstream, LResources, Forms, Controls,
Classes, SysUtils, FileUtil, zstream, LResources, Forms, Controls,
{$ifdef windows}
windows,
{$else}
Expand All @@ -35,7 +35,7 @@ interface

const
AppName = 'Transmission Remote GUI';
AppVersion = '5.9';
AppVersion = '5.10';

resourcestring
sAll = 'All torrents';
Expand Down Expand Up @@ -1377,7 +1377,6 @@ procedure TMainForm.FormCreate(Sender: TObject);
R: TRect;
bigt: boolean;
SL: TStringList;

{$ifdef darwin}
s: string;
pic: TPicture;
Expand Down Expand Up @@ -1537,6 +1536,12 @@ procedure TMainForm.FormCreate(Sender: TObject);
if Ini.ReadBool('MainForm', 'StatusBar', acStatusBar.Checked) <> acStatusBar.Checked then
acStatusBar.Execute;

if Ini.ReadBool('MainForm', 'Menu', acMenuShow.Checked) <> acMenuShow.Checked then
acMenuShow.Execute;
if Ini.ReadBool('MainForm', 'Toolbar', acToolbarShow.Checked) <> acToolbarShow.Checked then
acToolbarShow.Execute;


LoadColumns(gTorrents, 'TorrentsList');
TorrentColumnsChanged;
LoadColumns(lvFiles, 'FilesList');
Expand Down Expand Up @@ -2737,6 +2742,10 @@ procedure TMainForm.BeforeCloseApp;
Ini.WriteBool('MainForm', 'InfoPane', acInfoPane.Checked);
Ini.WriteBool('MainForm', 'StatusBar', acStatusBar.Checked);

Ini.WriteBool('MainForm', 'Menu', acMenuShow.Checked);
Ini.WriteBool('MainForm', 'Toolbar', acToolbarShow.Checked);


SaveColumns(gTorrents, 'TorrentsList');
SaveColumns(lvFiles, 'FilesList');
SaveColumns(lvPeers, 'PeerList');
Expand Down Expand Up @@ -5089,7 +5098,7 @@ function ExcludeInvalidChar (path: string): string; // PETROV
path := StringReplace(path, '>', '_', [rfReplaceAll, rfIgnoreCase]);
path := StringReplace(path, '"', '_', [rfReplaceAll, rfIgnoreCase]);
path := StringReplace(path, '~', '_', [rfReplaceAll, rfIgnoreCase]);
path := StringReplace(path, '..','_', [rfReplaceAll, rfIgnoreCase]);
//path := StringReplace(path, '..','_', [rfReplaceAll, rfIgnoreCase]); bag
Result:= path;
end;

Expand Down
4 changes: 2 additions & 2 deletions transgui.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<VersionInfo>
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="5"/>
<MinorVersionNr Value="9"/>
<StringTable CompanyName="Yury Sidorov" FileDescription="Transmission Remote GUI" InternalName="transgui" LegalCopyright="Copyright (c) 2008-2017 by Yury Sidorov &amp; Alexander Petrov" OriginalFilename="transgui.exe" ProductName="Transmission Remote GUI" ProductVersion="5.9"/>
<MinorVersionNr Value="10"/>
<StringTable CompanyName="Yury Sidorov" FileDescription="Transmission Remote GUI" InternalName="transgui" LegalCopyright="Copyright (c) 2008-2017 by Yury Sidorov &amp; Alexander Petrov" OriginalFilename="transgui.exe" ProductName="Transmission Remote GUI" ProductVersion="5.10"/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
Expand Down
Binary file modified transgui.res
Binary file not shown.

6 comments on commit cc29950

@PeterDaveHello
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leonsoft-kras can we separate the version bump in another commit next time?

@leonsoft-kras
Copy link
Contributor Author

@leonsoft-kras leonsoft-kras commented on cc29950 Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next vers 5.10.

@leonsoft-kras
Copy link
Contributor Author

@leonsoft-kras leonsoft-kras commented on cc29950 Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will not soon make further corrections. no time.

I do not yet know how to increase the time of the connection.
The time is set in the synapse library. Further did not study the code. If this is resolved, you can enter a parameter for setting the time of the connection.

@PeterDaveHello
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean next time we change the code, maybe just leave the version alone, we can bump the version later when release?

@leonsoft-kras
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change the version later, after making changes?
if we released version 5, made edits, then this is not the 5th version.
explain the purpose, I don't understand.

@PeterDaveHello
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that's not the final release, and I believe that we can have a more clean commit history for future code tracing :)

Please sign in to comment.