summaryrefslogtreecommitdiff
path: root/gtk/gtk_options.c
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2006-07-23 22:32:33 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2006-07-23 22:32:33 +0000
commit18d84f0c108c207f90d64803dd8834cfe6525374 (patch)
tree9c45f83a1b50fbe4fa4fda05f9f7e6c1673e0c6c /gtk/gtk_options.c
parent754b0c0c73d42dc85ba04f8bb0a7220c0f6a2ca9 (diff)
downloadnetsurf-18d84f0c108c207f90d64803dd8834cfe6525374.tar.gz
netsurf-18d84f0c108c207f90d64803dd8834cfe6525374.tar.bz2
Make Cairo rendering a run-time option in nsgtk - also add infrastructure for nsgtk-specific options.
svn path=/trunk/netsurf/; revision=2793
Diffstat (limited to 'gtk/gtk_options.c')
-rw-r--r--gtk/gtk_options.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtk_options.c b/gtk/gtk_options.c
index 86bf5ff54..5ee4ee8d8 100644
--- a/gtk/gtk_options.c
+++ b/gtk/gtk_options.c
@@ -12,8 +12,8 @@
#include <glade/glade.h>
#include "netsurf/utils/log.h"
#include "netsurf/desktop/options.h"
+#include "netsurf/gtk/options.h"
#include "netsurf/gtk/gtk_gui.h"
-#include "netsurf/desktop/options.h"
#include "netsurf/gtk/gtk_options.h"
GtkWindow *wndChoices;
@@ -102,8 +102,8 @@ void nsgtk_options_init(void) {
}
#define SET_ENTRY(x, y) gtk_entry_set_text(GTK_ENTRY((x)), (y))
-#define SET_SPIN(x, y) gtk_spin_button_set_value((x), (y))
-#define SET_CHECK(x, y) gtk_toggle_button_set_active((x), (y))
+#define SET_SPIN(x, y) gtk_spin_button_set_value(GTK_SPIN_BUTTON((x)), (y))
+#define SET_CHECK(x, y) gtk_toggle_button_set_active(GTK_CHECK_BUTTON((x)), (y))
void nsgtk_options_load(void) {
char *b[20];
@@ -122,7 +122,8 @@ void nsgtk_options_load(void) {
SET_SPIN(spinFetchesPerHost, option_max_fetchers_per_host);
SET_SPIN(spinCachedConnections, option_max_cached_fetch_handles);
- /* TODO: set checkUseCairo and checkReampleImages here */
+ /* TODO: set checkResampleImages here */
+ SET_CHECK(checkUseCairo, option_render_cairo);
SET_SPIN(spinAnimationSpeed, option_minimum_gif_delay);
SET_CHECK(checkDisableAnimations, !option_animate_images);
@@ -136,10 +137,12 @@ void nsgtk_options_load(void) {
#define GET_ENTRY(x, y) if ((y)) free((y)); \
(y) = strdup(gtk_entry_get_text(GTK_ENTRY((x))))
+#define GET_CHECK(x, y) (y) = gtk_toggle_button_get_active(GTK_CHECK_BUTTON((x)))
void nsgtk_options_save(void) {
GET_ENTRY(entryHomePageURL, option_homepage_url);
+ GET_CHECK(checkUseCairo, option_render_cairo);
/* TODO: save the other options */
options_write(options_file_location);