Skip to content

Commit

Permalink
Issues #988
Browse files Browse the repository at this point in the history
hiding/showing menu and toolbar
  • Loading branch information
leonsoft-kras committed Aug 1, 2017
1 parent ac8fe83 commit 1d608b2
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 10 deletions.
40 changes: 34 additions & 6 deletions main.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,11 @@ inherited MainForm: TMainForm
Height = 326
Top = 225
Width = 881
ActivePage = tabGeneral
ActivePage = tabTrackers
Align = alBottom
Constraints.MinHeight = 50
Images = ImageList16
TabIndex = 0
TabIndex = 1
TabOrder = 1
OnChange = PageInfoChange
OnResize = PageInfoResize
Expand Down Expand Up @@ -924,14 +924,14 @@ inherited MainForm: TMainForm
end
object tabTrackers: TTabSheet
Caption = 'Trackers'
ClientHeight = 558
ClientWidth = 1544
ClientHeight = 298
ClientWidth = 873
ImageIndex = 5
object lvTrackers: TVarGrid
Left = 0
Height = 279
Height = 298
Top = 0
Width = 772
Width = 873
Align = alClient
Columns = <
item
Expand Down Expand Up @@ -1962,6 +1962,14 @@ inherited MainForm: TMainForm
Action = acInfoPane
ShortCut = 123
end
object MenuItem501: TMenuItem
Action = acToolbarShow
ShortCut = 16506
end
object MenuItem502: TMenuItem
Action = acMenuShow
ShortCut = 16507
end
object MenuItem96: TMenuItem
Action = acStatusBar
end
Expand Down Expand Up @@ -2459,6 +2467,18 @@ inherited MainForm: TMainForm
Checked = True
OnExecute = acStatusBarSizesExecute
end
object acToolbarShow: TAction
Category = 'View'
Caption = 'Toolbar'
Checked = True
OnExecute = acToolbarShowExecute
end
object acMenuShow: TAction
Category = 'View'
Caption = 'Menu'
Checked = True
OnExecute = acMenuShowExecute
end
end
object TorrentsListTimer: TTimer[9]
Enabled = False
Expand Down Expand Up @@ -4903,4 +4923,12 @@ inherited MainForm: TMainForm
left = 832
top = 152
end
object ActionList1: TActionList[29]
left = 840
object MenuShow: TAction
Caption = 'MenuShow'
OnExecute = MenuShowExecute
ShortCut = 16507
end
end
end
39 changes: 38 additions & 1 deletion main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface

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

resourcestring
sAll = 'All torrents';
Expand Down Expand Up @@ -218,6 +218,10 @@ TMainForm = class(TBaseForm)
acFolderGrouping: TAction;
acAdvEditTrackers: TAction;
acFilterPane: TAction;
acMenuShow : TAction;
MenuShow: TAction;
ActionList1: TActionList;
acToolbarShow : TAction;
acInfoPane: TAction;
acStatusBar: TAction;
acCopyPath: TAction;
Expand All @@ -230,6 +234,8 @@ TMainForm = class(TBaseForm)
acVerifyTorrent: TAction;
ActionList: TActionList;
ApplicationProperties: TApplicationProperties;
MenuItem501: TMenuItem;
MenuItem502: TMenuItem;
txMagLabel: TLabel;
txMagnetLink: TEdit;
MenuItem101: TMenuItem;
Expand Down Expand Up @@ -503,6 +509,7 @@ TMainForm = class(TBaseForm)
procedure acForceStartTorrentExecute(Sender: TObject);
procedure acHideAppExecute(Sender: TObject);
procedure acInfoPaneExecute(Sender: TObject);
procedure acMenuShowExecute(Sender: TObject);
procedure acMoveTorrentExecute(Sender: TObject);
procedure acNewConnectionExecute(Sender: TObject);
procedure acOpenContainingFolderExecute(Sender: TObject);
Expand Down Expand Up @@ -537,6 +544,8 @@ TMainForm = class(TBaseForm)
procedure acStatusBarSizesExecute(Sender: TObject);
procedure acStopAllTorrentsExecute(Sender: TObject);
procedure acStopTorrentExecute(Sender: TObject);
procedure MenuShowExecute(Sender: TObject);
procedure acToolbarShowExecute(Sender: TObject);
procedure acTorrentPropsExecute(Sender: TObject);
procedure acTrackerGroupingExecute(Sender: TObject);
procedure acUpdateBlocklistExecute(Sender: TObject);
Expand Down Expand Up @@ -1788,6 +1797,15 @@ procedure TMainForm.acInfoPaneExecute(Sender: TObject);
RpcObj.AdvInfo:=aiNone;
end;

procedure TMainForm.acMenuShowExecute(Sender: TObject);
begin
acMenuShow.Checked:=not acMenuShow.Checked;
if acMenuShow.Checked = false then
MainForm.Menu := nil
else
MainForm.Menu := MainMenu;
end;

procedure TMainForm.acMoveTorrentExecute(Sender: TObject);
var
ids: variant;
Expand Down Expand Up @@ -3477,6 +3495,25 @@ procedure TMainForm.acStopTorrentExecute(Sender: TObject);
TorrentAction(GetSelectedTorrents, 'torrent-stop');
end;

procedure TMainForm.MenuShowExecute(Sender: TObject);
begin
acMenuShow.Checked:=not acMenuShow.Checked;
if acMenuShow.Checked = false then
MainForm.Menu := nil
else
MainForm.Menu := MainMenu;
end;

procedure TMainForm.acToolbarShowExecute(Sender: TObject);
begin

acToolbarShow.Checked:=not acToolbarShow.Checked;
if acToolbarShow.Checked = false then
MainToolBar.Visible:= false
else
MainToolBar.Visible:= true;
end;

procedure TMainForm.acTorrentPropsExecute(Sender: TObject);
begin
TorrentProps(0);
Expand Down
5 changes: 2 additions & 3 deletions transgui.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
<VersionInfo>
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="5"/>
<MinorVersionNr Value="8"/>
<RevisionNr Value="3"/>
<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.8.3"/>
<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"/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
Expand Down
Binary file modified transgui.res
Binary file not shown.

0 comments on commit 1d608b2

Please sign in to comment.