Skip to content

Commit a774180

Browse files
committed
- if config file specified in command line is without full path assume program's folder
- made program's main popup menu also appear by pressing ContexMenu/Shift+F10 key(s) right after program start (i.e. inside Hot Key panel help memo)
1 parent 531a566 commit a774180

File tree

5 files changed

+44
-26
lines changed

5 files changed

+44
-26
lines changed

TAHelper2009/TAHelper.cbproj

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -77,40 +77,40 @@
7777
<BCC_OptimizeForSize>true</BCC_OptimizeForSize>
7878
</PropertyGroup>
7979
<ItemGroup>
80-
<CppCompile Include="TAHelper.cpp">
81-
<BuildOrder>-1</BuildOrder>
82-
<BuildOrder>0</BuildOrder>
83-
</CppCompile>
84-
<ResFiles Include="TAHelper.res">
85-
<BuildOrder>-1</BuildOrder>
86-
<BuildOrder>1</BuildOrder>
87-
</ResFiles>
88-
<CppCompile Include="WindowUtils.cpp">
89-
<DependentOn>WindowUtils.h</DependentOn>
90-
<BuildOrder>7</BuildOrder>
91-
</CppCompile>
92-
<CppCompile Include="Wakan.cpp">
93-
<DependentOn>Wakan.h</DependentOn>
94-
<BuildOrder>6</BuildOrder>
95-
</CppCompile>
96-
<None Include="ModelSupport_TAHelper\default.txvpck"/>
97-
<None Include="ModelSupport_TAHelper\default.txaPackage"/>
9880
<CppCompile Include="Unit1.cpp">
9981
<BuildOrder>2</BuildOrder>
10082
<Form>FormTAHelper</Form>
10183
<DependentOn>Unit1.h</DependentOn>
10284
<BuildOrder>0</BuildOrder>
10385
</CppCompile>
86+
<None Include="ModelSupport_TAHelper\default.txaPackage"/>
10487
<CppCompile Include="UnitOSD.cpp">
10588
<Form>FormOSD</Form>
10689
<DependentOn>UnitOSD.h</DependentOn>
10790
<BuildOrder>5</BuildOrder>
10891
</CppCompile>
92+
<None Include="changelog.txt"/>
10993
<CppCompile Include="..\TAHplugin\StringUtils.cpp">
11094
<DependentOn>..\TAHplugin\StringUtils.h</DependentOn>
11195
<BuildOrder>8</BuildOrder>
11296
</CppCompile>
113-
<None Include="changelog.txt"/>
97+
<ResFiles Include="TAHelper.res">
98+
<BuildOrder>-1</BuildOrder>
99+
<BuildOrder>1</BuildOrder>
100+
</ResFiles>
101+
<CppCompile Include="TAHelper.cpp">
102+
<BuildOrder>-1</BuildOrder>
103+
<BuildOrder>0</BuildOrder>
104+
</CppCompile>
105+
<CppCompile Include="WindowUtils.cpp">
106+
<DependentOn>WindowUtils.h</DependentOn>
107+
<BuildOrder>7</BuildOrder>
108+
</CppCompile>
109+
<None Include="ModelSupport_TAHelper\default.txvpck"/>
110+
<CppCompile Include="Wakan.cpp">
111+
<DependentOn>Wakan.h</DependentOn>
112+
<BuildOrder>6</BuildOrder>
113+
</CppCompile>
114114
<FormResources Include="Unit1.dfm"/>
115115
<FormResources Include="UnitOSD.dfm"/>
116116
<BuildConfiguration Include="Base">
@@ -137,7 +137,7 @@
137137
<VersionInfo Name="MajorVer">1</VersionInfo>
138138
<VersionInfo Name="MinorVer">1</VersionInfo>
139139
<VersionInfo Name="Release">5</VersionInfo>
140-
<VersionInfo Name="Build">7</VersionInfo>
140+
<VersionInfo Name="Build">8</VersionInfo>
141141
<VersionInfo Name="Debug">True</VersionInfo>
142142
<VersionInfo Name="PreRelease">False</VersionInfo>
143143
<VersionInfo Name="Special">False</VersionInfo>
@@ -149,7 +149,7 @@
149149
<VersionInfoKeys>
150150
<VersionInfoKeys Name="CompanyName"/>
151151
<VersionInfoKeys Name="FileDescription">TAHelper by furniture</VersionInfoKeys>
152-
<VersionInfoKeys Name="FileVersion">1.1.5.7</VersionInfoKeys>
152+
<VersionInfoKeys Name="FileVersion">1.1.5.8</VersionInfoKeys>
153153
<VersionInfoKeys Name="InternalName"/>
154154
<VersionInfoKeys Name="LegalCopyright"/>
155155
<VersionInfoKeys Name="LegalTrademarks"/>

