Skip to content

Commit

Permalink
Make: Tendency panel show current of file
Browse files Browse the repository at this point in the history
  • Loading branch information
zaher committed Jan 12, 2020
1 parent 0ed3856 commit fb2ae07
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
5 changes: 3 additions & 2 deletions bin/silver.mne-theme
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<rtti version="1.0" author="MiniXML">
<Object Type="TGlobalAttributes">
<Name>silver</Name>
<Default Class="TGlobalAttribute">
<BackColor>14671839</BackColor>
<ForeColor>clBlack</ForeColor>
Expand Down Expand Up @@ -40,7 +41,7 @@
</Modified>
<Keyword Class="TGlobalAttribute">
<BackColor>2758927</BackColor>
<ForeColor>12274176</ForeColor>
<ForeColor>16739597</ForeColor>
<Options>gaoDefaultBackground</Options>
</Keyword>
<Symbol Class="TGlobalAttribute">
Expand All @@ -65,7 +66,7 @@
</Identifier>
<Variable Class="TGlobalAttribute">
<BackColor>2758927</BackColor>
<ForeColor>clSkyBlue</ForeColor>
<ForeColor>4400652</ForeColor>
<Options>gaoDefaultBackground</Options>
</Variable>
<Standard Class="TGlobalAttribute">
Expand Down
10 changes: 6 additions & 4 deletions source/gui/MainUnit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,12 @@ procedure TMainForm.EngineRefresh;
SaveAct.Enabled := False;
SaveAllAct.Enabled := Engine.GetIsChanged;
end;
if Engine.Session.Active and (Engine.Session.Project.Tendency <> nil) then
TypePnl.Caption := Engine.Session.Project.Tendency.Name
else if (Engine.Files.Current <> nil) and (Engine.Files.Current.Tendency <> nil) then
TypePnl.Caption := Engine.Files.Current.Tendency.Name
else
TypePnl.Caption := 'Undefined';
// DebugPnl.Visible := DebugPnl.Caption <> '';
UpdateMenu;
UpdateMenuItems;
Expand Down Expand Up @@ -1907,10 +1913,6 @@ procedure TMainForm.ProjectChanged;
SCMMnu.Caption := Engine.SCM.Name
else
SCMMnu.Caption := '';
if Engine.Session.Active and (Engine.Session.Project.Tendency <> nil) then
TypePnl.Caption := Engine.Session.Project.Tendency.Name
else
TypePnl.Caption := 'Undefined';

UpdateMenu;
UpdateMenuItems;
Expand Down
4 changes: 2 additions & 2 deletions source/gui/mne.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="..\editor;..\lib;..\extends;..\extends\php;..\extends\sard;..\extends\lua;..\extends\image;..\extends\commons;..\extends\pascal;..\extends\d;..\extends\csv;..\extends\python;..\extends\verilog;..\extends\cpp;..\extends\fntgen;..\extends\designer;..\extends\db;..\extends\go;..\extends\cmd"/>
<OtherUnitFiles Value="..\editor;..\lib;..\extends;..\extends\php;..\extends\sard;..\extends\lua;..\extends\image;..\extends\commons;..\extends\pascal;..\extends\d;..\extends\csv;..\extends\python;..\extends\verilog;..\extends\cpp;..\extends\fntgen;..\extends\designer;..\extends\db;..\extends\go;..\extends\cmd;..\extends\basic"/>
<UnitOutputDirectory Value="..\..\units\linux"/>
</SearchPaths>
<Linking>
Expand Down Expand Up @@ -72,7 +72,7 @@
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="..\editor;..\lib;..\extends;..\extends\php;..\extends\sard;..\extends\lua;..\extends\image;..\extends\commons;..\extends\pascal;..\extends\d;..\extends\csv;..\extends\python;..\extends\verilog;..\extends\cpp;..\extends\fntgen;..\extends\designer;..\extends\db;..\extends\go;..\extends\cmd"/>
<OtherUnitFiles Value="..\editor;..\lib;..\extends;..\extends\php;..\extends\sard;..\extends\lua;..\extends\image;..\extends\commons;..\extends\pascal;..\extends\d;..\extends\csv;..\extends\python;..\extends\verilog;..\extends\cpp;..\extends\fntgen;..\extends\designer;..\extends\db;..\extends\go;..\extends\cmd;..\extends\basic"/>
<UnitOutputDirectory Value="..\..\units\windows"/>
</SearchPaths>
<Parsing>
Expand Down
2 changes: 1 addition & 1 deletion source/gui/mne.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ procedure Run;
//DefaultSystemCodePage := widestringmanager.GetStandardCodePageProc(scpAnsi); //I fix it temporary that needed for AnsiToUtf8; //i commented cuz i cant convert to ansi in TTextEditorFile.DoSave
Application.Scaled := True;
Application.Initialize;
Application.Title :='miniEdit';
Application.Title :='miniEdit';
Application.Name := 'miniEdit';
Application.BidiMode := bdLeftToRight;
if InitEngine then
Expand Down

0 comments on commit fb2ae07

Please sign in to comment.