iphonelazext: added 'Show in Finder' button for the resources dir

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1207 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
skalogryz
2010-04-25 12:53:20 +00:00
parent 438fe286a0
commit 44f0867f94
3 changed files with 51 additions and 15 deletions

View File

@ -60,11 +60,13 @@ inherited iPhoneProjectOptionsEditor: TiPhoneProjectOptionsEditor
TabOrder = 2
end
object edtResDir: TEdit[6]
AnchorSideRight.Control = btnShowInFinder
Left = 120
Height = 22
Top = 176
Width = 482
Top = 174
Width = 355
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Right = 10
OnChange = edtResDirChange
OnExit = edtResDirExit
TabOrder = 3
@ -140,7 +142,18 @@ inherited iPhoneProjectOptionsEditor: TiPhoneProjectOptionsEditor
ParentColor = False
ParentFont = False
end
object nibsPopup: TPopupMenu[14]
object btnShowInFinder: TButton[14]
Left = 485
Height = 20
Top = 176
Width = 117
Anchors = [akTop, akRight]
AutoSize = True
Caption = 'Show in Finder'
OnClick = btnShowInFinderClick
TabOrder = 6
end
object nibsPopup: TPopupMenu[15]
OnPopup = nibsPopupPopup
left = 256
top = 288

View File

@ -18,15 +18,16 @@ LazarusResources.Add('TiPhoneProjectOptionsEditor','FORMDATA',[
+'P'#7'Caption'#6#12'SDK version:'#11'ParentColor'#8#0#0#242#2#5#9'TComboBox'
+#7'cmbSDKs'#4'Left'#2'p'#6'Height'#2#20#3'Top'#2'0'#5'Width'#3#184#0#10'Item'
+'Height'#2#0#8'OnChange'#7#13'cmbSDKsChange'#5'Style'#7#14'csDropDownList'#8
+'TabOrder'#2#2#0#0#242#2#6#5'TEdit'#9'edtResDir'#4'Left'#2'x'#6'Height'#2#22
+#3'Top'#3#176#0#5'Width'#3#226#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
+#0#8'OnChange'#7#15'edtResDirChange'#6'OnExit'#7#13'edtResDirExit'#8'TabOrde'
+'r'#2#3#4'Text'#6#9'Resources'#0#0#242#2#7#6'TLabel'#6'Label1'#4'Left'#2#16#6
+'Height'#2#18#3'Top'#3#176#0#5'Width'#2'Y'#7'Caption'#6#14'Resources dir:'#11
+'ParentColor'#8#0#0#242#2#8#5'TEdit'#10'edtExclude'#4'Left'#2'x'#6'Height'#2
+#22#3'Top'#3#224#0#5'Width'#3#226#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRig'
+'ht'#0#8'OnChange'#7#16'edtExcludeChange'#8'TabOrder'#2#4#4'Text'#6#4'.svn'#0
+#0#242#2#9#6'TLabel'#6'Label2'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#224#0#5
+'TabOrder'#2#2#0#0#242#2#6#5'TEdit'#9'edtResDir'#23'AnchorSideRight.Control'
+#7#15'btnShowInFinder'#4'Left'#2'x'#6'Height'#2#22#3'Top'#3#174#0#5'Width'#3
+'c'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#19'BorderSpacing.Right'#2
+#10#8'OnChange'#7#15'edtResDirChange'#6'OnExit'#7#13'edtResDirExit'#8'TabOrd'
+'er'#2#3#4'Text'#6#9'Resources'#0#0#242#2#7#6'TLabel'#6'Label1'#4'Left'#2#16
+#6'Height'#2#18#3'Top'#3#176#0#5'Width'#2'Y'#7'Caption'#6#14'Resources dir:'
+#11'ParentColor'#8#0#0#242#2#8#5'TEdit'#10'edtExclude'#4'Left'#2'x'#6'Height'
+#2#22#3'Top'#3#224#0#5'Width'#3#226#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akR'
+'ight'#0#8'OnChange'#7#16'edtExcludeChange'#8'TabOrder'#2#4#4'Text'#6#4'.svn'
+#0#0#242#2#9#6'TLabel'#6'Label2'#4'Left'#2#16#6'Height'#2#18#3'Top'#3#224#0#5
+'Width'#2'Q'#7'Caption'#6#12'Ignore mask:'#11'ParentColor'#8#0#0#242#2#10#6
+'TLabel'#6'Label3'#4'Left'#2#16#6'Height'#2#14#3'Top'#3#200#0#5'Width'#3'l'#1
+#7'Caption'#6'NIt''s recommended to set resource dir as a relative (to proje'
@ -42,7 +43,10 @@ LazarusResources.Add('TiPhoneProjectOptionsEditor','FORMDATA',[
+#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2'x'#6'Height'#2#14#3'Top'#3
+#180#1#5'Width'#3#246#0#7'Caption'#6'2The checked one is the main Nib of the'
+' application'#11'Font.Height'#2#246#11'ParentColor'#8#10'ParentFont'#8#0#0
+#242#2#14#10'TPopupMenu'#9'nibsPopup'#7'OnPopup'#7#14'nibsPopupPopup'#4'left'
+#3#0#1#3'top'#3' '#1#0#9'TMenuItem'#9'mnuOpenIB'#7'Caption'#6#22'Open Interf'
+'ace Builder'#7'OnClick'#7#14'mnuOpenIBClick'#0#0#0#0
+#242#2#14#7'TButton'#15'btnShowInFinder'#4'Left'#3#229#1#6'Height'#2#20#3'To'
+'p'#3#176#0#5'Width'#2'u'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#7
+'Caption'#6#14'Show in Finder'#7'OnClick'#7#20'btnShowInFinderClick'#8'TabOr'
+'der'#2#6#0#0#242#2#15#10'TPopupMenu'#9'nibsPopup'#7'OnPopup'#7#14'nibsPopup'
+'Popup'#4'left'#3#0#1#3'top'#3' '#1#0#9'TMenuItem'#9'mnuOpenIB'#7'Caption'#6
+#22'Open Interface Builder'#7'OnClick'#7#14'mnuOpenIBClick'#0#0#0#0
]);

View File

@ -28,6 +28,7 @@ type
{ TiPhoneProjectOptionsEditor }
TiPhoneProjectOptionsEditor = class(TAbstractIDEOptionsEditor)
btnShowInFinder:TButton;
Label5:TLabel;
mnuOpenIB:TMenuItem;
nibFilesBox:TCheckListBox;
@ -44,6 +45,7 @@ type
lblAppIDHint: TLabel;
lblSDKVer: TLabel;
nibsPopup:TPopupMenu;
procedure btnShowInFinderClick(Sender:TObject);
procedure cmbSDKsChange(Sender: TObject);
procedure edtExcludeChange(Sender: TObject);
procedure edtResDirChange(Sender:TObject);
@ -124,6 +126,23 @@ begin
end;
procedure TiPhoneProjectOptionsEditor.btnShowInFinderClick(Sender:TObject);
var
path: AnsiString;
tmp : AnsiString;
begin
path:=Trim(edtResDir.Text);
if (path='') or (path[1]<>PathDelim) then // project relative path
LazarusIDE.ActiveProject.LongenFilename(path);
while (path<>'') and (not DirectoryExistsUTF8(path)) do begin
tmp:=path;
path:=ExtractFileDir(path);
if tmp=path then Break;
end;
if DirectoryExistsUTF8(path) then ExecCmdLineNoWait('open "'+path +'"');
end;
procedure TiPhoneProjectOptionsEditor.edtExcludeChange(Sender: TObject);
begin