RxFPC: TFolderLister - fix Owner for menu items

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5215 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2016-09-26 07:55:49 +00:00
parent f38a3f42de
commit 031a80c310
7 changed files with 22 additions and 7 deletions

View File

@ -1,10 +1,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: register_rxctrl.sloadicon
msgid "Load icon"
msgstr ""
#: register_rxctrl.stesttrxlogindialog
msgid "Test TRxLoginDialog"
msgstr ""

View File

@ -103,6 +103,10 @@ msgstr ""
msgid "Flat buttons"
msgstr "Botones planos"
#: rxconst.sfolderlistererr
msgid "%s. Not assigned property MenuItem"
msgstr ""
#: rxconst.sfourthquarter
msgid "Fourth quarter"
msgstr ""

View File

@ -101,6 +101,10 @@ msgstr ""
msgid "Flat buttons"
msgstr ""
#: rxconst.sfolderlistererr
msgid "%s. Not assigned property MenuItem"
msgstr ""
#: rxconst.sfourthquarter
msgid "Fourth quarter"
msgstr ""

View File

@ -101,6 +101,10 @@ msgstr "Первый квартал"
msgid "Flat buttons"
msgstr "Плавающие кнопки"
#: rxconst.sfolderlistererr
msgid "%s. Not assigned property MenuItem"
msgstr "%s. Не определено свойство MenuItem"
#: rxconst.sfourthquarter
msgid "Fourth quarter"
msgstr "Четвёртый квартал"

View File

@ -114,6 +114,10 @@ msgstr ""
msgid "Flat buttons"
msgstr "Плаваючі кнопки"
#: rxconst.sfolderlistererr
msgid "%s. Not assigned property MenuItem"
msgstr ""
#: rxconst.sfourthquarter
msgid "Fourth quarter"
msgstr ""

View File

@ -136,6 +136,9 @@ resourcestring
sFirstHalfOfYear = 'First half of year';
sSecondHalfOfYear = 'Second half of year';
{ TFolderLister }
sFolderListerErr = '%s. Not assigned property MenuItem';
implementation
end.

View File

@ -79,7 +79,7 @@ type
end;
implementation
uses FileUtil, strutils, RxAppUtils, LazUTF8, LazFileUtils;
uses FileUtil, strutils, RxAppUtils, LazUTF8, LazFileUtils, rxconst;
function MenuItemStr(S:string):string;
var
@ -127,7 +127,7 @@ var
begin
for i:=0 to AFolderList.Count-1 do
begin
M:=TMenuItem.Create(Application.MainForm);
M:=TMenuItem.Create(MenuItem.Owner);//Application.MainForm);
S:=AFolderList[i];
M.Caption:=MenuItemStr(S);
MenuItem.Add(M);
@ -206,7 +206,7 @@ begin
if Assigned(FMenuItem) then
DoFind(FFileFolder, FMenuItem)
else
raise Exception.Create(Name+'. Not assigned property MenuItem');
raise Exception.CreateFmt( sFolderListerErr, [Name]);
end;
constructor TCustomFolderLister.Create(AOwner: TComponent);