fpbrowser: Some fixes for image loading

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1733 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat
2011-07-04 12:14:10 +00:00
parent eb3ecee187
commit 63c77c7417
5 changed files with 104 additions and 101 deletions

View File

@@ -86,6 +86,9 @@
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="10"/> <Version Value="10"/>
<SearchPaths>
<OtherUnitFiles Value="../../components/thtmlport/package"/>
</SearchPaths>
<Parsing> <Parsing>
<SyntaxOptions> <SyntaxOptions>
<SyntaxMode Value="Delphi"/> <SyntaxMode Value="Delphi"/>

View File

@@ -3,7 +3,7 @@ object formBrowser: TformBrowser
Height = 439 Height = 439
Top = 267 Top = 267
Width = 621 Width = 621
ClientHeight = 439 ClientHeight = 419
ClientWidth = 621 ClientWidth = 621
Color = clBtnFace Color = clBtnFace
Font.Color = clWindowText Font.Color = clWindowText
@@ -13,11 +13,12 @@ object formBrowser: TformBrowser
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter
LCLVersion = '0.9.31' LCLVersion = '0.9.31'
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 18 Height = 18
Top = 421 Top = 401
Width = 621 Width = 621
Align = alBottom Align = alBottom
Alignment = taLeftJustify Alignment = taLeftJustify
@@ -48,9 +49,10 @@ object formBrowser: TformBrowser
TabOrder = 1 TabOrder = 1
object editURL: TEdit object editURL: TEdit
Left = 190 Left = 190
Height = 22 Height = 24
Top = 4 Top = 4
Width = 337 Width = 337
AutoSize = False
OnKeyDown = editURLKeyDown OnKeyDown = editURLKeyDown
TabStop = False TabStop = False
TabOrder = 3 TabOrder = 3
@@ -88,19 +90,19 @@ object formBrowser: TformBrowser
end end
object Panel3: TPanel object Panel3: TPanel
Left = 0 Left = 0
Height = 388 Height = 368
Top = 33 Top = 33
Width = 621 Width = 621
Align = alClient Align = alClient
BevelInner = bvLowered BevelInner = bvLowered
BevelOuter = bvNone BevelOuter = bvNone
Caption = 'Panel3' Caption = 'Panel3'
ClientHeight = 388 ClientHeight = 368
ClientWidth = 621 ClientWidth = 621
TabOrder = 2 TabOrder = 2
object Viewer: THTMLViewer object Viewer: THTMLViewer
Left = 1 Left = 1
Height = 386 Height = 366
Top = 1 Top = 1
Width = 619 Width = 619
OnHotSpotCovered = HotSpotChange OnHotSpotCovered = HotSpotChange

View File