TAHelper2009/TAHelper.res

0 Bytes
Binary file not shown.

TAHelper2009/Unit1.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,6 +1364,8 @@ void __fastcall TFormTAHelper::FormShow(TObject *Sender)
13641364
LoadOptionsGlobal();
13651365

13661366
UnicodeString filename(ParamStr(1)); // get config file from command line
1367+
if (filename.Length() && !filename.Pos(L":"))
1368+
filename = ProgramDir() + filename;
13671369
if (!filename.Length())
13681370
filename = GetLastConfig(); // get last config file
13691371
if (!filename.Length())
@@ -2850,5 +2852,16 @@ void __fastcall TFormTAHelper::ToggleTaskbarVisibility1Click(TObject *Sender)
28502852
}
28512853
}
28522854
}
2855+
28532856
//---------------------------------------------------------------------------
2857+
void __fastcall TFormTAHelper::MemoHKhotkeysContextPopup(TObject *Sender, TPoint &MousePos,
2858+
bool &Handled)
2859+
{
2860+
Handled = true;
2861+
FormTAHelper->PopupMenuForm->Popup(FormTAHelper->Left, FormTAHelper->Top);
2862+
}
2863+
2864+
//---------------------------------------------------------------------------
2865+
2866+
28542867

TAHelper2009/Unit1.dfm

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ object FormTAHelper: TFormTAHelper
285285
Height = 242
286286
Anchors = [akLeft, akTop, akRight, akBottom]
287287
Caption = 'Clipboard Reviser'
288-
TabOrder = 0
288+
TabOrder = 1
289289
OnMouseDown = FormMouseDown
290290
DesignSize = (
291291
509
@@ -1509,7 +1509,7 @@ object FormTAHelper: TFormTAHelper
15091509
Height = 54
15101510
Anchors = [akLeft, akBottom]
15111511
Caption = 'Hot-Keys'
1512-
TabOrder = 2
1512+
TabOrder = 0
15131513
OnMouseDown = FormMouseDown
15141514
DesignSize = (
15151515
303
@@ -1528,7 +1528,7 @@ object FormTAHelper: TFormTAHelper
15281528
ParentFont = False
15291529
ParentShowHint = False
15301530
ShowHint = False
1531-
TabOrder = 0
1531+
TabOrder = 1
15321532
OnClick = CheckBoxHKenableClick
15331533
end
15341534
object MemoHKhotkeys: TMemo
@@ -1570,8 +1570,9 @@ object FormTAHelper: TFormTAHelper
15701570
ReadOnly = True
15711571
ScrollBars = ssVertical
15721572
ShowHint = False
1573-
TabOrder = 1
1573+
TabOrder = 0
15741574
WordWrap = False
1575+
OnContextPopup = MemoHKhotkeysContextPopup
15751576
end
15761577
end
15771578
object GroupBoxTA: TGroupBox
@@ -1581,7 +1582,7 @@ object FormTAHelper: TFormTAHelper
15811582
Height = 33
15821583
Anchors = [akLeft, akBottom]
15831584
Caption = 'Translation Aggregator'
1584-
TabOrder = 1
1585+
TabOrder = 2
15851586
OnMouseDown = FormMouseDown
15861587
object LabelTALstatus: TLabel
15871588
Left = 8

TAHelper2009/Unit1.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,10 @@ class TFormTAHelper : public TForm
10061006
void __fastcall WaKan1Click(TObject *Sender);
10071007
void __fastcall TimerWDredrawTimer(TObject *Sender);
10081008
void __fastcall ToggleTaskbarVisibility1Click(TObject *Sender);
1009+
void __fastcall MemoHKhotkeysContextPopup(TObject *Sender, TPoint &MousePos, bool &Handled);
1010+
1011+
1012+
10091013

10101014
private: // User declarations
10111015
public: // User declarations

0 commit comments

Comments
 (0)