summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2006-08-18 00:38:35 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2006-08-18 00:38:35 +0000
commitf8b8cf5e836338bd48812a51dd826171af0d16c6 (patch)
tree6615b825d64ebd418654a0b12ffde299aa63bb84 /gtk
parentc6eeed815e1871bd9a64bd54fd3e866e54882a05 (diff)
downloadnetsurf-f8b8cf5e836338bd48812a51dd826171af0d16c6.tar.gz
netsurf-f8b8cf5e836338bd48812a51dd826171af0d16c6.tar.bz2
Further Choices improvements in nsgtk; most of them now work correctly.
svn path=/trunk/netsurf/; revision=2865
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtk_options.c43
-rw-r--r--gtk/netsurf.glade15
2 files changed, 45 insertions, 13 deletions
diff --git a/gtk/gtk_options.c b/gtk/gtk_options.c
index 4f236ee6f..9a2f7b8e5 100644
--- a/gtk/gtk_options.c
+++ b/gtk/gtk_options.c
@@ -113,25 +113,25 @@ void nsgtk_options_load(void) {
SET_ENTRY(entryHomePageURL, option_homepage_url);
SET_CHECK(checkHideAdverts, option_block_ads);
- /* TODO: rest of "General" tab here */
SET_CHECK(checkDisplayRecentURLs, option_url_suggestion);
SET_CHECK(checkSendReferer, option_send_referer);
+ SET_COMBO(comboProxyType, option_http_proxy_auth);
SET_ENTRY(entryProxyHost, option_http_proxy_host);
snprintf(b, 20, "%d", option_http_proxy_port);
SET_ENTRY(entryProxyPort, b);
SET_ENTRY(entryProxyUser, option_http_proxy_auth_user);
SET_ENTRY(entryProxyPassword, option_http_proxy_auth_pass);
+
SET_SPIN(spinMaxFetchers, option_max_fetchers);
SET_SPIN(spinFetchesPerHost, option_max_fetchers_per_host);
SET_SPIN(spinCachedConnections, option_max_cached_fetch_handles);
- /* TODO: set checkResampleImages here */
SET_CHECK(checkUseCairo, option_render_cairo);
+ SET_CHECK(checkResampleImages, option_render_resample);
SET_SPIN(spinAnimationSpeed, option_minimum_gif_delay);
SET_CHECK(checkDisableAnimations, !option_animate_images);
- /* TODO: set all font name widgets here */
SET_FONT(fontSansSerif, option_font_sans);
SET_FONT(fontSerif, option_font_serif);
SET_FONT(fontMonospace, option_font_mono);
@@ -154,11 +154,46 @@ void nsgtk_options_load(void) {
(y) = strdup(gtk_font_button_get_font_name(GTK_FONT_BUTTON((x))))
void nsgtk_options_save(void) {
+ char *b = NULL;
+ int i;
+
GET_ENTRY(entryHomePageURL, option_homepage_url);
GET_CHECK(checkDisplayRecentURLs, option_url_suggestion);
+ GET_COMBO(comboProxyType, i);
+ option_http_proxy = (i > 0) ? true : false;
+ switch (i)
+ {
+ case 0:
+ case 1:
+ option_http_proxy_auth = OPTION_HTTP_PROXY_AUTH_NONE;
+ break;
+ case 2:
+ option_http_proxy_auth = OPTION_HTTP_PROXY_AUTH_BASIC;
+ break;
+ case 3:
+ option_http_proxy_auth = OPTION_HTTP_PROXY_AUTH_NTLM;
+ break;
+ default:
+ option_http_proxy_auth = OPTION_HTTP_PROXY_AUTH_NONE;
+ break;
+ }
+
+ GET_ENTRY(entryProxyHost, option_http_proxy_host);
+ GET_ENTRY(entryProxyPort, b);
+ option_http_proxy_port = atoi(b);
+ free(b);
+ GET_ENTRY(entryProxyUser, option_http_proxy_auth_user);
+ GET_ENTRY(entryProxyPassword, option_http_proxy_auth_pass);
+
+ GET_SPIN(spinMaxFetchers, option_max_fetchers);
+ GET_SPIN(spinFetchesPerHost, option_max_fetchers_per_host);
+ GET_SPIN(spinCachedConnections, option_max_cached_fetch_handles);
+
GET_CHECK(checkUseCairo, option_render_cairo);
GET_CHECK(checkResampleImages, option_render_resample);
+ GET_SPIN(spinAnimationSpeed, option_minimum_gif_delay);
+ option_minimum_gif_delay *= 10;
GET_FONT(fontSansSerif, option_font_sans);
GET_FONT(fontSerif, option_font_serif);
@@ -172,8 +207,6 @@ void nsgtk_options_save(void) {
option_font_size *= 10;
GET_SPIN(spinMinimumSize, option_font_min_size);
option_font_min_size *= 10;
-
- /* TODO: save the other options */
options_write(options_file_location);
nsgtk_reflow_all_windows();
diff --git a/gtk/netsurf.glade b/gtk/netsurf.glade
index 1fb0fa0a7..9509cbfc0 100644
--- a/gtk/netsurf.glade
+++ b/gtk/netsurf.glade
@@ -2454,11 +2454,10 @@
<child>
<widget class="GtkComboBox" id="comboProxyType">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="items" translatable="yes">None
+ <property name="items" translatable="yes">No proxy
Simple proxy
Basic authentication
-NTML authentication</property>
+NTLM authentication</property>
<property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property>
</widget>
@@ -2671,11 +2670,11 @@ NTML authentication</property>
<property name="tooltip" translatable="yes">If your proxy server requires authentication, enter your password here.</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
- <property name="visibility">True</property>
+ <property name="visibility">False</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
- <property name="invisible_char">‚óŹ</property>
+ <property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
@@ -3130,12 +3129,12 @@ NTML authentication</property>
<property name="tooltip" translatable="yes">Do not update animations any more often than this.</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
- <property name="digits">0</property>
+ <property name="digits">1</property>
<property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="update_policy">GTK_UPDATE_IF_VALID</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">0.10000000149 0 100 0.10000000149 10 10</property>
+ <property name="adjustment">0 0 100 0.10000000149 1 1</property>
</widget>
<packing>
<property name="padding">0</property>