summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/font_pango.c17
-rw-r--r--gtk/font_pango.h18
-rw-r--r--gtk/gtk_bitmap.c27
-rw-r--r--gtk/gtk_bitmap.h17
-rw-r--r--gtk/gtk_completion.c18
-rw-r--r--gtk/gtk_completion.h17
-rw-r--r--gtk/gtk_filetype.c100
-rw-r--r--gtk/gtk_filetype.h19
-rw-r--r--gtk/gtk_gui.c17
-rw-r--r--gtk/gtk_gui.h17
-rw-r--r--gtk/gtk_history.c17
-rw-r--r--gtk/gtk_history.h17
-rw-r--r--gtk/gtk_login.c17
-rw-r--r--gtk/gtk_options.c18
-rw-r--r--gtk/gtk_options.h17
-rw-r--r--gtk/gtk_plotters.c18
-rw-r--r--gtk/gtk_plotters.h17
-rw-r--r--gtk/gtk_scaffolding.c37
-rw-r--r--gtk/gtk_scaffolding.h17
-rw-r--r--gtk/gtk_schedule.c27
-rw-r--r--gtk/gtk_schedule.h17
-rw-r--r--gtk/gtk_throbber.c17
-rw-r--r--gtk/gtk_throbber.h17
-rw-r--r--gtk/gtk_thumbnail.c18
-rw-r--r--gtk/gtk_treeview.c19
-rw-r--r--gtk/gtk_window.c101
-rw-r--r--gtk/gtk_window.h17
-rw-r--r--gtk/options.h17
28 files changed, 495 insertions, 197 deletions
diff --git a/gtk/font_pango.c b/gtk/font_pango.c
index b03bfd79a..553b83905 100644
--- a/gtk/font_pango.c
+++ b/gtk/font_pango.c
@@ -1,8 +1,19 @@
/*
- * 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 2005 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file
diff --git a/gtk/font_pango.h b/gtk/font_pango.h
index b99629834..b3b08b95a 100644
--- a/gtk/font_pango.h
+++ b/gtk/font_pango.h
@@ -1,8 +1,19 @@
/*
- * 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 2005 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file
@@ -17,4 +28,3 @@ struct css_style;
bool nsfont_paint(const struct css_style *style,
const char *string, size_t length,
int x, int y, colour c);
-
diff --git a/gtk/gtk_bitmap.c b/gtk/gtk_bitmap.c
index 4701a7b5d..533159c23 100644
--- a/gtk/gtk_bitmap.c
+++ b/gtk/gtk_bitmap.c
@@ -1,8 +1,19 @@
/*
- * 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 2004 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file
@@ -46,7 +57,7 @@ struct bitmap {
struct bitmap *bitmap_create(int width, int height, unsigned int state)
{
struct bitmap *bmp = malloc(sizeof(struct bitmap));
-
+
bmp->primary = gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8,
width, height);
@@ -166,13 +177,13 @@ void bitmap_destroy(struct bitmap *bitmap)
bool bitmap_save(struct bitmap *bitmap, const char *path)
{
GError *err = NULL;
-
+
gdk_pixbuf_save(bitmap->primary, path, "png", &err, NULL);
-
+
if (err == NULL)
/* TODO: report an error here */
return false;
-
+
return true;
}
@@ -210,7 +221,7 @@ gtk_bitmap_generate_pretile(GdkPixbuf *primary, int repeat_x, int repeat_y)
char *target_buffer = (char *)gdk_pixbuf_get_pixels(result);
int x,y,row;
/* This algorithm won't work if the strides are not multiples */
- assert((size_t)gdk_pixbuf_get_rowstride(result) ==
+ assert((size_t)gdk_pixbuf_get_rowstride(result) ==
(primary_stride * repeat_x));
if (repeat_x == 1 && repeat_y == 1) {
diff --git a/gtk/gtk_bitmap.h b/gtk/gtk_bitmap.h
index edbeb75fb..d936f7d76 100644
--- a/gtk/gtk_bitmap.h
+++ b/gtk/gtk_bitmap.h
@@ -1,8 +1,19 @@
/*
- * 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 2006 Daniel Silverstone <dsilvers@digital-scurf.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NS_GTK_BITMAP_H
diff --git a/gtk/gtk_completion.c b/gtk/gtk_completion.c
index 4dbe41eca..8566f1c6d 100644
--- a/gtk/gtk_completion.c
+++ b/gtk/gtk_completion.c
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gtk/gtk.h>
@@ -61,4 +72,3 @@ void nsgtk_completion_update(const char *prefix)
if (option_url_suggestion == true)
urldb_iterate_partial(prefix, nsgtk_completion_udb_callback);
}
-
diff --git a/gtk/gtk_completion.h b/gtk/gtk_completion.h
index bccf4084f..67de43d8e 100644
--- a/gtk/gtk_completion.h
+++ b/gtk/gtk_completion.h
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _NETSURF_GTK_COMPLETION_H_
diff --git a/gtk/gtk_filetype.c b/gtk/gtk_filetype.c
index 290065cc4..2ae2a1fea 100644
--- a/gtk/gtk_filetype.c
+++ b/gtk/gtk_filetype.c
@@ -1,11 +1,22 @@
/*
- * 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@netsurf-browser.org>
* Copyright 2007 Vincent Sanders <vince@debian.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
+
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
@@ -28,23 +39,23 @@ void gtk_fetch_filetype_init(const char *mimefile)
FILE *fh = NULL;
mime_hash = hash_create(117);
-
+
/* first, check to see if /etc/mime.types in preference */
-
+
if ((stat("/etc/mime.types", &statbuf) == 0) &&
S_ISREG(statbuf.st_mode)) {
- mimefile = "/etc/mime.types";
-
+ mimefile = "/etc/mime.types";
+
}
-
+
fh = fopen(mimefile, "r");
-
+
/* Some OSes (mentioning no Solarises) have a worthlessly tiny
* /etc/mime.types that don't include essential things, so we
* pre-seed our hash with the essentials. These will get
* over-ridden if they are mentioned in the mime.types file.
*/
-
+
hash_add(mime_hash, "css", "text/css");
hash_add(mime_hash, "jpg", "image/jpeg");
hash_add(mime_hash, "jpeg", "image/jpeg");
@@ -56,52 +67,52 @@ void gtk_fetch_filetype_init(const char *mimefile)
LOG(("Unable to open a mime.types file, so using a minimal one for you."));
return;
}
-
+
while (!feof(fh)) {
char line[256], *ptr, *type, *ext;
fgets(line, 256, fh);
if (!feof(fh) && line[0] != '#') {
ptr = line;
-
+
/* search for the first non-whitespace character */
while (isspace(*ptr))
ptr++;
-
+
/* is this line empty other than leading whitespace? */
if (*ptr == '\n' || *ptr == '\0')
continue;
-
+
type = ptr;
-
+
/* search for the first non-whitespace char or NUL or
- * NL */
+ * NL */
while (*ptr && (!isspace(*ptr)) && *ptr != '\n')
ptr++;
-
+
if (*ptr == '\0' || *ptr == '\n') {
/* this mimetype has no extensions - read next
* line.
*/
continue;
}
-
+
*ptr++ = '\0';
-
+
/* search for the first non-whitespace character which
* will be the first filename extenion */
while (isspace(*ptr))
ptr++;
-
+
while(true) {
ext = ptr;
-
+
/* search for the first whitespace char or
* NUL or NL which is the end of the ext.
- */
+ */
while (*ptr && (!isspace(*ptr)) &&
*ptr != '\n')
ptr++;
-
+
if (*ptr == '\0' || *ptr == '\n') {
/* special case for last extension on
* the line
@@ -110,19 +121,19 @@ void gtk_fetch_filetype_init(const char *mimefile)
hash_add(mime_hash, ext, type);
break;
}
-
+
*ptr++ = '\0';
hash_add(mime_hash, ext, type);
-
+
/* search for the first non-whitespace char or
* NUL or NL, to find start of next ext.
- */
+ */
while (*ptr && (isspace(*ptr)) && *ptr != '\n')
- ptr++;
+ ptr++;
}
}
}
-
+
fclose(fh);
}
@@ -138,25 +149,25 @@ const char *fetch_filetype(const char *unix_path)
const char *ptr;
char *lowerchar;
const char *type;
-
+
stat(unix_path, &statbuf);
if (S_ISDIR(statbuf.st_mode))
return "application/x-netsurf-directory";
-
+
if (strchr(unix_path, '.') == NULL) {
/* no extension anywhere! */
return "text/plain";
}
-
+
ptr = unix_path + strlen(unix_path);
while (*ptr != '.' && *ptr != '/')
ptr--;
-
+
if (*ptr != '.')
return "text/plain";
-
+
ext = strdup(ptr + 1); /* skip the . */
-
+
/* the hash table only contains lower-case versions - make sure this
* copy is lower case too.
*/
@@ -165,11 +176,11 @@ const char *fetch_filetype(const char *unix_path)
*lowerchar = tolower(*lowerchar);
lowerchar++;
}
-
+
type = hash_get(mime_hash, ext);
free(ext);
-
- return type != NULL ? type : "text/plain";
+
+ return type != NULL ? type : "text/plain";
}
char *fetch_mimetype(const char *unix_path)
@@ -183,23 +194,22 @@ int main(int argc, char *argv[])
{
unsigned int c1, *c2;
const char *key;
-
+
gtk_fetch_filetype_init("./mime.types");
-
+
c1 = 0; c2 = 0;
-
+
while ( (key = hash_iterate(mime_hash, &c1, &c2)) != NULL) {
printf("%s ", key);
}
-
+
printf("\n");
-
+
if (argc > 1) {
printf("%s maps to %s\n", argv[1], fetch_filetype(argv[1]));
}
-
+
gtk_fetch_filetype_fin();
}
#endif
-
diff --git a/gtk/gtk_filetype.h b/gtk/gtk_filetype.h
index e0bab6c3e..8bf98db7c 100644
--- a/gtk/gtk_filetype.h
+++ b/gtk/gtk_filetype.h
@@ -1,12 +1,21 @@
/*
- * 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@netsurf-browser.org>
* Copyright 2007 Vincent Sanders <vince@debian.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
void gtk_fetch_filetype_init(const char *mimefile);
void gtk_fetch_filetype_fin(void);
-
-
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c
index 06c83027c..9939d5756 100644
--- a/gtk/gtk_gui.c
+++ b/gtk/gtk_gui.c
@@ -1,8 +1,19 @@
/*
- * 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 2005 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _GNU_SOURCE /* for strndup */
diff --git a/gtk/gtk_gui.h b/gtk/gtk_gui.h
index 4b054cfb0..cf4703fff 100644
--- a/gtk/gtk_gui.h
+++ b/gtk/gtk_gui.h
@@ -1,8 +1,19 @@
/*
- * 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 2005 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
diff --git a/gtk/gtk_history.c b/gtk/gtk_history.c
index 72f41538a..349643e56 100644
--- a/gtk/gtk_history.c
+++ b/gtk/gtk_history.c
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gtk/gtk.h>
diff --git a/gtk/gtk_history.h b/gtk/gtk_history.h
index 8648e5ddd..13b76358f 100644
--- a/gtk/gtk_history.h
+++ b/gtk/gtk_history.h
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __NSGTK_HISTORY_H__
diff --git a/gtk/gtk_login.c b/gtk/gtk_login.c
index c3b558d55..d2535515e 100644
--- a/gtk/gtk_login.c
+++ b/gtk/gtk_login.c
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/gtk/gtk_options.c b/gtk/gtk_options.c
index 5bc6644aa..b01e34df4 100644
--- a/gtk/gtk_options.c
+++ b/gtk/gtk_options.c
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
@@ -216,4 +227,3 @@ void nsgtk_options_save(void) {
options_write(options_file_location);
nsgtk_reflow_all_windows();
}
-
diff --git a/gtk/gtk_options.h b/gtk/gtk_options.h
index 15a7e934d..9ba6347b0 100644
--- a/gtk/gtk_options.h
+++ b/gtk/gtk_options.h
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETSURF_GTK_OPTIONS_H
diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c
index 99a30a9c6..9f40f3694 100644
--- a/gtk/gtk_plotters.c
+++ b/gtk/gtk_plotters.c
@@ -1,9 +1,20 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
* Copyright 2005 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file
@@ -472,4 +483,3 @@ void nsgtk_plot_caret(int x, int y, int h)
x, y,
x, y + h - 1);
}
-
diff --git a/gtk/gtk_plotters.h b/gtk/gtk_plotters.h
index 69a765110..2fb940904 100644
--- a/gtk/gtk_plotters.h
+++ b/gtk/gtk_plotters.h
@@ -1,8 +1,19 @@
/*
- * 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 2005 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file
diff --git a/gtk/gtk_scaffolding.c b/gtk/gtk_scaffolding.c
index 5fcaed4a4..8061de2f0 100644
--- a/gtk/gtk_scaffolding.c
+++ b/gtk/gtk_scaffolding.c
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
@@ -474,39 +485,39 @@ MENUHANDLER(full_screen)
MENUHANDLER(menu_bar)
{
struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
-
+
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
gtk_widget_show(GTK_WIDGET(gw->menu_bar));
} else {
gtk_widget_hide(GTK_WIDGET(gw->menu_bar));
}
-
+
return TRUE;
}
MENUHANDLER(tool_bar)
{
struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
-
+
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
gtk_widget_show(GTK_WIDGET(gw->tool_bar));
} else {
gtk_widget_hide(GTK_WIDGET(gw->tool_bar));
}
-
+
return TRUE;
}
MENUHANDLER(status_bar)
{
struct gtk_scaffolding *gw = (struct gtk_scaffolding *)g;
-
+
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
gtk_widget_show(GTK_WIDGET(gw->status_bar));
} else {
gtk_widget_hide(GTK_WIDGET(gw->status_bar));
}
-
+
return TRUE;
}
@@ -809,21 +820,21 @@ nsgtk_scaffolding *nsgtk_new_scaffolding(struct gui_window *toplevel)
g->being_destroyed = 0;
g->fullscreen = false;
-
+
/* create the popup version of the menu */
g->popup_xml = glade_xml_new(glade_file_location, "menuPopup", NULL);
g->popup_menu = GTK_MENU(glade_xml_get_widget(g->popup_xml, "menuPopup"));
-
+
#define POPUP_ATTACH(x, y) gtk_menu_item_set_submenu( \
GTK_MENU_ITEM(glade_xml_get_widget(g->popup_xml, x)),\
GTK_WIDGET(glade_xml_get_widget(g->xml, y)))
-
+
POPUP_ATTACH("menupopup_file", "menumain_file");
POPUP_ATTACH("menupopup_edit", "menumain_edit");
POPUP_ATTACH("menupopup_view", "menumain_view");
POPUP_ATTACH("menupopup_navigate", "menumain_navigate");
POPUP_ATTACH("menupopup_help", "menumain_help");
-
+
#undef POPUP_ATTACH
/* finally, show the window. */
diff --git a/gtk/gtk_scaffolding.h b/gtk/gtk_scaffolding.h
index 361b0d42f..8e3084316 100644
--- a/gtk/gtk_scaffolding.h
+++ b/gtk/gtk_scaffolding.h
@@ -1,8 +1,19 @@
/*
- * 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 2005 James Bursa <bursa@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETSURF_GTK_SCAFFOLDING_H
diff --git a/gtk/gtk_schedule.c b/gtk/gtk_schedule.c
index 2bee6b6c5..4fffd1691 100644
--- a/gtk/gtk_schedule.c
+++ b/gtk/gtk_schedule.c
@@ -1,8 +1,19 @@
/*
- * 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 2006-2007 Daniel Silverstone <dsilvers@digital-scurf.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
@@ -72,7 +83,7 @@ schedule_remove(void (*callback)(void *p), void *p)
.callback = callback,
.context = p,
};
-
+
g_list_foreach(queued_callbacks,
nsgtk_schedule_kill_callback, &cb_match);
g_list_foreach(pending_callbacks,
@@ -101,15 +112,15 @@ schedule_run(void)
{
/* Capture this run of pending callbacks into the list. */
this_run = pending_callbacks;
-
+
if (this_run == NULL)
return; /* Nothing to do */
-
+
/* Clear the pending list. */
pending_callbacks = NULL;
-
+
LOG(("Captured a run of %d callbacks to fire.", g_list_length(this_run)));
-
+
/* Run all the callbacks which made it this far. */
while (this_run != NULL) {
_nsgtk_callback_t *cb = (_nsgtk_callback_t *)(this_run->data);
diff --git a/gtk/gtk_schedule.h b/gtk/gtk_schedule.h
index 2c5d618e7..f26714453 100644
--- a/gtk/gtk_schedule.h
+++ b/gtk/gtk_schedule.h
@@ -1,8 +1,19 @@
/*
- * 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 2006 Daniel Silverstone <dsilvers@digital-scurf.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETSURF_GTK_CALLBACK_H
diff --git a/gtk/gtk_throbber.c b/gtk/gtk_throbber.c
index 49c546b4f..9bf5a10df 100644
--- a/gtk/gtk_throbber.c
+++ b/gtk/gtk_throbber.c
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
diff --git a/gtk/gtk_throbber.h b/gtk/gtk_throbber.h
index 04fb912c9..d4ff2cd41 100644
--- a/gtk/gtk_throbber.h
+++ b/gtk/gtk_throbber.h
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_THROBBER_H__
diff --git a/gtk/gtk_thumbnail.c b/gtk/gtk_thumbnail.c
index 5c456e6f0..b1d7149af 100644
--- a/gtk/gtk_thumbnail.c
+++ b/gtk/gtk_thumbnail.c
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file
@@ -93,4 +104,3 @@ bool thumbnail_create(struct content *content, struct bitmap *bitmap,
return true;
}
-
diff --git a/gtk/gtk_treeview.c b/gtk/gtk_treeview.c
index 3fd32b840..6e5643009 100644
--- a/gtk/gtk_treeview.c
+++ b/gtk/gtk_treeview.c
@@ -1,8 +1,19 @@
/*
- * 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 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file
@@ -114,5 +125,3 @@ void tree_update_URL_node(struct node *node, const char *url,
*/
void tree_resized(struct tree *tree) {
}
-
-
diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c
index 0954dd4bc..e59e5c081 100644
--- a/gtk/gtk_window.c
+++ b/gtk/gtk_window.c
@@ -1,9 +1,20 @@
/*
- * 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 2006 Daniel Silverstone <dsilvers@digital-scurf.org>
* Copyright 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gtk/gtk_window.h"
@@ -25,12 +36,12 @@ struct gui_window {
nsgtk_scaffolding *scaffold;
/* A gui_window is the rendering of a browser_window */
struct browser_window *bw;
-
+
/* These are the storage for the rendering */
int caretx, carety, careth;
gui_pointer_shape current_pointer;
int last_x, last_y;
-
+
/* Within GTK, a gui_window is a scrolled window
* with a viewport inside
* with a gtkfixed in that
@@ -43,7 +54,7 @@ struct gui_window {
GtkViewport *viewport;
GtkFixed *fixed;
GtkDrawingArea *drawing_area;
-
+
/* Keep gui_windows in a list for cleanup later */
struct gui_window *next, *prev;
};
@@ -89,15 +100,15 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
{
struct gui_window *g; /**< what we're creating to return */
GtkPolicyType scrollpolicy;
-
+
g = malloc(sizeof(*g));
if (!g) {
warn_user("NoMemory", 0);
return 0;
}
-
+
LOG(("Creating gui window %p for browser window %p", g, bw));
-
+
g->bw = bw;
g->current_pointer = GUI_POINTER_DEFAULT;
if (clone != NULL)
@@ -106,14 +117,14 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
bw->scale = (float) option_scale / 100;
g->careth = 0;
-
+
/* Attach ourselves to the list (push_top) */
if (window_list)
window_list->prev = g;
g->next = window_list;
g->prev = NULL;
window_list = g;
-
+
if (bw->parent != NULL) {
/* Find our parent's scaffolding */
g->scaffold = bw->parent->window->scaffold;
@@ -121,16 +132,16 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
/* Now construct and attach a scaffold */
g->scaffold = nsgtk_new_scaffolding(g);
}
-
+
/* Construct our primary elements */
g->fixed = GTK_FIXED(gtk_fixed_new());
g->drawing_area = GTK_DRAWING_AREA(gtk_drawing_area_new());
gtk_fixed_put(g->fixed, GTK_WIDGET(g->drawing_area), 0, 0);
gtk_container_set_border_width(GTK_CONTAINER(g->fixed), 0);
-
+
if (bw->parent != NULL ) {
g->scrolledwindow = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(NULL, NULL));
- gtk_scrolled_window_add_with_viewport(g->scrolledwindow,
+ gtk_scrolled_window_add_with_viewport(g->scrolledwindow,
GTK_WIDGET(g->fixed));
gtk_scrolled_window_set_shadow_type(g->scrolledwindow,
GTK_SHADOW_NONE);
@@ -141,11 +152,11 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
g->scrolledwindow = 0;
g->viewport = GTK_VIEWPORT(gtk_viewport_new(NULL, NULL)); /* Need to attach adjustments */
gtk_container_add(GTK_CONTAINER(g->viewport), GTK_WIDGET(g->fixed));
-
+
/* Attach our viewport into the scaffold */
nsgtk_attach_toplevel_viewport(g->scaffold, g->viewport);
}
-
+
gtk_container_set_border_width(GTK_CONTAINER(g->viewport), 0);
gtk_viewport_set_shadow_type(g->viewport, GTK_SHADOW_NONE);
if (g->scrolledwindow)
@@ -154,7 +165,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
gtk_widget_show(GTK_WIDGET(g->viewport));
gtk_widget_show(GTK_WIDGET(g->fixed));
gtk_widget_show(GTK_WIDGET(g->drawing_area));
-
+
switch(bw->scrolling) {
case SCROLLING_NO:
scrollpolicy = GTK_POLICY_NEVER;
@@ -167,7 +178,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
scrollpolicy = GTK_POLICY_AUTOMATIC;
break;
};
-
+
switch(bw->browser_window_type) {
case BROWSER_WINDOW_FRAMESET:
if (g->scrolledwindow)
@@ -194,7 +205,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
scrollpolicy);
break;
}
-
+
/* set the events we're interested in receiving from the browser's
* drawing area.
*/
@@ -222,7 +233,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
nsgtk_window_keypress_event, g);
CONNECT(g->viewport, "size_allocate",
nsgtk_window_size_allocate_event, g);
-
+
return g;
}
@@ -245,7 +256,7 @@ void gui_window_position_frame(struct gui_window *g, int x0, int y0, int x1, int
assert(w);
assert(f);
LOG(("%s: %d,%d %dx%d", g->bw->name, x0, y0, x1-x0+2, y1-y0+2));
-
+
/* if the window has not changed position or size, do not bother
* moving/resising it.
*/
@@ -286,7 +297,7 @@ gboolean nsgtk_window_expose_event(GtkWidget *widget,
/* HTML rendering handles scale itself */
if (c->type == CONTENT_HTML)
scale = 1;
-
+
current_widget = widget;
current_drawable = widget->window;
current_gc = gdk_gc_new(current_drawable);
@@ -348,9 +359,9 @@ gboolean nsgtk_window_button_press_event(GtkWidget *widget,
browser_window_mouse_click(g->bw, button,
event->x / g->bw->scale,
event->y / g->bw->scale);
-
+
gtk_widget_grab_focus(widget);
-
+
return TRUE;
}
@@ -404,12 +415,12 @@ gboolean nsgtk_window_keypress_event(GtkWidget *widget, GdkEventKey *event,
if (event->state == 0) {
double value;
GtkAdjustment *vscroll = gtk_viewport_get_vadjustment(g->viewport);
-
+
GtkAdjustment *hscroll = gtk_viewport_get_hadjustment(g->viewport);
-
+
GtkAdjustment *scroll;
-
- const GtkAllocation *const alloc =
+
+ const GtkAllocation *const alloc =
&GTK_WIDGET(g->viewport)->allocation;
switch (event->keyval) {
@@ -433,7 +444,7 @@ gboolean nsgtk_window_keypress_event(GtkWidget *widget, GdkEventKey *event,
case GDK_Left:
case GDK_KP_Left:
scroll = hscroll;
- value = gtk_adjustment_get_value(scroll) -
+ value = gtk_adjustment_get_value(scroll) -
scroll->step_increment;
if (value < scroll->lower)
value = scroll->lower;
@@ -442,7 +453,7 @@ gboolean nsgtk_window_keypress_event(GtkWidget *widget, GdkEventKey *event,
case GDK_Up:
case GDK_KP_Up:
scroll = vscroll;
- value = gtk_adjustment_get_value(scroll) -
+ value = gtk_adjustment_get_value(scroll) -
scroll->step_increment;
if (value < scroll->lower)
value = scroll->lower;
@@ -451,7 +462,7 @@ gboolean nsgtk_window_keypress_event(GtkWidget *widget, GdkEventKey *event,
case GDK_Right:
case GDK_KP_Right:
scroll = hscroll;
- value = gtk_adjustment_get_value(scroll) +
+ value = gtk_adjustment_get_value(scroll) +
scroll->step_increment;
if (value > scroll->upper - alloc->width)
value = scroll->upper - alloc->width;
@@ -460,7 +471,7 @@ gboolean nsgtk_window_keypress_event(GtkWidget *widget, GdkEventKey *event,
case GDK_Down:
case GDK_KP_Down:
scroll = vscroll;
- value = gtk_adjustment_get_value(scroll) +
+ value = gtk_adjustment_get_value(scroll) +
scroll->step_increment;
if (value > scroll->upper - alloc->height)
value = scroll->upper - alloc->height;
@@ -478,14 +489,14 @@ gboolean nsgtk_window_keypress_event(GtkWidget *widget, GdkEventKey *event,
case GDK_Page_Down:
case GDK_KP_Page_Down:
scroll = vscroll;
- value = gtk_adjustment_get_value(scroll) +
+ value = gtk_adjustment_get_value(scroll) +
scroll->page_increment;
if (value > scroll->upper - alloc->height)
value = scroll->upper - alloc->height;
break;
}
- gtk_adjustment_set_value(scroll, value);
+ gtk_adjustment_set_value(scroll, value);
}
return TRUE;
@@ -495,7 +506,7 @@ gboolean nsgtk_window_size_allocate_event(GtkWidget *widget,
GtkAllocation *allocation, gpointer data)
{
struct gui_window *g = data;
-
+
g->bw->reformat_pending = true;
browser_reformat_pending = true;
@@ -547,8 +558,8 @@ void gui_window_destroy(struct gui_window *g)
if (g->next)
g->next->prev = g->prev;
-
-
+
+
LOG(("Destroying gui_window %p", g));
assert(g != NULL);
assert(g->bw != NULL);
@@ -562,7 +573,7 @@ void gui_window_destroy(struct gui_window *g)
} else {
gtk_widget_destroy(GTK_WIDGET(g->scrolledwindow));
}
-
+
free(g);
}
@@ -604,13 +615,13 @@ bool gui_window_get_scroll(struct gui_window *g, int *sx, int *sy)
{
GtkAdjustment *vadj = gtk_viewport_get_vadjustment(g->viewport);
GtkAdjustment *hadj = gtk_viewport_get_hadjustment(g->viewport);
-
+
assert(vadj);
assert(hadj);
-
+
*sy = (int)(gtk_adjustment_get_value(vadj));
*sx = (int)(gtk_adjustment_get_value(hadj));
-
+
return true;
}
@@ -618,10 +629,10 @@ void gui_window_set_scroll(struct gui_window *g, int sx, int sy)
{
GtkAdjustment *vadj = gtk_viewport_get_vadjustment(g->viewport);
GtkAdjustment *hadj = gtk_viewport_get_hadjustment(g->viewport);
-
+
assert(vadj);
assert(hadj);
-
+
gtk_adjustment_set_value(vadj, (double)sy);
gtk_adjustment_set_value(hadj, (double)sx);
}
@@ -647,9 +658,9 @@ void gui_window_update_extent(struct gui_window *g)
gtk_widget_set_size_request(GTK_WIDGET(g->drawing_area),
g->bw->current_content->width * g->bw->scale,
g->bw->current_content->height * g->bw->scale);
-
+
gtk_widget_set_size_request(GTK_WIDGET(g->viewport), 0, 0);
-
+
}
void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
diff --git a/gtk/gtk_window.h b/gtk/gtk_window.h
index 7f9d6e9a5..7d62a217f 100644
--- a/gtk/gtk_window.h
+++ b/gtk/gtk_window.h
@@ -1,8 +1,19 @@
/*
- * 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 2006 Daniel Silverstone <dsilvers@digital-scurf.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETSURF_GTK_WINDOW_H
diff --git a/gtk/options.h b/gtk/options.h
index 71aef4c9d..00af12558 100644
--- a/gtk/options.h
+++ b/gtk/options.h
@@ -1,8 +1,19 @@
/*
- * 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 2006 Rob Kendrick <rjek@rjek.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _NETSURF_GTK_OPTIONS_H_