@@ -2,83 +2,84 @@
LazarusResources.Add('TformBrowser','FORMDATA',[ LazarusResources.Add('TformBrowser','FORMDATA',[
'TPF0'#12'TformBrowser'#11'formBrowser'#4'Left'#3't'#1#6'Height'#3#183#1#3'To' 'TPF0'#12'TformBrowser'#11'formBrowser'#4'Left'#3't'#1#6'Height'#3#183#1#3'To'
+'p'#3#11#1#5'Width'#3'm'#2#12'ClientHeight'#3#183#1#11'ClientWidth'#3'm'#2#5 +'p'#3#11#1#5'Width'#3'm'#2#12'ClientHeight'#3#163#1#11'ClientWidth'#3'm'#2#5
+'Color'#7#9'clBtnFace'#10'Font.Color'#7#12'clWindowText'#11'Font.Height'#2 +'Color'#7#9'clBtnFace'#10'Font.Color'#7#12'clWindowText'#11'Font.Height'#2
+#243#9'Font.Name'#6#5'Arial'#4'Menu'#7#8'MainMenu'#8'OnCreate'#7#10'FormCrea' +#243#9'Font.Name'#6#5'Arial'#4'Menu'#7#8'MainMenu'#8'OnCreate'#7#10'FormCrea'
+'te'#9'OnDestroy'#7#11'FormDestroy'#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6 +'te'#9'OnDestroy'#7#11'FormDestroy'#6'OnShow'#7#8'FormShow'#8'Position'#7#14
+#6'0.9.31'#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6'Height'#2#18#3'Top'#3#165#1#5 +'poScreenCenter'#10'LCLVersion'#6#6'0.9.31'#0#6'TPanel'#6'Panel1'#4'Left'#2#0
+'Width'#3'm'#2#5'Align'#7#8'alBottom'#9'Alignment'#7#13'taLeftJustify'#10'Be' +#6'Height'#2#18#3'Top'#3#145#1#5'Width'#3'm'#2#5'Align'#7#8'alBottom'#9'Alig'
+'velInner'#7#9'bvLowered'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2#18#11 +'nment'#7#13'taLeftJustify'#10'BevelInner'#7#9'bvLowered'#10'BevelOuter'#7#6
+'ClientWidth'#3'm'#2#8'TabOrder'#2#0#0#12'TProgressBar'#11'ProgressBar'#4'Le' +'bvNone'#12'ClientHeight'#2#18#11'ClientWidth'#3'm'#2#8'TabOrder'#2#0#0#12'T'
+'ft'#3#214#1#6'Height'#2#16#3'Top'#2#1#5'Width'#3#150#0#5'Align'#7#7'alRight' +'ProgressBar'#11'ProgressBar'#4'Left'#3#214#1#6'Height'#2#16#3'Top'#2#1#5'Wi'
+#8'TabOrder'#2#0#7'Visible'#8#0#0#0#6'TPanel'#6'Panel2'#4'Left'#2#0#6'Height' +'dth'#3#150#0#5'Align'#7#7'alRight'#8'TabOrder'#2#0#7'Visible'#8#0#0#0#6'TPa'
+#2'!'#3'Top'#2#0#5'Width'#3'm'#2#5'Align'#7#5'alTop'#10'BevelOuter'#7#6'bvNo' +'nel'#6'Panel2'#4'Left'#2#0#6'Height'#2'!'#3'Top'#2#0#5'Width'#3'm'#2#5'Alig'
+'ne'#12'ClientHeight'#2'!'#11'ClientWidth'#3'm'#2#8'TabOrder'#2#1#0#5'TEdit' +'n'#7#5'alTop'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2'!'#11'ClientWid'
+#7'editURL'#4'Left'#3#190#0#6'Height'#2#22#3'Top'#2#4#5'Width'#3'Q'#1#9'OnKe' +'th'#3'm'#2#8'TabOrder'#2#1#0#5'TEdit'#7'editURL'#4'Left'#3#190#0#6'Height'#2
+'yDown'#7#14'editURLKeyDown'#7'TabStop'#8#8'TabOrder'#2#3#0#0#7'TButton'#12 +#24#3'Top'#2#4#5'Width'#3'Q'#1#8'AutoSize'#8#9'OnKeyDown'#7#14'editURLKeyDow'
+'ReloadButton'#4'Left'#2#10#6'Height'#2#24#3'Top'#2#4#5'Width'#2';'#7'Captio' +'n'#7'TabStop'#8#8'TabOrder'#2#3#0#0#7'TButton'#12'ReloadButton'#4'Left'#2#10
+'n'#6#7'&Reload'#7'Enabled'#8#7'OnClick'#7#17'ReloadButtonClick'#8'TabOrder' +#6'Height'#2#24#3'Top'#2#4#5'Width'#2';'#7'Caption'#6#7'&Reload'#7'Enabled'#8
+#2#0#0#0#7'TButton'#10'BackButton'#4'Left'#2'E'#6'Height'#2#24#3'Top'#2#4#5 +#7'OnClick'#7#17'ReloadButtonClick'#8'TabOrder'#2#0#0#0#7'TButton'#10'BackBu'
+'Width'#2';'#7'Caption'#6#5'&Back'#7'Enabled'#8#7'OnClick'#7#12'FwdBackClick' +'tton'#4'Left'#2'E'#6'Height'#2#24#3'Top'#2#4#5'Width'#2';'#7'Caption'#6#5'&'
+#8'TabOrder'#2#1#0#0#7'TButton'#9'FwdButton'#4'Left'#3#128#0#6'Height'#2#24#3 +'Back'#7'Enabled'#8#7'OnClick'#7#12'FwdBackClick'#8'TabOrder'#2#1#0#0#7'TBut'
+'Top'#2#4#5'Width'#2';'#7'Caption'#6#8'&Forward'#7'Enabled'#8#7'OnClick'#7#12 +'ton'#9'FwdButton'#4'Left'#3#128#0#6'Height'#2#24#3'Top'#2#4#5'Width'#2';'#7
+'FwdBackClick'#8'TabOrder'#2#2#0#0#0#6'TPanel'#6'Panel3'#4'Left'#2#0#6'Heigh' +'Caption'#6#8'&Forward'#7'Enabled'#8#7'OnClick'#7#12'FwdBackClick'#8'TabOrde'
+'t'#3#132#1#3'Top'#2'!'#5'Width'#3'm'#2#5'Align'#7#8'alClient'#10'BevelInner' +'r'#2#2#0#0#0#6'TPanel'#6'Panel3'#4'Left'#2#0#6'Height'#3'p'#1#3'Top'#2'!'#5
+#7#9'bvLowered'#10'BevelOuter'#7#6'bvNone'#7'Caption'#6#6'Panel3'#12'ClientH' +'Width'#3'm'#2#5'Align'#7#8'alClient'#10'BevelInner'#7#9'bvLowered'#10'Bevel'
+'eight'#3#132#1#11'ClientWidth'#3'm'#2#8'TabOrder'#2#2#0#11'THTMLViewer'#6'V' +'Outer'#7#6'bvNone'#7'Caption'#6#6'Panel3'#12'ClientHeight'#3'p'#1#11'Client'
+'iewer'#4'Left'#2#1#6'Height'#3#130#1#3'Top'#2#1#5'Width'#3'k'#2#16'OnHotSpo' +'Width'#3'm'#2#8'TabOrder'#2#2#0#11'THTMLViewer'#6'Viewer'#4'Left'#2#1#6'Hei'
+'tCovered'#7#13'HotSpotChange'#14'OnHotSpotClick'#7#12'HotSpotClick'#14'OnIm' +'ght'#3'n'#1#3'Top'#2#1#5'Width'#3'k'#2#16'OnHotSpotCovered'#7#13'HotSpotCha'
+'ageRequest'#7#18'ViewerImageRequest'#12'OnFormSubmit'#7#11'SubmitEvent'#15 +'nge'#14'OnHotSpotClick'#7#12'HotSpotClick'#14'OnImageRequest'#7#18'ViewerIm'
+'OnHistoryChange'#7#13'HistoryChange'#10'OnProgress'#7#14'ViewerProgress'#7 +'ageRequest'#12'OnFormSubmit'#7#11'SubmitEvent'#15'OnHistoryChange'#7#13'His'
+'TabStop'#9#8'TabOrder'#2#0#5'Align'#7#8'alClient'#13'DefBackground'#7#8'clW' +'toryChange'#10'OnProgress'#7#14'ViewerProgress'#7'TabStop'#9#8'TabOrder'#2#0
+'indow'#11'BorderStyle'#7#9'htFocused'#15'HistoryMaxCount'#2#6#11'DefFontNam' +#5'Align'#7#8'alClient'#13'DefBackground'#7#8'clWindow'#11'BorderStyle'#7#9
+'e'#6#15'Times New Roman'#14'DefPreFontName'#6#11'Courier New'#12'DefFontCol' +'htFocused'#15'HistoryMaxCount'#2#6#11'DefFontName'#6#15'Times New Roman'#14
+'or'#7#12'clWindowText'#16'DefOverLinkColor'#7#9'clFuchsia'#15'ImageCacheCou' +'DefPreFontName'#6#11'Courier New'#12'DefFontColor'#7#12'clWindowText'#16'De'
+'nt'#2#6#8'NoSelect'#8#7'CharSet'#7#15'DEFAULT_CHARSET'#15'PrintMarginLeft'#5 +'fOverLinkColor'#7#9'clFuchsia'#15'ImageCacheCount'#2#6#8'NoSelect'#8#7'Char'
+#0#0#0#0#0#0#0#128#0'@'#16'PrintMarginRight'#5#0#0#0#0#0#0#0#128#0'@'#14'Pri' +'Set'#7#15'DEFAULT_CHARSET'#15'PrintMarginLeft'#5#0#0#0#0#0#0#0#128#0'@'#16
+'ntMarginTop'#5#0#0#0#0#0#0#0#128#0'@'#17'PrintMarginBottom'#5#0#0#0#0#0#0#0 +'PrintMarginRight'#5#0#0#0#0#0#0#0#128#0'@'#14'PrintMarginTop'#5#0#0#0#0#0#0
+#128#0'@'#10'PrintScale'#5#0#0#0#0#0#0#0#128#255'?'#11'OnMouseMove'#7#15'Vie' +#0#128#0'@'#17'PrintMarginBottom'#5#0#0#0#0#0#0#0#128#0'@'#10'PrintScale'#5#0
+'werMouseMove'#12'OnProcessing'#7#17'ProcessingHandler'#17'OnPrintHTMLHeader' +#0#0#0#0#0#0#128#255'?'#11'OnMouseMove'#7#15'ViewerMouseMove'#12'OnProcessin'
+#7#21'ViewerPrintHTMLHeader'#17'OnPrintHTMLFooter'#7#21'ViewerPrintHTMLFoote' +'g'#7#17'ProcessingHandler'#17'OnPrintHTMLHeader'#7#21'ViewerPrintHTMLHeader'
+'r'#9'OnInclude'#7#13'ViewerInclude'#14'OnSoundRequest'#7#12'SoundRequest'#13 +#17'OnPrintHTMLFooter'#7#21'ViewerPrintHTMLFooter'#9'OnInclude'#7#13'ViewerI'
+'OnMetaRefresh'#7#16'MetaRefreshEvent'#13'OnObjectClick'#7#11'ObjectClick'#12 +'nclude'#14'OnSoundRequest'#7#12'SoundRequest'#13'OnMetaRefresh'#7#16'MetaRe'
+'OnRightClick'#7#10'RightClick'#0#0#0#11'TOpenDialog'#10'OpenDialog'#10'Defa' +'freshEvent'#13'OnObjectClick'#7#11'ObjectClick'#12'OnRightClick'#7#10'Right'
+'ultExt'#6#4'.htm'#6'Filter'#6'%html files|*.htm;*.html|all files|*.*'#7'Opt' +'Click'#0#0#0#11'TOpenDialog'#10'OpenDialog'#10'DefaultExt'#6#4'.htm'#6'Filt'
+'ions'#11#14'ofHideReadOnly'#15'ofPathMustExist'#15'ofFileMustExist'#0#4'lef' +'er'#6'%html files|*.htm;*.html|all files|*.*'#7'Options'#11#14'ofHideReadOn'
+'t'#3'I'#1#3'top'#2#2#0#0#9'TMainMenu'#8'MainMenu'#4'left'#3'#'#1#3'top'#2#4 +'ly'#15'ofPathMustExist'#15'ofFileMustExist'#0#4'left'#3'I'#1#3'top'#2#2#0#0
+#0#9'TMenuItem'#5'File1'#7'Caption'#6#5'&File'#0#9'TMenuItem'#4'Open'#7'Capt' +#9'TMainMenu'#8'MainMenu'#4'left'#3'#'#1#3'top'#2#4#0#9'TMenuItem'#5'File1'#7
+'ion'#6#5'&Open'#8'ShortCut'#2'r'#7'OnClick'#7#13'OpenFileClick'#0#0#9'TMenu' +'Caption'#6#5'&File'#0#9'TMenuItem'#4'Open'#7'Caption'#6#5'&Open'#8'ShortCut'
+'Item'#12'OpenTextFile'#7'Caption'#6#15'Open &Text File'#7'OnClick'#7#17'Ope' +#2'r'#7'OnClick'#7#13'OpenFileClick'#0#0#9'TMenuItem'#12'OpenTextFile'#7'Cap'
+'nTextFileClick'#0#0#9'TMenuItem'#13'OpenImageFile'#7'Caption'#6#16'Open &Im' +'tion'#6#15'Open &Text File'#7'OnClick'#7#17'OpenTextFileClick'#0#0#9'TMenuI'
+'age File'#7'OnClick'#7#18'OpenImageFileClick'#0#0#9'TMenuItem'#13'PrinterSe' +'tem'#13'OpenImageFile'#7'Caption'#6#16'Open &Image File'#7'OnClick'#7#18'Op'
+'tup1'#7'Caption'#6#16'Printer Setup...'#7'OnClick'#7#18'PrinterSetup1Click' +'enImageFileClick'#0#0#9'TMenuItem'#13'PrinterSetup1'#7'Caption'#6#16'Printe'
+#0#0#9'TMenuItem'#12'Printpreview'#7'Caption'#6#14'Print pre&view'#7'Enabled' +'r Setup...'#7'OnClick'#7#18'PrinterSetup1Click'#0#0#9'TMenuItem'#12'Printpr'
+#8#7'OnClick'#7#17'PrintpreviewClick'#0#0#9'TMenuItem'#6'Print1'#7'Caption'#6 +'eview'#7'Caption'#6#14'Print pre&view'#7'Enabled'#8#7'OnClick'#7#17'Printpr'
+#9'&Print...'#7'Enabled'#8#7'OnClick'#7#11'Print1Click'#0#0#9'TMenuItem'#2'N' +'eviewClick'#0#0#9'TMenuItem'#6'Print1'#7'Caption'#6#9'&Print...'#7'Enabled'
+'1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#5'Exit1'#7'Caption'#6#5'E&xit'#7'OnCl' +#8#7'OnClick'#7#11'Print1Click'#0#0#9'TMenuItem'#2'N1'#7'Caption'#6#1'-'#0#0
+'ick'#7#10'Exit1Click'#0#0#0#9'TMenuItem'#5'Edit2'#7'Caption'#6#5'&Edit'#7'O' +#9'TMenuItem'#5'Exit1'#7'Caption'#6#5'E&xit'#7'OnClick'#7#10'Exit1Click'#0#0
+'nClick'#7#10'Edit2Click'#0#9'TMenuItem'#5'Find1'#7'Caption'#6#5'&Find'#7'En' +#0#9'TMenuItem'#5'Edit2'#7'Caption'#6#5'&Edit'#7'OnClick'#7#10'Edit2Click'#0
+'abled'#8#7'OnClick'#7#10'Find1Click'#0#0#9'TMenuItem'#8'CopyItem'#7'Caption' +#9'TMenuItem'#5'Find1'#7'Caption'#6#5'&Find'#7'Enabled'#8#7'OnClick'#7#10'Fi'
+#6#5'&Copy'#8'ShortCut'#3'C@'#7'OnClick'#7#13'CopyItemClick'#0#0#9'TMenuItem' +'nd1Click'#0#0#9'TMenuItem'#8'CopyItem'#7'Caption'#6#5'&Copy'#8'ShortCut'#3
+#2'N2'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#13'SelectAllItem'#7'Caption'#6#11 +'C@'#7'OnClick'#7#13'CopyItemClick'#0#0#9'TMenuItem'#2'N2'#7'Caption'#6#1'-'
+'Select &All'#7'Enabled'#8#7'OnClick'#7#18'SelectAllItemClick'#0#0#0#9'TMenu' +#0#0#9'TMenuItem'#13'SelectAllItem'#7'Caption'#6#11'Select &All'#7'Enabled'#8
+'Item'#8'options1'#7'Caption'#6#8'&Options'#0#9'TMenuItem'#10'ShowImages'#7 +#7'OnClick'#7#18'SelectAllItemClick'#0#0#0#9'TMenuItem'#8'options1'#7'Captio'
+'Caption'#6#12'&Show images'#7'OnClick'#7#15'ShowImagesClick'#0#0#9'TMenuIte' +'n'#6#8'&Options'#0#9'TMenuItem'#10'ShowImages'#7'Caption'#6#12'&Show images'
+'m'#5'Fonts'#7'Caption'#6#23'Default &Font/Colors...'#7'OnClick'#7#15'FontCo' +#7'OnClick'#7#15'ShowImagesClick'#0#0#9'TMenuItem'#5'Fonts'#7'Caption'#6#23
,'lorsClick'#0#0#0#9'TMenuItem'#15'HistoryMenuItem'#7'Caption'#6#8'&History'#7 ,'Default &Font/Colors...'#7'OnClick'#7#15'FontColorsClick'#0#0#0#9'TMenuItem'
+'Visible'#8#0#0#9'TMenuItem'#6'About1'#7'Caption'#6#6'&About'#7'OnClick'#7#11 +#15'HistoryMenuItem'#7'Caption'#6#8'&History'#7'Visible'#8#0#0#9'TMenuItem'#6
+'About1Click'#0#0#0#12'TPrintDialog'#11'PrintDialog'#8'FromPage'#2#1#7'MinPa' +'About1'#7'Caption'#6#6'&About'#7'OnClick'#7#11'About1Click'#0#0#0#12'TPrint'
+'ge'#2#1#7'MaxPage'#3#15''''#7'Options'#11#10'poPageNums'#0#6'ToPage'#2#1#4 +'Dialog'#11'PrintDialog'#8'FromPage'#2#1#7'MinPage'#2#1#7'MaxPage'#3#15''''#7
+'left'#3'j'#1#3'top'#2#1#0#0#11'TFindDialog'#10'FindDialog'#7'Options'#11#6 +'Options'#11#10'poPageNums'#0#6'ToPage'#2#1#4'left'#3'j'#1#3'top'#2#1#0#0#11
+'frDown'#15'frHideWholeWord'#18'frDisableWholeWord'#0#6'OnFind'#7#14'FindDia' +'TFindDialog'#10'FindDialog'#7'Options'#11#6'frDown'#15'frHideWholeWord'#18
+'logFind'#4'left'#3#249#0#3'top'#4#255#255#0#0#0#0#10'TPopupMenu'#9'PopupMen' +'frDisableWholeWord'#0#6'OnFind'#7#14'FindDialogFind'#4'left'#3#249#0#3'top'
+'u'#4'left'#3#144#1#3'top'#2#1#0#9'TMenuItem'#9'Viewimage'#7'Caption'#6#11'&' +#4#255#255#0#0#0#0#10'TPopupMenu'#9'PopupMenu'#4'left'#3#144#1#3'top'#2#1#0#9
+'View image'#7'OnClick'#7#14'ViewimageClick'#0#0#9'TMenuItem'#20'CopyImageTo' +'TMenuItem'#9'Viewimage'#7'Caption'#6#11'&View image'#7'OnClick'#7#14'Viewim'
+'Clipboard'#7'Caption'#6#24'&Copy image to clipboard'#7'OnClick'#7#25'CopyIm' +'ageClick'#0#0#9'TMenuItem'#20'CopyImageToClipboard'#7'Caption'#6#24'&Copy i'
+'ageToClipboardClick'#0#0#9'TMenuItem'#2'N3'#7'Caption'#6#1'-'#0#0#9'TMenuIt' +'mage to clipboard'#7'OnClick'#7#25'CopyImageToClipboardClick'#0#0#9'TMenuIt'
+'em'#15'OpenInNewWindow'#7'Caption'#6#19'&Open in new window'#7'OnClick'#7#20 +'em'#2'N3'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#15'OpenInNewWindow'#7'Caption'
+'OpenInNewWindowClick'#0#0#0#6'TTimer'#9'MetaTimer'#7'Enabled'#8#7'OnTimer'#7 +#6#19'&Open in new window'#7'OnClick'#7#20'OpenInNewWindowClick'#0#0#0#6'TTi'
+#14'MetaTimerTimer'#4'left'#3#242#0#3'top'#2'K'#0#0#6'TTimer'#6'Timer1'#8'In' +'mer'#9'MetaTimer'#7'Enabled'#8#7'OnTimer'#7#14'MetaTimerTimer'#4'left'#3#242
+'terval'#3#200#0#7'OnTimer'#7#11'Timer1Timer'#4'left'#3'#'#1#3'top'#2'G'#0#0 +#0#3'top'#2'K'#0#0#6'TTimer'#6'Timer1'#8'Interval'#3#200#0#7'OnTimer'#7#11'T'
+#19'TPrinterSetupDialog'#18'PrinterSetupDialog'#4'left'#3#192#1#0#0#0 +'imer1Timer'#4'left'#3'#'#1#3'top'#2'G'#0#0#19'TPrinterSetupDialog'#18'Print'
+'erSetupDialog'#4'left'#3#192#1#0#0#0
]); ]);

