r9571 tlsa - in /trunk/netsurfweb: about/news.en about/thanks.en index.en
by netsurf@semichrome.net
Author: tlsa
Date: Tue Sep 15 07:00:50 2009
New Revision: 9571
URL: http://source.netsurf-browser.org?rev=9571&view=rev
Log:
Mention GSoC 2009 on Thanks page.
Modified:
trunk/netsurfweb/about/news.en
trunk/netsurfweb/about/thanks.en
trunk/netsurfweb/index.en
Modified: trunk/netsurfweb/about/news.en
URL: http://source.netsurf-browser.org/trunk/netsurfweb/about/news.en?rev=9571...
==============================================================================
--- trunk/netsurfweb/about/news.en (original)
+++ trunk/netsurfweb/about/news.en Tue Sep 15 07:00:50 2009
@@ -56,7 +56,7 @@
<h1>News</h1>
<dl class="news">
-<dt><a href="http://vlists.pepperfish.net/pipermail/netsurf-users-netsurf-browser.org/...">Google Summer of Code Roundup</a> <span>15 September 2009</span></dt>
+<dt><a href="http://vlists.pepperfish.net/pipermail/netsurf-users-netsurf-browser.org/...">Google Summer of Code Roundup</a> <span>15 Sep 2009</span></dt>
<dd>As many of you know, NetSurf has participated in Google Summer of Code for a second consecutive year. This year we ran three projects which have all been of great benefit to the project.</dd>
<dt><a href="http://vlists.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/20...">New developers sought</a> <span>06 Aug 2009</span></dt>
<dd>A maintainer is required for the RISC OS front end. Also anyone with Perl scripting ability could help overhaul the autobuilder.</dd>
Modified: trunk/netsurfweb/about/thanks.en
URL: http://source.netsurf-browser.org/trunk/netsurfweb/about/thanks.en?rev=95...
==============================================================================
--- trunk/netsurfweb/about/thanks.en (original)
+++ trunk/netsurfweb/about/thanks.en Tue Sep 15 07:00:50 2009
@@ -70,9 +70,15 @@
<h2><img class="thankslogo" src="/webimages/logogsoc2008.png" alt="">Google Summer of Code</h2>
-<p>Google Summer of Code generously offers funding for students to work on open source projects over the summer. In the 2008 programme, NetSurf was selected to participate as a mentoring organisation. Four excellent students worked with us over the period and the experience proved a great success for NetSurf.</p>
+<p>Google Summer of Code generously offers funding for students to work on open source projects over the summer. NetSurf was selected to participate as a mentoring organisation in both the 2008 and 2009 programmes. Several excellent students worked with us and the experience proved a great success for NetSurf.</p>
-<p>Our students have completed our new HTML5 parser, vastly overhauled the GTK front end, implemented PDF export, added print functionality to the GTK version and split bits of NetSurf out into separate libraries, for ease of maintenance and use by other projects. In addition to all this, taking part in Google Summer of Code also raised NetSurf's profile in the wider open source community.</p>
+<h3>GSoC 2008</h3>
+
+<p>Our students completed our new HTML5 parser, vastly overhauled the GTK front end, implemented PDF export, added print functionality to the GTK version and split bits of NetSurf out into separate libraries, for ease of maintenance and use by other projects. In addition to all this, taking part in Google Summer of Code also raised NetSurf's profile in the wider open source community.</p>
+
+<h3>GSoC 2009</h3>
+
+<p>In the second year we participated, our students worked on several areas of the project. Much work was done on our new Document Object Model library. A set of core widgets like scrollbars and text inputs was created. Much previously RISC OS specific functionality was moved from the RISC OS front end to the multi-platform core. These include treeviews, global history, cookie management, and page text search. The GTK front end was much improved with interfaces for the new core functionality and other features like a search bar and favicons.</p>
<ul>
<li><a href="http://code.google.com/soc/2008/">Google Summer of Code 2008</a></li>
Modified: trunk/netsurfweb/index.en
URL: http://source.netsurf-browser.org/trunk/netsurfweb/index.en?rev=9571&r1=9...
==============================================================================
--- trunk/netsurfweb/index.en (original)
+++ trunk/netsurfweb/index.en Tue Sep 15 07:00:50 2009
@@ -139,7 +139,7 @@
<h2 id="news">Latest news</h2>
<dl class="frontnews">
-<dt><a href="http://vlists.pepperfish.net/pipermail/netsurf-users-netsurf-browser.org/...">Google Summer of Code Roundup</a> <span>15 September 2009</span></dt>
+<dt><a href="http://vlists.pepperfish.net/pipermail/netsurf-users-netsurf-browser.org/...">Google Summer of Code Roundup</a> <span>15 Sep 2009</span></dt>
<dd>As many of you know, NetSurf has participated in Google Summer of Code for a second consecutive year. This year we ran three projects which have all been of great benefit to the project.</dd>
<dt><a href="http://vlists.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/20...">New developers sought</a> <span>06 Aug 2009</span></dt>
<dd>A maintainer is required for the RISC OS front end. Also anyone with Perl scripting ability could help overhaul the autobuilder.</dd>
13 years, 8 months
r9569 chris_y - /trunk/netsurf/!NetSurf/Resources/it/Messages
by netsurf@semichrome.net
Author: chris_y
Date: Sun Sep 13 17:09:27 2009
New Revision: 9569
URL: http://source.netsurf-browser.org?rev=9569&view=rev
Log:
Update from Samir Hawamdeh
Modified:
trunk/netsurf/!NetSurf/Resources/it/Messages
Modified: trunk/netsurf/!NetSurf/Resources/it/Messages
URL: http://source.netsurf-browser.org/trunk/netsurf/%21NetSurf/Resources/it/M...
==============================================================================
--- trunk/netsurf/!NetSurf/Resources/it/Messages (original)
+++ trunk/netsurf/!NetSurf/Resources/it/Messages Sun Sep 13 17:09:27 2009
@@ -1,6 +1,6 @@
-# Italian messages for NetSurf 3.0 Development (Revision 9410)
+# Italian messages for NetSurf 3.0 Development (Revision 9560)
# Translated by Samir Hawamdeh (http://www.betatesting.it/backforthefuture)
-# 23.08.2009
+# 13.09.2009
# =========================================================================
#
# Description
@@ -266,9 +266,9 @@
HistLocalNS:Mostra cronologia locale...
FindTextNS:Trova testo...
Redraw:Ridisegna pagina
-ScaleInc:Increase
-ScaleDec:Decrease
-ScaleNorm:Normal
+ScaleInc:Incrementa
+ScaleDec:Decrementa
+ScaleNorm:Normale
# Hotlist menu
#
@@ -451,9 +451,9 @@
PrintSheetFilled:Il foglio stampato è pieno
PrintSheetsFilled:I fogli stampati sono pieni
-Printer:Printer
-Copies:Copies
-Printing:Printing page
+Printer:Stampante
+Copies:Copie
+Printing:Stampa della pagina
# Find text user interface tokens
@@ -604,7 +604,7 @@
EncNotRec:Tipo di codifica sconosciuta.
# Error messages for Amiga version only
-CompError:Unable to open
+CompError:Impossibile aprire
# Queries
# =======
@@ -1258,7 +1258,7 @@
DownloadDir:Percorso predefinito per i trasferimenti
TabbedBrowsing:Navigazione a schede
TabActive:Apri nuove schede in sottofondo
-TabMiddle:Tasto centrale del mouse per l'apertura delle schede
+TabMiddle:Tasto centrale del mouse per l'apertura delle schede (Tab)
Clipboard:Clipboard
ClipboardUTF8:Scrivi testo come UTF-8
ContextMenu:Menu contestuali
13 years, 8 months
r9568 MarkieB - in /branches/MarkieB/gtkmain: !NetSurf/Resources/ !NetSurf/Resources/de/ !NetSurf/Resources/en/ !NetSurf/Resources/fr/ !NetSurf/Resources/it/ !NetSurf/Resources/nl/ ./ Docs/ideas/ amiga/ amiga/dist/ amiga/pkg/ amiga/resources/Themes/AISS/ amiga/resources/Themes/Default/ content/ css/ render/ utils/
by netsurf@semichrome.net
Author: MarkieB
Date: Sun Sep 13 08:46:59 2009
New Revision: 9568
URL: http://source.netsurf-browser.org?rev=9568&view=rev
Log:
merge / resolve recent changes to trunk
Added:
branches/MarkieB/gtkmain/Docs/ideas/cache.txt
- copied unchanged from r9564, trunk/netsurf/Docs/ideas/cache.txt
Modified:
branches/MarkieB/gtkmain/ (props changed)
branches/MarkieB/gtkmain/!NetSurf/Resources/CSS,f79
branches/MarkieB/gtkmain/!NetSurf/Resources/de/Messages
branches/MarkieB/gtkmain/!NetSurf/Resources/en/Messages
branches/MarkieB/gtkmain/!NetSurf/Resources/fr/Messages
branches/MarkieB/gtkmain/!NetSurf/Resources/it/Messages
branches/MarkieB/gtkmain/!NetSurf/Resources/nl/Messages
branches/MarkieB/gtkmain/amiga/bitmap.c
branches/MarkieB/gtkmain/amiga/dist/Install
branches/MarkieB/gtkmain/amiga/dist/NetSurf.guide
branches/MarkieB/gtkmain/amiga/dist/netsurf.readme
branches/MarkieB/gtkmain/amiga/font.c
branches/MarkieB/gtkmain/amiga/gui.c
branches/MarkieB/gtkmain/amiga/gui.h
branches/MarkieB/gtkmain/amiga/history_local.c
branches/MarkieB/gtkmain/amiga/history_local.h
branches/MarkieB/gtkmain/amiga/menu.c
branches/MarkieB/gtkmain/amiga/menu.h
branches/MarkieB/gtkmain/amiga/pkg/makepackage
branches/MarkieB/gtkmain/amiga/plotters.c
branches/MarkieB/gtkmain/amiga/plotters.h
branches/MarkieB/gtkmain/amiga/print.c
branches/MarkieB/gtkmain/amiga/print.h
branches/MarkieB/gtkmain/amiga/resources/Themes/AISS/Theme
branches/MarkieB/gtkmain/amiga/resources/Themes/Default/Theme
branches/MarkieB/gtkmain/amiga/thumbnail.c
branches/MarkieB/gtkmain/content/content.c
branches/MarkieB/gtkmain/css/select.c
branches/MarkieB/gtkmain/render/layout.c
branches/MarkieB/gtkmain/utils/memdebug.c
Propchange: branches/MarkieB/gtkmain/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Sep 13 08:46:59 2009
@@ -1,1 +1,1 @@
-/trunk/netsurf:1-9429 /branches/vince/netsurf-fb:1-5422
+/branches/vince/netsurf-fb:1-5422 /trunk/netsurf:1-9567
Modified: branches/MarkieB/gtkmain/!NetSurf/Resources/CSS,f79
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/%21NetSurf/Res...
==============================================================================
--- branches/MarkieB/gtkmain/!NetSurf/Resources/CSS,f79 (original)
+++ branches/MarkieB/gtkmain/!NetSurf/Resources/CSS,f79 Sun Sep 13 08:46:59 2009
@@ -69,6 +69,8 @@
menu { display: block; padding-left: 1.5em; margin: 1.12em 0; }
table { display: table; border-spacing: 2px; }
+
+table[border], table[border] td, table[border] tr { border-color: grey; }
caption { display: table-caption; }
Modified: branches/MarkieB/gtkmain/!NetSurf/Resources/de/Messages
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/%21NetSurf/Res...
==============================================================================
--- branches/MarkieB/gtkmain/!NetSurf/Resources/de/Messages (original)
+++ branches/MarkieB/gtkmain/!NetSurf/Resources/de/Messages Sun Sep 13 08:46:59 2009
@@ -264,6 +264,9 @@
HistLocalNS:Show local history...
FindTextNS:Find text...
Redraw:Redraw page
+ScaleInc:Increase
+ScaleDec:Decrease
+ScaleNorm:Normal
# Hotlist menu
#
@@ -549,6 +552,9 @@
PrintSheetFilled:Druckseite
PrintSheetsFilled:Druckseiten
+Printer:Printer
+Copies:Copies
+Printing:Printing page
# Find text user interface tokens
@@ -706,7 +712,7 @@
AWNotSeen:Please locate the AWViewer application and try again.
# Error messages for Amiga version only
-NoMode:No matching mode in screens database
+CompError:Unable to open
# Queries
# =======
Modified: branches/MarkieB/gtkmain/!NetSurf/Resources/en/Messages
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/%21NetSurf/Res...
==============================================================================
--- branches/MarkieB/gtkmain/!NetSurf/Resources/en/Messages (original)
+++ branches/MarkieB/gtkmain/!NetSurf/Resources/en/Messages Sun Sep 13 08:46:59 2009
@@ -264,6 +264,9 @@
HistLocalNS:Show local history...
FindTextNS:Find text...
Redraw:Redraw page
+ScaleInc:Increase
+ScaleDec:Decrease
+ScaleNorm:Normal
# Hotlist menu
#
@@ -552,6 +555,9 @@
PrintSheetFilled:sheet is filled
PrintSheetsFilled:sheets are filled
+Printer:Printer
+Copies:Copies
+Printing:Printing page
# Find text user interface tokens
@@ -709,7 +715,7 @@
DirectoryError:directory '%s' already exists
# Error messages for Amiga version only
-NoMode:No matching mode in screens database
+CompError:Unable to open
# Queries
# =======
Modified: branches/MarkieB/gtkmain/!NetSurf/Resources/fr/Messages
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/%21NetSurf/Res...
==============================================================================
--- branches/MarkieB/gtkmain/!NetSurf/Resources/fr/Messages (original)
+++ branches/MarkieB/gtkmain/!NetSurf/Resources/fr/Messages Sun Sep 13 08:46:59 2009
@@ -264,6 +264,9 @@
HistLocalNS:Show local history...
FindTextNS:Find text...
Redraw:Redraw page
+ScaleInc:Increase
+ScaleDec:Decrease
+ScaleNorm:Normal
# Hotlist menu
#
@@ -549,6 +552,9 @@
PrintSheetFilled:feuille remplie
PrintSheetsFilled:feuilles remplies
+Printer:Printer
+Copies:Copies
+Printing:Printing page
# Find text user interface tokens
@@ -706,7 +712,7 @@
AWNotSeen:Localisez l'application AMViewer SVP puis réessayez.
# Error messages for Amiga version only
-NoMode:No matching mode in screens database
+CompError:Unable to open
# Queries
# =======
Modified: branches/MarkieB/gtkmain/!NetSurf/Resources/it/Messages
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/%21NetSurf/Res...
==============================================================================
--- branches/MarkieB/gtkmain/!NetSurf/Resources/it/Messages (original)
+++ branches/MarkieB/gtkmain/!NetSurf/Resources/it/Messages Sun Sep 13 08:46:59 2009
@@ -266,6 +266,9 @@
HistLocalNS:Mostra cronologia locale...
FindTextNS:Trova testo...
Redraw:Ridisegna pagina
+ScaleInc:Increase
+ScaleDec:Decrease
+ScaleNorm:Normal
# Hotlist menu
#
@@ -555,6 +558,9 @@
PrintSheetFilled:Il foglio stampato è pieno
PrintSheetsFilled:I fogli stampati sono pieni
+Printer:Printer
+Copies:Copies
+Printing:Printing page
# Find text user interface tokens
@@ -712,7 +718,7 @@
EncNotRec:Tipo di codifica sconosciuta.
# Error messages for Amiga version only
-NoMode:Questa modalità non coincide nel database degli schermi
+CompError:Unable to open
# Queries
# =======
Modified: branches/MarkieB/gtkmain/!NetSurf/Resources/nl/Messages
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/%21NetSurf/Res...
==============================================================================
--- branches/MarkieB/gtkmain/!NetSurf/Resources/nl/Messages (original)
+++ branches/MarkieB/gtkmain/!NetSurf/Resources/nl/Messages Sun Sep 13 08:46:59 2009
@@ -264,6 +264,9 @@
HistLocalNS:Show local history...
FindTextNS:Find text...
Redraw:Redraw page
+ScaleInc:Increase
+ScaleDec:Decrease
+ScaleNorm:Normal
# Hotlist menu
#
@@ -549,6 +552,9 @@
PrintSheetFilled:pagina
PrintSheetsFilled:pagina's
+Printer:Printer
+Copies:Copies
+Printing:Printing page
# Find text user interface tokens
@@ -706,7 +712,7 @@
AWNotSeen:Please locate the AWViewer application and try again.
# Error messages for Amiga version only
-NoMode:No matching mode in screens database
+CompError:Unable to open
# Queries
# =======
Modified: branches/MarkieB/gtkmain/amiga/bitmap.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/bitmap.c...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/bitmap.c (original)
+++ branches/MarkieB/gtkmain/amiga/bitmap.c Sun Sep 13 08:46:59 2009
@@ -364,9 +364,9 @@
if(GfxBase->lib_Version >= 53) // AutoDoc says v52, but this function isn't in OS4.0, so checking for v53 (OS4.1)
{
uint32 comptype = COMPOSITE_Src;
- uint32 flags = COMPFLAG_IgnoreDestAlpha;
-
- if(!bitmap->opaque) comptype = COMPOSITE_Src_Over_Dest;
+ uint32 flags = 0;
+
+ if(bitmap->opaque) flags |= COMPFLAG_IgnoreDestAlpha;
if(option_scale_quality) flags |= COMPFLAG_SrcFilter;
CompositeTags(comptype,tbm,scaledbm,
Modified: branches/MarkieB/gtkmain/amiga/dist/Install
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/dist/Ins...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/dist/Install (original)
+++ branches/MarkieB/gtkmain/amiga/dist/Install Sun Sep 13 08:46:59 2009
@@ -320,7 +320,7 @@
)
)
-(complete 40)
+(complete 30)
(copyfiles
(prompt "Copying files")
@@ -332,7 +332,7 @@
; (all)
)
-(set #complete 50)
+(set #complete 40)
(if (= #cairo-version 1)
(
Modified: branches/MarkieB/gtkmain/amiga/dist/NetSurf.guide
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/dist/Net...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/dist/NetSurf.guide (original)
+++ branches/MarkieB/gtkmain/amiga/dist/NetSurf.guide Sun Sep 13 08:46:59 2009
@@ -37,6 +37,8 @@
@{b}kiosk_mode@{ub} No gadgets
@{b}no_iframes@{ub} Disable IFrames
+@{b}printer_unit@{ub} Specifies which printer.device unit to print to
+
@{b}url_file@{ub} Path to URL database file
@{b}hotlist_file@{ub} Path to Hotlist file
@{b}arexx_dir@{ub} Path to ARexx scripts dir
Modified: branches/MarkieB/gtkmain/amiga/dist/netsurf.readme
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/dist/net...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/dist/netsurf.readme (original)
+++ branches/MarkieB/gtkmain/amiga/dist/netsurf.readme Sun Sep 13 08:46:59 2009
@@ -2,16 +2,17 @@
Uploader: chris(a)unsatisfactorysoftware.co.uk (Chris Young)
Author: NetSurf contributors (OS4 port by Chris Young)
Type: comm/www
-Version: 2.0 development (SVN 5911)
+Version: 3.0 development (SVN 9560)
Architecture: ppc-amigaos >= 4.0.0
-This is a preview release of the OS4 native port of NetSurf.
+MANUAL INSTALL ONLY - INTENTIONALLY NOT AVAILABLE VIA AMIUPDATE
+
+This is a preview release of NetSurf 3.0 for AmigaOS 4.
It is beta software, which means it is unstable and missing
features - use at your own risk!
-This is provided for testing purposes only, to gain feedback
-in order to fix bugs for the real release and to prioritise
-features.
+This is provided for testing purposes only. For the latest
+stable version, visit http://www.netsurf-browser.org
Please report bugs to chris(a)unsatisfactorysoftware.co.uk,
on the Amigans.net forums or in the bug tracker at
Modified: branches/MarkieB/gtkmain/amiga/font.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/font.c?r...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/font.c (original)
+++ branches/MarkieB/gtkmain/amiga/font.c Sun Sep 13 08:46:59 2009
@@ -97,6 +97,7 @@
size_t len,utf8len;
uint8 *utf8;
uint32 co = 0;
+ int utf16charlen;
len = utf8_bounded_length(string, length);
if(utf8_to_enc(string,"UTF-16",length,(char **)&utf16) != UTF8_CONVERT_OK) return false;
@@ -108,6 +109,14 @@
for(i=0;i<len;i++)
{
+ if (*utf16 < 0xD800 || 0xDFFF < *utf16)
+ utf16charlen = 1;
+ else
+ utf16charlen = 2;
+
+ utf8len = utf8_char_byte_length(string);
+ string += utf8len;
+
if(ESetInfo(&ofont->olf_EEngine,
OT_GlyphCode,*utf16,
TAG_END) == OTERR_Success)
@@ -116,12 +125,9 @@
OT_GlyphMap8Bit,&glyph,
TAG_END) == 0)
{
- if(utf8_from_enc((char *)utf16,"UTF-16",2,(char **)&utf8) != UTF8_CONVERT_OK) return false;
- utf8len = utf8_char_byte_length(utf8);
- free(utf8);
-
- if(x<tx+glyph->glm_X1)
+ if(x < (tx + glyph->glm_X1))
{
+ *actual_x = tx;
i = len+1;
}
else
@@ -129,21 +135,24 @@
co += utf8len;
}
- *actual_x = tx + (glyph->glm_X1 / 2);
- tx+= glyph->glm_X1;
+ tx += glyph->glm_X1;
EReleaseInfo(&ofont->olf_EEngine,
OT_GlyphMap8Bit,glyph,
TAG_END);
}
}
- if (*utf16 < 0xD800 || 0xDFFF < *utf16)
- utf16++;
- else
- utf16 += 2;
- }
+ utf16 += utf16charlen;
+ }
+
+ if(co == length)
+ {
+ *actual_x = tx;
+ co = length;
+ }
+
*char_offset = co;
- if(co>=length) *actual_x = tx;
+
free(outf16);
return true;
@@ -172,13 +181,14 @@
{
struct TextExtent extent;
ULONG co;
- char *charp;
+ char *ostr = string;
struct TextFont *tfont;
uint16 *utf16 = NULL,*outf16 = NULL;
struct OutlineFont *ofont;
struct GlyphMap *glyph;
uint32 tx=0,i=0;
size_t len;
+ int utf8len, utf8clen = 0;
len = utf8_bounded_length(string, length);
if(utf8_to_enc((char *)string,"UTF-16",length,(char **)&utf16) != UTF8_CONVERT_OK) return false;
@@ -186,9 +196,12 @@
if(!(ofont = ami_open_outline_font(fstyle))) return false;
*char_offset = 0;
+ *actual_x = 0;
for(i=0;i<len;i++)
{
+ utf8len = utf8_char_byte_length(string+utf8clen);
+
if(ESetInfo(&ofont->olf_EEngine,
OT_GlyphCode,*utf16,
TAG_END) == OTERR_Success)
@@ -197,37 +210,35 @@
OT_GlyphMap8Bit,&glyph,
TAG_END) == 0)
{
- if(*utf16 == 0x0020)
- {
- *actual_x = tx;
- co = i;
- }
-
- if(x<tx+glyph->glm_X1)
+ tx+= glyph->glm_X1;
+
+ if(x < tx)
{
i = length+1;
}
-
- tx+= glyph->glm_X1;
+ else
+ {
+ if(string[utf8clen] == ' ') //*utf16 == 0x0020)
+ {
+ *actual_x = tx;
+ *char_offset = utf8clen;
+ }
+ }
EReleaseInfo(&ofont->olf_EEngine,
OT_GlyphMap8Bit,glyph,
TAG_END);
}
}
+
if (*utf16 < 0xD800 || 0xDFFF < *utf16)
- utf16++;
+ utf16 += 1;
else
utf16 += 2;
- }
-
- charp = (char *)(string+co);
- while(((*charp != ' ')) && (charp > string))
- {
- charp--;
- co--;
- }
- *char_offset = co;
+
+ utf8clen += utf8len;
+ }
+
free(outf16);
return true;
@@ -269,7 +280,7 @@
}
/* Scale to 16.16 fixed point */
- ysize = fstyle->size * ((1 << 16) / FONT_SIZE_SCALE);
+ ysize = fstyle->size * ((1 << 16) / FONT_SIZE_SCALE) * glob->scale;
if(ESetInfo(&ofont->olf_EEngine,
OT_DeviceDPI,(72<<16) | 72,
Modified: branches/MarkieB/gtkmain/amiga/gui.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/gui.c?re...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/gui.c (original)
+++ branches/MarkieB/gtkmain/amiga/gui.c Sun Sep 13 08:46:59 2009
@@ -77,6 +77,7 @@
#include <graphics/blitattr.h>
#include "amiga/gui_options.h"
#include "amiga/bitmap.h"
+#include "amiga/print.h"
#include "amiga/stringview/stringview.h"
#include "amiga/stringview/urlhistory.h"
@@ -133,6 +134,7 @@
static Object *mouseptrobj[AMI_LASTPOINTER+1];
static struct BitMap *mouseptrbm[AMI_LASTPOINTER+1];
static int mouseptrcurrent=0;
+static struct DrawInfo *dri;
char *ptrs[AMI_LASTPOINTER+1] = {
"ptr_default",
@@ -187,6 +189,10 @@
void ami_init_mouse_pointers(void);
void ami_switch_tab(struct gui_window_2 *gwin,bool redraw);
static void *myrealloc(void *ptr, size_t len, void *pw);
+void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs);
+void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys);
+ULONG ami_set_border_gadget_balance(struct gui_window_2 *gwin);
+ULONG ami_get_border_gadget_balance(struct gui_window_2 *gwin, ULONG *size1, ULONG *size2);
STRPTR ami_locale_langs(void)
{
@@ -258,6 +264,8 @@
ASO_NoTrack,FALSE,
TAG_DONE))) die(messages_get("NoMemory"));
+ ami_print_init();
+
if(PopupMenuBase = OpenLibrary("popupmenu.class",0))
{
IPopupMenu = (struct PopupMenuIFace *)GetInterface(PopupMenuBase,"main",1,NULL);
@@ -573,6 +581,7 @@
scrn = LockPubScreen("Workbench");
}
}
+ dri = GetScreenDrawInfo(scrn);
}
void gui_init2(int argc, char** argv)
@@ -695,6 +704,11 @@
{
gwin->key_state |= BROWSER_MOUSE_MOD_2;
}
+
+ if((quals & IEQUALIFIER_LALT) || (quals & IEQUALIFIER_RALT))
+ {
+ gwin->key_state |= BROWSER_MOUSE_MOD_3;
+ }
}
void ami_handle_msg(void)
@@ -805,14 +819,14 @@
case WMHI_MOUSEMOVE:
GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
- GetAttr(SCROLLER_Top,gwin->objects[OID_HSCROLL],(ULONG *)&xs);
- x = gwin->win->MouseX - bbox->Left +xs; // mousex should be in intuimessage
-
- GetAttr(SCROLLER_Top,gwin->objects[OID_VSCROLL],(ULONG *)&ys);
- y = gwin->win->MouseY - bbox->Top + ys;
-
- x /= gwin->bw->scale;
- y /= gwin->bw->scale;
+ x = (ULONG)((gwin->win->MouseX - bbox->Left) / gwin->bw->scale);
+ y = (ULONG)((gwin->win->MouseY - bbox->Top) / gwin->bw->scale);
+
+ ami_get_hscroll_pos(gwin, (ULONG *)&xs);
+ ami_get_vscroll_pos(gwin, (ULONG *)&ys);
+
+ x += xs;
+ y += ys;
width=bbox->Width;
height=bbox->Height;
@@ -855,14 +869,16 @@
break;
case WMHI_MOUSEBUTTONS:
- GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
- GetAttr(SCROLLER_Top,gwin->objects[OID_HSCROLL],(ULONG *)&xs);
- x = gwin->win->MouseX - bbox->Left +xs;
- GetAttr(SCROLLER_Top,gwin->objects[OID_VSCROLL],(ULONG *)&ys);
- y = gwin->win->MouseY - bbox->Top + ys;
-
- x /= gwin->bw->scale;
- y /= gwin->bw->scale;
+ GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
+
+ x = (ULONG)((gwin->win->MouseX - bbox->Left) / gwin->bw->scale);
+ y = (ULONG)((gwin->win->MouseY - bbox->Top) / gwin->bw->scale);
+
+ ami_get_hscroll_pos(gwin, (ULONG *)&xs);
+ ami_get_vscroll_pos(gwin, (ULONG *)&ys);
+
+ x += xs;
+ y += ys;
width=bbox->Width;
height=bbox->Height;
@@ -929,7 +945,7 @@
break;
case WMHI_GADGETUP:
- switch(result & WMHI_GADGETMASK) //gadaddr->GadgetID) //result & WMHI_GADGETMASK)
+ switch(result & WMHI_GADGETMASK)
{
case GID_TABS:
ami_switch_tab(gwin,true);
@@ -1153,6 +1169,7 @@
switch(node->Type)
{
case AMINS_WINDOW:
+ ami_set_border_gadget_balance(gwin);
ami_update_throbber(gwin,true);
// fall through
case AMINS_FRAME:
@@ -1234,7 +1251,7 @@
if(gwin->redraw_required)
ami_do_redraw(gwin);
- if(gwin->throbber_frame)
+ if(gwin->bw->window->throbbing)
ami_update_throbber(gwin,false);
if(gwin->bw->window->c_h)
@@ -1281,10 +1298,10 @@
{
GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
- GetAttr(SCROLLER_Top,gwin->objects[OID_HSCROLL],(ULONG *)&xs);
+ ami_get_hscroll_pos(gwin, (ULONG *)&xs);
x = (appmsg->am_MouseX) - (bbox->Left) +xs;
- GetAttr(SCROLLER_Top,gwin->objects[OID_VSCROLL],(ULONG *)&ys);
+ ami_get_vscroll_pos(gwin, (ULONG *)&ys);
y = appmsg->am_MouseY - bbox->Top + ys;
width=bbox->Width;
@@ -1394,9 +1411,11 @@
ULONG winsignal = 1L << sport->mp_SigBit;
ULONG appsig = 1L << appport->mp_SigBit;
ULONG schedulesig = 1L << msgport->mp_SigBit;
- ULONG signalmask = winsignal | appsig | schedulesig | rxsig;
ULONG signal;
struct Message *timermsg = NULL;
+ struct MsgPort *printmsgport = ami_print_get_msgport();
+ ULONG printsig = 1L << printmsgport->mp_SigBit;
+ ULONG signalmask = winsignal | appsig | schedulesig | rxsig | printsig;
signal = Wait(signalmask);
@@ -1411,6 +1430,11 @@
else if(signal & rxsig)
{
ami_arexx_handle();
+ }
+ else if(signal & printsig)
+ {
+ while(GetMsg(printmsgport)); //ReplyMsg
+ ami_print_cont();
}
else if(signal & schedulesig)
{
@@ -1457,6 +1481,7 @@
void ami_switch_tab(struct gui_window_2 *gwin,bool redraw)
{
struct Node *tabnode;
+ struct IBox *bbox;
if(gwin->tabs == 0) return;
@@ -1467,13 +1492,19 @@
TNA_UserData,&gwin->bw,
TAG_DONE);
curbw = gwin->bw;
+ GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
+
+ if(!gwin->bw->current_content)
+ {
+ p96RectFill(gwin->win->RPort, bbox->Left, bbox->Top,
+ bbox->Width+bbox->Left, bbox->Height+bbox->Top, 0xffffffff);
+ return;
+ }
ami_update_buttons(gwin);
if(redraw)
{
- struct IBox *bbox;
- GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
p96RectFill(gwin->win->RPort,bbox->Left,bbox->Top,bbox->Width+bbox->Left,bbox->Height+bbox->Top,0xffffffff);
browser_window_update(gwin->bw,false);
@@ -1540,6 +1571,7 @@
ami_arexx_cleanup();
ami_free_layers(&browserglob);
+ FreeScreenDrawInfo(scrn, dri);
ami_close_fonts();
@@ -1569,6 +1601,7 @@
}
ami_clipboard_free();
+ ami_print_free();
FreeSysObject(ASOT_PORT,appport);
FreeSysObject(ASOT_PORT,sport);
@@ -1617,14 +1650,18 @@
if(!browser_window_reload_available(gwin->bw))
reload=TRUE;
- if(gwin->tabs <= 1)
- {
- tabclose=TRUE;
- OffMenu(gwin->win,AMI_MENU_CLOSETAB);
- }
- else
- {
- OnMenu(gwin->win,AMI_MENU_CLOSETAB);
+ if(gwin->bw->browser_window_type == BROWSER_WINDOW_NORMAL &&
+ option_kiosk_mode == false)
+ {
+ if(gwin->tabs <= 1)
+ {
+ tabclose=TRUE;
+ OffMenu(gwin->win,AMI_MENU_CLOSETAB);
+ }
+ else
+ {
+ OnMenu(gwin->win,AMI_MENU_CLOSETAB);
+ }
}
RefreshSetGadgetAttrs(gwin->gadgets[GID_BACK],gwin->win,NULL,
@@ -1675,6 +1712,7 @@
char reload[100],reload_s[100],reload_g[100];
char home[100],home_s[100],home_g[100];
char closetab[100],closetab_s[100],closetab_g[100];
+ char tabthrobber[100];
if((bw->browser_window_type == BROWSER_WINDOW_IFRAME) && option_no_iframes) return NULL;
@@ -1738,7 +1776,8 @@
TAG_DONE);
}
- RethinkLayout(gwin->shared->gadgets[GID_TABLAYOUT],gwin->shared->win,NULL,TRUE);
+ if(ClickTabBase->lib_Version < 53)
+ RethinkLayout(gwin->shared->gadgets[GID_TABLAYOUT],gwin->shared->win,NULL,TRUE);
gwin->shared->tabs++;
gwin->shared->next_tab++;
@@ -1853,6 +1892,7 @@
ami_get_theme_filename(closetab,"theme_closetab");
ami_get_theme_filename(closetab_s,"theme_closetab_s");
ami_get_theme_filename(closetab_g,"theme_closetab_g");
+ ami_get_theme_filename(tabthrobber,"theme_tab_loading");
gwin->shared->objects[OID_MAIN] = WindowObject,
WA_ScreenTitle,nsscreentitle,
@@ -1869,19 +1909,21 @@
WA_CustomScreen,scrn,
WA_ReportMouse,TRUE,
WA_SmartRefresh,TRUE,
+ WA_SizeBBottom, TRUE,
WA_IDCMP,IDCMP_MENUPICK | IDCMP_MOUSEMOVE |
IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
IDCMP_RAWKEY | IDCMP_SIZEVERIFY |
IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
IDCMP_INTUITICKS | IDCMP_ACTIVEWINDOW |
- IDCMP_EXTENDEDMOUSE,
+ IDCMP_EXTENDEDMOUSE | IDCMP_GADGETDOWN,
// WINDOW_IconifyGadget, TRUE,
WINDOW_NewMenu,menu,
- WINDOW_HorizProp,1,
+ // WINDOW_HorizProp,1,
WINDOW_VertProp,1,
WINDOW_IDCMPHook,&gwin->shared->scrollerhook,
WINDOW_IDCMPHookBits,IDCMP_IDCMPUPDATE |
- IDCMP_EXTENDEDMOUSE | IDCMP_SIZEVERIFY,
+ IDCMP_EXTENDEDMOUSE | IDCMP_SIZEVERIFY |
+ IDCMP_GADGETDOWN,
WINDOW_AppPort, appport,
WINDOW_AppWindow,TRUE,
WINDOW_SharedPort,sport,
@@ -2013,6 +2055,11 @@
GA_Underscore,13, // disable kb shortcuts
CLICKTAB_Labels,&gwin->shared->tab_list,
CLICKTAB_LabelTruncate,TRUE,
+ CLICKTAB_FlagImage, BitMapObject,
+ BITMAP_SourceFile, tabthrobber,
+ BITMAP_Screen,scrn,
+ BITMAP_Masking,TRUE,
+ BitMapEnd,
ClickTabEnd,
CHILD_CacheDomain,FALSE,
LayoutEnd,
@@ -2021,11 +2068,6 @@
GA_ID,GID_BROWSER,
SPACE_Transparent,TRUE,
SpaceEnd,
- LAYOUT_AddChild, gwin->shared->gadgets[GID_STATUS] = StringObject,
- GA_ID,GID_STATUS,
- GA_ReadOnly,TRUE,
- StringEnd,
- CHILD_WeightedHeight,0,
EndGroup,
EndWindow;
}
@@ -2087,22 +2129,71 @@
return NULL;
}
+ GetAttr(WINDOW_VertObject, gwin->shared->objects[OID_MAIN],
+ (ULONG *)&gwin->shared->objects[OID_VSCROLL]);
+
+ RefreshSetGadgetAttrs((APTR)gwin->shared->objects[OID_VSCROLL],
+ gwin->shared->win, NULL,
+ GA_ID, OID_VSCROLL,
+ ICA_TARGET, ICTARGET_IDCMP,
+ TAG_DONE);
+
+ if(bw->browser_window_type == BROWSER_WINDOW_NORMAL &&
+ option_kiosk_mode == false)
+ {
+ ULONG sz, size1, size2;
+
+ sz = ami_get_border_gadget_balance(gwin->shared,
+ (ULONG *)&size1, (ULONG *)&size2);
+
+ gwin->shared->gadgets[GID_HSCROLL] = (struct Gadget *)NewObject(
+ NULL,
+ "scrollergclass",
+ GA_ID, GID_HSCROLL,
+ PGA_Freedom, FREEHORIZ,
+ // GA_Left, size1,
+ GA_RelRight, 1 - size2 - sz,
+ GA_Width, size2,
+ GA_BottomBorder, TRUE,
+ GA_Immediate, TRUE,
+ ICA_TARGET, ICTARGET_IDCMP,
+ GA_DrawInfo, dri,
+ TAG_DONE);
+
+ GetAttr(GA_Height, gwin->shared->gadgets[GID_HSCROLL],
+ (ULONG *)&sz);
+
+ gwin->shared->gadgets[GID_STATUS] = (struct Gadget *)NewObject(
+ NULL,
+ "frbuttonclass",
+ GA_ID, GID_STATUS,
+ GA_Left, scrn->WBorLeft,
+ GA_RelBottom, -((1 + sz + scrn->WBorBottom - scrn->RastPort.TxHeight)/2),
+ GA_Width, size1,
+ GA_DrawInfo, dri,
+ GA_BottomBorder, TRUE,
+ GA_Next, gwin->shared->gadgets[GID_HSCROLL],
+ TAG_DONE);
+
+ AddGList(gwin->shared->win, gwin->shared->gadgets[GID_STATUS],
+ (UWORD)~0, -1, NULL);
+
+ RefreshGadgets((APTR)gwin->shared->gadgets[GID_STATUS],
+ gwin->shared->win, NULL);
+ }
+ else
+ {
+ GetAttr(WINDOW_HorizObject, gwin->shared->objects[OID_MAIN],
+ (ULONG *)&gwin->shared->objects[OID_HSCROLL]);
+
+ RefreshSetGadgetAttrs((APTR)gwin->shared->objects[OID_HSCROLL],
+ gwin->shared->win, NULL,
+ GA_ID, OID_HSCROLL,
+ ICA_TARGET, ICTARGET_IDCMP,
+ TAG_DONE);
+ }
+
gwin->shared->bw = bw;
-
- GetAttr(WINDOW_HorizObject,gwin->shared->objects[OID_MAIN],(ULONG *)&gwin->shared->objects[OID_HSCROLL]);
- GetAttr(WINDOW_VertObject,gwin->shared->objects[OID_MAIN],(ULONG *)&gwin->shared->objects[OID_VSCROLL]);
-
-
- RefreshSetGadgetAttrs((APTR)gwin->shared->objects[OID_VSCROLL],gwin->shared->win,NULL,
- GA_ID,OID_VSCROLL,
- ICA_TARGET,ICTARGET_IDCMP,
- TAG_DONE);
-
- RefreshSetGadgetAttrs((APTR)gwin->shared->objects[OID_HSCROLL],gwin->shared->win,NULL,
- GA_ID,OID_HSCROLL,
- ICA_TARGET,ICTARGET_IDCMP,
- TAG_DONE);
-
curbw = bw;
gwin->shared->node = AddObject(window_list,AMINS_WINDOW);
@@ -2111,6 +2202,51 @@
glob = &browserglob;
return gwin;
+}
+
+ULONG ami_set_border_gadget_balance(struct gui_window_2 *gwin)
+{
+ /* Reset gadget widths according to new calculation */
+ ULONG size1, size2, sz;
+
+ sz = ami_get_border_gadget_balance(gwin, &size1, &size2);
+
+ RefreshSetGadgetAttrs((APTR)gwin->gadgets[GID_HSCROLL],
+ gwin->win, NULL,
+ // GA_Left, size1,
+ GA_RelRight, - size2 - sz,
+ GA_Width, size2,
+ TAG_DONE);
+
+ RefreshSetGadgetAttrs((APTR)gwin->gadgets[GID_STATUS],
+ gwin->win, NULL,
+ GA_Width, size1,
+ TAG_DONE);
+
+ RefreshWindowFrame(gwin->win);
+}
+
+ULONG ami_get_border_gadget_balance(struct gui_window_2 *gwin, ULONG *size1, ULONG *size2)
+{
+ /* Get the sizes that border gadget 1 (status) and 2 (hscroller) need to be.
+ ** Returns the width of the vertical scroller (right-hand window border) as
+ ** a convenience.
+ */
+
+ ULONG sz;
+ ULONG available_width;
+ float gad1percent;
+
+ GetAttr(GA_Width, gwin->objects[OID_VSCROLL], (ULONG *)&sz);
+
+ available_width = gwin->win->Width - scrn->WBorLeft - sz;
+
+ gad1percent = option_toolbar_status_width / 10000.0;
+
+ *size1 = (ULONG)available_width * gad1percent;
+ *size2 = (ULONG)available_width * (1 - gad1percent);
+
+ return sz;
}
void ami_close_all_tabs(struct gui_window_2 *gwin)
@@ -2174,7 +2310,9 @@
CLICKTAB_Labels,&g->shared->tab_list,
CLICKTAB_Current,ptabnum,
TAG_DONE);
- RethinkLayout(g->shared->gadgets[GID_TABLAYOUT],g->shared->win,NULL,TRUE);
+
+ if(ClickTabBase->lib_Version < 53)
+ RethinkLayout(g->shared->gadgets[GID_TABLAYOUT],g->shared->win,NULL,TRUE);
g->shared->tabs--;
ami_switch_tab(g->shared,true);
@@ -2186,6 +2324,7 @@
DisposeObject(g->shared->objects[OID_MAIN]);
+ ami_utf8_free(g->shared->status);
FreeVec(g->shared->svbuffer);
DelObject(g->shared->node);
@@ -2226,7 +2365,9 @@
RefreshSetGadgetAttrs(g->shared->gadgets[GID_TABS],g->shared->win,NULL,
CLICKTAB_Labels,&g->shared->tab_list,
TAG_DONE);
- RethinkLayout(g->shared->gadgets[GID_TABLAYOUT],g->shared->win,NULL,TRUE);
+
+ if(ClickTabBase->lib_Version < 53)
+ RethinkLayout(g->shared->gadgets[GID_TABLAYOUT],g->shared->win,NULL,TRUE);
GetAttr(CLICKTAB_Current,g->shared->gadgets[GID_TABS],(ULONG *)&cur_tab);
}
@@ -2274,12 +2415,21 @@
current_redraw_browser = g->shared->bw;
- width=bbox->Width;
- height=bbox->Height;
+ width=bbox->Width / g->shared->bw->scale;
+ height=bbox->Height / g->shared->bw->scale;
xoffset=bbox->Left;
yoffset=bbox->Top;
+/* x0 *= g->shared->bw->scale;
+ x1 *= g->shared->bw->scale;
+ y0 *= g->shared->bw->scale;
+ y1 *= g->shared->bw->scale;
+
+ sx *= g->shared->bw->scale;
+ sy *= g->shared->bw->scale;
+*/
plot=amiplot;
+ glob = &browserglob;
if((y1<sy) || (y0>sy+height)) return;
if((x1<sx) || (x0>sx+width)) return;
@@ -2290,16 +2440,16 @@
if((x1-x0)+(xoffset+x0-sx)>(width)) x1 = (width-(x0-sx)+x0);
if((y1-y0)+(yoffset+y0-sy)>(height)) y1 = (height-(y0-sy)+y0);
- content_redraw(c,
- -sx,-sy,width-sx,height-sy,
- floorf((x0 *
- g->shared->bw->scale)-sx),
- ceilf((y0 *
- g->shared->bw->scale)-sy),
- (x1 *
- g->shared->bw->scale)-sx,
- (y1 *
- g->shared->bw->scale)-sy,
+ glob->scale = g->shared->bw->scale;
+
+ content_redraw(c,
+ -sx, -sy,
+ width - sx,
+ height - sy,
+ (x0 - sx) * g->shared->bw->scale,
+ (y0 - sy) * g->shared->bw->scale,
+ (x1 - sx) * g->shared->bw->scale,
+ (y1 - sy) * g->shared->bw->scale,
g->shared->bw->scale,
0xFFFFFF);
@@ -2307,8 +2457,15 @@
ami_clearclipreg(&browserglob);
- BltBitMapRastPort(browserglob.bm,x0-sx,y0-sy,g->shared->win->RPort,
- xoffset+x0-sx,yoffset+y0-sy,x1-x0,y1-y0,0x0C0);
+ BltBitMapRastPort(browserglob.bm,
+ (x0 - sx) * g->shared->bw->scale,
+ (y0 - sy) * g->shared->bw->scale,
+ g->shared->win->RPort,
+ xoffset + ((x0 - sx) * g->shared->bw->scale),
+ yoffset + ((y0 - sy) * g->shared->bw->scale),
+ (x1 - x0) * g->shared->bw->scale,
+ (y1 - y0) * g->shared->bw->scale,
+ 0x0C0);
}
void gui_window_redraw(struct gui_window *g, int x0, int y0, int x1, int y1)
@@ -2317,8 +2474,8 @@
struct content *c;
c = g->shared->bw->current_content;
- GetAttr(SCROLLER_Top,g->shared->objects[OID_HSCROLL],(ULONG *)&sx);
- GetAttr(SCROLLER_Top,g->shared->objects[OID_VSCROLL],(ULONG *)&sy);
+ ami_get_hscroll_pos(g->shared, (ULONG *)&sx);
+ ami_get_vscroll_pos(g->shared, (ULONG *)&sy);
ami_do_redraw_limits(g,c,x0,y0,x1,y1,sx,sy);
}
@@ -2342,8 +2499,8 @@
if(!g) return;
- GetAttr(SCROLLER_Top,g->shared->objects[OID_HSCROLL],(ULONG *)&sx);
- GetAttr(SCROLLER_Top,g->shared->objects[OID_VSCROLL],(ULONG *)&sy);
+ ami_get_hscroll_pos(g->shared, (ULONG *)&sx);
+ ami_get_vscroll_pos(g->shared, (ULONG *)&sy);
ami_do_redraw_limits(g,g->shared->bw->current_content,
data->redraw.x,data->redraw.y,
@@ -2363,8 +2520,8 @@
bool morescroll = false;
GetAttr(SPACE_AreaBox,g->gadgets[GID_BROWSER],(ULONG *)&bbox);
- GetAttr(SCROLLER_Top,g->objects[OID_HSCROLL],(ULONG *)&hcurrent);
- GetAttr(SCROLLER_Top,g->objects[OID_VSCROLL],(ULONG *)&vcurrent);
+ ami_get_hscroll_pos(g, (ULONG *)&hcurrent);
+ ami_get_vscroll_pos(g, (ULONG *)&vcurrent);
c = g->bw->current_content;
@@ -2379,6 +2536,7 @@
xoffset=bbox->Left;
yoffset=bbox->Top;
plot = amiplot;
+ glob = &browserglob;
if(g->bw->reformat_pending)
{
@@ -2404,46 +2562,57 @@
if(vcurrent>oldv)
{
- ami_do_redraw_limits(g->bw->window,c,hcurrent,height+oldv,
- hcurrent+width,vcurrent+height,hcurrent,vcurrent);
+ ami_do_redraw_limits(g->bw->window, c,
+ hcurrent, (height / g->bw->scale) + oldv,
+ hcurrent + (width / g->bw->scale),
+ vcurrent + (height / g->bw->scale),
+ hcurrent, vcurrent);
}
else if(vcurrent<oldv)
{
- ami_do_redraw_limits(g->bw->window,c,hcurrent,vcurrent,
- hcurrent+width,oldv,hcurrent,vcurrent);
+ ami_do_redraw_limits(g->bw->window, c,
+ hcurrent, vcurrent,
+ hcurrent + (width / g->bw->scale),
+ oldv, hcurrent, vcurrent);
}
if(hcurrent>oldh)
{
- ami_do_redraw_limits(g->bw->window,c,width+oldh,vcurrent,
- hcurrent+width,vcurrent+height,hcurrent,vcurrent);
+ ami_do_redraw_limits(g->bw->window, c,
+ (width / g->bw->scale) + oldh, vcurrent,
+ hcurrent + (width / g->bw->scale),
+ vcurrent + (height / g->bw->scale),
+ hcurrent, vcurrent);
}
else if(hcurrent<oldh)
{
- ami_do_redraw_limits(g->bw->window,c,hcurrent,vcurrent,
- oldh,vcurrent+height,hcurrent,vcurrent);
+ ami_do_redraw_limits(g->bw->window, c,
+ hcurrent, vcurrent,
+ oldh, vcurrent+(height / g->bw->scale),
+ hcurrent, vcurrent);
}
}
else
{
ami_clg(0xffffff);
+ glob->scale = g->bw->scale;
if(c->type == CONTENT_HTML)
+ {
+ content_redraw(c, -hcurrent,
+ -vcurrent,
+ (width / g->bw->scale) - hcurrent,
+ (height / g->bw->scale) - vcurrent,
+ 0,0,width,
+ height,
+ g->bw->scale,0xFFFFFF);
+ }
+ else
{
content_redraw(c, -hcurrent /* * g->bw->scale */,
-vcurrent /* * g->bw->scale */,
- width-hcurrent /* * g->bw->scale */,
- height-vcurrent /* * g->bw->scale */,
- 0,0,width /* * g->bw->scale */,
- height /* * g->bw->scale */,
- g->bw->scale,0xFFFFFF);
- }
- else
- {
- content_redraw(c, -hcurrent /* * g->bw->scale */,
- -vcurrent /* * g->bw->scale */,
- width-hcurrent /* * g->bw->scale */,
- height-vcurrent /* * g->bw->scale */,
+ (width / g->bw->scale) - hcurrent,
+ (height / g->bw->scale) - vcurrent,
0,0,c->width /* * g->bw->scale */,
c->height /* * g->bw->scale */,
g->bw->scale,0xFFFFFF);
@@ -2466,10 +2635,30 @@
g->new_content = false;
}
+void ami_get_hscroll_pos(struct gui_window_2 *gwin, ULONG *xs)
+{
+ if(gwin->gadgets[GID_HSCROLL])
+ {
+ GetAttr(PGA_Top, gwin->gadgets[GID_HSCROLL], xs);
+ }
+ else if(gwin->objects[OID_HSCROLL])
+ {
+ GetAttr(SCROLLER_Top, gwin->objects[OID_HSCROLL], xs);
+ }
+
+ *xs /= gwin->bw->scale;
+}
+
+void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys)
+{
+ GetAttr(SCROLLER_Top, gwin->objects[OID_VSCROLL], ys);
+ *ys /= gwin->bw->scale;
+}
+
bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
{
- GetAttr(SCROLLER_Top,g->shared->objects[OID_HSCROLL],(ULONG *)sx);
- GetAttr(SCROLLER_Top,g->shared->objects[OID_VSCROLL],(ULONG *)sy);
+ ami_get_hscroll_pos(g->shared, (ULONG *)sx);
+ ami_get_vscroll_pos(g->shared, (ULONG *)sy);
}
void gui_window_set_scroll(struct gui_window *g, int sx, int sy)
@@ -2487,20 +2676,30 @@
if((cur_tab == g->tab) || (g->shared->tabs == 0))
{
- RefreshSetGadgetAttrs((APTR)g->shared->objects[OID_VSCROLL],g->shared->win,NULL,
- SCROLLER_Top,sy,
+ RefreshSetGadgetAttrs((APTR)g->shared->objects[OID_VSCROLL],
+ g->shared->win, NULL,
+ SCROLLER_Top, (ULONG)(sy * g->shared->bw->scale),
TAG_DONE);
- RefreshSetGadgetAttrs((APTR)g->shared->objects[OID_HSCROLL],g->shared->win,NULL,
- SCROLLER_Top,sx,
- TAG_DONE);
-
+ if(g->shared->gadgets[GID_HSCROLL])
+ {
+ RefreshSetGadgetAttrs((APTR)g->shared->gadgets[GID_HSCROLL],
+ g->shared->win, NULL,
+ PGA_Top, (ULONG)(sx * g->shared->bw->scale),
+ TAG_DONE);
+ }
+ else if(g->shared->objects[OID_HSCROLL])
+ {
+ RefreshSetGadgetAttrs((APTR)g->shared->objects[OID_HSCROLL],
+ g->shared->win, NULL,
+ SCROLLER_Top, (ULONG)(sx * g->shared->bw->scale),
+ TAG_DONE);
+ }
g->shared->redraw_required = true;
if(option_faster_scroll) g->shared->redraw_scroll = true;
else g->shared->redraw_scroll = false;
-
g->scrollx = sx;
g->scrolly = sy;
@@ -2555,20 +2754,28 @@
{
GetAttr(SPACE_AreaBox,g->shared->gadgets[GID_BROWSER],(ULONG *)&bbox);
-/*
- printf("upd ext %ld,%ld\n",g->bw->current_content->width, // * g->bw->scale,
- g->bw->current_content->height); // * g->bw->scale);
-*/
-
RefreshSetGadgetAttrs((APTR)g->shared->objects[OID_VSCROLL],g->shared->win,NULL,
- SCROLLER_Total,g->shared->bw->current_content->height,
- SCROLLER_Visible,bbox->Height,
+ SCROLLER_Total, (ULONG)(g->shared->bw->current_content->height * g->shared->bw->scale),
+ SCROLLER_Visible, bbox->Height,
TAG_DONE);
- RefreshSetGadgetAttrs((APTR)g->shared->objects[OID_HSCROLL],g->shared->win,NULL,
- SCROLLER_Total,g->shared->bw->current_content->width,
- SCROLLER_Visible,bbox->Width,
- TAG_DONE);
+ if(g->shared->gadgets[GID_HSCROLL])
+ {
+ RefreshSetGadgetAttrs((APTR)g->shared->gadgets[GID_HSCROLL],
+ g->shared->win, NULL,
+ PGA_Total, (ULONG)(g->shared->bw->current_content->width * g->shared->bw->scale),
+ PGA_Visible, bbox->Width,
+ TAG_DONE);
+ }
+ else if(g->shared->objects[OID_HSCROLL])
+ {
+ RefreshSetGadgetAttrs((APTR)g->shared->objects[OID_HSCROLL],
+ g->shared->win, NULL,
+ SCROLLER_Total, (ULONG)(g->shared->bw->current_content->width * g->shared->bw->scale),
+ SCROLLER_Visible, bbox->Width,
+ TAG_DONE);
+ }
+
}
g->shared->new_content = true;
}
@@ -2576,15 +2783,30 @@
void gui_window_set_status(struct gui_window *g, const char *text)
{
ULONG cur_tab = 0;
+ char *utf8text;
if(!g) return;
if(!text) return;
+ if(!g->shared->gadgets[GID_STATUS]) return;
if(g->tab_node) GetAttr(CLICKTAB_Current,g->shared->gadgets[GID_TABS],(ULONG *)&cur_tab);
if((cur_tab == g->tab) || (g->shared->tabs == 0))
{
- RefreshSetGadgetAttrs(g->shared->gadgets[GID_STATUS],g->shared->win,NULL,STRINGA_TextVal,text,TAG_DONE);
+ utf8text = ami_utf8_easy((char *)text);
+
+ if((g->shared->status == NULL) || (strcmp(utf8text,g->shared->status)))
+ {
+ SetGadgetAttrs(g->shared->gadgets[GID_STATUS],
+ g->shared->win, NULL,
+ GA_Text, utf8text,
+ TAG_DONE);
+
+ RefreshWindowFrame(g->shared->win);
+
+ if(g->shared->status) ami_utf8_free(g->shared->status);
+ g->shared->status = utf8text;
+ }
}
}
@@ -2791,21 +3013,56 @@
void gui_window_start_throbber(struct gui_window *g)
{
struct IBox *bbox;
- GetAttr(SPACE_AreaBox,g->shared->gadgets[GID_THROBBER],(ULONG *)&bbox);
-
- g->shared->throbber_frame=1;
-
- BltBitMapRastPort(throbber,throbber_width,0,g->shared->win->RPort,bbox->Left,bbox->Top,throbber_width,throbber_height,0x0C0);
+ ULONG cur_tab = 0;
+
+ if(!g) return;
+
+ if(g->tab_node)
+ {
+ GetAttr(CLICKTAB_Current,g->shared->gadgets[GID_TABS],(ULONG *)&cur_tab);
+ SetClickTabNodeAttrs(g->tab_node, TNA_Flagged, TRUE, TAG_DONE);
+ RefreshGadgets((APTR)g->shared->gadgets[GID_TABS],
+ g->shared->win, NULL);
+ }
+
+ g->throbbing = true;
+
+ if((cur_tab == g->tab) || (g->shared->tabs == 0))
+ {
+ GetAttr(SPACE_AreaBox,g->shared->gadgets[GID_THROBBER],(ULONG *)&bbox);
+
+ if(g->shared->throbber_frame == 0) g->shared->throbber_frame=1;
+
+ BltBitMapRastPort(throbber,throbber_width,0,g->shared->win->RPort,bbox->Left,bbox->Top,throbber_width,throbber_height,0x0C0);
+ }
}
void gui_window_stop_throbber(struct gui_window *g)
{
struct IBox *bbox;
- GetAttr(SPACE_AreaBox,g->shared->gadgets[GID_THROBBER],(ULONG *)&bbox);
-
- BltBitMapRastPort(throbber,0,0,g->shared->win->RPort,bbox->Left,bbox->Top,throbber_width,throbber_height,0x0C0);
-
- g->shared->throbber_frame = 0;
+ ULONG cur_tab = 0;
+
+ if(!g) return;
+
+ if(g->tab_node)
+ {
+ GetAttr(CLICKTAB_Current, g->shared->gadgets[GID_TABS],
+ (ULONG *)&cur_tab);
+ SetClickTabNodeAttrs(g->tab_node, TNA_Flagged, FALSE, TAG_DONE);
+ RefreshGadgets((APTR)g->shared->gadgets[GID_TABS],
+ g->shared->win, NULL);
+ }
+
+ g->throbbing = false;
+
+ if((cur_tab == g->tab) || (g->shared->tabs == 0))
+ {
+ GetAttr(SPACE_AreaBox,g->shared->gadgets[GID_THROBBER],(ULONG *)&bbox);
+
+ BltBitMapRastPort(throbber, 0, 0, g->shared->win->RPort, bbox->Left,
+ bbox->Top, throbber_width, throbber_height, 0x0C0);
+ }
+// g->shared->throbber_frame = 0;
}
/**
@@ -2828,23 +3085,33 @@
void ami_update_throbber(struct gui_window_2 *g,bool redraw)
{
struct IBox *bbox;
-
+ int frame = g->throbber_frame;
+
+ if(!g) return;
if(!g->gadgets[GID_THROBBER]) return;
- if(!redraw)
- {
- if(g->throbber_update_count < throbber_update_interval)
- {
- g->throbber_update_count++;
- return;
- }
-
- g->throbber_update_count = 0;
-
- g->throbber_frame++;
- if(g->throbber_frame > (throbber_frames-1))
- g->throbber_frame=1;
-
+ if(g->bw->window->throbbing == false)
+ {
+ frame = 0;
+ g->throbber_frame=1;
+ }
+ else
+ {
+ if(!redraw)
+ {
+ if(g->throbber_update_count < throbber_update_interval)
+ {
+ g->throbber_update_count++;
+ return;
+ }
+
+ g->throbber_update_count = 0;
+
+ g->throbber_frame++;
+ if(g->throbber_frame > (throbber_frames-1))
+ g->throbber_frame=1;
+
+ }
}
GetAttr(SPACE_AreaBox,g->gadgets[GID_THROBBER],(ULONG *)&bbox);
@@ -2854,7 +3121,7 @@
bbox->Left+throbber_width,bbox->Top+throbber_height);
*/
- BltBitMapTags(BLITA_SrcX,throbber_width*g->throbber_frame,
+ BltBitMapTags(BLITA_SrcX, throbber_width * frame,
BLITA_SrcY,0,
BLITA_DestX,bbox->Left,
BLITA_DestY,bbox->Top,
@@ -2878,8 +3145,8 @@
gui_window_remove_caret(g);
GetAttr(SPACE_AreaBox,g->shared->gadgets[GID_BROWSER],(ULONG *)&bbox);
- GetAttr(SCROLLER_Top,g->shared->objects[OID_HSCROLL],&xs);
- GetAttr(SCROLLER_Top,g->shared->objects[OID_VSCROLL],&ys);
+ ami_get_hscroll_pos(g->shared, (ULONG *)&xs);
+ ami_get_vscroll_pos(g->shared, (ULONG *)&ys);
SetAPen(g->shared->win->RPort,3);
@@ -2906,8 +3173,8 @@
if(!g) return;
GetAttr(SPACE_AreaBox,g->shared->gadgets[GID_BROWSER],(ULONG *)&bbox);
- GetAttr(SCROLLER_Top,g->shared->objects[OID_HSCROLL],(ULONG *)&xs);
- GetAttr(SCROLLER_Top,g->shared->objects[OID_VSCROLL],(ULONG *)&ys);
+ ami_get_hscroll_pos(g->shared, (ULONG *)&xs);
+ ami_get_vscroll_pos(g->shared, (ULONG *)&ys);
BltBitMapRastPort(browserglob.bm,g->c_x-xs,g->c_y-ys,g->shared->win->RPort,bbox->Left+g->c_x-xs,bbox->Top+g->c_y-ys,2+1,g->c_h+1,0x0C0);
@@ -2929,8 +3196,8 @@
g->shared->oldh = 0;
g->shared->oldv = 0;
- if(g->shared->bw->browser_window_type != BROWSER_WINDOW_NORMAL)
- return;
+ if(g->shared->bw->browser_window_type != BROWSER_WINDOW_NORMAL ||
+ option_kiosk_mode == true) return;
if(c->type <= CONTENT_CSS)
{
@@ -2991,7 +3258,9 @@
void gui_window_set_scale(struct gui_window *g, float scale)
{
- printf("set scale\n");
+ browserglob.scale = scale;
+ g->shared->new_content = true;
+ g->shared->redraw_required = true;
}
void gui_create_form_select_menu(struct browser_window *bw,
@@ -3040,7 +3309,8 @@
gid = GetTagData( GA_ID, 0, msg->IAddress );
switch( gid )
- {
+ {
+ case GID_HSCROLL:
case OID_HSCROLL:
case OID_VSCROLL:
// history_set_current_scroll(gwin->bw->history,
@@ -3059,8 +3329,8 @@
wheel = (struct IntuiWheelData *)msg->IAddress;
gui_window_set_scroll(gwin->bw->window,
- gwin->bw->window->scrollx + (wheel->WheelX * 20),
- gwin->bw->window->scrolly + (wheel->WheelY * 20));
+ gwin->bw->window->scrollx + (wheel->WheelX * 50),
+ gwin->bw->window->scrolly + (wheel->WheelY * 50));
}
break;
Modified: branches/MarkieB/gtkmain/amiga/gui.h
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/gui.h?re...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/gui.h (original)
+++ branches/MarkieB/gtkmain/amiga/gui.h Sun Sep 13 08:46:59 2009
@@ -58,6 +58,7 @@
GID_SEARCHSTRING,
GID_SHOWALL,
GID_CASE,
+ GID_HSCROLL,
GID_LAST
};
@@ -67,7 +68,7 @@
OID_VSCROLL,
OID_HSCROLL,
OID_MENU,
- OID_LAST
+ OID_LAST
};
#define AMI_GUI_POINTER_BLANK GUI_POINTER_PROGRESS+1
@@ -100,6 +101,7 @@
bool redraw_scroll;
bool new_content;
char *svbuffer;
+ char *status;
};
struct gui_window
@@ -114,6 +116,7 @@
int scrolly;
struct history_window *hw;
struct List dllist;
+ bool throbbing;
};
void ami_get_msg(void);
Modified: branches/MarkieB/gtkmain/amiga/history_local.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/history_...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/history_local.c (original)
+++ branches/MarkieB/gtkmain/amiga/history_local.c Sun Sep 13 08:46:59 2009
@@ -17,7 +17,7 @@
*/
/** \file
- * Browser history window (RISC OS implementation).
+ * Browser history window (AmigaOS implementation).
*
* There is only one history window, not one per browser window.
*/
@@ -82,6 +82,8 @@
{
hwindow = AllocVec(sizeof(struct history_window),MEMF_CLEAR | MEMF_PRIVATE);
+ ami_init_layers(&hwindow->gg, 0, 0);
+
hwindow->bw = bw;
history_size(history, &width, &height);
@@ -98,7 +100,7 @@
WA_SizeGadget, TRUE,
WA_CustomScreen,scrn,
WA_InnerWidth,width,
- WA_InnerHeight,height,
+ WA_InnerHeight,height + 10,
WINDOW_SharedPort,sport,
WINDOW_UserData,hwindow,
WINDOW_IconifyGadget, FALSE,
@@ -158,19 +160,18 @@
GetAttr(SCROLLER_Top,hw->objects[OID_HSCROLL],(ULONG *)&xs);
GetAttr(SCROLLER_Top,hw->objects[OID_VSCROLL],(ULONG *)&ys);
+ glob = &hw->gg;
ami_clg(0xffffff);
-// RefreshGadgets(hw->gadgets[GID_MAIN],hw->win,NULL);
-// currp = hw->win->RPort;
history_redraw_rectangle(history_current, xs, ys,
bbox->Width + xs, bbox->Height + ys, 0, 0);
-// currp = &glob.rp;
-
- ami_clearclipreg(&browserglob);
+ glob = &browserglob;
+
+ ami_clearclipreg(&hw->gg);
ami_history_update_extent(hw);
- BltBitMapRastPort(browserglob.bm, 0, 0, hw->win->RPort,
+ BltBitMapRastPort(hw->gg.bm, 0, 0, hw->win->RPort,
bbox->Left, bbox->Top, bbox->Width, bbox->Height, 0x0C0);
}
@@ -216,6 +217,7 @@
void ami_history_close(struct history_window *hw)
{
+ ami_free_layers(&hw->gg);
hw->bw->window->hw = NULL;
DisposeObject(hw->objects[OID_MAIN]);
DelObject(hw->node);
Modified: branches/MarkieB/gtkmain/amiga/history_local.h
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/history_...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/history_local.h (original)
+++ branches/MarkieB/gtkmain/amiga/history_local.h Sun Sep 13 08:46:59 2009
@@ -31,6 +31,7 @@
struct browser_window *bw;
ULONG pad[4];
struct Hook scrollerhook;
+ struct gui_globals gg;
};
void ami_history_open(struct browser_window *bw, struct history *history);
Modified: branches/MarkieB/gtkmain/amiga/menu.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/menu.c?r...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/menu.c (original)
+++ branches/MarkieB/gtkmain/amiga/menu.c Sun Sep 13 08:46:59 2009
@@ -100,17 +100,20 @@
menulab[24] = ami_utf8_easy((char *)messages_get("Browser"));
menulab[25] = ami_utf8_easy((char *)messages_get("FindTextNS"));
menulab[26] = NM_BARLABEL;
- menulab[27] = ami_utf8_easy((char *)messages_get("normal"));
- menulab[28] = ami_utf8_easy((char *)messages_get("HistLocalNS"));
- menulab[29] = ami_utf8_easy((char *)messages_get("HistGlobalNS"));
- menulab[30] = NM_BARLABEL;
- menulab[31] = ami_utf8_easy((char *)messages_get("ShowCookies"));
- menulab[32] = NM_BARLABEL;
- menulab[33] = ami_utf8_easy((char *)messages_get("Redraw"));
- menulab[34] = ami_utf8_easy((char *)messages_get("Hotlist"));
- menulab[35] = ami_utf8_easy((char *)messages_get("HotlistAdd"));
- menulab[36] = ami_utf8_easy((char *)messages_get("HotlistShowNS"));
- menulab[37] = NM_BARLABEL;
+ menulab[27] = ami_utf8_easy((char *)messages_get("HistLocalNS"));
+ menulab[28] = ami_utf8_easy((char *)messages_get("HistGlobalNS"));
+ menulab[29] = NM_BARLABEL;
+ menulab[30] = ami_utf8_easy((char *)messages_get("ShowCookies"));
+ menulab[31] = NM_BARLABEL;
+ menulab[32] = ami_utf8_easy((char *)messages_get("Scale"));
+ menulab[33] = ami_utf8_easy((char *)messages_get("ScaleDec"));
+ menulab[34] = ami_utf8_easy((char *)messages_get("ScaleNorm"));
+ menulab[35] = ami_utf8_easy((char *)messages_get("ScaleInc"));
+ menulab[36] = ami_utf8_easy((char *)messages_get("Redraw"));
+ menulab[37] = ami_utf8_easy((char *)messages_get("Hotlist"));
+ menulab[38] = ami_utf8_easy((char *)messages_get("HotlistAdd"));
+ menulab[39] = ami_utf8_easy((char *)messages_get("HotlistShowNS"));
+ menulab[40] = NM_BARLABEL;
menulab[AMI_MENU_HOTLIST_MAX] = ami_utf8_easy((char *)messages_get("Settings"));
menulab[AMI_MENU_HOTLIST_MAX+1] = ami_utf8_easy((char *)messages_get("SettingsEdit"));
@@ -154,12 +157,15 @@
{NM_TITLE,0,0,0,0,0,}, // browser
{ NM_ITEM,0,"F",0,0,0,}, // find in page
{ NM_ITEM,NM_BARLABEL,0,0,0,0,},
- {NM_IGNORE,0,0,0,0,0,}, // was test option for scaling
{ NM_ITEM,0,0,0,0,0,}, // local history
{ NM_ITEM,0,0,0,0,0,}, // global history
{ NM_ITEM,NM_BARLABEL,0,0,0,0,},
{ NM_ITEM,0,0,0,0,0,}, // cookies
{ NM_ITEM,NM_BARLABEL,0,0,0,0,},
+ { NM_ITEM,0,0,0,0,0,}, // scale
+ { NM_SUB,0,"-",0,0,0,}, // decrease
+ { NM_SUB,0,"=",0,0,0,}, // normal
+ { NM_SUB,0,"+",0,0,0,}, // increase
{ NM_ITEM,0,0,0,0,0,}, // redraw
{NM_TITLE,0,0,0,0,0,}, // hotlist
{ NM_ITEM,0,0,0,0,0,}, // add to hotlist
@@ -647,19 +653,6 @@
ami_search_open(gwin->bw->window);
break;
- case 1: // size
- switch(subnum)
- {
- case 0: // normal
- gwin->bw->scale = 1.0;
- break;
-
- case 1: // double
- gwin->bw->scale = 2.0;
- break;
- }
- break;
-
case 2: // local history
if(gwin->bw && gwin->bw->history)
ami_history_open(gwin->bw, gwin->bw->history);
@@ -673,7 +666,27 @@
ami_open_tree(cookies_tree,AMI_TREE_COOKIES);
break;
- case 7: // redraw
+ case 7: // size
+ switch(subnum)
+ {
+ case 0: // decrease */
+ if(gwin->bw->scale > 0.1)
+ browser_window_set_scale(gwin->bw,
+ gwin->bw->scale - 0.1, false);
+ break;
+
+ case 1: // normal */
+ browser_window_set_scale(gwin->bw, 1.0, false);
+ break;
+
+ case 2: // increase */
+ browser_window_set_scale(gwin->bw,
+ gwin->bw->scale + 0.1, false);
+ break;
+ }
+ break;
+
+ case 8: // redraw
gwin->redraw_required = true;
gwin->new_content = true;
break;
Modified: branches/MarkieB/gtkmain/amiga/menu.h
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/menu.h?r...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/menu.h (original)
+++ branches/MarkieB/gtkmain/amiga/menu.h Sun Sep 13 08:46:59 2009
@@ -28,10 +28,10 @@
/* Maximum number of menu items - first value is number of static items
* (ie. everything not intially defined as NM_IGNORE) */
-#define AMI_MENU_MAX 46 + AMI_HOTLIST_ITEMS
+#define AMI_MENU_MAX 49 + AMI_HOTLIST_ITEMS
/* Where the hotlist entries start */
-#define AMI_MENU_HOTLIST 38
+#define AMI_MENU_HOTLIST 41
/* Where the hotlist entries end */
#define AMI_MENU_HOTLIST_MAX AMI_MENU_HOTLIST+AMI_HOTLIST_ITEMS
Modified: branches/MarkieB/gtkmain/amiga/pkg/makepackage
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/pkg/make...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/pkg/makepackage (original)
+++ branches/MarkieB/gtkmain/amiga/pkg/makepackage Sun Sep 13 08:46:59 2009
@@ -20,6 +20,6 @@
makedir ram:NetSurf/Rexx
copy amiga/dist/Rexx/~(.svn) ram:NetSurf/Rexx/ COM
makedir ram:NetSurf/SObjs
-copy sobjs:libjpeg.so sobjs:libexpat.so sobjs:libhubbub.so.0 sobjs:libhpdf-2.2.0.so.0.0 sobjs:libmng.so.1 sobjs:liblcms.so sobjs:libxml2.so sobjs:libparserutils.so.0 sobjs:libnsgif.so.0 sobjs:libnsbmp.so.0 sobjs:libcss.so.0 sobjs:libwapcaplet.so.0 sobjs:libcurl.so ram:NetSurf/SObjs clone
+copy sobjs:libjpeg.so sobjs:libexpat.so sobjs:libhubbub.so.0 sobjs:libhpdf-2.2.0.so.0.0 sobjs:libmng.so.1 sobjs:liblcms.so sobjs:libxml2.so sobjs:libparserutils.so.0 sobjs:libnsgif.so.0 sobjs:libnsbmp.so.0 sobjs:libcss.so.0 sobjs:libwapcaplet.so.0 sobjs:libcurl.so sobjs:libsvgtiny.so.0 ram:NetSurf/SObjs clone
;sobjs:libssl-0.9.8.so
;sobjs:libgcc.so sobjs:libc.so sobjs:libpthread.so
Modified: branches/MarkieB/gtkmain/amiga/plotters.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/plotters...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/plotters.c (original)
+++ branches/MarkieB/gtkmain/amiga/plotters.c Sun Sep 13 08:46:59 2009
@@ -116,6 +116,7 @@
if(!width) width = scrn->Width;
if(!height) height = scrn->Width;
+ gg->scale = 1.0;
gg->layerinfo = NewLayerInfo();
gg->areabuf = AllocVec(100,MEMF_PRIVATE | MEMF_CLEAR);
gg->tmprasbuf = AllocVec(width*height,MEMF_PRIVATE | MEMF_CLEAR);
Modified: branches/MarkieB/gtkmain/amiga/plotters.h
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/plotters...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/plotters.h (original)
+++ branches/MarkieB/gtkmain/amiga/plotters.h Sun Sep 13 08:46:59 2009
@@ -33,6 +33,7 @@
APTR areabuf;
APTR tmprasbuf;
struct Rectangle rect;
+ float scale;
#ifdef NS_AMIGA_CAIRO
cairo_surface_t *surface;
cairo_t *cr;
Modified: branches/MarkieB/gtkmain/amiga/print.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/print.c?...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/print.c (original)
+++ branches/MarkieB/gtkmain/amiga/print.c Sun Sep 13 08:46:59 2009
@@ -21,16 +21,30 @@
#include "render/font.h"
#include "amiga/gui.h"
#include "amiga/options.h"
-
-#include <proto/exec.h>
+#include "amiga/print.h"
+#include "utils/messages.h"
+#include "utils/utils.h"
+
+#include <proto/intuition.h>
#include <proto/Picasso96API.h>
#include <devices/printer.h>
#include <devices/prtbase.h>
+
+#include <proto/window.h>
+#include <proto/layout.h>
+
+#include <proto/fuelgauge.h>
+#include <classes/window.h>
+#include <gadgets/fuelgauge.h>
+#include <gadgets/layout.h>
+
+#include <reaction/reaction_macros.h>
bool ami_print_begin(struct print_settings *ps);
bool ami_print_next_page(void);
void ami_print_end(void);
bool ami_print_dump(void);
+void ami_print_progress(void);
const struct printer amiprinter = {
&amiplot,
@@ -46,18 +60,22 @@
struct PrinterData *PD;
struct PrinterExtendedData *PED;
struct MsgPort *msgport;
+ struct content *c;
+ struct print_settings *ps;
int page;
+ int pages;
+ struct Gadget *gadgets[GID_LAST];
+ struct Object *objects[OID_LAST];
+ struct Window *win;
};
struct ami_printer_info ami_print_info;
void ami_print(struct content *c)
{
- struct print_settings *ps;
-
- if(!(ami_print_info.msgport = AllocSysObjectTags(ASOT_PORT,
- ASO_NoTrack,FALSE,
- TAG_DONE))) return;
+ double height, print_height;
+
+ if(!ami_print_info.msgport) return;
if(!(ami_print_info.PReq =
(struct IODRPTagsReq *)AllocSysObjectTags(ASOT_IOREQUEST,
@@ -67,21 +85,69 @@
TAG_DONE))) return;
if(OpenDevice("printer.device", option_printer_unit,
- (struct IORequest *)ami_print_info.PReq, 0)) return;
+ (struct IORequest *)ami_print_info.PReq, 0))
+ {
+ warn_user("CompError","printer.device");
+ return;
+ }
ami_print_info.PD = (struct PrinterData *)ami_print_info.PReq->io_Device;
ami_print_info.PED = &ami_print_info.PD->pd_SegmentData->ps_PED;
- ps = print_make_settings(PRINT_DEFAULT, c->url, &nsfont);
- ps->page_width = ami_print_info.PED->ped_MaxXDots;
- ps->page_height = ami_print_info.PED->ped_MaxYDots;
- ps->scale = 1.0;
-
- print_basic_run(c, &amiprinter, ps);
-
- CloseDevice(ami_print_info.PReq);
- FreeSysObject(ASOT_IOREQUEST,ami_print_info.PReq);
+ ami_print_info.ps = print_make_settings(PRINT_DEFAULT, c->url, &nsfont);
+ ami_print_info.ps->page_width = ami_print_info.PED->ped_MaxXDots;
+ ami_print_info.ps->page_height = ami_print_info.PED->ped_MaxYDots;
+ ami_print_info.ps->scale = 1.0;
+
+ print_set_up(c, &amiprinter, ami_print_info.ps, &height);
+
+ height *= ami_print_info.ps->scale;
+ ami_print_info.pages = height / ami_print_info.ps->page_height;
+ ami_print_info.c = c;
+
+ ami_print_progress();
+
+ while(ami_print_cont()); /* remove while() for async printing */
+}
+
+bool ami_print_cont(void)
+{
+ bool ret = false;
+
+ if(ami_print_info.page <= ami_print_info.pages)
+ {
+ glob = ami_print_info.gg;
+ print_draw_next_page(&amiprinter, ami_print_info.ps);
+ ami_print_dump();
+ glob = &browserglob;
+ ret = true;
+ }
+ else
+ {
+ print_cleanup(ami_print_info.c, &amiprinter, ami_print_info.ps);
+ ret = false;
+ }
+
+ return ret;
+}
+
+struct MsgPort *ami_print_init(void)
+{
+ ami_print_info.msgport = AllocSysObjectTags(ASOT_PORT,
+ ASO_NoTrack,FALSE,
+ TAG_DONE);
+
+ return ami_print_info.msgport;
+}
+
+void ami_print_free(void)
+{
FreeSysObject(ASOT_PORT,ami_print_info.msgport);
+}
+
+struct MsgPort *ami_print_get_msgport(void)
+{
+ return ami_print_info.msgport;
}
bool ami_print_begin(struct print_settings *ps)
@@ -94,7 +160,7 @@
ami_print_info.PED->ped_MaxXDots,
ami_print_info.PED->ped_MaxYDots);
- glob = ami_print_info.gg;
+ ami_print_info.gg->scale = ps->scale;
ami_print_info.page = 0;
return true;
@@ -102,20 +168,24 @@
bool ami_print_next_page(void)
{
- bool ret = true;
-
- if(ami_print_info.page > 0) ret = ami_print_dump();
ami_print_info.page++;
- return ret;
+ RefreshSetGadgetAttrs(ami_print_info.gadgets[GID_STATUS],
+ ami_print_info.win, NULL,
+ FUELGAUGE_Level, ami_print_info.page,
+ TAG_DONE);
+ return true;
}
void ami_print_end(void)
{
- ami_print_dump();
ami_free_layers(ami_print_info.gg);
FreeVec(ami_print_info.gg);
+ DisposeObject(ami_print_info.objects[OID_MAIN]);
glob = &browserglob;
+
+ CloseDevice(ami_print_info.PReq);
+ FreeSysObject(ASOT_IOREQUEST,ami_print_info.PReq);
}
bool ami_print_dump(void)
@@ -134,7 +204,51 @@
ami_print_info.PReq->io_DestRows = ami_print_info.PED->ped_MaxYDots;
ami_print_info.PReq->io_Special = 0;
- DoIO(ami_print_info.PReq);
+ DoIO(ami_print_info.PReq); /* SendIO for async printing */
return true;
}
+
+void ami_print_progress(void)
+{
+ ami_print_info.objects[OID_MAIN] = WindowObject,
+ WA_ScreenTitle,nsscreentitle,
+ WA_Title, messages_get("Printing"),
+ WA_Activate, TRUE,
+ WA_DepthGadget, TRUE,
+ WA_DragBar, TRUE,
+ WA_CloseGadget, FALSE,
+ WA_SizeGadget, TRUE,
+ WA_CustomScreen,scrn,
+ //WINDOW_SharedPort,sport,
+ WINDOW_UserData, &ami_print_info,
+ WINDOW_IconifyGadget, FALSE,
+ WINDOW_LockHeight,TRUE,
+ WINDOW_Position, WPOS_CENTERSCREEN,
+ WINDOW_ParentGroup, ami_print_info.gadgets[GID_MAIN] = VGroupObject,
+ LAYOUT_AddChild, ami_print_info.gadgets[GID_STATUS] = FuelGaugeObject,
+ GA_ID,GID_STATUS,
+ FUELGAUGE_Min,0,
+ FUELGAUGE_Max,ami_print_info.pages,
+ FUELGAUGE_Level,0,
+ FUELGAUGE_Ticks,11,
+ FUELGAUGE_ShortTicks,TRUE,
+ FUELGAUGE_Percent,TRUE,
+ FUELGAUGE_Justification,FGJ_CENTER,
+ FuelGaugeEnd,
+ CHILD_NominalSize,TRUE,
+ CHILD_WeightedHeight,0,
+/*
+ LAYOUT_AddChild, ami_print_info.gadgets[GID_CANCEL] = ButtonObject,
+ GA_ID,GID_CANCEL,
+ GA_Disabled,TRUE,
+ GA_RelVerify,TRUE,
+ GA_Text,messages_get("Abort"),
+ GA_TabCycle,TRUE,
+ ButtonEnd,
+*/
+ EndGroup,
+ EndWindow;
+
+ ami_print_info.win = (struct Window *)RA_OpenWindow(ami_print_info.objects[OID_MAIN]);
+}
Modified: branches/MarkieB/gtkmain/amiga/print.h
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/print.h?...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/print.h (original)
+++ branches/MarkieB/gtkmain/amiga/print.h Sun Sep 13 08:46:59 2009
@@ -18,7 +18,13 @@
#ifndef AMIGA_PRINT_H
#define AMIGA_PRINT_H
+#include <proto/exec.h>
+
struct content;
void ami_print(struct content *c);
+bool ami_print_cont(void);
+struct MsgPort *ami_print_init(void);
+void ami_print_free(void);
+struct MsgPort *ami_print_get_msgport(void);
#endif
Modified: branches/MarkieB/gtkmain/amiga/resources/Themes/AISS/Theme
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/resource...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/resources/Themes/AISS/Theme (original)
+++ branches/MarkieB/gtkmain/amiga/resources/Themes/AISS/Theme Sun Sep 13 08:46:59 2009
@@ -30,6 +30,7 @@
theme_throbber:Throbber
theme_throbber_frames:13
theme_throbber_delay:100
+theme_tab_loading:*TBImages:list_flagyellow
ptr_default:*PROGDIR:Resources/Pointers/Default
ptr_point:*PROGDIR:Resources/Pointers/Point
ptr_caret:*PROGDIR:Resources/Pointers/Caret
Modified: branches/MarkieB/gtkmain/amiga/resources/Themes/Default/Theme
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/resource...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/resources/Themes/Default/Theme (original)
+++ branches/MarkieB/gtkmain/amiga/resources/Themes/Default/Theme Sun Sep 13 08:46:59 2009
@@ -43,6 +43,7 @@
theme_throbber:Throbber
theme_throbber_frames:9
theme_throbber_delay:100
+theme_tab_loading:
ptr_default:*PROGDIR:Resources/Pointers/Default
ptr_point:*PROGDIR:Resources/Pointers/Point
ptr_caret:*PROGDIR:Resources/Pointers/Caret
Modified: branches/MarkieB/gtkmain/amiga/thumbnail.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/amiga/thumbnai...
==============================================================================
--- branches/MarkieB/gtkmain/amiga/thumbnail.c (original)
+++ branches/MarkieB/gtkmain/amiga/thumbnail.c Sun Sep 13 08:46:59 2009
@@ -40,9 +40,11 @@
bitmap->nativebmwidth = bitmap->width;
bitmap->nativebmheight = bitmap->height;
ami_clearclipreg(&browserglob);
+ current_redraw_browser = curbw;
plot = amiplot;
content_redraw(content, 0, 0, content->width, content->width,
0, 0, content->width, content->width, 1.0, 0xFFFFFF);
+ current_redraw_browser = NULL;
if(GfxBase->lib_Version >= 53) // AutoDoc says v52, but this function isn't in OS4.0, so checking for v53 (OS4.1)
{
Modified: branches/MarkieB/gtkmain/content/content.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/content/conten...
==============================================================================
--- branches/MarkieB/gtkmain/content/content.c (original)
+++ branches/MarkieB/gtkmain/content/content.c Sun Sep 13 08:46:59 2009
@@ -492,6 +492,33 @@
if (c->status == CONTENT_STATUS_ERROR)
/* error state */
continue;
+ /** \todo We need to reconsider the entire caching strategy in
+ * the light of data being shared between specific contents.
+ *
+ * For example, string dictionaries are owned by the document,
+ * and all stylesheets used by the document share the same
+ * dictionary.
+ *
+ * The CSS content handler retrieves the dictionary from its
+ * parent content. This relies upon there being a 1:1 mapping
+ * between documents and stylesheets.
+ *
+ * The type of a content is only known once we've received the
+ * headers from the fetch layer (and potentially some of the
+ * content data, too, if we ever sniff for the type). There
+ * is thus a problem with returning contents of unknown type
+ * here -- when we subsequently discover that they must only
+ * have one user, we clone them. By that point, however, we've
+ * no idea what the parent content is, which means that they
+ * end up with the wrong parent (and thus wrong dictionary).
+ *
+ * Of course, the problem with ignoring unknown content types
+ * here is that, for all the content types which may be shared,
+ * we end up duplicating them and wasting memory. Hence the
+ * need to reconsider everything.
+ */
+ if (c->type == CONTENT_UNKNOWN)
+ continue;
if (c->type != CONTENT_UNKNOWN &&
handler_map[c->type].no_share &&
c->user_list->next)
Modified: branches/MarkieB/gtkmain/css/select.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/css/select.c?r...
==============================================================================
--- branches/MarkieB/gtkmain/css/select.c (original)
+++ branches/MarkieB/gtkmain/css/select.c Sun Sep 13 08:46:59 2009
@@ -17,6 +17,7 @@
*/
#include <assert.h>
+#include <stdbool.h>
#include <string.h>
#include <strings.h>
@@ -444,8 +445,8 @@
* \return CSS_OK on success,
* CSS_NOMEM on memory exhaustion.
*
- * \note The returned array will be destroyed by libcss. Therefore, it must
- * be allocated using the same allocator as used by libcss during style
+ * \note The returned array will be destroyed by libcss. Therefore, it must
+ * be allocated using the same allocator as used by libcss during style
* selection.
*/
css_error node_classes(void *pw, void *node,
@@ -497,7 +498,7 @@
}
result = temp;
- lerror = lwc_context_intern(dict, start, p - start,
+ lerror = lwc_context_intern(dict, start, p - start,
&result[items]);
switch (lerror) {
case lwc_error_oom:
@@ -920,7 +921,7 @@
{
xmlNode *n = node;
xmlAttr *attr;
-
+
attr = xmlHasProp(n, (const xmlChar *) lwc_string_data(name));
*match = attr != NULL;
@@ -954,7 +955,7 @@
if (attr != NULL) {
*match = strlen((const char *) attr) ==
lwc_string_length(value) &&
- strncmp((const char *) attr,
+ strncasecmp((const char *) attr,
lwc_string_data(value),
lwc_string_length(value)) == 0;
xmlFree(attr);
@@ -1099,7 +1100,7 @@
}
/**
- * Callback to determine if a node is a linking element whose target has been
+ * Callback to determine if a node is a linking element whose target has been
* visited.
*
* \param pw HTML document
@@ -1296,7 +1297,7 @@
if (bgcol == NULL)
return CSS_PROPERTY_NOT_SET;
- if (nscss_parse_colour((const char *) bgcol,
+ if (nscss_parse_colour((const char *) bgcol,
&hint->data.color)) {
hint->status = CSS_BACKGROUND_COLOR_COLOR;
} else {
@@ -1316,7 +1317,7 @@
if (align == NULL)
return CSS_PROPERTY_NOT_SET;
- if (strcmp((const char *) align, "bottom") == 0) {
+ if (strcasecmp((const char *) align, "bottom") == 0) {
hint->status = CSS_CAPTION_SIDE_BOTTOM;
} else {
xmlFree(align);
@@ -1388,9 +1389,9 @@
if (align == NULL)
return CSS_PROPERTY_NOT_SET;
- if (strcmp((const char *) align, "left") == 0) {
+ if (strcasecmp((const char *) align, "left") == 0) {
hint->status = CSS_FLOAT_LEFT;
- } else if (strcmp((const char *) align, "right") == 0) {
+ } else if (strcasecmp((const char *) align, "right") == 0) {
hint->status = CSS_FLOAT_RIGHT;
} else {
xmlFree(align);
@@ -1549,8 +1550,11 @@
property == CSS_PROP_BORDER_RIGHT_STYLE ||
property == CSS_PROP_BORDER_BOTTOM_STYLE ||
property == CSS_PROP_BORDER_LEFT_STYLE) {
+ bool is_table_cell = false;
+
if (strcmp((const char *) n->name, "td") == 0 ||
strcmp((const char *) n->name, "th") == 0) {
+ is_table_cell = true;
/* Find table */
for (n = n->parent; n != NULL &&
n->type == XML_ELEMENT_NODE;
@@ -1567,7 +1571,10 @@
if (strcmp((const char *) n->name, "table") == 0 &&
xmlHasProp(n,
(const xmlChar *) "border") != NULL) {
- hint->status = CSS_BORDER_STYLE_OUTSET;
+ if (is_table_cell)
+ hint->status = CSS_BORDER_STYLE_INSET;
+ else
+ hint->status = CSS_BORDER_STYLE_OUTSET;
return CSS_OK;
}
} else if (property == CSS_PROP_BORDER_TOP_WIDTH ||
@@ -1575,9 +1582,11 @@
property == CSS_PROP_BORDER_BOTTOM_WIDTH ||
property == CSS_PROP_BORDER_LEFT_WIDTH) {
xmlChar *width;
+ bool is_table_cell = false;
if (strcmp((const char *) n->name, "td") == 0 ||
strcmp((const char *) n->name, "th") == 0) {
+ is_table_cell = true;
/* Find table */
for (n = n->parent; n != NULL &&
n->type == XML_ELEMENT_NODE;
@@ -1602,6 +1611,12 @@
if (parse_dimension((const char *) width, false,
&hint->data.length.value,
&hint->data.length.unit)) {
+ if (is_table_cell &&
+ INTTOFIX(0) !=
+ hint->data.length.value) {
+ hint->data.length.value = INTTOFIX(1);
+ hint->data.length.unit = CSS_UNIT_PX;
+ }
hint->status = CSS_BORDER_WIDTH_WIDTH;
} else {
xmlFree(width);
@@ -1666,12 +1681,12 @@
if (align == NULL)
return CSS_PROPERTY_NOT_SET;
- if (strcmp((const char *) align, "center") == 0 ||
- strcmp((const char *) align,
+ if (strcasecmp((const char *) align, "center") == 0 ||
+ strcasecmp((const char *) align,
"abscenter") == 0 ||
- strcmp((const char *) align,
+ strcasecmp((const char *) align,
"middle") == 0 ||
- strcmp((const char *) align,
+ strcasecmp((const char *) align,
"absmiddle") == 0) {
hint->status = CSS_MARGIN_AUTO;
} else {
@@ -1688,7 +1703,7 @@
if (align == NULL)
return CSS_PROPERTY_NOT_SET;
- if (strcmp((const char *) align, "left") == 0) {
+ if (strcasecmp((const char *) align, "left") == 0) {
if (property == CSS_PROP_MARGIN_LEFT) {
hint->data.length.value = 0;
hint->data.length.unit = CSS_UNIT_PX;
@@ -1696,10 +1711,11 @@
} else {
hint->status = CSS_MARGIN_AUTO;
}
- } else if (strcmp((const char *) align,
+ } else if (strcasecmp((const char *) align,
"center") == 0) {
hint->status = CSS_MARGIN_AUTO;
- } else if (strcmp((const char *) align, "right") == 0) {
+ } else if (strcasecmp((const char *) align,
+ "right") == 0) {
if (property == CSS_PROP_MARGIN_RIGHT) {
hint->data.length.value = 0;
hint->data.length.unit = CSS_UNIT_PX;
@@ -1768,14 +1784,15 @@
if (align == NULL)
return CSS_PROPERTY_NOT_SET;
- if (strcmp((const char *) align, "left") == 0) {
+ if (strcasecmp((const char *) align, "left") == 0) {
hint->status = CSS_TEXT_ALIGN_LEFT;
- } else if (strcmp((const char *) align,
+ } else if (strcasecmp((const char *) align,
"center") == 0) {
hint->status = CSS_TEXT_ALIGN_CENTER;
- } else if (strcmp((const char *) align, "right") == 0) {
+ } else if (strcasecmp((const char *) align,
+ "right") == 0) {
hint->status = CSS_TEXT_ALIGN_RIGHT;
- } else if (strcmp((const char *) align,
+ } else if (strcasecmp((const char *) align,
"justify") == 0) {
hint->status = CSS_TEXT_ALIGN_JUSTIFY;
} else {
@@ -1793,14 +1810,16 @@
} else if (strcmp((const char *) n->name, "caption") == 0) {
align = xmlGetProp(n, (const xmlChar *) "align");
- if (align == NULL || strcmp((const char *) align,
+ if (align == NULL || strcasecmp((const char *) align,
"center") == 0) {
hint->status = CSS_TEXT_ALIGN_LIBCSS_CENTER;
- } else if (strcmp((const char *) align, "left") == 0) {
+ } else if (strcasecmp((const char *) align,
+ "left") == 0) {
hint->status = CSS_TEXT_ALIGN_LIBCSS_LEFT;
- } else if (strcmp((const char *) align, "right") == 0) {
+ } else if (strcasecmp((const char *) align,
+ "right") == 0) {
hint->status = CSS_TEXT_ALIGN_LIBCSS_RIGHT;
- } else if (strcmp((const char *) align,
+ } else if (strcasecmp((const char *) align,
"justify") == 0) {
hint->status = CSS_TEXT_ALIGN_JUSTIFY;
} else {
@@ -1824,13 +1843,15 @@
if (align == NULL)
return CSS_PROPERTY_NOT_SET;
- if (strcmp((const char *) align, "center") == 0) {
+ if (strcasecmp((const char *) align, "center") == 0) {
hint->status = CSS_TEXT_ALIGN_LIBCSS_CENTER;
- } else if (strcmp((const char *) align, "left") == 0) {
+ } else if (strcasecmp((const char *) align,
+ "left") == 0) {
hint->status = CSS_TEXT_ALIGN_LIBCSS_LEFT;
- } else if (strcmp((const char *) align, "right") == 0) {
+ } else if (strcasecmp((const char *) align,
+ "right") == 0) {
hint->status = CSS_TEXT_ALIGN_LIBCSS_RIGHT;
- } else if (strcmp((const char *) align,
+ } else if (strcasecmp((const char *) align,
"justify") == 0) {
hint->status = CSS_TEXT_ALIGN_JUSTIFY;
} else {
@@ -1864,15 +1885,15 @@
if (valign == NULL)
return CSS_PROPERTY_NOT_SET;
- if (strcmp((const char *) valign, "top") == 0) {
+ if (strcasecmp((const char *) valign, "top") == 0) {
hint->status = CSS_VERTICAL_ALIGN_TOP;
- } else if (strcmp((const char *) valign,
+ } else if (strcasecmp((const char *) valign,
"middle") == 0) {
hint->status = CSS_VERTICAL_ALIGN_MIDDLE;
- } else if (strcmp((const char *) valign,
+ } else if (strcasecmp((const char *) valign,
"bottom") == 0) {
hint->status = CSS_VERTICAL_ALIGN_BOTTOM;
- } else if (strcmp((const char *) valign,
+ } else if (strcasecmp((const char *) valign,
"baseline") == 0) {
hint->status = CSS_VERTICAL_ALIGN_BASELINE;
} else {
@@ -1894,19 +1915,19 @@
if (valign == NULL)
return CSS_PROPERTY_NOT_SET;
- if (strcmp((const char *) valign, "top") == 0) {
+ if (strcasecmp((const char *) valign, "top") == 0) {
hint->status = CSS_VERTICAL_ALIGN_TOP;
- } else if (strcmp((const char *) valign,
- "bottom") == 0 ||
- strcmp((const char *) valign,
+ } else if (strcasecmp((const char *) valign,
+ "bottom") == 0 ||
+ strcasecmp((const char *) valign,
"baseline") == 0) {
hint->status = CSS_VERTICAL_ALIGN_BASELINE;
- } else if (strcmp((const char *) valign,
+ } else if (strcasecmp((const char *) valign,
"texttop") == 0) {
hint->status = CSS_VERTICAL_ALIGN_TEXT_TOP;
- } else if (strcmp((const char *) valign,
+ } else if (strcasecmp((const char *) valign,
"absmiddle") == 0 ||
- strcmp((const char *) valign,
+ strcasecmp((const char *) valign,
"abscenter") == 0) {
hint->status = CSS_VERTICAL_ALIGN_MIDDLE;
} else {
@@ -1984,8 +2005,8 @@
*
* \param a Name to match
* \param b Colour map entry to consider
- * \return 0 on match,
- * < 0 if a < b,
+ * \return 0 on match,
+ * < 0 if a < b,
* > 0 if b > a.
*/
int cmp_colour_name(const void *a, const void *b)
@@ -2211,7 +2232,7 @@
* \param maybe_negative Negative numbers permitted
* \param real Floating point numbers permitted
* \param value Pointer to location to receive numeric value
- * \param consumed Pointer to location to receive number of input
+ * \param consumed Pointer to location to receive number of input
* bytes consumed
* \return true on success, false on invalid input
*/
Modified: branches/MarkieB/gtkmain/render/layout.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/render/layout....
==============================================================================
--- branches/MarkieB/gtkmain/render/layout.c (original)
+++ branches/MarkieB/gtkmain/render/layout.c Sun Sep 13 08:46:59 2009
@@ -70,7 +70,7 @@
struct box *box);
static bool layout_apply_minmax_height(struct box *box, struct box *container);
static void layout_block_add_scrollbar(struct box *box, int which);
-static int layout_solve_width(struct box *box, int available_width, int width,
+static int layout_solve_width(struct box *box, int available_width, int width,
int lm, int rm, int max_width, int min_width);
static void layout_float_find_dimensions(int available_width,
const css_computed_style *style, struct box *box);
@@ -1024,16 +1024,16 @@
* \post \a box's left/right margins will be updated.
*/
-int layout_solve_width(struct box *box, int available_width, int width,
+int layout_solve_width(struct box *box, int available_width, int width,
int lm, int rm, int max_width, int min_width)
{
bool auto_width = false;
/* Increase specified left/right margins */
- if (box->margin[LEFT] != AUTO && box->margin[LEFT] < lm &&
+ if (box->margin[LEFT] != AUTO && box->margin[LEFT] < lm &&
box->margin[LEFT] >= 0)
box->margin[LEFT] = lm;
- if (box->margin[RIGHT] != AUTO && box->margin[RIGHT] < rm &&
+ if (box->margin[RIGHT] != AUTO && box->margin[RIGHT] < rm &&
box->margin[RIGHT] >= 0)
box->margin[RIGHT] = rm;
@@ -1095,10 +1095,10 @@
if (box->margin[LEFT] == AUTO && box->margin[RIGHT] == AUTO) {
/* make the margins equal, centering the element */
- box->margin[LEFT] = box->margin[RIGHT] =
+ box->margin[LEFT] = box->margin[RIGHT] =
(available_width - lm - rm -
- (box->border[LEFT].width + box->padding[LEFT] +
- width + box->padding[RIGHT] +
+ (box->border[LEFT].width + box->padding[LEFT] +
+ width + box->padding[RIGHT] +
box->border[RIGHT].width)) / 2;
if (box->margin[LEFT] < 0) {
@@ -1110,17 +1110,17 @@
} else if (box->margin[LEFT] == AUTO) {
box->margin[LEFT] = available_width - lm -
- (box->border[LEFT].width + box->padding[LEFT] +
- width + box->padding[RIGHT] +
+ (box->border[LEFT].width + box->padding[LEFT] +
+ width + box->padding[RIGHT] +
box->border[RIGHT].width + box->margin[RIGHT]);
- box->margin[LEFT] = box->margin[LEFT] < lm
+ box->margin[LEFT] = box->margin[LEFT] < lm
? lm : box->margin[LEFT];
} else {
/* margin-right auto or "over-constrained" */
box->margin[RIGHT] = available_width - rm -
(box->margin[LEFT] + box->border[LEFT].width +
- box->padding[LEFT] + width +
- box->padding[RIGHT] +
+ box->padding[LEFT] + width +
+ box->padding[RIGHT] +
box->border[RIGHT].width);
}
@@ -2677,7 +2677,7 @@
b->width = opt_maxwidth;
if (option_core_select_menu)
b->width += SCROLLBAR_WIDTH;
-
+
} else {
font_func->font_width(&fstyle, b->text,
b->length, &b->width);
@@ -3849,8 +3849,8 @@
css_computed_position(box->style) ==
CSS_POSITION_RELATIVE);
- if (box->float_container && (css_computed_float(box->style) ==
- CSS_FLOAT_LEFT ||
+ if (box->float_container &&
+ (css_computed_float(box->style) == CSS_FLOAT_LEFT ||
css_computed_float(box->style) == CSS_FLOAT_RIGHT)) {
containing_block = box->float_container;
} else {
@@ -3871,19 +3871,14 @@
else {
/* over constrained => examine direction property
* of containing block */
- if (containing_block->style) {
- if (css_computed_direction(containing_block->style) ==
- CSS_DIRECTION_LTR)
- /* left wins */
- right = -left;
- else if (css_computed_direction(
- containing_block->style) ==
- CSS_DIRECTION_RTL)
- /* right wins */
- left = -right;
- }
- else {
- /* no parent style, so assume LTR */
+ if (containing_block->style &&
+ css_computed_direction(
+ containing_block->style) ==
+ CSS_DIRECTION_RTL) {
+ /* right wins */
+ left = -right;
+ } else {
+ /* assume LTR in all other cases */
right = -left;
}
}
@@ -4226,7 +4221,7 @@
/* \todo layout_table considers margins etc. again */
if (!layout_table(box, width, content))
return false;
- layout_solve_width(box, box->parent->width, box->width, 0, 0,
+ layout_solve_width(box, box->parent->width, box->width, 0, 0,
-1, -1);
}
Modified: branches/MarkieB/gtkmain/utils/memdebug.c
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/utils/memdebug...
==============================================================================
--- branches/MarkieB/gtkmain/utils/memdebug.c (original)
+++ branches/MarkieB/gtkmain/utils/memdebug.c Sun Sep 13 08:46:59 2009
@@ -39,9 +39,12 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
+#ifdef riscos
+#include <unixlib/local.h>
#include "oslib/os.h"
#include "oslib/osfile.h"
+#endif
#include "memdebug.h"
@@ -50,7 +53,9 @@
#define MAGIC 0x34343434
#define GUARD 0x34
+#if defined(riscos) && !defined(__ELF__)
extern int __dynamic_num;
+#endif
struct memdebug {
size_t size;
@@ -141,7 +146,7 @@
}
if(logfile && source)
- fprintf(logfile, "MEM %s:%d malloc(%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d malloc(%zu) = %p\n",
source, line, wantedsize, mem ? mem->mem : 0);
return (mem ? mem->mem : NULL);
}
@@ -171,7 +176,7 @@
}
if(logfile && source)
- fprintf(logfile, "MEM %s:%d calloc(%u,%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d calloc(%zu,%zu) = %p\n",
source, line, wanted_elements, wanted_size, mem ? mem->mem : 0);
return (mem ? mem->mem : NULL);
}
@@ -193,7 +198,7 @@
memcpy(mem, str, len);
if(logfile)
- fprintf(logfile, "MEM %s:%d strdup(%p) (%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d strdup(%p) (%zu) = %p\n",
source, line, str, len, mem);
return mem;
@@ -220,7 +225,7 @@
}
if(logfile)
- fprintf(logfile, "MEM %s:%d strndup(%p, %d) (%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d strndup(%p, %zd) (%zu) = %p\n",
source, line, str, size, len, mem);
return mem;
@@ -240,7 +245,8 @@
return NULL;
if(ptr) {
- mem = (struct memdebug *)((char *)ptr - offsetof(struct memdebug, mem));
+ mem = (struct memdebug *)(void *)
+ ((char *)ptr - offsetof(struct memdebug, mem));
}
if(logfile) {
@@ -249,7 +255,7 @@
for (i = 0; mem && i != 8; i++)
if (((char *) mem->mem)[mem->size + i] != GUARD)
fprintf(logfile, "GUARD %u match failed!\n", i);
- fprintf(logfile, "MEM %s:%d realloc(%p, %u) = ",
+ fprintf(logfile, "MEM %s:%d realloc(%p, %zu) = ",
source, line, ptr, wantedsize);
fflush(logfile);
}
@@ -279,11 +285,14 @@
assert(ptr != NULL);
- mem = (struct memdebug *)((char *)ptr - offsetof(struct memdebug, mem));
+ mem = (struct memdebug *)(void *)
+ ((char *)ptr - offsetof(struct memdebug, mem));
if(logfile) {
fprintf(logfile, "MEM %s:%d free(%p)\n", source, line, ptr);
if (mem->magic != MAGIC) {
fprintf(logfile, "MAGIC match failed!\n");
+#ifdef riscos
+ #ifndef __ELF__
if (__dynamic_num != -1) {
int size;
byte *base_address;
@@ -294,6 +303,10 @@
xosfile_save("core", (bits) base_address, 0, base_address,
base_address + size);
}
+ #else
+ __unixlib_write_coredump(NULL);
+ #endif
+#endif
}
fflush(logfile);
for (i = 0; i != 8; i++)
13 years, 8 months
r9567 MarkieB - /branches/MarkieB/gtkmain/gtk/res/
by netsurf@semichrome.net
Author: MarkieB
Date: Sun Sep 13 08:34:36 2009
New Revision: 9567
URL: http://source.netsurf-browser.org?rev=9567&view=rev
Log:
restore svn ignore property
Modified:
branches/MarkieB/gtkmain/gtk/res/ (props changed)
Propchange: branches/MarkieB/gtkmain/gtk/res/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Sep 13 08:34:36 2009
@@ -1,0 +1,1 @@
+toolbarIndices
13 years, 8 months
r9565 MarkieB - in /branches/MarkieB/gtkmain: Docs/BUILDING-AmigaCross Makefile gtk/res/ gtk/res/toolbarIndices
by netsurf@semichrome.net
Author: MarkieB
Date: Sun Sep 13 08:20:15 2009
New Revision: 9565
URL: http://source.netsurf-browser.org?rev=9565&view=rev
Log:
move unversioned settings handling to makefile; more slow advances in amiga cross-compile
Removed:
branches/MarkieB/gtkmain/gtk/res/toolbarIndices
Modified:
branches/MarkieB/gtkmain/Docs/BUILDING-AmigaCross
branches/MarkieB/gtkmain/Makefile
branches/MarkieB/gtkmain/gtk/res/ (props changed)
Modified: branches/MarkieB/gtkmain/Docs/BUILDING-AmigaCross
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/Docs/BUILDING-...
==============================================================================
--- branches/MarkieB/gtkmain/Docs/BUILDING-AmigaCross (original)
+++ branches/MarkieB/gtkmain/Docs/BUILDING-AmigaCross Sun Sep 13 08:20:15 2009
@@ -26,17 +26,73 @@
though newlib / clib2 are apparently already included in the ppc-amigaos-gcc tarball
+lha utility is debian package lha
+
then install linked libs in the correct place
+[normally /usr/local/amiga]
+so
+sudo chmod --recursive 775 /usr/local/amiga
+sudo chmod --recursive +s /usr/local/amiga
+sudo chown --recursive `whoami` /usr/local/amiga
+sudo chgrp --recursive root /usr/local/amiga
+[mkdir /usr/local/amiga/include]
+
+[may need to set ppc-amigaos-gcc libpaths]
+
zlib
+download tarball from project homepage, untar in a storage directory /
+download source from your distribution's repository [zlib1g in Ubuntu]
+[cd to top-level directory of zlib containing configure script]
+CC=ppc-amigaos-gcc AR=ppc-amigaos-ar RANLIB=ppc-amigaos-ranlib \
+CFLAGS="-DNO_FSEEKO" ./configure --prefix=/usr/local/amiga
+make
+make install
+
libxml
-regex [unless in clib2]
+download the tarball from the project's homepage, untar in a storage directory /
+download source from your distribution's repository
+download the tarball from the project's homepage, untar in a storage directory /
+download source from your distribution's repository
+cd into the directory containing the configure file
+$ ./configure --prefix=/usr/local/amiga --host=ppc-amigaos
+$ make
+[need glob.h / change logic in runtest.c]
+$ make install
+
+alternative
+http://www.aminet.net/dev/lib/libxml.lha
+
+
+regex [pre-compiled]
+http://aminet.net/dev/lib/libregex-4.4.3.lha
+
libcurl
-libiconv
+download the tarball from the project's homepage, untar in a storage directory /
+download source from your distribution's repository
+cd into the directory containing the configure file
+./configure --prefix=/usr/local/amiga --host=ppc-amigaos
+$ make
+[you MUST have either POSIX or glibc strerror_r if strerror_r is found]
+$ make install
+
+alternative
+http://www.aminet.net/dev/lib/libcurl.lha
+
+libiconv [unnecessary as a non-overridable limited version is included in newlib]
+
openssl
+
libpng
+
libmng
+http://www.aminet.net/dev/lib/libmng_so.lha
+http://www.aminet.net/dev/lib/libmng.lha
+
liblcms
+http://www.aminet.net/dev/lib/liblcms_so.lha
+http://www.aminet.net/dev/lib/liblcms_so.lha
+
libjpeg
libparserutils
Modified: branches/MarkieB/gtkmain/Makefile
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/Makefile?rev=9...
==============================================================================
--- branches/MarkieB/gtkmain/Makefile (original)
+++ branches/MarkieB/gtkmain/Makefile Sun Sep 13 08:20:15 2009
@@ -554,6 +554,9 @@
$(Q)$(CC) -o $(EXETARGET:,ff8=,e1f) $(OBJECTS) $(LDFLAGS)
$(Q)$(ELF2AIF) $(EXETARGET:,ff8=,e1f) $(EXETARGET)
$(Q)$(RM) $(EXETARGET:,ff8=,e1f)
+endif
+ifeq ($(TARGET),gtk)
+ $(Q)$(TOUCH) gtk/res/toolbarIndices
endif
ifeq ($(NETSURF_STRIP_BINARY),YES)
$(VQ)echo " STRIP: $(EXETARGET)"
Propchange: branches/MarkieB/gtkmain/gtk/res/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore (removed)
@@ -1,1 +1,0 @@
-toolbarIndices
Removed: branches/MarkieB/gtkmain/gtk/res/toolbarIndices
URL: http://source.netsurf-browser.org/branches/MarkieB/gtkmain/gtk/res/toolba...
==============================================================================
(empty)
13 years, 8 months
r9564 chris_y - in /trunk/netsurf/amiga/dist: NetSurf.guide netsurf.readme
by netsurf@semichrome.net
Author: chris_y
Date: Sun Sep 13 07:23:30 2009
New Revision: 9564
URL: http://source.netsurf-browser.org?rev=9564&view=rev
Log:
Doc updates
Modified:
trunk/netsurf/amiga/dist/NetSurf.guide
trunk/netsurf/amiga/dist/netsurf.readme
Modified: trunk/netsurf/amiga/dist/NetSurf.guide
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/dist/NetSurf.guide?...
==============================================================================
--- trunk/netsurf/amiga/dist/NetSurf.guide (original)
+++ trunk/netsurf/amiga/dist/NetSurf.guide Sun Sep 13 07:23:30 2009
@@ -37,6 +37,8 @@
@{b}kiosk_mode@{ub} No gadgets
@{b}no_iframes@{ub} Disable IFrames
+@{b}printer_unit@{ub} Specifies which printer.device unit to print to
+
@{b}url_file@{ub} Path to URL database file
@{b}hotlist_file@{ub} Path to Hotlist file
@{b}arexx_dir@{ub} Path to ARexx scripts dir
Modified: trunk/netsurf/amiga/dist/netsurf.readme
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/dist/netsurf.readme...
==============================================================================
--- trunk/netsurf/amiga/dist/netsurf.readme (original)
+++ trunk/netsurf/amiga/dist/netsurf.readme Sun Sep 13 07:23:30 2009
@@ -2,16 +2,17 @@
Uploader: chris(a)unsatisfactorysoftware.co.uk (Chris Young)
Author: NetSurf contributors (OS4 port by Chris Young)
Type: comm/www
-Version: 2.0 development (SVN 5911)
+Version: 3.0 development (SVN 9560)
Architecture: ppc-amigaos >= 4.0.0
-This is a preview release of the OS4 native port of NetSurf.
+MANUAL INSTALL ONLY - INTENTIONALLY NOT AVAILABLE VIA AMIUPDATE
+
+This is a preview release of NetSurf 3.0 for AmigaOS 4.
It is beta software, which means it is unstable and missing
features - use at your own risk!
-This is provided for testing purposes only, to gain feedback
-in order to fix bugs for the real release and to prioritise
-features.
+This is provided for testing purposes only. For the latest
+stable version, visit http://www.netsurf-browser.org
Please report bugs to chris(a)unsatisfactorysoftware.co.uk,
on the Amigans.net forums or in the bug tracker at
13 years, 8 months
r9563 jmb - /trunk/netsurf/Docs/ideas/cache.txt
by netsurf@semichrome.net
Author: jmb
Date: Wed Sep 9 05:40:53 2009
New Revision: 9563
URL: http://source.netsurf-browser.org?rev=9563&view=rev
Log:
Introduce the concept of content reusability.
Modified:
trunk/netsurf/Docs/ideas/cache.txt
Modified: trunk/netsurf/Docs/ideas/cache.txt
URL: http://source.netsurf-browser.org/trunk/netsurf/Docs/ideas/cache.txt?rev=...
==============================================================================
--- trunk/netsurf/Docs/ideas/cache.txt (original)
+++ trunk/netsurf/Docs/ideas/cache.txt Wed Sep 9 05:40:53 2009
@@ -30,9 +30,19 @@
+ Responsible for content objects.
+ Tracks content dependencies (and potential cycles).
+ Returns opaque handles to content objects.
- + Manages content sharability.
+ + Manages content sharability & reusability (see below).
+ Contents with unknown types are never shared and thus get unique handles.
+ Content handles <> content objects: they're an indirection mechanism.
+
+Content sharability & reusability
+--------------------------------
+
+ If a content is shareable, then it may have multiple concurrent users.
+ Otherwise, it may have at most one user.
+
+ If a content is reusable, then it may be retained in the cache for later use
+ when it has no users. Otherwise, it will be removed from the cache when
+ it has no users.
Example: retrieving a top-level resource
----------------------------------------
13 years, 8 months
r9562 chris_y - /trunk/netsurf/amiga/gui.c
by netsurf@semichrome.net
Author: chris_y
Date: Tue Sep 8 17:59:47 2009
New Revision: 9562
URL: http://source.netsurf-browser.org?rev=9562&view=rev
Log:
Fix crash when switching to tabs that are still loading
Modified:
trunk/netsurf/amiga/gui.c
Modified: trunk/netsurf/amiga/gui.c
URL: http://source.netsurf-browser.org/trunk/netsurf/amiga/gui.c?rev=9562&r1=9...
==============================================================================
--- trunk/netsurf/amiga/gui.c (original)
+++ trunk/netsurf/amiga/gui.c Tue Sep 8 17:59:47 2009
@@ -1481,6 +1481,7 @@
void ami_switch_tab(struct gui_window_2 *gwin,bool redraw)
{
struct Node *tabnode;
+ struct IBox *bbox;
if(gwin->tabs == 0) return;
@@ -1491,13 +1492,19 @@
TNA_UserData,&gwin->bw,
TAG_DONE);
curbw = gwin->bw;
+ GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
+
+ if(!gwin->bw->current_content)
+ {
+ p96RectFill(gwin->win->RPort, bbox->Left, bbox->Top,
+ bbox->Width+bbox->Left, bbox->Height+bbox->Top, 0xffffffff);
+ return;
+ }
ami_update_buttons(gwin);
if(redraw)
{
- struct IBox *bbox;
- GetAttr(SPACE_AreaBox,gwin->gadgets[GID_BROWSER],(ULONG *)&bbox);
p96RectFill(gwin->win->RPort,bbox->Left,bbox->Top,bbox->Width+bbox->Left,bbox->Height+bbox->Top,0xffffffff);
browser_window_update(gwin->bw,false);
13 years, 8 months