r3170 rjek - /trunk/netsurf/makefile
by netsurf@semichrome.net
Author: rjek
Date: Tue Feb 6 21:49:59 2007
New Revision: 3170
URL: http://svn.semichrome.net?rev=3170&view=rev
Log:
Remove optimisation settings accidentally checked in. I will examine my diffs more carefully in future. I promise.
Modified:
trunk/netsurf/makefile
Modified: trunk/netsurf/makefile
URL: http://svn.semichrome.net/trunk/netsurf/makefile?rev=3170&r1=3169&r2=3170...
==============================================================================
--- trunk/netsurf/makefile (original)
+++ trunk/netsurf/makefile Tue Feb 6 21:49:59 2007
@@ -133,7 +133,7 @@
-D_BSD_SOURCE \
-DGTK_DISABLE_DEPRECATED \
-D_POSIX_C_SOURCE \
- $(WARNFLAGS) -I.. -g -O2 -fomit-frame-pointer -Wformat=2 \
+ $(WARNFLAGS) -I.. -g -O0 -Wformat=2 \
`pkg-config --cflags libglade-2.0 gtk+-2.0` `xml2-config --cflags`
# Stop GCC under Cygwin throwing a fit
16 years, 7 months
r3169 rjek - /trunk/netsurf/makefile
by netsurf@semichrome.net
Author: rjek
Date: Tue Feb 6 21:48:22 2007
New Revision: 3169
URL: http://svn.semichrome.net?rev=3169&view=rev
Log:
Reduce warnings caused by GTK and XML2 library headers
Modified:
trunk/netsurf/makefile
Modified: trunk/netsurf/makefile
URL: http://svn.semichrome.net/trunk/netsurf/makefile?rev=3169&r1=3168&r2=3169...
==============================================================================
--- trunk/netsurf/makefile (original)
+++ trunk/netsurf/makefile Tue Feb 6 21:48:22 2007
@@ -129,8 +129,11 @@
CFLAGS_NCOS = $(CFLAGS_RISCOS) -Dncos
CFLAGS_DEBUG = -std=c99 -D_BSD_SOURCE -DDEBUG_BUILD $(WARNFLAGS) -I.. \
$(PLATFORM_CFLAGS_DEBUG) -g
-CFLAGS_GTK = -Dnsgtk -std=c99 -D_BSD_SOURCE -Dgtk \
- $(WARNFLAGS) -I.. -g -O0 -Wformat=2 \
+CFLAGS_GTK = -std=c99 -Dgtk -Dnsgtk \
+ -D_BSD_SOURCE \
+ -DGTK_DISABLE_DEPRECATED \
+ -D_POSIX_C_SOURCE \
+ $(WARNFLAGS) -I.. -g -O2 -fomit-frame-pointer -Wformat=2 \
`pkg-config --cflags libglade-2.0 gtk+-2.0` `xml2-config --cflags`
# Stop GCC under Cygwin throwing a fit
16 years, 7 months
r3168 rjek - /trunk/netsurf/posix.mk
by netsurf@semichrome.net
Author: rjek
Date: Tue Feb 6 21:25:20 2007
New Revision: 3168
URL: http://svn.semichrome.net?rev=3168&view=rev
Log:
Make makefile delete nsgtk binary on clean
Modified:
trunk/netsurf/posix.mk
Modified: trunk/netsurf/posix.mk
URL: http://svn.semichrome.net/trunk/netsurf/posix.mk?rev=3168&r1=3167&r2=3168...
==============================================================================
--- trunk/netsurf/posix.mk (original)
+++ trunk/netsurf/posix.mk Tue Feb 6 21:25:20 2007
@@ -43,4 +43,5 @@
-rm $(OBJDIR_RISCOS)/* $(OBJDIR_RISCOS_SMALL)/* $(OBJDIR_NCOS)/* \
$(OBJDIR_DEBUG)/* $(OBJDIR_GTK)/* \
css/css_enum.c css/css_enum.h \
- css/parser.c css/parser.h css/scanner.c
+ css/parser.c css/parser.h css/scanner.c \
+ nsgtk
16 years, 7 months
r3167 rjek - in /trunk/netsurf: Docs/BUILDING-GTK netsurf
by netsurf@semichrome.net
Author: rjek
Date: Tue Feb 6 16:52:47 2007
New Revision: 3167
URL: http://svn.semichrome.net?rev=3167&view=rev
Log:
Remove bashism and improve nsgtk launcher shell script, add simple BUILDING-GTK document.
Added:
trunk/netsurf/Docs/BUILDING-GTK
Modified:
trunk/netsurf/netsurf
Added: trunk/netsurf/Docs/BUILDING-GTK
URL: http://svn.semichrome.net/trunk/netsurf/Docs/BUILDING-GTK?rev=3167&view=auto
==============================================================================
--- trunk/netsurf/Docs/BUILDING-GTK (added)
+++ trunk/netsurf/Docs/BUILDING-GTK Tue Feb 6 16:52:47 2007
@@ -1,0 +1,26 @@
+To build the GTK version of NetSurf on a UNIX-like platform (although it has
+only been tested on Debian, Ubuntu and FreeBSD), simply run "make gtk" once
+you have got the relevent build dependancies installed. Under a Debian-like
+OS, this should suffice:
+
+ apt-get install libglade2-dev libcurl3-dev libxml2-dev lemon re2c
+
+This will pull in loads of things, like all the GTK dev libraries, the PNG and
+JPEG libraries, colour management libraries, zlib, OpenSSL etc that NetSurf
+also depends on.
+
+lemon and re2c are the parser and lexer generators used to create NetSurf's CSS
+support. If you have trouble finding lemon for your platform, it forms part of
+the SQLite distribution, and consists of a single C file and a single runtime
+data file, and is trivial to build yourself.
+
+Type "make gtk". Currently, this produces a huge number of warnings, mostly
+due to confused signedness. These havn't been fixed yet but are mostly
+harmless.
+
+Once you've built NetSurf, you should have an executable called nsgtk. You
+can't run this directly without setting up some environment variables so that
+NetSurf can find its resources (such as the window definitions, text resources,
+etc). A small shell script called "netsurf" is provided to make it easy to run
+NetSurf from the build tree.
+
Modified: trunk/netsurf/netsurf
URL: http://svn.semichrome.net/trunk/netsurf/netsurf?rev=3167&r1=3166&r2=3167&...
==============================================================================
--- trunk/netsurf/netsurf (original)
+++ trunk/netsurf/netsurf Tue Feb 6 16:52:47 2007
@@ -1,9 +1,17 @@
#!/bin/sh
+# This file is part of NetSurf, http://netsurf-browser.org/
+# Licensed under the GNU General Public License,
+# http://www.opensource.org/licenses/gpl-license
+# Copyright 2007 Rob Kendrick <rjek(a)netsurf-browser.org>
+
if [ -d ~/.netsurf ]; then
LOG=~/.netsurf/log.txt
+elif [ -d /tmp ]; then
+ LOG=/tmp/netsurf-log.txt
else
- LOG=/tmp/netsurf-log.txt
+ LOG=netsurf-log.txt
fi
-export NETSURFRES=`dirname $0`/gtk/res/
+NETSURFRES=`dirname $0`/gtk/res/
+export NETSURFRES
exec `dirname $0`/nsgtk "$@" 2>$LOG
16 years, 7 months
r3166 rjek - in /trunk/netsurf: !NetSurf/ ./ .cvsignore css/ css/.cvsignore
by netsurf@semichrome.net
Author: rjek
Date: Sun Feb 4 13:00:06 2007
New Revision: 3166
URL: http://svn.semichrome.net?rev=3166&view=rev
Log:
Remove .cvsignore files, and replicate functionality with svn:ignore attributes
Removed:
trunk/netsurf/.cvsignore
trunk/netsurf/css/.cvsignore
Modified:
trunk/netsurf/ (props changed)
trunk/netsurf/!NetSurf/ (props changed)
trunk/netsurf/css/ (props changed)
Propchange: trunk/netsurf/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Feb 4 13:00:06 2007
@@ -1,0 +1,7 @@
+arm-riscos-aof
+arm-riscos-aof-debug
+arm-riscos-aof-ncos
+arm-riscos-aof-small
+objects-gtk
+depend
+nsgtk
Propchange: trunk/netsurf/!NetSurf/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Feb 4 13:00:06 2007
@@ -1,0 +1,1 @@
+!RunImage,ff8
Removed: trunk/netsurf/.cvsignore
URL: http://svn.semichrome.net/trunk/netsurf/.cvsignore?rev=3165&view=auto
==============================================================================
--- trunk/netsurf/.cvsignore (original)
+++ trunk/netsurf/.cvsignore (removed)
@@ -1,3 +1,0 @@
-arm-riscos-aof
-arm-riscos-aof-debug
-arm-riscos-aof-ncos
Propchange: trunk/netsurf/css/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Feb 4 13:00:06 2007
@@ -1,0 +1,7 @@
+css_enum.c
+css_enum.h
+parser.c
+parser.h
+parser.out
+scanner.c
+scanner.h
Removed: trunk/netsurf/css/.cvsignore
URL: http://svn.semichrome.net/trunk/netsurf/css/.cvsignore?rev=3165&view=auto
==============================================================================
--- trunk/netsurf/css/.cvsignore (original)
+++ trunk/netsurf/css/.cvsignore (removed)
@@ -1,6 +1,0 @@
-css_enum.c
-css_enum.h
-parser.c
-parser.h
-scanner.c
-scanner.h
16 years, 7 months
r3165 jmb - in /trunk/netsurf: content/content.c content/fetch.c content/fetch.h content/fetchcache.c content/fetchcache.h css/css.c desktop/browser.c render/html.c riscos/plugin.c
by netsurf@semichrome.net
Author: jmb
Date: Fri Feb 2 23:08:13 2007
New Revision: 3165
URL: http://svn.semichrome.net?rev=3165&view=rev
Log:
Fix handling of cookies in unverifiable transactions caused by a redirect from a fetch into a browser window which was varifiable.
Modified:
trunk/netsurf/content/content.c
trunk/netsurf/content/fetch.c
trunk/netsurf/content/fetch.h
trunk/netsurf/content/fetchcache.c
trunk/netsurf/content/fetchcache.h
trunk/netsurf/css/css.c
trunk/netsurf/desktop/browser.c
trunk/netsurf/render/html.c
trunk/netsurf/riscos/plugin.c
Modified: trunk/netsurf/content/content.c
URL: http://svn.semichrome.net/trunk/netsurf/content/content.c?rev=3165&r1=316...
==============================================================================
--- trunk/netsurf/content/content.c (original)
+++ trunk/netsurf/content/content.c Fri Feb 2 23:08:13 2007
@@ -535,6 +535,8 @@
c->user_list->next->next) {
/* type not shareable, and more than one user: split into
* a content per user */
+ const char *referer = fetch_get_referer(c->fetch);
+
while (c->user_list->next->next) {
clone = content_create(c->url);
if (!clone) {
@@ -566,10 +568,11 @@
}
content_remove_user(c, callback, p1, p2);
content_broadcast(clone, CONTENT_MSG_NEWPTR, msg_data);
- fetchcache_go(clone, fetch_get_referer(c->fetch),
+ fetchcache_go(clone, referer,
callback, p1, p2,
clone->width, clone->height,
- 0, 0, false);
+ 0, 0, false,
+ referer ? referer : c->url);
}
}
Modified: trunk/netsurf/content/fetch.c
URL: http://svn.semichrome.net/trunk/netsurf/content/fetch.c?rev=3165&r1=3164&...
==============================================================================
--- trunk/netsurf/content/fetch.c (original)
+++ trunk/netsurf/content/fetch.c Fri Feb 2 23:08:13 2007
@@ -69,6 +69,8 @@
char *url; /**< URL. */
char *referer; /**< URL for Referer header. */
bool send_referer; /**< Valid to send the referer */
+ char *parent_fetch_url; /**< URL of parent fetch (not necessarily
+ * the same as the referer) */
void *p; /**< Private data for callback. */
struct curl_slist *headers; /**< List of request headers. */
char *host; /**< Host part of URL. */
@@ -310,7 +312,7 @@
unsigned long size),
void *p, bool only_2xx, const char *post_urlenc,
struct form_successful_control *post_multipart,
- bool verifiable, char *headers[])
+ bool verifiable, const char *parent_url, char *headers[])
{
char *host;
struct fetch *fetch;
@@ -372,6 +374,7 @@
strcasecmp(ref1, ref2) == 0)
fetch->send_referer = true;
}
+ fetch->parent_fetch_url = parent_url ? strdup(parent_url) : 0;
fetch->p = p;
fetch->headers = 0;
fetch->host = host;
@@ -404,6 +407,7 @@
fetch->r_next = 0;
if (!fetch->url || (referer && !fetch->referer) ||
+ (parent_url && !fetch->parent_fetch_url) ||
(post_urlenc && !fetch->post_urlenc) ||
(post_multipart && !fetch->post_multipart))
goto failed;
@@ -478,6 +482,7 @@
if (ref2)
free(ref2);
free(fetch->url);
+ free(fetch->parent_fetch_url);
free(fetch->referer);
free(fetch->post_urlenc);
if (fetch->post_multipart)
@@ -794,6 +799,7 @@
curl_easy_cleanup(f->curl_handle);
free(f->url);
free(f->host);
+ free(f->parent_fetch_url);
free(f->referer);
free(f->location);
free(f->cookie_string);
@@ -1223,15 +1229,17 @@
/* extract Set-Cookie header */
SKIP_ST(11);
- /* If the fetch is unverifiable and there's no referer,
- * err on the side of caution and do not set the cookie */
-
- if (f->verifiable || f->referer) {
+ /* If the fetch is unverifiable and there's no parent fetch
+ * url, err on the side of caution and do not set the
+ cookie */
+
+ if (f->verifiable || f->parent_fetch_url) {
/* If the transaction's verifiable, we don't require
- * that the request uri and the referer domain match,
- * so don't pass in the referer in this case. */
+ * that the request uri and the parent domain match,
+ * so don't pass in the parent in this case. */
urldb_set_cookie(&data[i], f->url,
- f->verifiable ? 0 : f->referer);
+ f->verifiable ? 0
+ : f->parent_fetch_url);
}
}
Modified: trunk/netsurf/content/fetch.h
URL: http://svn.semichrome.net/trunk/netsurf/content/fetch.h?rev=3165&r1=3164&...
==============================================================================
--- trunk/netsurf/content/fetch.h (original)
+++ trunk/netsurf/content/fetch.h Fri Feb 2 23:08:13 2007
@@ -72,7 +72,7 @@
unsigned long size),
void *p, bool only_2xx, const char *post_urlenc,
struct form_successful_control *post_multipart,
- bool verifiable, char *headers[]);
+ bool verifiable, const char *parent_url, char *headers[]);
void fetch_abort(struct fetch *f);
void fetch_poll(void);
void fetch_quit(void);
Modified: trunk/netsurf/content/fetchcache.c
URL: http://svn.semichrome.net/trunk/netsurf/content/fetchcache.c?rev=3165&r1=...
==============================================================================
--- trunk/netsurf/content/fetchcache.c (original)
+++ trunk/netsurf/content/fetchcache.c Fri Feb 2 23:08:13 2007
@@ -204,6 +204,7 @@
* \param post_urlenc url encoded post data, or 0 if none
* \param post_multipart multipart post data, or 0 if none
* \param verifiable this transaction is verifiable
+ * \param parent_url URL of fetch which spawned this one, or 0 if none
*
* Errors will be sent back through the callback.
*/
@@ -215,7 +216,7 @@
int width, int height,
char *post_urlenc,
struct form_successful_control *post_multipart,
- bool verifiable)
+ bool verifiable, const char *parent_url)
{
char error_message[500];
union content_msg_data msg_data;
@@ -309,7 +310,7 @@
fetchcache_callback, content,
content->no_error_pages,
post_urlenc, post_multipart, verifiable,
- headers);
+ parent_url, headers);
for (i = 0; headers[i]; i++)
free(headers[i]);
free(headers);
@@ -771,7 +772,7 @@
for (u = c->user_list->next; u; u = u->next) {
fetchcache_go(c, referer, u->callback, u->p1, u->p2,
c->width, c->height, 0, 0,
- false);
+ false, ref ? referer : c->url);
}
free(referer);
Modified: trunk/netsurf/content/fetchcache.h
URL: http://svn.semichrome.net/trunk/netsurf/content/fetchcache.h?rev=3165&r1=...
==============================================================================
--- trunk/netsurf/content/fetchcache.h (original)
+++ trunk/netsurf/content/fetchcache.h Fri Feb 2 23:08:13 2007
@@ -39,6 +39,6 @@
int width, int height,
char *post_urlenc,
struct form_successful_control *post_multipart,
- bool verifiable);
+ bool verifiable, const char *parent_url);
#endif
Modified: trunk/netsurf/css/css.c
URL: http://svn.semichrome.net/trunk/netsurf/css/css.c?rev=3165&r1=3164&r2=316...
==============================================================================
--- trunk/netsurf/css/css.c (original)
+++ trunk/netsurf/css/css.c Fri Feb 2 23:08:13 2007
@@ -877,7 +877,7 @@
fetchcache_go(c->data.css.import_content[i], c->url,
css_atimport_callback, (intptr_t) c, i,
c->width, c->height,
- 0, 0, false);
+ 0, 0, false, c->url);
}
free(url);
@@ -949,7 +949,7 @@
c->url, css_atimport_callback,
(intptr_t) c, i,
css->width, css->height,
- 0, 0, false);
+ 0, 0, false, c->url);
}
break;
Modified: trunk/netsurf/desktop/browser.c
URL: http://svn.semichrome.net/trunk/netsurf/desktop/browser.c?rev=3165&r1=316...
==============================================================================
--- trunk/netsurf/desktop/browser.c (original)
+++ trunk/netsurf/desktop/browser.c Fri Feb 2 23:08:13 2007
@@ -64,7 +64,7 @@
const char *url, char *post_urlenc,
struct form_successful_control *post_multipart,
bool history_add, const char *referer, bool download,
- bool verifiable);
+ bool verifiable, const char *parent_url);
static void browser_window_callback(content_msg msg, struct content *c,
intptr_t p1, intptr_t p2, union content_msg_data data);
static void browser_window_refresh(void *p);
@@ -175,12 +175,12 @@
*/
void browser_window_go(struct browser_window *bw, const char *url,
- const char* referer, bool history_add)
+ const char *referer, bool history_add)
{
/* All fetches passing through here are verifiable
* (i.e are the result of user action) */
browser_window_go_post(bw, url, 0, 0, history_add, referer,
- false, true);
+ false, true, referer);
}
@@ -195,12 +195,12 @@
*/
void browser_window_go_unverifiable(struct browser_window *bw,
- const char *url, const char* referer, bool history_add)
+ const char *url, const char *referer, bool history_add)
{
/* All fetches passing through here are unverifiable
* (i.e are not the result of user action) */
browser_window_go_post(bw, url, 0, 0, history_add, referer,
- false, false);
+ false, false, referer);
}
/**
@@ -214,6 +214,8 @@
* \param referer the referring uri (copied), or 0 if none
* \param download download, rather than render the uri
* \param verifiable this transaction is verifiable
+ * \param parent_url URL of fetch which spawned this one (copied),
+ * or 0 if none
*
* Any existing fetches in the window are aborted.
*
@@ -227,7 +229,7 @@
char *post_urlenc,
struct form_successful_control *post_multipart,
bool history_add, const char *referer, bool download,
- bool verifiable)
+ bool verifiable, const char *parent_url)
{
struct content *c;
char *url2;
@@ -337,7 +339,7 @@
bw->download = download;
fetchcache_go(c, referer, browser_window_callback,
(intptr_t) bw, 0, width, height,
- post_urlenc, post_multipart, verifiable);
+ post_urlenc, post_multipart, verifiable, parent_url);
}
@@ -475,6 +477,9 @@
break;
case CONTENT_MSG_REDIRECT:
+ {
+ const char *prev_url = bw->loading_content->url;
+
bw->loading_content = 0;
browser_window_set_status(bw,
messages_get("Redirecting"));
@@ -483,7 +488,9 @@
* referer across the redirect */
browser_window_go_post(bw, data.redirect, 0, 0,
bw->history_add, bw->referer,
- bw->download, false);
+ bw->download, false,
+ bw->referer ? bw->referer : prev_url);
+ }
break;
case CONTENT_MSG_REFORMAT:
@@ -789,7 +796,7 @@
}
bw->current_content->fresh = false;
browser_window_go_post(bw, bw->current_content->url, 0, 0,
- false, 0, false, true);
+ false, 0, false, true, 0);
}
@@ -1443,7 +1450,7 @@
mouse & BROWSER_MOUSE_MOD_1) {
/* force download of link */
browser_window_go_post(bw, url, 0, 0, false,
- c->url, true, true);
+ c->url, true, true, 0);
} else if (mouse & BROWSER_MOUSE_CLICK_1) {
bw = browser_window_find_target(bw, target);
@@ -2304,14 +2311,14 @@
}
browser_window_go_post(bw_form, form->action, data, 0,
true, bw->current_content->url,
- false, true);
+ false, true, 0);
break;
case method_POST_MULTIPART:
browser_window_go_post(bw_form, form->action, 0,
success, true,
bw->current_content->url,
- false, true);
+ false, true, 0);
break;
default:
Modified: trunk/netsurf/render/html.c
URL: http://svn.semichrome.net/trunk/netsurf/render/html.c?rev=3165&r1=3164&r2...
==============================================================================
--- trunk/netsurf/render/html.c (original)
+++ trunk/netsurf/render/html.c Fri Feb 2 23:08:13 2007
@@ -613,10 +613,10 @@
if (!c->data.html.stylesheet_content[STYLESHEET_BASE])
return false;
c->active++;
- fetchcache_go(c->data.html.stylesheet_content[STYLESHEET_BASE], 0,
- html_convert_css_callback, (intptr_t) c,
+ fetchcache_go(c->data.html.stylesheet_content[STYLESHEET_BASE],
+ c->url, html_convert_css_callback, (intptr_t) c,
STYLESHEET_BASE, c->width, c->height,
- 0, 0, false);
+ 0, 0, false, 0);
if (option_block_ads) {
c->data.html.stylesheet_content[STYLESHEET_ADBLOCK] =
@@ -629,9 +629,9 @@
c->active++;
fetchcache_go(c->data.html.
stylesheet_content[STYLESHEET_ADBLOCK],
- 0, html_convert_css_callback, (intptr_t) c,
- STYLESHEET_ADBLOCK, c->width,
- c->height, 0, 0, false);
+ c->url, html_convert_css_callback,
+ (intptr_t) c, STYLESHEET_ADBLOCK, c->width,
+ c->height, 0, 0, false, 0);
}
for (node = head == 0 ? 0 : head->children; node; node = node->next) {
@@ -703,7 +703,7 @@
c->url,
html_convert_css_callback,
(intptr_t) c, i, c->width, c->height,
- 0, 0, false);
+ 0, 0, false, c->url);
free(url);
i++;
@@ -890,7 +890,8 @@
c->url,
html_convert_css_callback,
(intptr_t) c, i, css->width,
- css->height, 0, 0, false);
+ css->height, 0, 0, false,
+ c->url);
}
break;
@@ -977,7 +978,7 @@
fetchcache_go(c_fetch, c->url,
html_object_callback, (intptr_t) c, i,
available_width, available_height,
- 0, 0, false);
+ 0, 0, false, c->url);
return true;
}
@@ -1044,7 +1045,7 @@
html_object_callback, (intptr_t) c, i,
c->data.html.object[i].box->width,
c->data.html.object[i].box->height,
- post_urlenc, post_multipart, false);
+ post_urlenc, post_multipart, false, c->url);
return true;
}
@@ -1144,7 +1145,8 @@
html_object_callback,
(intptr_t) c, i,
0, 0,
- 0, 0, false);
+ 0, 0,
+ false, c->url);
}
}
break;
Modified: trunk/netsurf/riscos/plugin.c
URL: http://svn.semichrome.net/trunk/netsurf/riscos/plugin.c?rev=3165&r1=3164&...
==============================================================================
--- trunk/netsurf/riscos/plugin.c (original)
+++ trunk/netsurf/riscos/plugin.c Fri Feb 2 23:08:13 2007
@@ -1659,7 +1659,7 @@
p->c = c;
fetchcache_go(c, 0, plugin_stream_callback, (intptr_t)p, 0,
- 100, 100, 0, 0, false);
+ 100, 100, 0, 0, false, 0);
return true;
}
16 years, 7 months
r3164 rjek - /trunk/netsurf/gtk/gtk_plotters.c
by netsurf@semichrome.net
Author: rjek
Date: Fri Feb 2 22:24:42 2007
New Revision: 3164
URL: http://svn.semichrome.net?rev=3164&view=rev
Log:
Fix more off-by-ones in nsgtk's image plotting and clipping. AFAICT, this is now perfect.
Modified:
trunk/netsurf/gtk/gtk_plotters.c
Modified: trunk/netsurf/gtk/gtk_plotters.c
URL: http://svn.semichrome.net/trunk/netsurf/gtk/gtk_plotters.c?rev=3164&r1=31...
==============================================================================
--- trunk/netsurf/gtk/gtk_plotters.c (original)
+++ trunk/netsurf/gtk/gtk_plotters.c Fri Feb 2 22:24:42 2007
@@ -195,15 +195,15 @@
#ifdef CAIRO_VERSION
if (option_render_cairo) {
cairo_reset_clip(current_cr);
- cairo_rectangle(current_cr, clip_x0 - 1, clip_y0 - 1,
- clip_x1 - clip_x0 + 1, clip_y1 - clip_y0 + 1);
+ cairo_rectangle(current_cr, clip_x0, clip_y0,
+ clip_x1 - clip_x0, clip_y1 - clip_y0);
cairo_clip(current_cr);
}
#endif
cliprect.x = clip_x0;
cliprect.y = clip_y0;
- cliprect.width = clip_x1 - clip_x0 + 1;
- cliprect.height = clip_y1 - clip_y0 + 1;
+ cliprect.width = clip_x1 - clip_x0;
+ cliprect.height = clip_y1 - clip_y0;
gdk_gc_set_clip_rectangle(current_gc, &cliprect);
return true;
}
@@ -275,9 +275,7 @@
if (width == 0 || height == 0)
return true;
- width++; /* TODO: investigate why this is required */
-
- if (gdk_pixbuf_get_width(pixbuf) == (width - 1) &&
+ if (gdk_pixbuf_get_width(pixbuf) == width &&
gdk_pixbuf_get_height(pixbuf) == height) {
gdk_draw_pixbuf(current_drawable, current_gc,
pixbuf,
16 years, 7 months
r3163 jmb - /trunk/netsurfbuild/autobuild.pl
by netsurf@semichrome.net
Author: jmb
Date: Fri Feb 2 16:41:32 2007
New Revision: 3163
URL: http://svn.semichrome.net?rev=3163&view=rev
Log:
Make autobuilder generate new version information.
Modified:
trunk/netsurfbuild/autobuild.pl
Modified: trunk/netsurfbuild/autobuild.pl
URL: http://svn.semichrome.net/trunk/netsurfbuild/autobuild.pl?rev=3163&r1=316...
==============================================================================
--- trunk/netsurfbuild/autobuild.pl (original)
+++ trunk/netsurfbuild/autobuild.pl Fri Feb 2 16:41:32 2007
@@ -76,7 +76,9 @@
# create version.c
save('netsurf/desktop/version.c',
- "const char * const netsurf_version = \"$version\";\n");
+ "const char * const netsurf_version = \"$version\";\n" .
+ "const int netsurf_version_major = 0;\n" .
+ "const int netsurf_version_minor = 0;\n");
# build RISC OS version
chdir "$root/netsurf";
16 years, 7 months
r3162 rjek - /trunk/netsurf/gtk/gtk_plotters.c
by netsurf@semichrome.net
Author: rjek
Date: Fri Feb 2 11:45:54 2007
New Revision: 3162
URL: http://svn.semichrome.net?rev=3162&view=rev
Log:
Fix off-by-one in nsgtk image plotter that resulted in all images being subject to a bilinear resample.
Modified:
trunk/netsurf/gtk/gtk_plotters.c
Modified: trunk/netsurf/gtk/gtk_plotters.c
URL: http://svn.semichrome.net/trunk/netsurf/gtk/gtk_plotters.c?rev=3162&r1=31...
==============================================================================
--- trunk/netsurf/gtk/gtk_plotters.c (original)
+++ trunk/netsurf/gtk/gtk_plotters.c Fri Feb 2 11:45:54 2007
@@ -277,7 +277,7 @@
width++; /* TODO: investigate why this is required */
- if (gdk_pixbuf_get_width(pixbuf) == width &&
+ if (gdk_pixbuf_get_width(pixbuf) == (width - 1) &&
gdk_pixbuf_get_height(pixbuf) == height) {
gdk_draw_pixbuf(current_drawable, current_gc,
pixbuf,
16 years, 7 months
r3161 rjek - in /trunk/netsurf: gtk/gtk_gui.c gtk/res/netsurf.glade makefile
by netsurf@semichrome.net
Author: rjek
Date: Fri Feb 2 11:34:13 2007
New Revision: 3161
URL: http://svn.semichrome.net?rev=3161&view=rev
Log:
Misc nsgtk fixes and improvements in makefile, choices dialogue and info window
Modified:
trunk/netsurf/gtk/gtk_gui.c
trunk/netsurf/gtk/res/netsurf.glade
trunk/netsurf/makefile
Modified: trunk/netsurf/gtk/gtk_gui.c
URL: http://svn.semichrome.net/trunk/netsurf/gtk/gtk_gui.c?rev=3161&r1=3160&r2...
==============================================================================
--- trunk/netsurf/gtk/gtk_gui.c (original)
+++ trunk/netsurf/gtk/gtk_gui.c Fri Feb 2 11:34:13 2007
@@ -143,6 +143,7 @@
void gui_init(int argc, char** argv)
{
char buf[PATH_MAX];
+ PangoFontDescription *fontdesc;
gtk_init(&argc, &argv);
@@ -227,6 +228,9 @@
gtk_image_set_from_file(GTK_IMAGE(
glade_xml_get_widget(gladeWindows, "imageLogo")),
find_resource(buf, "netsurf-logo.png", "netsurf-logo.png"));
+ fontdesc = pango_font_description_from_string("Monospace 8");
+ gtk_widget_modify_font(GTK_WIDGET(
+ glade_xml_get_widget(gladeWindows, "textviewGPL")), fontdesc);
nsgtk_history_init();
}
Modified: trunk/netsurf/gtk/res/netsurf.glade
URL: http://svn.semichrome.net/trunk/netsurf/gtk/res/netsurf.glade?rev=3161&r1...
==============================================================================
--- trunk/netsurf/gtk/res/netsurf.glade (original)
+++ trunk/netsurf/gtk/res/netsurf.glade Fri Feb 2 11:34:13 2007
@@ -1839,7 +1839,7 @@
<property name="can_focus">True</property>
<property name="show_tabs">True</property>
<property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_LEFT</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">False</property>
<property name="enable_popup">False</property>
@@ -4740,10 +4740,11 @@
<child>
<widget class="GtkNotebook" id="notebook4">
<property name="border_width">4</property>
+ <property name="width_request">575</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_tabs">True</property>
- <property name="show_border">True</property>
+ <property name="show_border">False</property>
<property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">False</property>
<property name="enable_popup">False</property>
@@ -4874,7 +4875,7 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkTextView" id="textview7">
+ <widget class="GtkTextView" id="textviewGPL">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
@@ -4889,7 +4890,7 @@
<property name="left_margin">0</property>
<property name="right_margin">0</property>
<property name="indent">0</property>
- <property name="text" translatable="yes"> GNU GENERAL PUBLIC LICENSE
+ <property name="text" translatable="yes"> GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
Modified: trunk/netsurf/makefile
URL: http://svn.semichrome.net/trunk/netsurf/makefile?rev=3161&r1=3160&r2=3161...
==============================================================================
--- trunk/netsurf/makefile (original)
+++ trunk/netsurf/makefile Fri Feb 2 11:34:13 2007
@@ -130,7 +130,7 @@
CFLAGS_DEBUG = -std=c99 -D_BSD_SOURCE -DDEBUG_BUILD $(WARNFLAGS) -I.. \
$(PLATFORM_CFLAGS_DEBUG) -g
CFLAGS_GTK = -Dnsgtk -std=c99 -D_BSD_SOURCE -Dgtk \
- $(WARNFLAGS) -I.. -g -O0 -Wformat=2 -DNDEBUG \
+ $(WARNFLAGS) -I.. -g -O0 -Wformat=2 \
`pkg-config --cflags libglade-2.0 gtk+-2.0` `xml2-config --cflags`
# Stop GCC under Cygwin throwing a fit
16 years, 7 months