View File

@@ -788,12 +788,16 @@ begin
J := Pos(':', UpperCase(SRC)); J := Pos(':', UpperCase(SRC));
if J = 0 then if J = 0 then
begin begin
URL := MyPageLoader.LastPageURL + Copy(SRC, 2, Length(SRC)-1) if (Length(MyPageLoader.LastPageURL) > 0) and
(MyPageLoader.LastPageURL[Length(MyPageLoader.LastPageURL)] = '/') then
URL := MyPageLoader.LastPageURL + Copy(SRC, 2, Length(SRC)-1)
else
URL := MyPageLoader.LastPageURL + SRC;
end end
else URL := SRC; else
URL := SRC;
J := Pos('http:', LowerCase(URL));
J := Pos('HTTP:', UpperCase(URL));
if (J > 0) then if (J > 0) then
begin begin
MyPageLoader.LoadBinaryResource(URL, Stream); MyPageLoader.LoadBinaryResource(URL, Stream);

View File

@@ -38,8 +38,12 @@ end;
procedure TPageLoader.LoadFromURL(AURL: string); procedure TPageLoader.LoadFromURL(AURL: string);
var var
Client: THttpSend; Client: THttpSend;
J: Integer;
begin begin
LastPageURL := AURL; // If there is no protocol, add http
J := Pos(':', AURL);
if (J = 0) then LastPageURL := 'http://' + AURL
else LastPageURL := AURL;
Client := THttpSend.Create; Client := THttpSend.Create;
try try
@@ -52,7 +56,7 @@ begin
// end; // end;
// Client.UserAgent := AUserAgent; // Client.UserAgent := AUserAgent;
Client.HttpMethod('GET', AURL); Client.HttpMethod('GET', LastPageURL);
Client.Document.Position := 0; Client.Document.Position := 0;
ContentsList.LoadFromStream(Client.Document); ContentsList.LoadFromStream(Client.Document);
@@ -63,7 +67,6 @@ begin
end; end;
end; end;
{.$define FPB_DEBUG_IMAGE_LOAD}
procedure TPageLoader.LoadBinaryResource(AURL: string; var ADest: TMemoryStream); procedure TPageLoader.LoadBinaryResource(AURL: string; var ADest: TMemoryStream);
var var
Client: THttpSend; Client: THttpSend;
@@ -82,17 +85,7 @@ begin
Client.Document.Position := 0; Client.Document.Position := 0;
ADest := TMemoryStream.Create; ADest := TMemoryStream.Create;
ADest.CopyFrom(Client.Document, Client.Document.Size); ADest.CopyFrom(Client.Document, Client.Document.Size);
// ADest.SaveToFile('/Users/felipe/test.gif'); // WriteLn(AURL, ' Size: ', ADest.Size);
{$IFDEF FPB_DEBUG_IMAGE_LOAD}
ContentsList.LoadFromStream(Client.Document);
WriteLn('Starting to receive image: ' + AURL);
for i := 0 to ContentsList.Count-1 do
WriteLn(ContentsList.Strings[i]);
Contents := ContentsList.Text;
{$ENDIF}
finally finally
Client.Free; Client.Free;
end; end;