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 "" msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8" msgstr "Content-Type: text/plain; charset=UTF-8"
#: register_rxctrl.sloadicon
msgid "Load icon"
msgstr ""
#: register_rxctrl.stesttrxlogindialog #: register_rxctrl.stesttrxlogindialog
msgid "Test TRxLoginDialog" msgid "Test TRxLoginDialog"
msgstr "" msgstr ""

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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