netsurf: branch mono/removing-windom-dependency updated. 695f0522370e43c5c6aa6b35a1c7c0ff93e5faa9
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/695f0522370e43c5c6aa6...
...commit http://git.netsurf-browser.org/netsurf.git/commit/695f0522370e43c5c6aa6b3...
...tree http://git.netsurf-browser.org/netsurf.git/tree/695f0522370e43c5c6aa6b35a...
The branch, mono/removing-windom-dependency has been updated
via 695f0522370e43c5c6aa6b35a1c7c0ff93e5faa9 (commit)
from f0f57e34314b1a2e3327ab0ae65ec840efa3ee3a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/695f0522370e43c5c6a...
commit 695f0522370e43c5c6aa6b35a1c7c0ff93e5faa9
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
Moved form handling into gemtk,
removed several windom includes
diff --git a/atari/bitmap.c b/atari/bitmap.c
index 1b5611f..c01fa4d 100755
--- a/atari/bitmap.c
+++ b/atari/bitmap.c
@@ -19,7 +19,6 @@
#include <inttypes.h>
#include <sys/types.h>
#include <string.h>
-#include <windom.h>
#include "assert.h"
diff --git a/atari/clipboard.c b/atari/clipboard.c
new file mode 100644
index 0000000..9b45e73
--- /dev/null
+++ b/atari/clipboard.c
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2013 Ole Loots <ole(a)monochrom.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/>.
+ *
+ * Module Description:
+ *
+ *
+ *
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdio.h>
+#include <mint/osbind.h>
+#include "atari/clipboard.h"
+
+
+static int filesize(char * path)
+{
+ FILE *f;
+ int fs;
+
+ f = fopen( path, "r+b");
+ if(!f)
+ return(-1);
+
+ fseek(f, 0L, SEEK_END);
+ fs = ftell(f);
+ fclose(f);
+
+ return(fs);
+}
+
+int scrap_txt_write(char *str)
+{
+ scrap_wtxt(str);
+}
+
+char *scrap_txt_read(void)
+{
+ char * buf = NULL;
+ char path[80];
+ int file;
+ int len;
+
+ if (get_scrapdir (path))
+ {
+ strcat (path, "scrap.txt");
+ len = filesize(path);
+ if(len > 0){
+ if ((file = (int) Fopen (path, 0)) >= 0)
+ {
+ buf = malloc(len);
+ if(buf){
+ len = Fread (file, len, buf);
+ Fclose (file);
+ buf[len] = '\0';
+ return buf;
+ }
+ }
+ }
+ }
+
+}
+
diff --git a/atari/clipboard.h b/atari/clipboard.h
index aa032b7..f35161e 100755
--- a/atari/clipboard.h
+++ b/atari/clipboard.h
@@ -18,10 +18,8 @@
#ifndef NS_ATARI_CLIPBOARD_H
#define NS_ATARI_CLIPBOARD_H
-
-#include <windom.h>
-int scrap_txt_write( APPvar app, char *str);
-char *scrap_txt_read( APPvar app );
+int scrap_txt_write(char *str);
+char *scrap_txt_read(void);
#endif
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c
index c9189af..035fbcc 100644
--- a/atari/ctxmenu.c
+++ b/atari/ctxmenu.c
@@ -208,14 +208,15 @@ void context_popup(struct gui_window * gw, short x, short y)
case POP_CTX_COPY_URL:
if( (ctx->flags & CNT_IMG) && (ctx->ccdata.object != NULL) ){
if( hlcache_handle_get_url(ctx->ccdata.object) != NULL ){
- scrap_txt_write(&app, (char*)nsurl_access(hlcache_handle_get_url(ctx->ccdata.object)) );
+ scrap_txt_write((char*)nsurl_access(
+ hlcache_handle_get_url(ctx->ccdata.object)));
}
}
break;
case POP_CTX_COPY_LINK:
if( (ctx->flags & CNT_HREF) && ctx->ccdata.link_url != NULL ){
- scrap_txt_write(&app, (char*)ctx->ccdata.link_url);
+ scrap_txt_write((char*)ctx->ccdata.link_url);
}
break;
diff --git a/atari/deskmenu.c b/atari/deskmenu.c
index 601ba99..4a6b083 100644
--- a/atari/deskmenu.c
+++ b/atari/deskmenu.c
@@ -1,5 +1,4 @@
#include <stdlib.h>
-#include <windom.h>
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/atari/download.c b/atari/download.c
index bf3105f..c01ac80 100755
--- a/atari/download.c
+++ b/atari/download.c
@@ -131,10 +131,10 @@ static void on_redraw(struct gui_download_window *dw, GRECT *clip)
/*
Update the AES Object to reflect current state of download:
*/
- ((TEDINFO *)get_obspec(tree, DOWNLOAD_FILENAME))->te_ptext = &dw->lbl_file;
- ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_BYTES))->te_ptext = &dw->lbl_done;
- ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_PERCENT))->te_ptext = &dw->lbl_percent;
- ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_SPEED))->te_ptext = &dw->lbl_speed;
+ ((TEDINFO *)get_obspec(tree, DOWNLOAD_FILENAME))->te_ptext = dw->lbl_file;
+ ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_BYTES))->te_ptext = dw->lbl_done;
+ ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_PERCENT))->te_ptext = dw->lbl_percent;
+ ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_SPEED))->te_ptext = dw->lbl_speed;
if (dw->size_total > 0 ) {
p = ((double)dw->size_downloaded / (double)dw->size_total * 100);
diff --git a/atari/encoding.h b/atari/encoding.h
index 7b9cc82..c85bac9 100644
--- a/atari/encoding.h
+++ b/atari/encoding.h
@@ -22,7 +22,6 @@
#include <inttypes.h>
#include <assert.h>
#include <stdbool.h>
-#include <windom.h>
#include "css/css.h"
#include "render/font.h"
diff --git a/atari/findfile.c b/atari/findfile.c
index 00502c9..d4c4c30 100755
--- a/atari/findfile.c
+++ b/atari/findfile.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <assert.h>
#include <curl/curl.h>
-#include <windom.h>
#include "utils/log.h"
#include "utils/url.h"
diff --git a/atari/font.c b/atari/font.c
index afb1209..dfa0efe 100755
--- a/atari/font.c
+++ b/atari/font.c
@@ -37,7 +37,6 @@
*/
#include <stdbool.h>
-#include <windom.h>
#include "css/css.h"
#include "render/font.h"
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h
index c77b0d9..b70ec06 100644
--- a/atari/gemtk/gemtk.h
+++ b/atari/gemtk/gemtk.h
@@ -1,14 +1,18 @@
#ifndef GEMTK_H_INCLUDED
#define GEMTK_H_INCLUDED
-#include <gem.h>
-#include <mint/osbind.h>
-#include <mint/cookie.h>
#include <stdint.h>
#include <stdbool.h>
+#include <mint/osbind.h>
+#include <mint/cookie.h>
+
+#include <gem.h>
+#include <cflib.h>
+
+
/* -------------------------------------------------------------------------- */
-/* Utils */
+/* SYSTEM UTILS */
/* -------------------------------------------------------------------------- */
/* System type detection added by [GS] */
@@ -28,7 +32,6 @@
extern unsigned short _systype_v;
unsigned short _systype (void);
-OBJECT *get_tree( int idx );
#ifndef POINT_WITHIN
# define POINT_WITHIN(_x,_y, r) ((_x >= r.g_x) && (_x <= r.g_x + r.g_w ) \
@@ -95,11 +98,23 @@ short msg_box_show(short type, const char * msg);
#define GW_STATUS_SHADED 0x02
#define GW_XTYPE_CHECKBOX (101 << 8)
+#define GW_CB_SELECTED (OS_SELECTED | OS_CROSSED)
#define GUIWIN_VSLIDER 0x01
#define GUIWIN_HSLIDER 0x02
#define GUIWIN_VH_SLIDER 0x03
+/*
+ Message sent to the client application when an AES object is
+ clicked in an window which contains an form.
+
+ Message Parameters:
+ msg[4] = Clicked Object.
+ msg[5] = Number of clicks.
+ msg[6] = Modifier keys.
+*/
+#define GUIWIN_WM_FORM 1001
+
struct gui_window_s;
typedef struct gui_window_s GUIWIN;
typedef short (*guiwin_event_handler_f)(GUIWIN *gw,
@@ -139,6 +154,7 @@ void *guiwin_get_user_data(GUIWIN *win);
struct guiwin_scroll_info_s * guiwin_get_scroll_info(GUIWIN *win);
void guiwin_set_scroll_grid(GUIWIN * win, short x, short y);
void guiwin_set_content_units(GUIWIN * win, short x, short y);
+void guiwin_set_form(GUIWIN *win, OBJECT *tree, short index);
bool guiwin_update_slider(GUIWIN *win, short mode);
void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh);
void guiwin_send_msg(GUIWIN *win, short msgtype, short a, short b, short c,
@@ -147,14 +163,22 @@ void guiwin_send_redraw(GUIWIN *win, GRECT *area);
VdiHdl guiwin_get_vdi_handle(GUIWIN *win);
bool guiwin_has_intersection(GUIWIN *win, GRECT *work);
void guiwin_toolbar_redraw(GUIWIN *win, GRECT *clip);
+void guiwin_form_redraw(GUIWIN *gw, GRECT *clip);
void guiwin_clear(GUIWIN *win);
/* -------------------------------------------------------------------------- */
-/* AES Scroller module */
+/* AES SCROLLER MODULE */
+/* -------------------------------------------------------------------------- */
+
+/* -------------------------------------------------------------------------- */
+/* AES TABS MODULE */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
-/* AES Tabs module */
+/* AES OBJECT TREE TOOLS */
/* -------------------------------------------------------------------------- */
+GRECT * obj_screen_rect(OBJECT * tree, short obj);
+bool obj_is_inside(OBJECT * tree, short obj, GRECT *area);
+OBJECT *get_tree(int idx);
#endif // GEMTK_H_INCLUDED
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index a471fc9..f0bb744 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -26,16 +26,21 @@
#include <mt_gem.h>
#include "gemtk.h"
-//#define DEBUG_PRINT(x) printf x
-#define DEBUG_PRINT(x)
+#define DEBUG_PRINT(x) printf x
+//#define DEBUG_PRINT(x)
struct gui_window_s {
short handle;
guiwin_event_handler_f handler_func;
uint32_t flags;
uint32_t state;
- OBJECT * toolbar;
+ OBJECT *toolbar;
+ short toolbar_edit_obj;
short toolbar_idx;
+ OBJECT *form;
+ short form_edit_obj;
+ short form_focus_obj;
+ short form_idx;
struct guiwin_scroll_info_s scroll_info;
void *user_data;
struct gui_window_s *next, *prev;
@@ -73,6 +78,10 @@ static void move_rect(GUIWIN * win, GRECT *rect, int dx, int dy)
wind_update(END_UPDATE);
}
+/**
+* Handles common events.
+* returns 0 when the event was not handled, 1 otherwise.
+*/
static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
{
GRECT g, g_ro, g2;
@@ -90,8 +99,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
if(val != slid->x_pos) {
if (val < slid->x_pos) {
val = -(MAX(0, slid->x_pos-val));
- }
- else {
+ } else {
val = val-slid->x_pos;
}
guiwin_scroll(gw, GUIWIN_HSLIDER, val, false);
@@ -106,8 +114,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
if(val != slid->y_pos) {
if (val < slid->y_pos) {
val = -(slid->y_pos - val);
- }
- else {
+ } else {
val = val -slid->y_pos;
}
guiwin_scroll(gw, GUIWIN_VSLIDER, val, false);
@@ -126,7 +133,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WA_UPPAGE:
/* scroll page up */
guiwin_scroll(gw, GUIWIN_VSLIDER, -(g.g_h/slid->y_unit_px),
- true);
+ true);
break;
case WA_UPLINE:
@@ -137,7 +144,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WA_DNPAGE:
/* scroll page down */
guiwin_scroll(gw, GUIWIN_VSLIDER, g.g_h/slid->y_unit_px,
- true);
+ true);
break;
case WA_DNLINE:
@@ -148,25 +155,25 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WA_LFPAGE:
/* scroll page left */
guiwin_scroll(gw, GUIWIN_HSLIDER, -(g.g_w/slid->x_unit_px),
- true);
+ true);
break;
case WA_LFLINE:
/* scroll line left */
guiwin_scroll(gw, GUIWIN_HSLIDER, -1,
- true);
+ true);
break;
case WA_RTPAGE:
/* scroll page right */
guiwin_scroll(gw, GUIWIN_HSLIDER, (g.g_w/slid->x_unit_px),
- true);
+ true);
break;
case WA_RTLINE:
/* scroll line right */
guiwin_scroll(gw, GUIWIN_HSLIDER, 1,
- true);
+ true);
break;
default:
@@ -182,21 +189,34 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WM_MOVED:
wind_get_grect(gw->handle, WF_CURRXYWH, &g);
wind_set(gw->handle, WF_CURRXYWH, msg[4], msg[5], g.g_w, g.g_h);
+
+ if (gw->form) {
+
+ guiwin_get_grect(gw, GUIWIN_AREA_CONTENT, &g);
+ slid = guiwin_get_scroll_info(gw);
+
+ gw->form[gw->form_idx].ob_x = g.g_x -
+ (slid->x_pos * slid->x_unit_px);
+
+ gw->form[gw->form_idx].ob_y = g.g_y -
+ (slid->y_pos * slid->y_unit_px);
+ }
+
break;
case WM_SIZED:
case WM_REPOSED:
- wind_get_grect(gw->handle, WF_FULLXYWH, &g2);
+ wind_get_grect(gw->handle, WF_FULLXYWH, &g2);
wind_get_grect(gw->handle, WF_CURRXYWH, &g);
g.g_w = MIN(msg[6], g2.g_w);
g.g_h = MIN(msg[7], g2.g_h);
- if(g2.g_w != g.g_w || g2.g_h != g.g_h){
- wind_set(gw->handle, WF_CURRXYWH, g.g_x, g.g_y, g.g_w, g.g_h);
- if((gw->flags & GW_FLAG_CUSTOM_SCROLLING) == 0) {
- if(guiwin_update_slider(gw, GUIWIN_VH_SLIDER)) {
- guiwin_send_redraw(gw, NULL);
- }
- }
+ if(g2.g_w != g.g_w || g2.g_h != g.g_h) {
+ wind_set(gw->handle, WF_CURRXYWH, g.g_x, g.g_y, g.g_w, g.g_h);
+ if((gw->flags & GW_FLAG_CUSTOM_SCROLLING) == 0) {
+ if(guiwin_update_slider(gw, GUIWIN_VH_SLIDER)) {
+ guiwin_send_redraw(gw, NULL);
+ }
+ }
}
@@ -205,7 +225,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WM_FULLED:
wind_get_grect(gw->handle, WF_FULLXYWH, &g);
wind_get_grect(gw->handle, WF_CURRXYWH, &g2);
- if(g.g_w == g2.g_w && g.g_h == g2.g_h){
+ if(g.g_w == g2.g_w && g.g_h == g2.g_h) {
wind_get_grect(gw->handle, WF_PREVXYWH, &g);
}
wind_set_grect(gw->handle, WF_CURRXYWH, &g);
@@ -243,6 +263,13 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
g.g_h = msg[7];
guiwin_toolbar_redraw(gw, &g);
}
+ if (gw->form != NULL) {
+ g.g_x = msg[4];
+ g.g_y = msg[5];
+ g.g_w = msg[6];
+ g.g_h = msg[7];
+ guiwin_form_redraw(gw, &g);
+ }
break;
default:
@@ -254,6 +281,182 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
return(retval);
}
+static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
+{
+ short retval = 0;
+
+ DEBUG_PRINT(("preproc_mu_button\n"));
+
+ // toolbar handling:
+ if ((gw->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0
+ && gw->toolbar != NULL) {
+
+ GRECT tb_area;
+
+ guiwin_get_grect(gw, GUIWIN_AREA_TOOLBAR, &tb_area);
+
+ if (POINT_WITHIN(ev_out->emo_mouse.p_x,
+ ev_out->emo_mouse.p_y, tb_area)) {
+ // send WM_TOOLBAR message
+ gw->toolbar[gw->toolbar_idx].ob_x = tb_area.g_x;
+ gw->toolbar[gw->toolbar_idx].ob_y = tb_area.g_y;
+ short obj_idx = objc_find(gw->toolbar,
+ gw->toolbar_idx, 8,
+ ev_out->emo_mouse.p_x,
+ ev_out->emo_mouse.p_y);
+
+ DEBUG_PRINT(("Toolbar index: %d\n", obj_idx));
+ if (obj_idx > 0) {
+ if ((gw->toolbar[obj_idx].ob_flags & OF_SELECTABLE)!=0
+ && ((gw->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0)
+ && ((gw->flags & GW_FLAG_TOOLBAR_REDRAW) == 1)) {
+ gw->toolbar[obj_idx].ob_state |= OS_SELECTED;
+ // TODO: optimize redraw by setting the object clip:
+ guiwin_toolbar_redraw(gw, NULL);
+ }
+ }
+
+ short oldevents = ev_out->emo_events;
+ short msg_out[8] = {WM_TOOLBAR, gl_apid,
+ 0, gw->handle,
+ obj_idx, ev_out->emo_mclicks,
+ ev_out->emo_kmeta, 0
+ };
+ ev_out->emo_events = MU_MESAG;
+ // notify the window about toolbar click:
+ gw->handler_func(gw, ev_out, msg_out);
+ ev_out->emo_events = oldevents;
+ retval = 1;
+ }
+ }
+
+ if (gw->form != NULL) {
+
+ GRECT content_area;
+ struct guiwin_scroll_info_s *slid;
+
+ DEBUG_PRINT(("preproc_mu_button: handling form click.\n"));
+
+ guiwin_get_grect(gw, GUIWIN_AREA_CONTENT, &content_area);
+
+ if (POINT_WITHIN(ev_out->emo_mouse.p_x,
+ ev_out->emo_mouse.p_y, content_area)) {
+
+ slid = guiwin_get_scroll_info(gw);
+
+ gw->form[gw->form_idx].ob_x = content_area.g_x -
+ (slid->x_pos * slid->x_unit_px);
+ gw->form[gw->form_idx].ob_y = content_area.g_y -
+ (slid->y_pos * slid->y_unit_px);
+
+ gw->form_focus_obj = objc_find(gw->form, gw->form_idx, 8,
+ ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y);
+
+ DEBUG_PRINT(("Window Form click, obj: %d\n", gw->form_focus_obj));
+ if (gw->form_focus_obj > -1
+ && (gw->form[gw->form_focus_obj].ob_state & OS_DISABLED)== 0) {
+
+ uint16_t type = (gw->form[gw->form_focus_obj].ob_type & 0xFF);
+ uint16_t xtype = (gw->form[gw->form_focus_obj].ob_type & 0xFF00);
+ uint16_t nextobj, edit_idx;
+
+ DEBUG_PRINT(("type: %d, xtype: %d\n", type, xtype));
+
+ if (type == G_FTEXT || type == G_FBOXTEXT) {
+
+ // report mouse click to the tree:
+ retval = form_button(gw->form, gw->form_focus_obj,
+ ev_out->emo_mclicks, &nextobj);
+
+ // end edit mode for active edit object:
+ if(gw->form_edit_obj != -1) {
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDEND);
+ }
+
+ // activate the new edit object:
+ gw->form_edit_obj = gw->form_focus_obj;
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDINIT);
+
+ } else {
+
+ // end edit mode for active edit object:
+ if(gw->form_edit_obj != -1) {
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDEND);
+ gw->form_edit_obj = -1;
+ }
+
+ if ((xtype & GW_XTYPE_CHECKBOX) != 0) {
+
+ if ((gw->form[gw->form_focus_obj].ob_state & OS_SELECTED) != 0) {
+ gw->form[gw->form_focus_obj].ob_state &= ~(OS_SELECTED|OS_CROSSED);
+ } else {
+ gw->form[gw->form_focus_obj].ob_state |= (OS_SELECTED|OS_CROSSED);
+ }
+ guiwin_form_redraw(gw, obj_screen_rect(gw->form,
+ gw->form_focus_obj));
+ }
+ short oldevents = ev_out->emo_events;
+ short msg_out[8] = {GUIWIN_WM_FORM, gl_apid,
+ 0, gw->handle,
+ gw->form_focus_obj, ev_out->emo_mclicks,
+ ev_out->emo_kmeta, 0
+ };
+ ev_out->emo_events = MU_MESAG;
+ // notify the window about form click:
+ gw->handler_func(gw, ev_out, msg_out);
+ ev_out->emo_events = oldevents;
+ retval = 1;
+ evnt_timer(150);
+ }
+ }
+ }
+ }
+
+ return(retval);
+}
+
+static short preproc_mu_keybd(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
+{
+
+ if((gw->form != NULL) && (gw->form_edit_obj > -1) ) {
+
+ short next_edit_obj = gw->form_edit_obj;
+ short next_char = -1;
+ short edit_idx;
+ short r;
+
+ r = form_keybd(gw->form, gw->form_edit_obj, next_edit_obj,
+ ev_out->emo_kreturn,
+ &next_edit_obj, &next_char);
+
+ if (next_edit_obj != gw->form_edit_obj) {
+
+ if(gw->form_edit_obj != -1) {
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDEND);
+ }
+
+ gw->form_edit_obj = next_edit_obj;
+
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDINIT);
+ } else {
+ if(next_char > 13)
+ r = objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDCHAR);
+ }
+ }
+}
+
short guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8])
{
GUIWIN *dest;
@@ -311,50 +514,22 @@ short guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8])
dest = guiwin_find(h_aes);
- if(dest == NULL || dest->handler_func == NULL)
+ if (dest == NULL || dest->handler_func == NULL)
return(0);
- if( (ev_out->emo_events & MU_BUTTON) != 0) {
- DEBUG_PRINT(("Found MU_BUTTON dest: %p (%d), flags: %d, cb: %p\n", dest, dest->handle, dest->flags, dest->handler_func));
+ if ((ev_out->emo_events & MU_BUTTON) != 0) {
- // toolbar handling:
- if((dest->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0
- && dest->toolbar != NULL) {
- GRECT tb_area;
- guiwin_get_grect(dest, GUIWIN_AREA_TOOLBAR, &tb_area);
- if (POINT_WITHIN(ev_out->emo_mouse.p_x,
- ev_out->emo_mouse.p_y, tb_area)) {
- // send WM_TOOLBAR message
- dest->toolbar[dest->toolbar_idx].ob_x = tb_area.g_x;
- dest->toolbar[dest->toolbar_idx].ob_y = tb_area.g_y;
- short obj_idx = objc_find(dest->toolbar,
- dest->toolbar_idx, 8,
- ev_out->emo_mouse.p_x,
- ev_out->emo_mouse.p_y);
- DEBUG_PRINT(("Toolbar index: %d\n", obj_idx));
- short msg_out[8] = {WM_TOOLBAR, gl_apid, 0, dest->handle,
- obj_idx, ev_out->emo_mclicks, ev_out->emo_kmeta, 0
- };
- if (obj_idx > 0) {
- if ((dest->toolbar[obj_idx].ob_flags & OF_SELECTABLE)!=0
- && ((dest->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0)
- && ((dest->flags & GW_FLAG_TOOLBAR_REDRAW) == 1)) {
- dest->toolbar[obj_idx].ob_state |= OS_SELECTED;
- // TODO: optimize redraw by setting the object clip:
- guiwin_toolbar_redraw(dest, NULL);
- }
- }
-
- short oldevents = ev_out->emo_events;
- ev_out->emo_events = MU_MESAG;
- // notify the window about toolbar click:
- dest->handler_func(dest, ev_out, msg_out);
- handler_called=true;
- ev_out->emo_events = oldevents;
- retval = 1;
- }
+ DEBUG_PRINT(("Found MU_BUTTON dest: %p (%d), flags: %d, cb: %p\n", dest, dest->handle, dest->flags, dest->handler_func));
+ retval = preproc_mu_button(dest, ev_out, msg);
+ if(retval != 0) {
+ handler_called = true;
}
}
+
+ if ((ev_out->emo_events & MU_KEYBD)) {
+ retval = preproc_mu_keybd(dest, ev_out, msg);
+ }
+
if (handler_called==false) {
dest->handler_func(dest, ev_out, msg);
}
@@ -458,7 +633,7 @@ short guiwin_remove(GUIWIN *win)
void guiwin_get_grect(GUIWIN *win, enum guwin_area_e mode, GRECT *dest)
{
- assert(win != NULL);
+ assert(win != NULL);
wind_get_grect(win->handle, WF_WORKXYWH, dest);
if (mode == GUIWIN_AREA_CONTENT) {
@@ -502,9 +677,9 @@ void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh)
vis_units = g.g_h/slid->y_unit_px;
newpos = slid->y_pos = MIN(slid->y_units-vis_units,
MAX(0, slid->y_pos+units));
- if(newpos < 0){
- newpos = slid->y_pos = 0;
- }
+ if(newpos < 0) {
+ newpos = slid->y_pos = 0;
+ }
if(oldpos == newpos)
return;
@@ -538,9 +713,9 @@ void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh)
newpos = slid->x_pos = MIN(slid->x_units-vis_units,
MAX(0, slid->x_pos+units));
- if(newpos < 0){
- newpos = slid->x_pos = 0;
- }
+ if(newpos < 0) {
+ newpos = slid->x_pos = 0;
+ }
if(oldpos == newpos)
return;
@@ -656,6 +831,7 @@ void guiwin_set_toolbar(GUIWIN *win, OBJECT *toolbar, short idx, uint32_t flags)
{
win->toolbar = toolbar;
win->toolbar_idx = idx;
+ win->toolbar_edit_obj = -1;
if(flags & GW_FLAG_HAS_VTOOLBAR) {
win->flags |= GW_FLAG_HAS_VTOOLBAR;
}
@@ -677,30 +853,30 @@ struct guiwin_scroll_info_s *guiwin_get_scroll_info(GUIWIN *win) {
void guiwin_set_scroll_grid(GUIWIN * win, short x, short y)
{
- struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
+ struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
- assert(slid != NULL);
+ assert(slid != NULL);
- slid->y_unit_px = x;
- slid->x_unit_px = y;
+ slid->y_unit_px = x;
+ slid->x_unit_px = y;
}
void guiwin_set_content_units(GUIWIN * win, short x, short y)
{
- struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
+ struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
- assert(slid != NULL);
+ assert(slid != NULL);
- slid->x_units = x;
- slid->y_units = y;
+ slid->x_units = x;
+ slid->y_units = y;
}
void guiwin_send_msg(GUIWIN *win, short msg_type, short a, short b, short c,
- short d)
+ short d)
{
- short msg[8];
+ short msg[8];
- msg[0] = msg_type;
+ msg[0] = msg_type;
msg[1] = gl_apid;
msg[2] = 0;
msg[3] = win->handle;
@@ -714,32 +890,32 @@ void guiwin_send_msg(GUIWIN *win, short msg_type, short a, short b, short c,
void guiwin_send_redraw(GUIWIN *win, GRECT *area)
{
- short msg[8];
+ short msg[8], retval;
GRECT work;
EVMULT_IN event_in = {
- .emi_flags = MU_MESAG | MU_TIMER | MU_KEYBD | MU_BUTTON,
- .emi_bclicks = 258,
- .emi_bmask = 3,
- .emi_bstate = 0,
- .emi_m1leave = MO_ENTER,
- .emi_m1 = {0,0,0,0},
- .emi_m2leave = 0,
- .emi_m2 = {0,0,0,0},
- .emi_tlow = 0,
- .emi_thigh = 0
- };
- EVMULT_OUT event_out;
+ .emi_flags = MU_MESAG | MU_TIMER | MU_KEYBD | MU_BUTTON,
+ .emi_bclicks = 258,
+ .emi_bmask = 3,
+ .emi_bstate = 0,
+ .emi_m1leave = MO_ENTER,
+ .emi_m1 = {0,0,0,0},
+ .emi_m2leave = 0,
+ .emi_m2 = {0,0,0,0},
+ .emi_tlow = 0,
+ .emi_thigh = 0
+ };
+ EVMULT_OUT event_out;
if (area == NULL) {
guiwin_get_grect(win, GUIWIN_AREA_WORK, &work);
if (work.g_w < 1 || work.g_h < 1) {
- if (win->toolbar != NULL) {
- guiwin_get_grect(win, GUIWIN_AREA_TOOLBAR, &work);
- if (work.g_w < 1 || work.g_h < 1) {
- return;
- }
- }
+ if (win->toolbar != NULL) {
+ guiwin_get_grect(win, GUIWIN_AREA_TOOLBAR, &work);
+ if (work.g_w < 1 || work.g_h < 1) {
+ return;
+ }
+ }
}
area = &work;
}
@@ -753,13 +929,25 @@ void guiwin_send_redraw(GUIWIN *win, GRECT *area)
msg[6] = area->g_w;
msg[7] = area->g_h;
- event_out.emo_events = MU_MESAG;
- win->handler_func(win, &event_out, msg);
+ event_out.emo_events = MU_MESAG;
+ retval = preproc_wm(win, &event_out, msg);
+ if (retval == 0 || (win->flags & GW_FLAG_PREPROC_WM) != 0){
+ win->handler_func(win, &event_out, msg);
+ }
+
+
//appl_write(gl_apid, 16, &msg);
}
-
+void guiwin_set_form(GUIWIN *win, OBJECT *tree, short index)
+{
+ DEBUG_PRINT(("Setting form %p (%d) for window %p\n", tree, index, win));
+ win->form = tree;
+ win->form_edit_obj = -1;
+ win->form_focus_obj = -1;
+ win->form_idx = index;
+}
bool guiwin_has_intersection(GUIWIN *win, GRECT *work)
{
@@ -815,6 +1003,47 @@ void guiwin_toolbar_redraw(GUIWIN *gw, GRECT *clip)
}
}
+
+void guiwin_form_redraw(GUIWIN *gw, GRECT *clip)
+{
+ GRECT area, area_ro, g;
+ int scroll_px_x, scroll_px_y;
+ struct guiwin_scroll_info_s *slid;
+ //int new_x, new_y, old_x, old_y;
+ short edit_idx;
+
+ DEBUG_PRINT(("guiwin_form_redraw\n"));
+
+ // calculate form coordinates, include scrolling:
+ guiwin_get_grect(gw, GUIWIN_AREA_CONTENT, &area_ro);
+ slid = guiwin_get_scroll_info(gw);
+
+ // Update form position:
+ gw->form[gw->form_idx].ob_x = area_ro.g_x - (slid->x_pos * slid->x_unit_px);
+ gw->form[gw->form_idx].ob_y = area_ro.g_y - (slid->y_pos * slid->y_unit_px);
+
+ if(clip == NULL) {
+ clip = &area_ro;
+ }
+
+ area = area_ro;
+
+ /* Walk the AES rectangle list and redraw the visible areas of the window:*/
+ if(rc_intersect(clip, &area)) {
+
+ wind_get_grect(gw->handle, WF_FIRSTXYWH, &g);
+ while (g.g_h > 0 || g.g_w > 0) {
+ if(rc_intersect(&area, &g)) {
+ objc_draw(gw->form, gw->form_idx, 8, g.g_x, g.g_y,
+ g.g_w, g.g_h);
+
+ }
+ wind_get_grect(gw->handle, WF_NEXTXYWH, &g);
+ }
+ }
+}
+
+
void guiwin_clear(GUIWIN *win)
{
GRECT area, g;
@@ -823,7 +1052,7 @@ void guiwin_clear(GUIWIN *win)
vh = guiwin_get_vdi_handle(win);
- if(win->state & GW_STATUS_ICONIFIED){
+ if(win->state & GW_STATUS_ICONIFIED) {
// also clear the toolbar area when iconified:
guiwin_get_grect(win, GUIWIN_AREA_WORK, &area);
} else {
diff --git a/atari/gemtk/objc.c b/atari/gemtk/objc.c
new file mode 100644
index 0000000..90c4d88
--- /dev/null
+++ b/atari/gemtk/objc.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2013 Ole Loots <ole(a)monochrom.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/>.
+ *
+ * Module Description:
+ *
+ * AES Object tree tools.
+ *
+ */
+
+ #include "gemtk.h"
+
+
+OBJECT *get_tree(int idx)
+{
+
+ OBJECT *tree;
+
+ rsrc_gaddr(R_TREE, idx, &tree);
+
+ return tree;
+}
+
+bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
+{
+ GRECT obj_screen;
+ bool ret = false;
+
+ objc_offset(tree, obj, &obj_screen.g_x, &obj_screen.g_y);
+ obj_screen.g_w = tree[obj].ob_width;
+ obj_screen.g_h = tree[obj].ob_height;
+
+ ret = RC_WITHIN(&obj_screen, area);
+
+ return(ret);
+}
+
+GRECT * obj_screen_rect(OBJECT * tree, short obj)
+{
+ static GRECT obj_screen;
+
+ get_objframe(tree, obj, &obj_screen);
+
+ return(&obj_screen);
+}
diff --git a/atari/gemtk/objc.h b/atari/gemtk/objc.h
new file mode 100644
index 0000000..6fa1072
--- /dev/null
+++ b/atari/gemtk/objc.h
@@ -0,0 +1,7 @@
+#ifndef GEMTK_OBJC_H
+#define GEMTK_OBJC_H
+
+
+
+#endif // GEMTK_OBJC_H
+
diff --git a/atari/gemtk/utils.c b/atari/gemtk/utils.c
index 4a24d82..82f74f9 100644
--- a/atari/gemtk/utils.c
+++ b/atari/gemtk/utils.c
@@ -38,8 +38,3 @@ unsigned short _systype (void)
return _systype_v;
}
-OBJECT *get_tree( int idx) {
- OBJECT *tree;
- rsrc_gaddr(R_TREE, idx, &tree);
- return tree;
-}
diff --git a/atari/gui.c b/atari/gui.c
index 888f82d..ccf7c21 100755
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -715,7 +715,7 @@ void gui_start_selection(struct gui_window *w)
void gui_paste_from_clipboard(struct gui_window *w, int x, int y)
{
- char * clip = scrap_txt_read( &app );
+ char * clip = scrap_txt_read();
if( clip == NULL )
return;
int clip_length = strlen( clip );
@@ -731,8 +731,9 @@ void gui_paste_from_clipboard(struct gui_window *w, int x, int y)
strlen(utf8), true);
free(utf8);
}
- free( clip );
}
+
+ free( clip );
}
bool gui_empty_clipboard(void)
@@ -812,7 +813,7 @@ fin:
bool gui_commit_clipboard(void)
{
- int r = scrap_txt_write(&app, tmp_clipboard);
+ int r = scrap_txt_write(tmp_clipboard);
return( (r>0)?true:false );
}
diff --git a/atari/history.h b/atari/history.h
index 3ea2621..6185e2a 100755
--- a/atari/history.h
+++ b/atari/history.h
@@ -20,7 +20,6 @@
#define NS_ATARI_HISTORY_H
#include <stdbool.h>
-#include <windom.h>
#include "desktop/tree.h"
#include "atari/treeview.h"
#include "atari/gemtk/gemtk.h"
diff --git a/atari/hotlist.h b/atari/hotlist.h
index ed965a5..9fbf389 100755
--- a/atari/hotlist.h
+++ b/atari/hotlist.h
@@ -19,7 +19,6 @@
#ifndef NS_ATARI_HOTLIST_H
#define NS_ATARI_HOTLIST_H
#include <stdbool.h>
-#include <windom.h>
#include "desktop/tree.h"
#include "atari/gemtk/gemtk.h"
#include "atari/treeview.h"
diff --git a/atari/search.c b/atari/search.c
index 4737125..cc58caa 100644
--- a/atari/search.c
+++ b/atari/search.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Ole Loots <ole(a)monochrom.net>
+ * Copyright 2013 Ole Loots <ole(a)monochrom.net>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -14,7 +14,13 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+ *
+ * Module Description:
+ *
+ *
+ *
+ */
+
#include <limits.h>
#include <stdlib.h>
@@ -39,10 +45,14 @@
#include "atari/res/netsurf.rsh"
extern struct gui_window * input_window;
-extern void * h_gem_rsrc;
+extern void * h_gem_rsrc;
+extern GRECT desk_area;
-static SEARCH_FORM_SESSION current;
+static SEARCH_FORM_SESSION current;
+static OBJECT *dlgtree;
+static GUIWIN *searchwin;
+static short h_aes_win;
static void nsatari_search_set_status(bool found, void *p);
static void nsatari_search_set_hourglass(bool active, void *p);
@@ -80,7 +90,7 @@ void nsatari_search_set_hourglass(bool active, void *p)
{
SEARCH_FORM_SESSION s = (SEARCH_FORM_SESSION)p;
LOG((""));
- if( active && current != NULL )
+ if (active && current != NULL)
gui_window_set_pointer(s->bw->window, GUI_POINTER_PROGRESS);
else
gui_window_set_pointer(s->bw->window, GUI_POINTER_DEFAULT);
@@ -127,22 +137,22 @@ void nsatari_search_set_back_state(bool active, void *p)
}
-static SEARCH_FORM_SESSION get_search_session(WINDOW * win)
+static SEARCH_FORM_SESSION get_search_session(GUIWIN * win)
{
return (current);
}
-static void destroy_search_session( SEARCH_FORM_SESSION s )
+static void destroy_search_session(SEARCH_FORM_SESSION s)
{
- if( s != NULL ){
+ if(s != NULL ){
LOG((""));
- free( s );
+ free(s);
}
}
-static int apply_form(WINDOW * win, struct s_search_form_state * s)
+static int apply_form(GUIWIN *win, struct s_search_form_state * s)
{
- OBJECT * obj = ObjcTree(OC_FORM, win );
+ OBJECT * obj = dlgtree;
if( obj == NULL ){
goto error;
}
@@ -167,15 +177,15 @@ error:
return( 1 );
}
-/* checks if search parameters changes */
-static bool form_changed( WINDOW * w )
+/* checks for search parameters changes */
+static bool form_changed(GUIWIN * w)
{
bool check;
struct s_search_form_state cur;
SEARCH_FORM_SESSION s = get_search_session(w);
if( s == NULL )
return false;
- OBJECT * obj = ObjcTree(OC_FORM, w);
+ OBJECT * obj = (OC_FORM, w);
assert( s != NULL && obj != NULL );
uint32_t flags_old = s->state.flags;
apply_form(w, &cur);
@@ -188,9 +198,9 @@ static bool form_changed( WINDOW * w )
}
char * cstr = ObjcString( obj, SEARCH_TB_SRCH, NULL );
- if( cstr != NULL ){
- if( strcmp(cstr, (char*)&s->state.text) != 0 ) {
- return ( true );
+ if (cstr != NULL){
+ if (strcmp(cstr, (char*)&s->state.text) != 0) {
+ return (true);
}
}
@@ -202,14 +212,14 @@ static void __CDECL evnt_bt_srch_click( WINDOW *win, int index, int unused, void
{
bool fwd;
- SEARCH_FORM_SESSION s = get_search_session(win);
- OBJECT * obj = ObjcTree(OC_FORM, s->formwind );
+ SEARCH_FORM_SESSION s = get_search_session(searchwin);
+ OBJECT * obj = dlgtree;
search_flags_t flags = 0;
ObjcChange(OC_FORM, win, index, ~SELECTED , TRUE);
- if( form_changed(win) ){
+ if( form_changed(searchwin) ){
browser_window_search_destroy_context(s->bw);
- apply_form( win, &s->state );
+ apply_form(searchwin, &s->state );
} else {
/* get search direction manually: */
if( (obj[SEARCH_CB_FWD].ob_state & SELECTED) != 0 )
@@ -227,78 +237,93 @@ static void __CDECL evnt_cb_click( WINDOW *win, int index, int unused, void *unu
{
short newstate;
- OBJECT * obj = ObjcTree(OC_FORM, get_search_session(win)->formwind );
+
}
static void __CDECL evnt_close( WINDOW *win, short buff[8])
{
- /* Free Search Contexts */
- /* todo: destroy search context, if any? */
- SEARCH_FORM_SESSION s = get_search_session(win);
- if( s != NULL ){
- destroy_search_session( s );
- }
- current = NULL;
- ApplWrite( _AESapid, WM_DESTROY, win->handle, 0,0,0,0 );
-}
-void search_destroy( struct gui_window * gw )
-{
- LOG(("search_destroy %p / %p", gw, current ));
- if( current != NULL && current->formwind != NULL ){
- ApplWrite( _AESapid, WM_CLOSED, current->formwind->handle, 0,0,0,0);
- /* Handle Close event */
- EvntWindom( MU_MESAG );
- /* Handle Destroy Event */
- EvntWindom( MU_MESAG );
- }
- LOG(("done"));
}
+
+void search_destroy(struct gui_window *gw)
+{
+ /* Free Search Contexts */
+ /* todo: destroy search context, if any? */
+ LOG((""));
-SEARCH_FORM_SESSION open_browser_search( struct gui_window * gw )
+ if (current != NULL){
+ destroy_search_session(current);
+ current = NULL;
+ }
+
+ guiwin_remove(searchwin);
+ searchwin = NULL;
+
+ wind_close(h_aes_win);
+ wind_delete(h_aes_win);
+ h_aes_win = -1;
+
+ LOG(("done"));
+}
+
+SEARCH_FORM_SESSION open_browser_search(struct gui_window * gw)
{
char * title;
SEARCH_FORM_SESSION sfs;
- GRECT pos, treesize;
- OBJECT * tree = get_tree(SEARCH);
- if( tree == NULL ){
- return( NULL );
- }
+ GRECT pos, treesize;
+ uint32_t kind = CLOSER | NAME | MOVER;
+
+ if (dlgtree == NULL) {
+ dlgtree = get_tree(SEARCH);
+ if (dlgtree == NULL ) {
+ return( NULL );
+ }
+ }
+
+ if(searchwin){
+ search_destroy(gw);
+ }
+
sfs = calloc(1, sizeof(struct s_search_form_session));
if( sfs == NULL )
return( NULL );
title = (char*)messages_get("FindTextNS");
- if( title == NULL )
- title = (char*)"Find text ...";
-
- search_destroy( gw );
-
+ if (title == NULL)
+ title = (char*)"Find text ...";
+
/* setup dipslay position: right corner */
treesize.g_x = 0;
treesize.g_y = 0;
- treesize.g_w = tree->ob_width;
- treesize.g_h = tree->ob_height;
- wind_calc_grect(WC_BORDER, WAT_FORM, &treesize, &pos);
- pos.g_x = app.w - pos.g_w;
- pos.g_y = app.h - pos.g_h;
+ treesize.g_w = dlgtree->ob_width;
+ treesize.g_h = dlgtree->ob_height;
+ wind_calc_grect(WC_BORDER, kind, &treesize, &pos);
+ pos.g_x = desk_area.g_w - pos.g_w;
+ pos.g_y = desk_area.g_h - pos.g_h;
+
+ /* create the dialog: */
+ h_aes_win = wind_create_grect(kind, &pos);
+ wind_set_str(h_aes_win, WF_NAME, title);
current = sfs;
- sfs->bw = gw->browser->bw;
+ sfs->bw = gw->browser->bw;
+/*
sfs->formwind = mt_FormCreate( &app, tree, WAT_FORM,
NULL, title,
&pos, true, false);
-
+*/
+/*
ObjcAttachFormFunc(sfs->formwind, SEARCH_BT_SEARCH, evnt_bt_srch_click,
NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_CASESENSE, evnt_cb_click, NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_SHOWALL, evnt_cb_click, NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_FWD, evnt_cb_click, NULL);
EvntAdd(sfs->formwind, WM_CLOSED, evnt_close, EV_TOP);
- apply_form(sfs->formwind, &sfs->state );
- strncpy( ObjcString( tree, SEARCH_TB_SRCH, NULL ), "", SEARCH_MAX_SLEN);
+*/
+ apply_form(searchwin, &sfs->state );
+ set_string(dlgtree, SEARCH_TB_SRCH, "");
return( current );
diff --git a/atari/search.h b/atari/search.h
index 7913803..9228b96 100644
--- a/atari/search.h
+++ b/atari/search.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Ole Loots <ole(a)monochrom.net>
+ * Copyright 2013 Ole Loots <ole(a)monochrom.net>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -14,7 +14,13 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+ *
+ * Module Description:
+ *
+ *
+ *
+ */
+
#ifndef NS_ATARI_SEARCH_H
#define NS_ATARI_SEARCH_H
@@ -29,7 +35,6 @@ struct s_search_form_state
struct s_search_form_session {
struct browser_window * bw;
- WINDOW * formwind;
struct s_search_form_state state;
};
@@ -37,6 +42,6 @@ struct s_search_form_session {
typedef struct s_search_form_session * SEARCH_FORM_SESSION;
SEARCH_FORM_SESSION open_browser_search(struct gui_window * gw);
-void search_destroy( struct gui_window * gw );
+void search_destroy(struct gui_window * gw);
#endif
diff --git a/atari/settings.c b/atari/settings.c
index 90404c1..c5cc3ae 100644
--- a/atari/settings.c
+++ b/atari/settings.c
@@ -59,7 +59,7 @@ static OBJECT * dlgtree;
guiwin_send_redraw(settings_guiwin, \
obj_screen_rect(dlgtree, idx));
-#define FORMEVENT(idx) form_event(idx, 0, NULL);
+#define FORMEVENT(idx) form_event(idx, 0);
#define INPUT_HOMEPAGE_URL_MAX_LEN 44
#define INPUT_LOCALE_MAX_LEN 6
@@ -73,37 +73,12 @@ static OBJECT * dlgtree;
#define LABEL_ICONSET_MAX_LEN 8
#define INPUT_TOOLBAR_COLOR_MAX_LEN 6
-#define CB_SELECTED (OS_SELECTED | OS_CROSSED)
-
static void on_close(void);
static void on_redraw(GRECT *clip);
-static void form_event(int index, int external, void *unused2);
+static void form_event(int index, int external);
static void apply_settings(void);
static void save_settings(void);
-static bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
-{
- GRECT obj_screen;
- bool ret = false;
-
- objc_offset(tree, obj, &obj_screen.g_x, &obj_screen.g_y);
- obj_screen.g_w = dlgtree[obj].ob_width;
- obj_screen.g_h = dlgtree[obj].ob_height;
-
- ret = RC_WITHIN(&obj_screen, area);
-
- return(ret);
-}
-
-static GRECT * obj_screen_rect(OBJECT * tree, short obj)
-{
- static GRECT obj_screen;
-
- get_objframe(tree, obj, &obj_screen);
-
- return(&obj_screen);
-}
-
static void set_text( short idx, char * text, int len )
{
@@ -234,21 +209,21 @@ static void display_settings(void)
set_text( SETTINGS_BT_SEL_FONT_RENDERER, nsoption_charp(atari_font_driver),
LABEL_FONT_RENDERER_MAX_LEN );
SET_BIT(dlgtree[SETTINGS_CB_TRANSPARENCY].ob_state,
- CB_SELECTED, nsoption_int(atari_transparency) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_int(atari_transparency) ? 1 : 0 );
SET_BIT(dlgtree[SETTINGS_CB_ENABLE_ANIMATION].ob_state,
- CB_SELECTED, nsoption_bool(animate_images) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(animate_images) ? 1 : 0 );
SET_BIT(dlgtree[SETTINGS_CB_FG_IMAGES].ob_state,
- CB_SELECTED, nsoption_bool(foreground_images) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(foreground_images) ? 1 : 0 );
SET_BIT(dlgtree[SETTINGS_CB_BG_IMAGES].ob_state,
- CB_SELECTED, nsoption_bool(background_images) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(background_images) ? 1 : 0 );
/*
TODO: enable this option?
SET_BIT(dlgtree[SETTINGS_CB_INCREMENTAL_REFLOW].ob_state,
- CB_SELECTED, nsoption_bool(incremental_reflow) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(incremental_reflow) ? 1 : 0 );
*/
SET_BIT(dlgtree[SETTINGS_CB_ANTI_ALIASING].ob_state,
- CB_SELECTED, nsoption_int(atari_font_monochrom) ? 0 : 1 );
+ GW_CB_SELECTED, nsoption_int(atari_font_monochrom) ? 0 : 1 );
/*
TODO: activate this option?
@@ -274,9 +249,9 @@ static void display_settings(void)
set_text( SETTINGS_EDIT_PROXY_PASSWORD, nsoption_charp(http_proxy_auth_pass),
INPUT_PROXY_PASSWORD_MAX_LEN );
SET_BIT(dlgtree[SETTINGS_CB_USE_PROXY].ob_state,
- CB_SELECTED, nsoption_bool(http_proxy) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(http_proxy) ? 1 : 0 );
SET_BIT(dlgtree[SETTINGS_CB_PROXY_AUTH].ob_state,
- CB_SELECTED, nsoption_int(http_proxy_auth) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_int(http_proxy_auth) ? 1 : 0 );
tmp_option_max_cached_fetch_handles = nsoption_int(max_cached_fetch_handles);
snprintf( spare, 255, "%2d", nsoption_int(max_cached_fetch_handles) );
@@ -304,7 +279,7 @@ static void display_settings(void)
}
-static void form_event(int index, int external, void *unused2)
+static void form_event(int index, int external)
{
char spare[255];
bool is_button = false;
@@ -327,36 +302,15 @@ static void form_event(int index, int external, void *unused2)
short x, y;
int choice;
- // TODO: set correct form coords.
-
- switch( index ){
+ switch(index){
case SETTINGS_SAVE:
save_settings();
- //save_settings();
- break;
-
-
- case SETTINGS_INC_HISTORY_AGE:
- case SETTINGS_DEC_HISTORY_AGE:
- if(index == SETTINGS_INC_HISTORY_AGE)
- tmp_option_expire_url += 1;
- else
- tmp_option_expire_url -= 1;
-
- if(tmp_option_expire_url > 99)
- tmp_option_expire_url = 0;
-
- snprintf( spare, 255, "%02d", tmp_option_expire_url);
- set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
- OBJ_REDRAW(SETTINGS_EDIT_HISTORY_AGE);
- is_button = true;
-
- default: break;
- }
-
+ break;
- switch(index){
+ case SETTINGS_ABORT:
+ close_settings();
+ break;
case SETTINGS_CB_USE_PROXY:
if( checked ){
@@ -398,13 +352,13 @@ static void form_event(int index, int external, void *unused2)
case SETTINGS_BT_SEL_FONT_RENDERER:
if( external ){
objc_offset(dlgtree, SETTINGS_BT_SEL_FONT_RENDERER, &x, &y);
- choice = MenuPopUp ( font_driver_items, x, y,
+ choice = MenuPopUp (font_driver_items, x, y,
num_font_drivers,
-1, -1, P_LIST + P_WNDW + P_CHCK );
if( choice > 0 &&
choice <= num_font_drivers ){
set_text(SETTINGS_BT_SEL_FONT_RENDERER,
- font_driver_items[choice-1],
+ (char*)font_driver_items[choice-1],
LABEL_FONT_RENDERER_MAX_LEN);
OBJ_REDRAW(SETTINGS_BT_SEL_FONT_RENDERER);
}
@@ -423,7 +377,7 @@ static void form_event(int index, int external, void *unused2)
num_locales,
-1, -1, P_LIST + P_WNDW + P_CHCK );
if( choice > 0 && choice <= num_locales ){
- set_text(SETTINGS_BT_SEL_LOCALE, locales[choice-1], 5);
+ set_text(SETTINGS_BT_SEL_LOCALE, (char*)locales[choice-1], 5);
}
OBJ_REDRAW(SETTINGS_BT_SEL_LOCALE);
break;
@@ -607,43 +561,6 @@ static void form_event(int index, int external, void *unused2)
}
}
-static void on_redraw(GRECT *clip)
-{
- GRECT visible, work, clip_ro;
- int scroll_px_x, scroll_px_y;
- struct guiwin_scroll_info_s *slid;
- int new_x, new_y, old_x, old_y;
- short edit_idx;
-
- /* Walk the AES rectangle list and redraw the visible areas of the window: */
- guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &work);
- slid = guiwin_get_scroll_info(settings_guiwin);
-
- old_x = dlgtree->ob_x;
- old_y = dlgtree->ob_y;
- dlgtree->ob_x = new_x = work.g_x - (slid->x_pos * slid->x_unit_px);
- dlgtree->ob_y = new_y = work.g_y - (slid->y_pos * slid->y_unit_px);
-
- if ((edit_obj > -1) && (obj_is_inside(dlgtree, edit_obj, &work) == true)) {
- dlgtree->ob_x = old_x;
- dlgtree->ob_y = old_y;
- objc_edit(dlgtree, edit_obj, 0, &edit_idx,
- EDEND);
- edit_obj = -1;
-
- dlgtree->ob_x = new_x;
- dlgtree->ob_y = new_y;
- }
-
- wind_get_grect(h_aes_win, WF_FIRSTXYWH, &visible);
- while (visible.g_x && visible.g_y) {
- if (rc_intersect(clip, &visible)) {
- objc_draw_grect(dlgtree, 0, 8, &visible);
- }
- wind_get_grect(h_aes_win, WF_NEXTXYWH, &visible);
- }
-}
-
static void apply_settings(void)
{
@@ -732,21 +649,15 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
short retval = 0;
GRECT clip, work;
static short edit_idx = 0;
+ struct guiwin_scroll_info_s *slid;
if ((ev_out->emo_events & MU_MESAG) != 0) {
// handle message
// printf("settings win msg: %d\n", msg[0]);
switch (msg[0]) {
- case WM_REDRAW:
- clip.g_x = msg[4];
- clip.g_y = msg[5];
- clip.g_w = msg[6];
- clip.g_h = msg[7];
- on_redraw(&clip);
- break;
- case WM_CLOSED:
+ case WM_CLOSED:
// TODO: this needs to iterate through all gui windows and
// check if the rootwin is this window...
close_settings();
@@ -756,90 +667,28 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
guiwin_update_slider(win, GUIWIN_VH_SLIDER);
break;
+ case WM_MOVED:
+ break;
+
case WM_TOOLBAR:
switch(msg[4]){
default: break;
}
break;
+ case GUIWIN_WM_FORM:
+ form_event(msg[4], 1);
+ break;
+
default:
break;
}
}
- if ((ev_out->emo_events & MU_KEYBD) != 0) {
-
- if((edit_obj > -1) /* && obj_is_inside(dlgtree, edit_obj, &work) */){
-
- short next_edit_obj = edit_obj;
- short next_char = -1;
- short r;
-
- guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &work);
-
- r = form_keybd(dlgtree, edit_obj, next_edit_obj, ev_out->emo_kreturn,
- &next_edit_obj, &next_char);
- if (next_edit_obj != edit_obj) {
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx,
- EDEND);
- edit_obj = next_edit_obj;
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx,
- EDINIT);
- } else {
- if(next_char > 13)
- r = objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx,
- EDCHAR);
- }
-
- }
+ if ((ev_out->emo_events & MU_KEYBD) != 0) {
}
- if ((ev_out->emo_events & MU_BUTTON) != 0) {
-
- struct guiwin_scroll_info_s *slid;
- short nextobj, ret=-1;
-
- guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &work);
-
- slid = guiwin_get_scroll_info(settings_guiwin);
- dlgtree->ob_x = work.g_x - (slid->x_pos * slid->x_unit_px);
- dlgtree->ob_y = work.g_y - (slid->y_pos * slid->y_unit_px);
-
- any_obj = objc_find(dlgtree, 0, 8, ev_out->emo_mouse.p_x,
- ev_out->emo_mouse.p_y);
-
- if((dlgtree[any_obj].ob_state & OS_DISABLED) != 0) {
- return(retval);
- }
- uint16_t type = (dlgtree[any_obj].ob_type & 0xFF);
- if (type == G_FTEXT || type == G_FBOXTEXT) {
- ret = form_button(dlgtree, any_obj, ev_out->emo_mclicks, &nextobj);
- if(edit_obj != -1){
- if (obj_is_inside(dlgtree, edit_obj, &work)) {
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx, EDEND);
- }
- }
- if (obj_is_inside(dlgtree, any_obj, &work)) {
- edit_obj = any_obj;
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx, EDINIT);
- }
- } else {
- if ((edit_obj != -1) && obj_is_inside(dlgtree, edit_obj, &work)){
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx, EDEND);
- }
- edit_obj = -1;
- if (((dlgtree[any_obj].ob_type & 0xff00) & GW_XTYPE_CHECKBOX) != 0) {
- if (OBJ_SELECTED(any_obj)) {
- dlgtree[any_obj].ob_state &= ~(OS_SELECTED|OS_CROSSED);
- } else {
- dlgtree[any_obj].ob_state |= (OS_SELECTED|OS_CROSSED);
- }
- guiwin_send_redraw(win, obj_screen_rect(dlgtree, any_obj));
- }
- form_event(any_obj, 1, NULL);
- }
- //printf("clicked: %d / %d\n", any_obj, ret);
- evnt_timer(150);
+ if ((ev_out->emo_events & MU_BUTTON) != 0) {
}
return(retval);
@@ -866,8 +715,6 @@ void open_settings(void)
curr.g_w = MIN(dlgtree->ob_width, desk_area.g_w);
curr.g_h = MIN(dlgtree->ob_height, desk_area.g_h-64);
curr.g_x = 1;
- curr.g_y = desk_area.g_y;
- //curr.g_x = (desk_area.g_w / 2) - (curr.g_w / 2);
curr.g_y = (desk_area.g_h / 2) - (curr.g_h / 2);
wind_calc_grect(WC_BORDER, kind, &curr, &curr);
@@ -880,26 +727,26 @@ void open_settings(void)
wind_open_grect(h_aes_win, &curr);
+ guiwin_set_form(settings_guiwin, dlgtree, 0);
guiwin_set_scroll_grid(settings_guiwin, 32, 32);
guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &area);
+
slid = guiwin_get_scroll_info(settings_guiwin);
guiwin_set_content_units(settings_guiwin,
(dlgtree->ob_width/slid->x_unit_px),
(dlgtree->ob_height/slid->y_unit_px));
guiwin_update_slider(settings_guiwin, GUIWIN_VH_SLIDER);
-
}
}
void close_settings(void)
{
-
-
- printf("settings close\n");
+ LOG((""));
guiwin_remove(settings_guiwin);
settings_guiwin = NULL;
wind_close(h_aes_win);
wind_delete(h_aes_win);
h_aes_win = 0;
+ LOG(("Done"));
}
diff --git a/atari/settings.h b/atari/settings.h
index ef6ae81..87597e6 100644
--- a/atari/settings.h
+++ b/atari/settings.h
@@ -1,7 +1,6 @@
#ifndef NS_ATARI_SETTINGS
#define NS_ATARI_SETTINGS
-#include <windom.h>
void open_settings(void);
void close_settings(void);
diff --git a/atari/statusbar.c b/atari/statusbar.c
index bf241e2..d43ebc8 100755
--- a/atari/statusbar.c
+++ b/atari/statusbar.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
-#include <windom.h>
#include <assert.h>
#include <math.h>
diff --git a/atari/toolbar.c b/atari/toolbar.c
index c6bd745..9920b92 100644
--- a/atari/toolbar.c
+++ b/atari/toolbar.c
@@ -585,12 +585,12 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc)
text = malloc( len+1 );
if (text){
textarea_get_text( tb->url.textarea, text, len+1 );
- scrap_txt_write( &app, text );
+ scrap_txt_write(text);
free( text );
}
}
else if ( ik == KEY_PASTE) {
- char * clip = scrap_txt_read( &app );
+ char * clip = scrap_txt_read();
if ( clip != NULL ){
int clip_length = strlen( clip );
if ( clip_length > 0 ) {
@@ -604,8 +604,8 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc)
free(utf8);
ret = true;
}
- free( clip );
}
+ free( clip );
}
}
else if (ik == KEY_ESCAPE) {
diff --git a/atari/treeview.h b/atari/treeview.h
index 8683bc3..19b7730 100755
--- a/atari/treeview.h
+++ b/atari/treeview.h
@@ -20,7 +20,6 @@
#define NS_ATARI_TREEVIEW_H
#include <stdbool.h>
-#include <windom.h>
#include "desktop/tree.h"
#include "atari/gui.h"
#include "atari/gemtk/gemtk.h"
-----------------------------------------------------------------------
Summary of changes:
atari/bitmap.c | 1 -
atari/clipboard.c | 79 +++++
atari/clipboard.h | 6 +-
atari/ctxmenu.c | 5 +-
atari/deskmenu.c | 1 -
atari/download.c | 8 +-
atari/encoding.h | 1 -
atari/findfile.c | 1 -
atari/font.c | 1 -
atari/gemtk/gemtk.h | 38 ++-
atari/gemtk/guiwin.c | 433 +++++++++++++++++++++-------
beos/gui_options.cpp => atari/gemtk/objc.c | 85 +++---
atari/gemtk/objc.h | 7 +
atari/gemtk/utils.c | 5 -
atari/gui.c | 7 +-
atari/history.h | 1 -
atari/hotlist.h | 1 -
atari/search.c | 149 ++++++----
atari/search.h | 13 +-
atari/settings.c | 221 +++------------
atari/settings.h | 1 -
atari/statusbar.c | 1 -
atari/toolbar.c | 6 +-
atari/treeview.h | 1 -
24 files changed, 641 insertions(+), 431 deletions(-)
create mode 100644 atari/clipboard.c
copy beos/gui_options.cpp => atari/gemtk/objc.c (50%)
create mode 100644 atari/gemtk/objc.h
diff --git a/atari/bitmap.c b/atari/bitmap.c
index 1b5611f..c01fa4d 100755
--- a/atari/bitmap.c
+++ b/atari/bitmap.c
@@ -19,7 +19,6 @@
#include <inttypes.h>
#include <sys/types.h>
#include <string.h>
-#include <windom.h>
#include "assert.h"
diff --git a/atari/clipboard.c b/atari/clipboard.c
new file mode 100644
index 0000000..9b45e73
--- /dev/null
+++ b/atari/clipboard.c
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2013 Ole Loots <ole(a)monochrom.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/>.
+ *
+ * Module Description:
+ *
+ *
+ *
+ */
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdio.h>
+#include <mint/osbind.h>
+#include "atari/clipboard.h"
+
+
+static int filesize(char * path)
+{
+ FILE *f;
+ int fs;
+
+ f = fopen( path, "r+b");
+ if(!f)
+ return(-1);
+
+ fseek(f, 0L, SEEK_END);
+ fs = ftell(f);
+ fclose(f);
+
+ return(fs);
+}
+
+int scrap_txt_write(char *str)
+{
+ scrap_wtxt(str);
+}
+
+char *scrap_txt_read(void)
+{
+ char * buf = NULL;
+ char path[80];
+ int file;
+ int len;
+
+ if (get_scrapdir (path))
+ {
+ strcat (path, "scrap.txt");
+ len = filesize(path);
+ if(len > 0){
+ if ((file = (int) Fopen (path, 0)) >= 0)
+ {
+ buf = malloc(len);
+ if(buf){
+ len = Fread (file, len, buf);
+ Fclose (file);
+ buf[len] = '\0';
+ return buf;
+ }
+ }
+ }
+ }
+
+}
+
diff --git a/atari/clipboard.h b/atari/clipboard.h
index aa032b7..f35161e 100755
--- a/atari/clipboard.h
+++ b/atari/clipboard.h
@@ -18,10 +18,8 @@
#ifndef NS_ATARI_CLIPBOARD_H
#define NS_ATARI_CLIPBOARD_H
-
-#include <windom.h>
-int scrap_txt_write( APPvar app, char *str);
-char *scrap_txt_read( APPvar app );
+int scrap_txt_write(char *str);
+char *scrap_txt_read(void);
#endif
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c
index c9189af..035fbcc 100644
--- a/atari/ctxmenu.c
+++ b/atari/ctxmenu.c
@@ -208,14 +208,15 @@ void context_popup(struct gui_window * gw, short x, short y)
case POP_CTX_COPY_URL:
if( (ctx->flags & CNT_IMG) && (ctx->ccdata.object != NULL) ){
if( hlcache_handle_get_url(ctx->ccdata.object) != NULL ){
- scrap_txt_write(&app, (char*)nsurl_access(hlcache_handle_get_url(ctx->ccdata.object)) );
+ scrap_txt_write((char*)nsurl_access(
+ hlcache_handle_get_url(ctx->ccdata.object)));
}
}
break;
case POP_CTX_COPY_LINK:
if( (ctx->flags & CNT_HREF) && ctx->ccdata.link_url != NULL ){
- scrap_txt_write(&app, (char*)ctx->ccdata.link_url);
+ scrap_txt_write((char*)ctx->ccdata.link_url);
}
break;
diff --git a/atari/deskmenu.c b/atari/deskmenu.c
index 601ba99..4a6b083 100644
--- a/atari/deskmenu.c
+++ b/atari/deskmenu.c
@@ -1,5 +1,4 @@
#include <stdlib.h>
-#include <windom.h>
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/atari/download.c b/atari/download.c
index bf3105f..c01ac80 100755
--- a/atari/download.c
+++ b/atari/download.c
@@ -131,10 +131,10 @@ static void on_redraw(struct gui_download_window *dw, GRECT *clip)
/*
Update the AES Object to reflect current state of download:
*/
- ((TEDINFO *)get_obspec(tree, DOWNLOAD_FILENAME))->te_ptext = &dw->lbl_file;
- ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_BYTES))->te_ptext = &dw->lbl_done;
- ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_PERCENT))->te_ptext = &dw->lbl_percent;
- ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_SPEED))->te_ptext = &dw->lbl_speed;
+ ((TEDINFO *)get_obspec(tree, DOWNLOAD_FILENAME))->te_ptext = dw->lbl_file;
+ ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_BYTES))->te_ptext = dw->lbl_done;
+ ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_PERCENT))->te_ptext = dw->lbl_percent;
+ ((TEDINFO *)get_obspec(tree, DOWNLOAD_LBL_SPEED))->te_ptext = dw->lbl_speed;
if (dw->size_total > 0 ) {
p = ((double)dw->size_downloaded / (double)dw->size_total * 100);
diff --git a/atari/encoding.h b/atari/encoding.h
index 7b9cc82..c85bac9 100644
--- a/atari/encoding.h
+++ b/atari/encoding.h
@@ -22,7 +22,6 @@
#include <inttypes.h>
#include <assert.h>
#include <stdbool.h>
-#include <windom.h>
#include "css/css.h"
#include "render/font.h"
diff --git a/atari/findfile.c b/atari/findfile.c
index 00502c9..d4c4c30 100755
--- a/atari/findfile.c
+++ b/atari/findfile.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <assert.h>
#include <curl/curl.h>
-#include <windom.h>
#include "utils/log.h"
#include "utils/url.h"
diff --git a/atari/font.c b/atari/font.c
index afb1209..dfa0efe 100755
--- a/atari/font.c
+++ b/atari/font.c
@@ -37,7 +37,6 @@
*/
#include <stdbool.h>
-#include <windom.h>
#include "css/css.h"
#include "render/font.h"
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h
index c77b0d9..b70ec06 100644
--- a/atari/gemtk/gemtk.h
+++ b/atari/gemtk/gemtk.h
@@ -1,14 +1,18 @@
#ifndef GEMTK_H_INCLUDED
#define GEMTK_H_INCLUDED
-#include <gem.h>
-#include <mint/osbind.h>
-#include <mint/cookie.h>
#include <stdint.h>
#include <stdbool.h>
+#include <mint/osbind.h>
+#include <mint/cookie.h>
+
+#include <gem.h>
+#include <cflib.h>
+
+
/* -------------------------------------------------------------------------- */
-/* Utils */
+/* SYSTEM UTILS */
/* -------------------------------------------------------------------------- */
/* System type detection added by [GS] */
@@ -28,7 +32,6 @@
extern unsigned short _systype_v;
unsigned short _systype (void);
-OBJECT *get_tree( int idx );
#ifndef POINT_WITHIN
# define POINT_WITHIN(_x,_y, r) ((_x >= r.g_x) && (_x <= r.g_x + r.g_w ) \
@@ -95,11 +98,23 @@ short msg_box_show(short type, const char * msg);
#define GW_STATUS_SHADED 0x02
#define GW_XTYPE_CHECKBOX (101 << 8)
+#define GW_CB_SELECTED (OS_SELECTED | OS_CROSSED)
#define GUIWIN_VSLIDER 0x01
#define GUIWIN_HSLIDER 0x02
#define GUIWIN_VH_SLIDER 0x03
+/*
+ Message sent to the client application when an AES object is
+ clicked in an window which contains an form.
+
+ Message Parameters:
+ msg[4] = Clicked Object.
+ msg[5] = Number of clicks.
+ msg[6] = Modifier keys.
+*/
+#define GUIWIN_WM_FORM 1001
+
struct gui_window_s;
typedef struct gui_window_s GUIWIN;
typedef short (*guiwin_event_handler_f)(GUIWIN *gw,
@@ -139,6 +154,7 @@ void *guiwin_get_user_data(GUIWIN *win);
struct guiwin_scroll_info_s * guiwin_get_scroll_info(GUIWIN *win);
void guiwin_set_scroll_grid(GUIWIN * win, short x, short y);
void guiwin_set_content_units(GUIWIN * win, short x, short y);
+void guiwin_set_form(GUIWIN *win, OBJECT *tree, short index);
bool guiwin_update_slider(GUIWIN *win, short mode);
void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh);
void guiwin_send_msg(GUIWIN *win, short msgtype, short a, short b, short c,
@@ -147,14 +163,22 @@ void guiwin_send_redraw(GUIWIN *win, GRECT *area);
VdiHdl guiwin_get_vdi_handle(GUIWIN *win);
bool guiwin_has_intersection(GUIWIN *win, GRECT *work);
void guiwin_toolbar_redraw(GUIWIN *win, GRECT *clip);
+void guiwin_form_redraw(GUIWIN *gw, GRECT *clip);
void guiwin_clear(GUIWIN *win);
/* -------------------------------------------------------------------------- */
-/* AES Scroller module */
+/* AES SCROLLER MODULE */
+/* -------------------------------------------------------------------------- */
+
+/* -------------------------------------------------------------------------- */
+/* AES TABS MODULE */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
-/* AES Tabs module */
+/* AES OBJECT TREE TOOLS */
/* -------------------------------------------------------------------------- */
+GRECT * obj_screen_rect(OBJECT * tree, short obj);
+bool obj_is_inside(OBJECT * tree, short obj, GRECT *area);
+OBJECT *get_tree(int idx);
#endif // GEMTK_H_INCLUDED
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index a471fc9..f0bb744 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -26,16 +26,21 @@
#include <mt_gem.h>
#include "gemtk.h"
-//#define DEBUG_PRINT(x) printf x
-#define DEBUG_PRINT(x)
+#define DEBUG_PRINT(x) printf x
+//#define DEBUG_PRINT(x)
struct gui_window_s {
short handle;
guiwin_event_handler_f handler_func;
uint32_t flags;
uint32_t state;
- OBJECT * toolbar;
+ OBJECT *toolbar;
+ short toolbar_edit_obj;
short toolbar_idx;
+ OBJECT *form;
+ short form_edit_obj;
+ short form_focus_obj;
+ short form_idx;
struct guiwin_scroll_info_s scroll_info;
void *user_data;
struct gui_window_s *next, *prev;
@@ -73,6 +78,10 @@ static void move_rect(GUIWIN * win, GRECT *rect, int dx, int dy)
wind_update(END_UPDATE);
}
+/**
+* Handles common events.
+* returns 0 when the event was not handled, 1 otherwise.
+*/
static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
{
GRECT g, g_ro, g2;
@@ -90,8 +99,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
if(val != slid->x_pos) {
if (val < slid->x_pos) {
val = -(MAX(0, slid->x_pos-val));
- }
- else {
+ } else {
val = val-slid->x_pos;
}
guiwin_scroll(gw, GUIWIN_HSLIDER, val, false);
@@ -106,8 +114,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
if(val != slid->y_pos) {
if (val < slid->y_pos) {
val = -(slid->y_pos - val);
- }
- else {
+ } else {
val = val -slid->y_pos;
}
guiwin_scroll(gw, GUIWIN_VSLIDER, val, false);
@@ -126,7 +133,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WA_UPPAGE:
/* scroll page up */
guiwin_scroll(gw, GUIWIN_VSLIDER, -(g.g_h/slid->y_unit_px),
- true);
+ true);
break;
case WA_UPLINE:
@@ -137,7 +144,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WA_DNPAGE:
/* scroll page down */
guiwin_scroll(gw, GUIWIN_VSLIDER, g.g_h/slid->y_unit_px,
- true);
+ true);
break;
case WA_DNLINE:
@@ -148,25 +155,25 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WA_LFPAGE:
/* scroll page left */
guiwin_scroll(gw, GUIWIN_HSLIDER, -(g.g_w/slid->x_unit_px),
- true);
+ true);
break;
case WA_LFLINE:
/* scroll line left */
guiwin_scroll(gw, GUIWIN_HSLIDER, -1,
- true);
+ true);
break;
case WA_RTPAGE:
/* scroll page right */
guiwin_scroll(gw, GUIWIN_HSLIDER, (g.g_w/slid->x_unit_px),
- true);
+ true);
break;
case WA_RTLINE:
/* scroll line right */
guiwin_scroll(gw, GUIWIN_HSLIDER, 1,
- true);
+ true);
break;
default:
@@ -182,21 +189,34 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WM_MOVED:
wind_get_grect(gw->handle, WF_CURRXYWH, &g);
wind_set(gw->handle, WF_CURRXYWH, msg[4], msg[5], g.g_w, g.g_h);
+
+ if (gw->form) {
+
+ guiwin_get_grect(gw, GUIWIN_AREA_CONTENT, &g);
+ slid = guiwin_get_scroll_info(gw);
+
+ gw->form[gw->form_idx].ob_x = g.g_x -
+ (slid->x_pos * slid->x_unit_px);
+
+ gw->form[gw->form_idx].ob_y = g.g_y -
+ (slid->y_pos * slid->y_unit_px);
+ }
+
break;
case WM_SIZED:
case WM_REPOSED:
- wind_get_grect(gw->handle, WF_FULLXYWH, &g2);
+ wind_get_grect(gw->handle, WF_FULLXYWH, &g2);
wind_get_grect(gw->handle, WF_CURRXYWH, &g);
g.g_w = MIN(msg[6], g2.g_w);
g.g_h = MIN(msg[7], g2.g_h);
- if(g2.g_w != g.g_w || g2.g_h != g.g_h){
- wind_set(gw->handle, WF_CURRXYWH, g.g_x, g.g_y, g.g_w, g.g_h);
- if((gw->flags & GW_FLAG_CUSTOM_SCROLLING) == 0) {
- if(guiwin_update_slider(gw, GUIWIN_VH_SLIDER)) {
- guiwin_send_redraw(gw, NULL);
- }
- }
+ if(g2.g_w != g.g_w || g2.g_h != g.g_h) {
+ wind_set(gw->handle, WF_CURRXYWH, g.g_x, g.g_y, g.g_w, g.g_h);
+ if((gw->flags & GW_FLAG_CUSTOM_SCROLLING) == 0) {
+ if(guiwin_update_slider(gw, GUIWIN_VH_SLIDER)) {
+ guiwin_send_redraw(gw, NULL);
+ }
+ }
}
@@ -205,7 +225,7 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
case WM_FULLED:
wind_get_grect(gw->handle, WF_FULLXYWH, &g);
wind_get_grect(gw->handle, WF_CURRXYWH, &g2);
- if(g.g_w == g2.g_w && g.g_h == g2.g_h){
+ if(g.g_w == g2.g_w && g.g_h == g2.g_h) {
wind_get_grect(gw->handle, WF_PREVXYWH, &g);
}
wind_set_grect(gw->handle, WF_CURRXYWH, &g);
@@ -243,6 +263,13 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
g.g_h = msg[7];
guiwin_toolbar_redraw(gw, &g);
}
+ if (gw->form != NULL) {
+ g.g_x = msg[4];
+ g.g_y = msg[5];
+ g.g_w = msg[6];
+ g.g_h = msg[7];
+ guiwin_form_redraw(gw, &g);
+ }
break;
default:
@@ -254,6 +281,182 @@ static short preproc_wm(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
return(retval);
}
+static short preproc_mu_button(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
+{
+ short retval = 0;
+
+ DEBUG_PRINT(("preproc_mu_button\n"));
+
+ // toolbar handling:
+ if ((gw->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0
+ && gw->toolbar != NULL) {
+
+ GRECT tb_area;
+
+ guiwin_get_grect(gw, GUIWIN_AREA_TOOLBAR, &tb_area);
+
+ if (POINT_WITHIN(ev_out->emo_mouse.p_x,
+ ev_out->emo_mouse.p_y, tb_area)) {
+ // send WM_TOOLBAR message
+ gw->toolbar[gw->toolbar_idx].ob_x = tb_area.g_x;
+ gw->toolbar[gw->toolbar_idx].ob_y = tb_area.g_y;
+ short obj_idx = objc_find(gw->toolbar,
+ gw->toolbar_idx, 8,
+ ev_out->emo_mouse.p_x,
+ ev_out->emo_mouse.p_y);
+
+ DEBUG_PRINT(("Toolbar index: %d\n", obj_idx));
+ if (obj_idx > 0) {
+ if ((gw->toolbar[obj_idx].ob_flags & OF_SELECTABLE)!=0
+ && ((gw->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0)
+ && ((gw->flags & GW_FLAG_TOOLBAR_REDRAW) == 1)) {
+ gw->toolbar[obj_idx].ob_state |= OS_SELECTED;
+ // TODO: optimize redraw by setting the object clip:
+ guiwin_toolbar_redraw(gw, NULL);
+ }
+ }
+
+ short oldevents = ev_out->emo_events;
+ short msg_out[8] = {WM_TOOLBAR, gl_apid,
+ 0, gw->handle,
+ obj_idx, ev_out->emo_mclicks,
+ ev_out->emo_kmeta, 0
+ };
+ ev_out->emo_events = MU_MESAG;
+ // notify the window about toolbar click:
+ gw->handler_func(gw, ev_out, msg_out);
+ ev_out->emo_events = oldevents;
+ retval = 1;
+ }
+ }
+
+ if (gw->form != NULL) {
+
+ GRECT content_area;
+ struct guiwin_scroll_info_s *slid;
+
+ DEBUG_PRINT(("preproc_mu_button: handling form click.\n"));
+
+ guiwin_get_grect(gw, GUIWIN_AREA_CONTENT, &content_area);
+
+ if (POINT_WITHIN(ev_out->emo_mouse.p_x,
+ ev_out->emo_mouse.p_y, content_area)) {
+
+ slid = guiwin_get_scroll_info(gw);
+
+ gw->form[gw->form_idx].ob_x = content_area.g_x -
+ (slid->x_pos * slid->x_unit_px);
+ gw->form[gw->form_idx].ob_y = content_area.g_y -
+ (slid->y_pos * slid->y_unit_px);
+
+ gw->form_focus_obj = objc_find(gw->form, gw->form_idx, 8,
+ ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y);
+
+ DEBUG_PRINT(("Window Form click, obj: %d\n", gw->form_focus_obj));
+ if (gw->form_focus_obj > -1
+ && (gw->form[gw->form_focus_obj].ob_state & OS_DISABLED)== 0) {
+
+ uint16_t type = (gw->form[gw->form_focus_obj].ob_type & 0xFF);
+ uint16_t xtype = (gw->form[gw->form_focus_obj].ob_type & 0xFF00);
+ uint16_t nextobj, edit_idx;
+
+ DEBUG_PRINT(("type: %d, xtype: %d\n", type, xtype));
+
+ if (type == G_FTEXT || type == G_FBOXTEXT) {
+
+ // report mouse click to the tree:
+ retval = form_button(gw->form, gw->form_focus_obj,
+ ev_out->emo_mclicks, &nextobj);
+
+ // end edit mode for active edit object:
+ if(gw->form_edit_obj != -1) {
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDEND);
+ }
+
+ // activate the new edit object:
+ gw->form_edit_obj = gw->form_focus_obj;
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDINIT);
+
+ } else {
+
+ // end edit mode for active edit object:
+ if(gw->form_edit_obj != -1) {
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDEND);
+ gw->form_edit_obj = -1;
+ }
+
+ if ((xtype & GW_XTYPE_CHECKBOX) != 0) {
+
+ if ((gw->form[gw->form_focus_obj].ob_state & OS_SELECTED) != 0) {
+ gw->form[gw->form_focus_obj].ob_state &= ~(OS_SELECTED|OS_CROSSED);
+ } else {
+ gw->form[gw->form_focus_obj].ob_state |= (OS_SELECTED|OS_CROSSED);
+ }
+ guiwin_form_redraw(gw, obj_screen_rect(gw->form,
+ gw->form_focus_obj));
+ }
+ short oldevents = ev_out->emo_events;
+ short msg_out[8] = {GUIWIN_WM_FORM, gl_apid,
+ 0, gw->handle,
+ gw->form_focus_obj, ev_out->emo_mclicks,
+ ev_out->emo_kmeta, 0
+ };
+ ev_out->emo_events = MU_MESAG;
+ // notify the window about form click:
+ gw->handler_func(gw, ev_out, msg_out);
+ ev_out->emo_events = oldevents;
+ retval = 1;
+ evnt_timer(150);
+ }
+ }
+ }
+ }
+
+ return(retval);
+}
+
+static short preproc_mu_keybd(GUIWIN * gw, EVMULT_OUT *ev_out, short msg[8])
+{
+
+ if((gw->form != NULL) && (gw->form_edit_obj > -1) ) {
+
+ short next_edit_obj = gw->form_edit_obj;
+ short next_char = -1;
+ short edit_idx;
+ short r;
+
+ r = form_keybd(gw->form, gw->form_edit_obj, next_edit_obj,
+ ev_out->emo_kreturn,
+ &next_edit_obj, &next_char);
+
+ if (next_edit_obj != gw->form_edit_obj) {
+
+ if(gw->form_edit_obj != -1) {
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDEND);
+ }
+
+ gw->form_edit_obj = next_edit_obj;
+
+ objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDINIT);
+ } else {
+ if(next_char > 13)
+ r = objc_edit(gw->form, gw->form_edit_obj,
+ ev_out->emo_kreturn, &edit_idx,
+ EDCHAR);
+ }
+ }
+}
+
short guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8])
{
GUIWIN *dest;
@@ -311,50 +514,22 @@ short guiwin_dispatch_event(EVMULT_IN *ev_in, EVMULT_OUT *ev_out, short msg[8])
dest = guiwin_find(h_aes);
- if(dest == NULL || dest->handler_func == NULL)
+ if (dest == NULL || dest->handler_func == NULL)
return(0);
- if( (ev_out->emo_events & MU_BUTTON) != 0) {
- DEBUG_PRINT(("Found MU_BUTTON dest: %p (%d), flags: %d, cb: %p\n", dest, dest->handle, dest->flags, dest->handler_func));
+ if ((ev_out->emo_events & MU_BUTTON) != 0) {
- // toolbar handling:
- if((dest->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0
- && dest->toolbar != NULL) {
- GRECT tb_area;
- guiwin_get_grect(dest, GUIWIN_AREA_TOOLBAR, &tb_area);
- if (POINT_WITHIN(ev_out->emo_mouse.p_x,
- ev_out->emo_mouse.p_y, tb_area)) {
- // send WM_TOOLBAR message
- dest->toolbar[dest->toolbar_idx].ob_x = tb_area.g_x;
- dest->toolbar[dest->toolbar_idx].ob_y = tb_area.g_y;
- short obj_idx = objc_find(dest->toolbar,
- dest->toolbar_idx, 8,
- ev_out->emo_mouse.p_x,
- ev_out->emo_mouse.p_y);
- DEBUG_PRINT(("Toolbar index: %d\n", obj_idx));
- short msg_out[8] = {WM_TOOLBAR, gl_apid, 0, dest->handle,
- obj_idx, ev_out->emo_mclicks, ev_out->emo_kmeta, 0
- };
- if (obj_idx > 0) {
- if ((dest->toolbar[obj_idx].ob_flags & OF_SELECTABLE)!=0
- && ((dest->flags & GW_FLAG_CUSTOM_TOOLBAR) == 0)
- && ((dest->flags & GW_FLAG_TOOLBAR_REDRAW) == 1)) {
- dest->toolbar[obj_idx].ob_state |= OS_SELECTED;
- // TODO: optimize redraw by setting the object clip:
- guiwin_toolbar_redraw(dest, NULL);
- }
- }
-
- short oldevents = ev_out->emo_events;
- ev_out->emo_events = MU_MESAG;
- // notify the window about toolbar click:
- dest->handler_func(dest, ev_out, msg_out);
- handler_called=true;
- ev_out->emo_events = oldevents;
- retval = 1;
- }
+ DEBUG_PRINT(("Found MU_BUTTON dest: %p (%d), flags: %d, cb: %p\n", dest, dest->handle, dest->flags, dest->handler_func));
+ retval = preproc_mu_button(dest, ev_out, msg);
+ if(retval != 0) {
+ handler_called = true;
}
}
+
+ if ((ev_out->emo_events & MU_KEYBD)) {
+ retval = preproc_mu_keybd(dest, ev_out, msg);
+ }
+
if (handler_called==false) {
dest->handler_func(dest, ev_out, msg);
}
@@ -458,7 +633,7 @@ short guiwin_remove(GUIWIN *win)
void guiwin_get_grect(GUIWIN *win, enum guwin_area_e mode, GRECT *dest)
{
- assert(win != NULL);
+ assert(win != NULL);
wind_get_grect(win->handle, WF_WORKXYWH, dest);
if (mode == GUIWIN_AREA_CONTENT) {
@@ -502,9 +677,9 @@ void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh)
vis_units = g.g_h/slid->y_unit_px;
newpos = slid->y_pos = MIN(slid->y_units-vis_units,
MAX(0, slid->y_pos+units));
- if(newpos < 0){
- newpos = slid->y_pos = 0;
- }
+ if(newpos < 0) {
+ newpos = slid->y_pos = 0;
+ }
if(oldpos == newpos)
return;
@@ -538,9 +713,9 @@ void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh)
newpos = slid->x_pos = MIN(slid->x_units-vis_units,
MAX(0, slid->x_pos+units));
- if(newpos < 0){
- newpos = slid->x_pos = 0;
- }
+ if(newpos < 0) {
+ newpos = slid->x_pos = 0;
+ }
if(oldpos == newpos)
return;
@@ -656,6 +831,7 @@ void guiwin_set_toolbar(GUIWIN *win, OBJECT *toolbar, short idx, uint32_t flags)
{
win->toolbar = toolbar;
win->toolbar_idx = idx;
+ win->toolbar_edit_obj = -1;
if(flags & GW_FLAG_HAS_VTOOLBAR) {
win->flags |= GW_FLAG_HAS_VTOOLBAR;
}
@@ -677,30 +853,30 @@ struct guiwin_scroll_info_s *guiwin_get_scroll_info(GUIWIN *win) {
void guiwin_set_scroll_grid(GUIWIN * win, short x, short y)
{
- struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
+ struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
- assert(slid != NULL);
+ assert(slid != NULL);
- slid->y_unit_px = x;
- slid->x_unit_px = y;
+ slid->y_unit_px = x;
+ slid->x_unit_px = y;
}
void guiwin_set_content_units(GUIWIN * win, short x, short y)
{
- struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
+ struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
- assert(slid != NULL);
+ assert(slid != NULL);
- slid->x_units = x;
- slid->y_units = y;
+ slid->x_units = x;
+ slid->y_units = y;
}
void guiwin_send_msg(GUIWIN *win, short msg_type, short a, short b, short c,
- short d)
+ short d)
{
- short msg[8];
+ short msg[8];
- msg[0] = msg_type;
+ msg[0] = msg_type;
msg[1] = gl_apid;
msg[2] = 0;
msg[3] = win->handle;
@@ -714,32 +890,32 @@ void guiwin_send_msg(GUIWIN *win, short msg_type, short a, short b, short c,
void guiwin_send_redraw(GUIWIN *win, GRECT *area)
{
- short msg[8];
+ short msg[8], retval;
GRECT work;
EVMULT_IN event_in = {
- .emi_flags = MU_MESAG | MU_TIMER | MU_KEYBD | MU_BUTTON,
- .emi_bclicks = 258,
- .emi_bmask = 3,
- .emi_bstate = 0,
- .emi_m1leave = MO_ENTER,
- .emi_m1 = {0,0,0,0},
- .emi_m2leave = 0,
- .emi_m2 = {0,0,0,0},
- .emi_tlow = 0,
- .emi_thigh = 0
- };
- EVMULT_OUT event_out;
+ .emi_flags = MU_MESAG | MU_TIMER | MU_KEYBD | MU_BUTTON,
+ .emi_bclicks = 258,
+ .emi_bmask = 3,
+ .emi_bstate = 0,
+ .emi_m1leave = MO_ENTER,
+ .emi_m1 = {0,0,0,0},
+ .emi_m2leave = 0,
+ .emi_m2 = {0,0,0,0},
+ .emi_tlow = 0,
+ .emi_thigh = 0
+ };
+ EVMULT_OUT event_out;
if (area == NULL) {
guiwin_get_grect(win, GUIWIN_AREA_WORK, &work);
if (work.g_w < 1 || work.g_h < 1) {
- if (win->toolbar != NULL) {
- guiwin_get_grect(win, GUIWIN_AREA_TOOLBAR, &work);
- if (work.g_w < 1 || work.g_h < 1) {
- return;
- }
- }
+ if (win->toolbar != NULL) {
+ guiwin_get_grect(win, GUIWIN_AREA_TOOLBAR, &work);
+ if (work.g_w < 1 || work.g_h < 1) {
+ return;
+ }
+ }
}
area = &work;
}
@@ -753,13 +929,25 @@ void guiwin_send_redraw(GUIWIN *win, GRECT *area)
msg[6] = area->g_w;
msg[7] = area->g_h;
- event_out.emo_events = MU_MESAG;
- win->handler_func(win, &event_out, msg);
+ event_out.emo_events = MU_MESAG;
+ retval = preproc_wm(win, &event_out, msg);
+ if (retval == 0 || (win->flags & GW_FLAG_PREPROC_WM) != 0){
+ win->handler_func(win, &event_out, msg);
+ }
+
+
//appl_write(gl_apid, 16, &msg);
}
-
+void guiwin_set_form(GUIWIN *win, OBJECT *tree, short index)
+{
+ DEBUG_PRINT(("Setting form %p (%d) for window %p\n", tree, index, win));
+ win->form = tree;
+ win->form_edit_obj = -1;
+ win->form_focus_obj = -1;
+ win->form_idx = index;
+}
bool guiwin_has_intersection(GUIWIN *win, GRECT *work)
{
@@ -815,6 +1003,47 @@ void guiwin_toolbar_redraw(GUIWIN *gw, GRECT *clip)
}
}
+
+void guiwin_form_redraw(GUIWIN *gw, GRECT *clip)
+{
+ GRECT area, area_ro, g;
+ int scroll_px_x, scroll_px_y;
+ struct guiwin_scroll_info_s *slid;
+ //int new_x, new_y, old_x, old_y;
+ short edit_idx;
+
+ DEBUG_PRINT(("guiwin_form_redraw\n"));
+
+ // calculate form coordinates, include scrolling:
+ guiwin_get_grect(gw, GUIWIN_AREA_CONTENT, &area_ro);
+ slid = guiwin_get_scroll_info(gw);
+
+ // Update form position:
+ gw->form[gw->form_idx].ob_x = area_ro.g_x - (slid->x_pos * slid->x_unit_px);
+ gw->form[gw->form_idx].ob_y = area_ro.g_y - (slid->y_pos * slid->y_unit_px);
+
+ if(clip == NULL) {
+ clip = &area_ro;
+ }
+
+ area = area_ro;
+
+ /* Walk the AES rectangle list and redraw the visible areas of the window:*/
+ if(rc_intersect(clip, &area)) {
+
+ wind_get_grect(gw->handle, WF_FIRSTXYWH, &g);
+ while (g.g_h > 0 || g.g_w > 0) {
+ if(rc_intersect(&area, &g)) {
+ objc_draw(gw->form, gw->form_idx, 8, g.g_x, g.g_y,
+ g.g_w, g.g_h);
+
+ }
+ wind_get_grect(gw->handle, WF_NEXTXYWH, &g);
+ }
+ }
+}
+
+
void guiwin_clear(GUIWIN *win)
{
GRECT area, g;
@@ -823,7 +1052,7 @@ void guiwin_clear(GUIWIN *win)
vh = guiwin_get_vdi_handle(win);
- if(win->state & GW_STATUS_ICONIFIED){
+ if(win->state & GW_STATUS_ICONIFIED) {
// also clear the toolbar area when iconified:
guiwin_get_grect(win, GUIWIN_AREA_WORK, &area);
} else {
diff --git a/beos/gui_options.cpp b/atari/gemtk/objc.c
similarity index 50%
copy from beos/gui_options.cpp
copy to atari/gemtk/objc.c
index 62e6640..90c4d88 100644
--- a/beos/gui_options.cpp
+++ b/atari/gemtk/objc.c
@@ -1,49 +1,58 @@
-/*
- * Copyright 2008 François Revol <mmu_man(a)users.sourceforge.net>
- * Copyright 2006 Rob Kendrick <rjek(a)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/>.
+/*
+ * Copyright 2013 Ole Loots <ole(a)monochrom.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/>.
+ *
+ * Module Description:
+ *
+ * AES Object tree tools.
+ *
*/
-#define __STDBOOL_H__ 1
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-extern "C" {
-#include "utils/log.h"
-#include "desktop/options.h"
-}
-#include "beos/gui.h"
-#include "beos/scaffolding.h"
-#include "beos/gui_options.h"
+ #include "gemtk.h"
-#include <View.h>
-#include <Window.h>
-BWindow *wndPreferences;
+OBJECT *get_tree(int idx)
+{
-void nsbeos_options_init(void) {
- /* set the widgets to reflect the current options */
- nsbeos_options_load();
+ OBJECT *tree;
+
+ rsrc_gaddr(R_TREE, idx, &tree);
+
+ return tree;
}
-void nsbeos_options_load(void) {
-#warning WRITEME
+bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
+{
+ GRECT obj_screen;
+ bool ret = false;
+
+ objc_offset(tree, obj, &obj_screen.g_x, &obj_screen.g_y);
+ obj_screen.g_w = tree[obj].ob_width;
+ obj_screen.g_h = tree[obj].ob_height;
+
+ ret = RC_WITHIN(&obj_screen, area);
+
+ return(ret);
}
+GRECT * obj_screen_rect(OBJECT * tree, short obj)
+{
+ static GRECT obj_screen;
+
+ get_objframe(tree, obj, &obj_screen);
-void nsbeos_options_save(void) {
-#warning WRITEME
+ return(&obj_screen);
}
diff --git a/atari/gemtk/objc.h b/atari/gemtk/objc.h
new file mode 100644
index 0000000..6fa1072
--- /dev/null
+++ b/atari/gemtk/objc.h
@@ -0,0 +1,7 @@
+#ifndef GEMTK_OBJC_H
+#define GEMTK_OBJC_H
+
+
+
+#endif // GEMTK_OBJC_H
+
diff --git a/atari/gemtk/utils.c b/atari/gemtk/utils.c
index 4a24d82..82f74f9 100644
--- a/atari/gemtk/utils.c
+++ b/atari/gemtk/utils.c
@@ -38,8 +38,3 @@ unsigned short _systype (void)
return _systype_v;
}
-OBJECT *get_tree( int idx) {
- OBJECT *tree;
- rsrc_gaddr(R_TREE, idx, &tree);
- return tree;
-}
diff --git a/atari/gui.c b/atari/gui.c
index 888f82d..ccf7c21 100755
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -715,7 +715,7 @@ void gui_start_selection(struct gui_window *w)
void gui_paste_from_clipboard(struct gui_window *w, int x, int y)
{
- char * clip = scrap_txt_read( &app );
+ char * clip = scrap_txt_read();
if( clip == NULL )
return;
int clip_length = strlen( clip );
@@ -731,8 +731,9 @@ void gui_paste_from_clipboard(struct gui_window *w, int x, int y)
strlen(utf8), true);
free(utf8);
}
- free( clip );
}
+
+ free( clip );
}
bool gui_empty_clipboard(void)
@@ -812,7 +813,7 @@ fin:
bool gui_commit_clipboard(void)
{
- int r = scrap_txt_write(&app, tmp_clipboard);
+ int r = scrap_txt_write(tmp_clipboard);
return( (r>0)?true:false );
}
diff --git a/atari/history.h b/atari/history.h
index 3ea2621..6185e2a 100755
--- a/atari/history.h
+++ b/atari/history.h
@@ -20,7 +20,6 @@
#define NS_ATARI_HISTORY_H
#include <stdbool.h>
-#include <windom.h>
#include "desktop/tree.h"
#include "atari/treeview.h"
#include "atari/gemtk/gemtk.h"
diff --git a/atari/hotlist.h b/atari/hotlist.h
index ed965a5..9fbf389 100755
--- a/atari/hotlist.h
+++ b/atari/hotlist.h
@@ -19,7 +19,6 @@
#ifndef NS_ATARI_HOTLIST_H
#define NS_ATARI_HOTLIST_H
#include <stdbool.h>
-#include <windom.h>
#include "desktop/tree.h"
#include "atari/gemtk/gemtk.h"
#include "atari/treeview.h"
diff --git a/atari/search.c b/atari/search.c
index 4737125..cc58caa 100644
--- a/atari/search.c
+++ b/atari/search.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Ole Loots <ole(a)monochrom.net>
+ * Copyright 2013 Ole Loots <ole(a)monochrom.net>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -14,7 +14,13 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+ *
+ * Module Description:
+ *
+ *
+ *
+ */
+
#include <limits.h>
#include <stdlib.h>
@@ -39,10 +45,14 @@
#include "atari/res/netsurf.rsh"
extern struct gui_window * input_window;
-extern void * h_gem_rsrc;
+extern void * h_gem_rsrc;
+extern GRECT desk_area;
-static SEARCH_FORM_SESSION current;
+static SEARCH_FORM_SESSION current;
+static OBJECT *dlgtree;
+static GUIWIN *searchwin;
+static short h_aes_win;
static void nsatari_search_set_status(bool found, void *p);
static void nsatari_search_set_hourglass(bool active, void *p);
@@ -80,7 +90,7 @@ void nsatari_search_set_hourglass(bool active, void *p)
{
SEARCH_FORM_SESSION s = (SEARCH_FORM_SESSION)p;
LOG((""));
- if( active && current != NULL )
+ if (active && current != NULL)
gui_window_set_pointer(s->bw->window, GUI_POINTER_PROGRESS);
else
gui_window_set_pointer(s->bw->window, GUI_POINTER_DEFAULT);
@@ -127,22 +137,22 @@ void nsatari_search_set_back_state(bool active, void *p)
}
-static SEARCH_FORM_SESSION get_search_session(WINDOW * win)
+static SEARCH_FORM_SESSION get_search_session(GUIWIN * win)
{
return (current);
}
-static void destroy_search_session( SEARCH_FORM_SESSION s )
+static void destroy_search_session(SEARCH_FORM_SESSION s)
{
- if( s != NULL ){
+ if(s != NULL ){
LOG((""));
- free( s );
+ free(s);
}
}
-static int apply_form(WINDOW * win, struct s_search_form_state * s)
+static int apply_form(GUIWIN *win, struct s_search_form_state * s)
{
- OBJECT * obj = ObjcTree(OC_FORM, win );
+ OBJECT * obj = dlgtree;
if( obj == NULL ){
goto error;
}
@@ -167,15 +177,15 @@ error:
return( 1 );
}
-/* checks if search parameters changes */
-static bool form_changed( WINDOW * w )
+/* checks for search parameters changes */
+static bool form_changed(GUIWIN * w)
{
bool check;
struct s_search_form_state cur;
SEARCH_FORM_SESSION s = get_search_session(w);
if( s == NULL )
return false;
- OBJECT * obj = ObjcTree(OC_FORM, w);
+ OBJECT * obj = (OC_FORM, w);
assert( s != NULL && obj != NULL );
uint32_t flags_old = s->state.flags;
apply_form(w, &cur);
@@ -188,9 +198,9 @@ static bool form_changed( WINDOW * w )
}
char * cstr = ObjcString( obj, SEARCH_TB_SRCH, NULL );
- if( cstr != NULL ){
- if( strcmp(cstr, (char*)&s->state.text) != 0 ) {
- return ( true );
+ if (cstr != NULL){
+ if (strcmp(cstr, (char*)&s->state.text) != 0) {
+ return (true);
}
}
@@ -202,14 +212,14 @@ static void __CDECL evnt_bt_srch_click( WINDOW *win, int index, int unused, void
{
bool fwd;
- SEARCH_FORM_SESSION s = get_search_session(win);
- OBJECT * obj = ObjcTree(OC_FORM, s->formwind );
+ SEARCH_FORM_SESSION s = get_search_session(searchwin);
+ OBJECT * obj = dlgtree;
search_flags_t flags = 0;
ObjcChange(OC_FORM, win, index, ~SELECTED , TRUE);
- if( form_changed(win) ){
+ if( form_changed(searchwin) ){
browser_window_search_destroy_context(s->bw);
- apply_form( win, &s->state );
+ apply_form(searchwin, &s->state );
} else {
/* get search direction manually: */
if( (obj[SEARCH_CB_FWD].ob_state & SELECTED) != 0 )
@@ -227,78 +237,93 @@ static void __CDECL evnt_cb_click( WINDOW *win, int index, int unused, void *unu
{
short newstate;
- OBJECT * obj = ObjcTree(OC_FORM, get_search_session(win)->formwind );
+
}
static void __CDECL evnt_close( WINDOW *win, short buff[8])
{
- /* Free Search Contexts */
- /* todo: destroy search context, if any? */
- SEARCH_FORM_SESSION s = get_search_session(win);
- if( s != NULL ){
- destroy_search_session( s );
- }
- current = NULL;
- ApplWrite( _AESapid, WM_DESTROY, win->handle, 0,0,0,0 );
-}
-void search_destroy( struct gui_window * gw )
-{
- LOG(("search_destroy %p / %p", gw, current ));
- if( current != NULL && current->formwind != NULL ){
- ApplWrite( _AESapid, WM_CLOSED, current->formwind->handle, 0,0,0,0);
- /* Handle Close event */
- EvntWindom( MU_MESAG );
- /* Handle Destroy Event */
- EvntWindom( MU_MESAG );
- }
- LOG(("done"));
}
+
+void search_destroy(struct gui_window *gw)
+{
+ /* Free Search Contexts */
+ /* todo: destroy search context, if any? */
+ LOG((""));
-SEARCH_FORM_SESSION open_browser_search( struct gui_window * gw )
+ if (current != NULL){
+ destroy_search_session(current);
+ current = NULL;
+ }
+
+ guiwin_remove(searchwin);
+ searchwin = NULL;
+
+ wind_close(h_aes_win);
+ wind_delete(h_aes_win);
+ h_aes_win = -1;
+
+ LOG(("done"));
+}
+
+SEARCH_FORM_SESSION open_browser_search(struct gui_window * gw)
{
char * title;
SEARCH_FORM_SESSION sfs;
- GRECT pos, treesize;
- OBJECT * tree = get_tree(SEARCH);
- if( tree == NULL ){
- return( NULL );
- }
+ GRECT pos, treesize;
+ uint32_t kind = CLOSER | NAME | MOVER;
+
+ if (dlgtree == NULL) {
+ dlgtree = get_tree(SEARCH);
+ if (dlgtree == NULL ) {
+ return( NULL );
+ }
+ }
+
+ if(searchwin){
+ search_destroy(gw);
+ }
+
sfs = calloc(1, sizeof(struct s_search_form_session));
if( sfs == NULL )
return( NULL );
title = (char*)messages_get("FindTextNS");
- if( title == NULL )
- title = (char*)"Find text ...";
-
- search_destroy( gw );
-
+ if (title == NULL)
+ title = (char*)"Find text ...";
+
/* setup dipslay position: right corner */
treesize.g_x = 0;
treesize.g_y = 0;
- treesize.g_w = tree->ob_width;
- treesize.g_h = tree->ob_height;
- wind_calc_grect(WC_BORDER, WAT_FORM, &treesize, &pos);
- pos.g_x = app.w - pos.g_w;
- pos.g_y = app.h - pos.g_h;
+ treesize.g_w = dlgtree->ob_width;
+ treesize.g_h = dlgtree->ob_height;
+ wind_calc_grect(WC_BORDER, kind, &treesize, &pos);
+ pos.g_x = desk_area.g_w - pos.g_w;
+ pos.g_y = desk_area.g_h - pos.g_h;
+
+ /* create the dialog: */
+ h_aes_win = wind_create_grect(kind, &pos);
+ wind_set_str(h_aes_win, WF_NAME, title);
current = sfs;
- sfs->bw = gw->browser->bw;
+ sfs->bw = gw->browser->bw;
+/*
sfs->formwind = mt_FormCreate( &app, tree, WAT_FORM,
NULL, title,
&pos, true, false);
-
+*/
+/*
ObjcAttachFormFunc(sfs->formwind, SEARCH_BT_SEARCH, evnt_bt_srch_click,
NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_CASESENSE, evnt_cb_click, NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_SHOWALL, evnt_cb_click, NULL);
ObjcAttachFormFunc(sfs->formwind, SEARCH_CB_FWD, evnt_cb_click, NULL);
EvntAdd(sfs->formwind, WM_CLOSED, evnt_close, EV_TOP);
- apply_form(sfs->formwind, &sfs->state );
- strncpy( ObjcString( tree, SEARCH_TB_SRCH, NULL ), "", SEARCH_MAX_SLEN);
+*/
+ apply_form(searchwin, &sfs->state );
+ set_string(dlgtree, SEARCH_TB_SRCH, "");
return( current );
diff --git a/atari/search.h b/atari/search.h
index 7913803..9228b96 100644
--- a/atari/search.h
+++ b/atari/search.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Ole Loots <ole(a)monochrom.net>
+ * Copyright 2013 Ole Loots <ole(a)monochrom.net>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -14,7 +14,13 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+ *
+ * Module Description:
+ *
+ *
+ *
+ */
+
#ifndef NS_ATARI_SEARCH_H
#define NS_ATARI_SEARCH_H
@@ -29,7 +35,6 @@ struct s_search_form_state
struct s_search_form_session {
struct browser_window * bw;
- WINDOW * formwind;
struct s_search_form_state state;
};
@@ -37,6 +42,6 @@ struct s_search_form_session {
typedef struct s_search_form_session * SEARCH_FORM_SESSION;
SEARCH_FORM_SESSION open_browser_search(struct gui_window * gw);
-void search_destroy( struct gui_window * gw );
+void search_destroy(struct gui_window * gw);
#endif
diff --git a/atari/settings.c b/atari/settings.c
index 90404c1..c5cc3ae 100644
--- a/atari/settings.c
+++ b/atari/settings.c
@@ -59,7 +59,7 @@ static OBJECT * dlgtree;
guiwin_send_redraw(settings_guiwin, \
obj_screen_rect(dlgtree, idx));
-#define FORMEVENT(idx) form_event(idx, 0, NULL);
+#define FORMEVENT(idx) form_event(idx, 0);
#define INPUT_HOMEPAGE_URL_MAX_LEN 44
#define INPUT_LOCALE_MAX_LEN 6
@@ -73,37 +73,12 @@ static OBJECT * dlgtree;
#define LABEL_ICONSET_MAX_LEN 8
#define INPUT_TOOLBAR_COLOR_MAX_LEN 6
-#define CB_SELECTED (OS_SELECTED | OS_CROSSED)
-
static void on_close(void);
static void on_redraw(GRECT *clip);
-static void form_event(int index, int external, void *unused2);
+static void form_event(int index, int external);
static void apply_settings(void);
static void save_settings(void);
-static bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
-{
- GRECT obj_screen;
- bool ret = false;
-
- objc_offset(tree, obj, &obj_screen.g_x, &obj_screen.g_y);
- obj_screen.g_w = dlgtree[obj].ob_width;
- obj_screen.g_h = dlgtree[obj].ob_height;
-
- ret = RC_WITHIN(&obj_screen, area);
-
- return(ret);
-}
-
-static GRECT * obj_screen_rect(OBJECT * tree, short obj)
-{
- static GRECT obj_screen;
-
- get_objframe(tree, obj, &obj_screen);
-
- return(&obj_screen);
-}
-
static void set_text( short idx, char * text, int len )
{
@@ -234,21 +209,21 @@ static void display_settings(void)
set_text( SETTINGS_BT_SEL_FONT_RENDERER, nsoption_charp(atari_font_driver),
LABEL_FONT_RENDERER_MAX_LEN );
SET_BIT(dlgtree[SETTINGS_CB_TRANSPARENCY].ob_state,
- CB_SELECTED, nsoption_int(atari_transparency) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_int(atari_transparency) ? 1 : 0 );
SET_BIT(dlgtree[SETTINGS_CB_ENABLE_ANIMATION].ob_state,
- CB_SELECTED, nsoption_bool(animate_images) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(animate_images) ? 1 : 0 );
SET_BIT(dlgtree[SETTINGS_CB_FG_IMAGES].ob_state,
- CB_SELECTED, nsoption_bool(foreground_images) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(foreground_images) ? 1 : 0 );
SET_BIT(dlgtree[SETTINGS_CB_BG_IMAGES].ob_state,
- CB_SELECTED, nsoption_bool(background_images) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(background_images) ? 1 : 0 );
/*
TODO: enable this option?
SET_BIT(dlgtree[SETTINGS_CB_INCREMENTAL_REFLOW].ob_state,
- CB_SELECTED, nsoption_bool(incremental_reflow) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(incremental_reflow) ? 1 : 0 );
*/
SET_BIT(dlgtree[SETTINGS_CB_ANTI_ALIASING].ob_state,
- CB_SELECTED, nsoption_int(atari_font_monochrom) ? 0 : 1 );
+ GW_CB_SELECTED, nsoption_int(atari_font_monochrom) ? 0 : 1 );
/*
TODO: activate this option?
@@ -274,9 +249,9 @@ static void display_settings(void)
set_text( SETTINGS_EDIT_PROXY_PASSWORD, nsoption_charp(http_proxy_auth_pass),
INPUT_PROXY_PASSWORD_MAX_LEN );
SET_BIT(dlgtree[SETTINGS_CB_USE_PROXY].ob_state,
- CB_SELECTED, nsoption_bool(http_proxy) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_bool(http_proxy) ? 1 : 0 );
SET_BIT(dlgtree[SETTINGS_CB_PROXY_AUTH].ob_state,
- CB_SELECTED, nsoption_int(http_proxy_auth) ? 1 : 0 );
+ GW_CB_SELECTED, nsoption_int(http_proxy_auth) ? 1 : 0 );
tmp_option_max_cached_fetch_handles = nsoption_int(max_cached_fetch_handles);
snprintf( spare, 255, "%2d", nsoption_int(max_cached_fetch_handles) );
@@ -304,7 +279,7 @@ static void display_settings(void)
}
-static void form_event(int index, int external, void *unused2)
+static void form_event(int index, int external)
{
char spare[255];
bool is_button = false;
@@ -327,36 +302,15 @@ static void form_event(int index, int external, void *unused2)
short x, y;
int choice;
- // TODO: set correct form coords.
-
- switch( index ){
+ switch(index){
case SETTINGS_SAVE:
save_settings();
- //save_settings();
- break;
-
-
- case SETTINGS_INC_HISTORY_AGE:
- case SETTINGS_DEC_HISTORY_AGE:
- if(index == SETTINGS_INC_HISTORY_AGE)
- tmp_option_expire_url += 1;
- else
- tmp_option_expire_url -= 1;
-
- if(tmp_option_expire_url > 99)
- tmp_option_expire_url = 0;
-
- snprintf( spare, 255, "%02d", tmp_option_expire_url);
- set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
- OBJ_REDRAW(SETTINGS_EDIT_HISTORY_AGE);
- is_button = true;
-
- default: break;
- }
-
+ break;
- switch(index){
+ case SETTINGS_ABORT:
+ close_settings();
+ break;
case SETTINGS_CB_USE_PROXY:
if( checked ){
@@ -398,13 +352,13 @@ static void form_event(int index, int external, void *unused2)
case SETTINGS_BT_SEL_FONT_RENDERER:
if( external ){
objc_offset(dlgtree, SETTINGS_BT_SEL_FONT_RENDERER, &x, &y);
- choice = MenuPopUp ( font_driver_items, x, y,
+ choice = MenuPopUp (font_driver_items, x, y,
num_font_drivers,
-1, -1, P_LIST + P_WNDW + P_CHCK );
if( choice > 0 &&
choice <= num_font_drivers ){
set_text(SETTINGS_BT_SEL_FONT_RENDERER,
- font_driver_items[choice-1],
+ (char*)font_driver_items[choice-1],
LABEL_FONT_RENDERER_MAX_LEN);
OBJ_REDRAW(SETTINGS_BT_SEL_FONT_RENDERER);
}
@@ -423,7 +377,7 @@ static void form_event(int index, int external, void *unused2)
num_locales,
-1, -1, P_LIST + P_WNDW + P_CHCK );
if( choice > 0 && choice <= num_locales ){
- set_text(SETTINGS_BT_SEL_LOCALE, locales[choice-1], 5);
+ set_text(SETTINGS_BT_SEL_LOCALE, (char*)locales[choice-1], 5);
}
OBJ_REDRAW(SETTINGS_BT_SEL_LOCALE);
break;
@@ -607,43 +561,6 @@ static void form_event(int index, int external, void *unused2)
}
}
-static void on_redraw(GRECT *clip)
-{
- GRECT visible, work, clip_ro;
- int scroll_px_x, scroll_px_y;
- struct guiwin_scroll_info_s *slid;
- int new_x, new_y, old_x, old_y;
- short edit_idx;
-
- /* Walk the AES rectangle list and redraw the visible areas of the window: */
- guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &work);
- slid = guiwin_get_scroll_info(settings_guiwin);
-
- old_x = dlgtree->ob_x;
- old_y = dlgtree->ob_y;
- dlgtree->ob_x = new_x = work.g_x - (slid->x_pos * slid->x_unit_px);
- dlgtree->ob_y = new_y = work.g_y - (slid->y_pos * slid->y_unit_px);
-
- if ((edit_obj > -1) && (obj_is_inside(dlgtree, edit_obj, &work) == true)) {
- dlgtree->ob_x = old_x;
- dlgtree->ob_y = old_y;
- objc_edit(dlgtree, edit_obj, 0, &edit_idx,
- EDEND);
- edit_obj = -1;
-
- dlgtree->ob_x = new_x;
- dlgtree->ob_y = new_y;
- }
-
- wind_get_grect(h_aes_win, WF_FIRSTXYWH, &visible);
- while (visible.g_x && visible.g_y) {
- if (rc_intersect(clip, &visible)) {
- objc_draw_grect(dlgtree, 0, 8, &visible);
- }
- wind_get_grect(h_aes_win, WF_NEXTXYWH, &visible);
- }
-}
-
static void apply_settings(void)
{
@@ -732,21 +649,15 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
short retval = 0;
GRECT clip, work;
static short edit_idx = 0;
+ struct guiwin_scroll_info_s *slid;
if ((ev_out->emo_events & MU_MESAG) != 0) {
// handle message
// printf("settings win msg: %d\n", msg[0]);
switch (msg[0]) {
- case WM_REDRAW:
- clip.g_x = msg[4];
- clip.g_y = msg[5];
- clip.g_w = msg[6];
- clip.g_h = msg[7];
- on_redraw(&clip);
- break;
- case WM_CLOSED:
+ case WM_CLOSED:
// TODO: this needs to iterate through all gui windows and
// check if the rootwin is this window...
close_settings();
@@ -756,90 +667,28 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
guiwin_update_slider(win, GUIWIN_VH_SLIDER);
break;
+ case WM_MOVED:
+ break;
+
case WM_TOOLBAR:
switch(msg[4]){
default: break;
}
break;
+ case GUIWIN_WM_FORM:
+ form_event(msg[4], 1);
+ break;
+
default:
break;
}
}
- if ((ev_out->emo_events & MU_KEYBD) != 0) {
-
- if((edit_obj > -1) /* && obj_is_inside(dlgtree, edit_obj, &work) */){
-
- short next_edit_obj = edit_obj;
- short next_char = -1;
- short r;
-
- guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &work);
-
- r = form_keybd(dlgtree, edit_obj, next_edit_obj, ev_out->emo_kreturn,
- &next_edit_obj, &next_char);
- if (next_edit_obj != edit_obj) {
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx,
- EDEND);
- edit_obj = next_edit_obj;
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx,
- EDINIT);
- } else {
- if(next_char > 13)
- r = objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx,
- EDCHAR);
- }
-
- }
+ if ((ev_out->emo_events & MU_KEYBD) != 0) {
}
- if ((ev_out->emo_events & MU_BUTTON) != 0) {
-
- struct guiwin_scroll_info_s *slid;
- short nextobj, ret=-1;
-
- guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &work);
-
- slid = guiwin_get_scroll_info(settings_guiwin);
- dlgtree->ob_x = work.g_x - (slid->x_pos * slid->x_unit_px);
- dlgtree->ob_y = work.g_y - (slid->y_pos * slid->y_unit_px);
-
- any_obj = objc_find(dlgtree, 0, 8, ev_out->emo_mouse.p_x,
- ev_out->emo_mouse.p_y);
-
- if((dlgtree[any_obj].ob_state & OS_DISABLED) != 0) {
- return(retval);
- }
- uint16_t type = (dlgtree[any_obj].ob_type & 0xFF);
- if (type == G_FTEXT || type == G_FBOXTEXT) {
- ret = form_button(dlgtree, any_obj, ev_out->emo_mclicks, &nextobj);
- if(edit_obj != -1){
- if (obj_is_inside(dlgtree, edit_obj, &work)) {
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx, EDEND);
- }
- }
- if (obj_is_inside(dlgtree, any_obj, &work)) {
- edit_obj = any_obj;
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx, EDINIT);
- }
- } else {
- if ((edit_obj != -1) && obj_is_inside(dlgtree, edit_obj, &work)){
- objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx, EDEND);
- }
- edit_obj = -1;
- if (((dlgtree[any_obj].ob_type & 0xff00) & GW_XTYPE_CHECKBOX) != 0) {
- if (OBJ_SELECTED(any_obj)) {
- dlgtree[any_obj].ob_state &= ~(OS_SELECTED|OS_CROSSED);
- } else {
- dlgtree[any_obj].ob_state |= (OS_SELECTED|OS_CROSSED);
- }
- guiwin_send_redraw(win, obj_screen_rect(dlgtree, any_obj));
- }
- form_event(any_obj, 1, NULL);
- }
- //printf("clicked: %d / %d\n", any_obj, ret);
- evnt_timer(150);
+ if ((ev_out->emo_events & MU_BUTTON) != 0) {
}
return(retval);
@@ -866,8 +715,6 @@ void open_settings(void)
curr.g_w = MIN(dlgtree->ob_width, desk_area.g_w);
curr.g_h = MIN(dlgtree->ob_height, desk_area.g_h-64);
curr.g_x = 1;
- curr.g_y = desk_area.g_y;
- //curr.g_x = (desk_area.g_w / 2) - (curr.g_w / 2);
curr.g_y = (desk_area.g_h / 2) - (curr.g_h / 2);
wind_calc_grect(WC_BORDER, kind, &curr, &curr);
@@ -880,26 +727,26 @@ void open_settings(void)
wind_open_grect(h_aes_win, &curr);
+ guiwin_set_form(settings_guiwin, dlgtree, 0);
guiwin_set_scroll_grid(settings_guiwin, 32, 32);
guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &area);
+
slid = guiwin_get_scroll_info(settings_guiwin);
guiwin_set_content_units(settings_guiwin,
(dlgtree->ob_width/slid->x_unit_px),
(dlgtree->ob_height/slid->y_unit_px));
guiwin_update_slider(settings_guiwin, GUIWIN_VH_SLIDER);
-
}
}
void close_settings(void)
{
-
-
- printf("settings close\n");
+ LOG((""));
guiwin_remove(settings_guiwin);
settings_guiwin = NULL;
wind_close(h_aes_win);
wind_delete(h_aes_win);
h_aes_win = 0;
+ LOG(("Done"));
}
diff --git a/atari/settings.h b/atari/settings.h
index ef6ae81..87597e6 100644
--- a/atari/settings.h
+++ b/atari/settings.h
@@ -1,7 +1,6 @@
#ifndef NS_ATARI_SETTINGS
#define NS_ATARI_SETTINGS
-#include <windom.h>
void open_settings(void);
void close_settings(void);
diff --git a/atari/statusbar.c b/atari/statusbar.c
index bf241e2..d43ebc8 100755
--- a/atari/statusbar.c
+++ b/atari/statusbar.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
-#include <windom.h>
#include <assert.h>
#include <math.h>
diff --git a/atari/toolbar.c b/atari/toolbar.c
index c6bd745..9920b92 100644
--- a/atari/toolbar.c
+++ b/atari/toolbar.c
@@ -585,12 +585,12 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc)
text = malloc( len+1 );
if (text){
textarea_get_text( tb->url.textarea, text, len+1 );
- scrap_txt_write( &app, text );
+ scrap_txt_write(text);
free( text );
}
}
else if ( ik == KEY_PASTE) {
- char * clip = scrap_txt_read( &app );
+ char * clip = scrap_txt_read();
if ( clip != NULL ){
int clip_length = strlen( clip );
if ( clip_length > 0 ) {
@@ -604,8 +604,8 @@ bool toolbar_key_input(struct s_toolbar *tb, short nkc)
free(utf8);
ret = true;
}
- free( clip );
}
+ free( clip );
}
}
else if (ik == KEY_ESCAPE) {
diff --git a/atari/treeview.h b/atari/treeview.h
index 8683bc3..19b7730 100755
--- a/atari/treeview.h
+++ b/atari/treeview.h
@@ -20,7 +20,6 @@
#define NS_ATARI_TREEVIEW_H
#include <stdbool.h>
-#include <windom.h>
#include "desktop/tree.h"
#include "atari/gui.h"
#include "atari/gemtk/gemtk.h"
--
NetSurf Browser
10 years, 9 months
libdom: branch master updated. f7ae4017ff50be5ef4eb3047ebbff4820550d5ed
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libdom.git/shortlog/f7ae4017ff50be5ef4eb30...
...commit http://git.netsurf-browser.org/libdom.git/commit/f7ae4017ff50be5ef4eb3047...
...tree http://git.netsurf-browser.org/libdom.git/tree/f7ae4017ff50be5ef4eb3047eb...
The branch, master has been updated
via f7ae4017ff50be5ef4eb3047ebbff4820550d5ed (commit)
from 04ca17132485801786e0555c31edf9d4ca82f2eb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/libdom.git/commitdiff/f7ae4017ff50be5ef4eb...
commit f7ae4017ff50be5ef4eb3047ebbff4820550d5ed
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Fix use of incorrect variable in dom_string(_caseless)_isequal
diff --git a/src/core/string.c b/src/core/string.c
index 0cadd77..9ba3576 100644
--- a/src/core/string.c
+++ b/src/core/string.c
@@ -228,12 +228,12 @@ bool dom_string_isequal(const dom_string *s1, const dom_string *s2)
return match;
}
- len = dom_string_byte_length(s1);
+ len = dom_string_byte_length((dom_string *) is1);
if (len != dom_string_byte_length((dom_string *)is2))
return false;
- return 0 == memcmp(dom_string_data(s1), dom_string_data((dom_string *)is2), len);
+ return 0 == memcmp(dom_string_data((dom_string *) is1), dom_string_data((dom_string *)is2), len);
}
/**
@@ -278,12 +278,12 @@ bool dom_string_caseless_isequal(const dom_string *s1, const dom_string *s2)
return match;
}
- len = dom_string_byte_length(s1);
+ len = dom_string_byte_length((dom_string *) is1);
if (len != dom_string_byte_length((dom_string *)is2))
return false;
- d1 = (const uint8_t *) dom_string_data(s1);
+ d1 = (const uint8_t *) dom_string_data((dom_string *) is1);
d2 = (const uint8_t *) dom_string_data((dom_string *)is2);
while (len > 0) {
-----------------------------------------------------------------------
Summary of changes:
src/core/string.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/core/string.c b/src/core/string.c
index 0cadd77..9ba3576 100644
--- a/src/core/string.c
+++ b/src/core/string.c
@@ -228,12 +228,12 @@ bool dom_string_isequal(const dom_string *s1, const dom_string *s2)
return match;
}
- len = dom_string_byte_length(s1);
+ len = dom_string_byte_length((dom_string *) is1);
if (len != dom_string_byte_length((dom_string *)is2))
return false;
- return 0 == memcmp(dom_string_data(s1), dom_string_data((dom_string *)is2), len);
+ return 0 == memcmp(dom_string_data((dom_string *) is1), dom_string_data((dom_string *)is2), len);
}
/**
@@ -278,12 +278,12 @@ bool dom_string_caseless_isequal(const dom_string *s1, const dom_string *s2)
return match;
}
- len = dom_string_byte_length(s1);
+ len = dom_string_byte_length((dom_string *) is1);
if (len != dom_string_byte_length((dom_string *)is2))
return false;
- d1 = (const uint8_t *) dom_string_data(s1);
+ d1 = (const uint8_t *) dom_string_data((dom_string *) is1);
d2 = (const uint8_t *) dom_string_data((dom_string *)is2);
while (len > 0) {
--
Document Object Model library
10 years, 9 months
libdom: branch master updated. 04ca17132485801786e0555c31edf9d4ca82f2eb
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libdom.git/shortlog/04ca17132485801786e055...
...commit http://git.netsurf-browser.org/libdom.git/commit/04ca17132485801786e0555c...
...tree http://git.netsurf-browser.org/libdom.git/tree/04ca17132485801786e0555c31...
The branch, master has been updated
via 04ca17132485801786e0555c31edf9d4ca82f2eb (commit)
from 7e8a1f4f60bd8189f097517b04d3f0a81f36324a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/libdom.git/commitdiff/04ca17132485801786e0...
commit 04ca17132485801786e0555c31edf9d4ca82f2eb
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Fix dom_node_set_text_content.
diff --git a/include/dom/core/node.h b/include/dom/core/node.h
index 668206f..35be6f0 100644
--- a/include/dom/core/node.h
+++ b/include/dom/core/node.h
@@ -481,7 +481,7 @@ static inline dom_exception dom_node_set_text_content(struct dom_node *node,
return ((dom_node_vtable *) node->vtable)->dom_node_set_text_content(
(dom_node_internal *) node, content);
}
-#define dom_node_set_text_content(n, c) dom_node_get_text_content( \
+#define dom_node_set_text_content(n, c) dom_node_set_text_content( \
(dom_node *) (n), (c))
static inline dom_exception dom_node_is_same(struct dom_node *node,
-----------------------------------------------------------------------
Summary of changes:
include/dom/core/node.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/dom/core/node.h b/include/dom/core/node.h
index 668206f..35be6f0 100644
--- a/include/dom/core/node.h
+++ b/include/dom/core/node.h
@@ -481,7 +481,7 @@ static inline dom_exception dom_node_set_text_content(struct dom_node *node,
return ((dom_node_vtable *) node->vtable)->dom_node_set_text_content(
(dom_node_internal *) node, content);
}
-#define dom_node_set_text_content(n, c) dom_node_get_text_content( \
+#define dom_node_set_text_content(n, c) dom_node_set_text_content( \
(dom_node *) (n), (c))
static inline dom_exception dom_node_is_same(struct dom_node *node,
--
Document Object Model library
10 years, 9 months
libsvgtiny: branch master updated. f30bcdde419565d50974a288c816aad30a412683
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libsvgtiny.git/shortlog/f30bcdde419565d509...
...commit http://git.netsurf-browser.org/libsvgtiny.git/commit/f30bcdde419565d50974...
...tree http://git.netsurf-browser.org/libsvgtiny.git/tree/f30bcdde419565d50974a2...
The branch, master has been updated
via f30bcdde419565d50974a288c816aad30a412683 (commit)
from c9f60cf51dd1c83a7b8b623cdfe61c0e1c95ccdf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/libsvgtiny.git/commitdiff/f30bcdde419565d5...
commit f30bcdde419565d50974a288c816aad30a412683
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Handle empty text nodes correctly.
diff --git a/src/svgtiny.c b/src/svgtiny.c
index 403758b..0bcfe7d 100644
--- a/src/svgtiny.c
+++ b/src/svgtiny.c
@@ -1008,9 +1008,13 @@ svgtiny_code svgtiny_parse_text(dom_element *text,
dom_node_unref(child);
return svgtiny_LIBDOM_ERROR;
}
- shape->text = strndup(dom_string_data(content),
- dom_string_byte_length(content));
- dom_string_unref(content);
+ if (content != NULL) {
+ shape->text = strndup(dom_string_data(content),
+ dom_string_byte_length(content));
+ dom_string_unref(content);
+ } else {
+ shape->text = strdup("");
+ }
shape->text_x = px;
shape->text_y = py;
state.diagram->shape_count++;
-----------------------------------------------------------------------
Summary of changes:
src/svgtiny.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/svgtiny.c b/src/svgtiny.c
index 403758b..0bcfe7d 100644
--- a/src/svgtiny.c
+++ b/src/svgtiny.c
@@ -1008,9 +1008,13 @@ svgtiny_code svgtiny_parse_text(dom_element *text,
dom_node_unref(child);
return svgtiny_LIBDOM_ERROR;
}
- shape->text = strndup(dom_string_data(content),
- dom_string_byte_length(content));
- dom_string_unref(content);
+ if (content != NULL) {
+ shape->text = strndup(dom_string_data(content),
+ dom_string_byte_length(content));
+ dom_string_unref(content);
+ } else {
+ shape->text = strdup("");
+ }
shape->text_x = px;
shape->text_y = py;
state.diagram->shape_count++;
--
NetSurf SVG decoder
10 years, 9 months
libdom: branch master updated. 7e8a1f4f60bd8189f097517b04d3f0a81f36324a
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libdom.git/shortlog/7e8a1f4f60bd8189f09751...
...commit http://git.netsurf-browser.org/libdom.git/commit/7e8a1f4f60bd8189f097517b...
...tree http://git.netsurf-browser.org/libdom.git/tree/7e8a1f4f60bd8189f097517b04...
The branch, master has been updated
via 7e8a1f4f60bd8189f097517b04d3f0a81f36324a (commit)
via 9508d0205519b6f4bc7901d5cfe260d9860bca87 (commit)
from 8051772672c6cae6e00847f396cea6f7e3f43f3b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/libdom.git/commitdiff/7e8a1f4f60bd8189f097...
commit 7e8a1f4f60bd8189f097517b04d3f0a81f36324a
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Fix reference leak in error case.
diff --git a/src/core/characterdata.c b/src/core/characterdata.c
index c46a5c6..94c286e 100644
--- a/src/core/characterdata.c
+++ b/src/core/characterdata.c
@@ -247,8 +247,10 @@ dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata,
doc = dom_node_get_owner(cdata);
err = _dom_dispatch_characterdata_modified_event(doc, c, c->value,
temp, &success);
- if (err != DOM_NO_ERR)
+ if (err != DOM_NO_ERR) {
+ dom_string_unref(temp);
return err;
+ }
if (c->value != NULL) {
dom_string_unref(c->value);
commitdiff http://git.netsurf-browser.org/libdom.git/commitdiff/9508d0205519b6f4bc79...
commit 9508d0205519b6f4bc7901d5cfe260d9860bca87
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Initialise *ret
diff --git a/src/core/text.c b/src/core/text.c
index e84972a..0bf6322 100644
--- a/src/core/text.c
+++ b/src/core/text.c
@@ -470,6 +470,8 @@ dom_exception walk_logic_adjacent_text(dom_text *text,
return DOM_NOT_SUPPORTED_ERR;
}
+ *ret = NULL;
+
/* Firstly, we look our left */
err = walk_logic_adjacent_text_in_order(left, opt, LEFT, ret, &cont);
if (err != DOM_NO_ERR) {
-----------------------------------------------------------------------
Summary of changes:
src/core/characterdata.c | 4 +++-
src/core/text.c | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/core/characterdata.c b/src/core/characterdata.c
index c46a5c6..94c286e 100644
--- a/src/core/characterdata.c
+++ b/src/core/characterdata.c
@@ -247,8 +247,10 @@ dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata,
doc = dom_node_get_owner(cdata);
err = _dom_dispatch_characterdata_modified_event(doc, c, c->value,
temp, &success);
- if (err != DOM_NO_ERR)
+ if (err != DOM_NO_ERR) {
+ dom_string_unref(temp);
return err;
+ }
if (c->value != NULL) {
dom_string_unref(c->value);
diff --git a/src/core/text.c b/src/core/text.c
index e84972a..0bf6322 100644
--- a/src/core/text.c
+++ b/src/core/text.c
@@ -470,6 +470,8 @@ dom_exception walk_logic_adjacent_text(dom_text *text,
return DOM_NOT_SUPPORTED_ERR;
}
+ *ret = NULL;
+
/* Firstly, we look our left */
err = walk_logic_adjacent_text_in_order(left, opt, LEFT, ret, &cont);
if (err != DOM_NO_ERR) {
--
Document Object Model library
10 years, 9 months
libsvgtiny: branch master updated. c9f60cf51dd1c83a7b8b623cdfe61c0e1c95ccdf
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libsvgtiny.git/shortlog/c9f60cf51dd1c83a7b...
...commit http://git.netsurf-browser.org/libsvgtiny.git/commit/c9f60cf51dd1c83a7b8b...
...tree http://git.netsurf-browser.org/libsvgtiny.git/tree/c9f60cf51dd1c83a7b8b62...
The branch, master has been updated
via c9f60cf51dd1c83a7b8b623cdfe61c0e1c95ccdf (commit)
from 0f073d1103af4295b1aa9d2be2795f1d745f25e8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/libsvgtiny.git/commitdiff/c9f60cf51dd1c83a...
commit c9f60cf51dd1c83a7b8b623cdfe61c0e1c95ccdf
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Drop const, as this can't work with libdom.
diff --git a/src/svgtiny.c b/src/svgtiny.c
index 137f2b0..403758b 100644
--- a/src/svgtiny.c
+++ b/src/svgtiny.c
@@ -42,12 +42,12 @@ static svgtiny_code svgtiny_parse_poly(dom_element *poly,
struct svgtiny_parse_state state, bool polygon);
static svgtiny_code svgtiny_parse_text(dom_element *text,
struct svgtiny_parse_state state);
-static void svgtiny_parse_position_attributes(const dom_element *node,
+static void svgtiny_parse_position_attributes(dom_element *node,
const struct svgtiny_parse_state state,
float *x, float *y, float *width, float *height);
-static void svgtiny_parse_paint_attributes(const dom_element *node,
+static void svgtiny_parse_paint_attributes(dom_element *node,
struct svgtiny_parse_state *state);
-static void svgtiny_parse_font_attributes(const dom_element *node,
+static void svgtiny_parse_font_attributes(dom_element *node,
struct svgtiny_parse_state *state);
static void svgtiny_parse_transform_attributes(dom_element *node,
struct svgtiny_parse_state *state);
@@ -1035,7 +1035,7 @@ svgtiny_code svgtiny_parse_text(dom_element *text,
* Parse x, y, width, and height attributes, if present.
*/
-void svgtiny_parse_position_attributes(const dom_element *node,
+void svgtiny_parse_position_attributes(dom_element *node,
const struct svgtiny_parse_state state,
float *x, float *y, float *width, float *height)
{
@@ -1127,7 +1127,7 @@ float svgtiny_parse_length(dom_string *s, int viewport_size,
* Parse paint attributes, if present.
*/
-void svgtiny_parse_paint_attributes(const dom_element *node,
+void svgtiny_parse_paint_attributes(dom_element *node,
struct svgtiny_parse_state *state)
{
dom_string *attr;
@@ -1264,7 +1264,7 @@ void svgtiny_parse_color(dom_string *s, svgtiny_colour *c,
* Parse font attributes, if present.
*/
-void svgtiny_parse_font_attributes(const dom_element *node,
+void svgtiny_parse_font_attributes(dom_element *node,
struct svgtiny_parse_state *state)
{
/* TODO: Implement this, it never used to be */
-----------------------------------------------------------------------
Summary of changes:
src/svgtiny.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/svgtiny.c b/src/svgtiny.c
index 137f2b0..403758b 100644
--- a/src/svgtiny.c
+++ b/src/svgtiny.c
@@ -42,12 +42,12 @@ static svgtiny_code svgtiny_parse_poly(dom_element *poly,
struct svgtiny_parse_state state, bool polygon);
static svgtiny_code svgtiny_parse_text(dom_element *text,
struct svgtiny_parse_state state);
-static void svgtiny_parse_position_attributes(const dom_element *node,
+static void svgtiny_parse_position_attributes(dom_element *node,
const struct svgtiny_parse_state state,
float *x, float *y, float *width, float *height);
-static void svgtiny_parse_paint_attributes(const dom_element *node,
+static void svgtiny_parse_paint_attributes(dom_element *node,
struct svgtiny_parse_state *state);
-static void svgtiny_parse_font_attributes(const dom_element *node,
+static void svgtiny_parse_font_attributes(dom_element *node,
struct svgtiny_parse_state *state);
static void svgtiny_parse_transform_attributes(dom_element *node,
struct svgtiny_parse_state *state);
@@ -1035,7 +1035,7 @@ svgtiny_code svgtiny_parse_text(dom_element *text,
* Parse x, y, width, and height attributes, if present.
*/
-void svgtiny_parse_position_attributes(const dom_element *node,
+void svgtiny_parse_position_attributes(dom_element *node,
const struct svgtiny_parse_state state,
float *x, float *y, float *width, float *height)
{
@@ -1127,7 +1127,7 @@ float svgtiny_parse_length(dom_string *s, int viewport_size,
* Parse paint attributes, if present.
*/
-void svgtiny_parse_paint_attributes(const dom_element *node,
+void svgtiny_parse_paint_attributes(dom_element *node,
struct svgtiny_parse_state *state)
{
dom_string *attr;
@@ -1264,7 +1264,7 @@ void svgtiny_parse_color(dom_string *s, svgtiny_colour *c,
* Parse font attributes, if present.
*/
-void svgtiny_parse_font_attributes(const dom_element *node,
+void svgtiny_parse_font_attributes(dom_element *node,
struct svgtiny_parse_state *state)
{
/* TODO: Implement this, it never used to be */
--
NetSurf SVG decoder
10 years, 9 months
netsurf: branch master updated. ea3f09a72433be165cc4ec09052b3d636e64ac0c
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/ea3f09a72433be165cc4e...
...commit http://git.netsurf-browser.org/netsurf.git/commit/ea3f09a72433be165cc4ec0...
...tree http://git.netsurf-browser.org/netsurf.git/tree/ea3f09a72433be165cc4ec090...
The branch, master has been updated
via ea3f09a72433be165cc4ec09052b3d636e64ac0c (commit)
from f12be4ed854d9dd44fa6e3117fe8bd9525deae51 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/ea3f09a72433be165cc...
commit ea3f09a72433be165cc4ec09052b3d636e64ac0c
Author: John-Mark Bell <jmb(a)netsurf-browser.org>
Commit: John-Mark Bell <jmb(a)netsurf-browser.org>
Correctly emit entities when serialising to HTML.
diff --git a/desktop/save_complete.c b/desktop/save_complete.c
index 7137f0b..d9bd507 100644
--- a/desktop/save_complete.c
+++ b/desktop/save_complete.c
@@ -39,8 +39,10 @@
#include "desktop/save_complete.h"
#include "render/box.h"
#include "render/html.h"
+#include "utils/corestrings.h"
#include "utils/log.h"
#include "utils/nsurl.h"
+#include "utils/utf8.h"
#include "utils/utils.h"
regex_t save_complete_import_re;
@@ -551,7 +553,9 @@ static bool save_complete_rewrite_url_value(save_complete_ctx *ctx,
{
nsurl *url;
hlcache_handle *content;
+ char *escaped;
nserror error;
+ utf8_convert_ret ret;
error = nsurl_join(ctx->base, value, &url);
if (error == NSERROR_NOMEM)
@@ -566,11 +570,25 @@ static bool save_complete_rewrite_url_value(save_complete_ctx *ctx,
fprintf(ctx->fp, "\"%p\"", content);
} else {
/* no match found */
- fprintf(ctx->fp, "\"%s\"", nsurl_access(url));
+ ret = utf8_to_html(nsurl_access(url), "UTF-8",
+ nsurl_length(url), &escaped);
nsurl_unref(url);
+
+ if (ret != UTF8_CONVERT_OK)
+ return false;
+
+ fprintf(ctx->fp, "\"%s\"", escaped);
+
+ free(escaped);
}
} else {
- fprintf(ctx->fp, "\"%.*s\"", (int) value_len, value);
+ ret = utf8_to_html(value, "UTF-8", value_len, &escaped);
+ if (ret != UTF8_CONVERT_OK)
+ return false;
+
+ fprintf(ctx->fp, "\"%s\"", escaped);
+
+ free(escaped);
}
return true;
@@ -579,7 +597,16 @@ static bool save_complete_rewrite_url_value(save_complete_ctx *ctx,
static bool save_complete_write_value(save_complete_ctx *ctx,
const char *value, size_t value_len)
{
- fprintf(ctx->fp, "\"%.*s\"", (int) value_len, value);
+ char *escaped;
+ utf8_convert_ret ret;
+
+ ret = utf8_to_html(value, "UTF-8", value_len, &escaped);
+ if (ret != UTF8_CONVERT_OK)
+ return false;
+
+ fprintf(ctx->fp, "\"%s\"", escaped);
+
+ free(escaped);
return true;
}
@@ -728,7 +755,7 @@ static bool save_complete_handle_attrs(save_complete_ctx *ctx,
for (i = 0; i < length; i++) {
dom_attr *attr;
- error = dom_namednodemap_item(attrs, i, &attr);
+ error = dom_namednodemap_item(attrs, i, (void *) &attr);
if (error != DOM_NO_ERR)
return false;
@@ -753,6 +780,7 @@ static bool save_complete_handle_element(save_complete_ctx *ctx,
dom_namednodemap *attrs;
const char *name_data;
size_t name_len;
+ bool process = true;
dom_exception error;
ctx->iter_state = STATE_NORMAL;
@@ -767,9 +795,56 @@ static bool save_complete_handle_element(save_complete_ctx *ctx,
name_data = dom_string_data(name);
name_len = dom_string_byte_length(name);
- /* Elide BASE elements from the output */
if (name_len == SLEN("base") &&
strncasecmp(name_data, "base", name_len) == 0) {
+ /* Elide BASE elements from the output */
+ process = false;
+ } else if (name_len == SLEN("meta") &&
+ strncasecmp(name_data, "meta", name_len) == 0) {
+ /* Don't emit close tags for META elements */
+ if (event_type == EVENT_LEAVE) {
+ process = false;
+ } else {
+ /* Elide meta charsets */
+ dom_string *value;
+ error = dom_element_get_attribute(node,
+ corestring_dom_http_equiv, &value);
+ if (error != DOM_NO_ERR) {
+ dom_string_unref(name);
+ return false;
+ }
+
+ if (value != NULL) {
+ if (dom_string_length(value) ==
+ SLEN("Content-Type") &&
+ strncasecmp(dom_string_data(value),
+ "Content-Type",
+ SLEN("Content-Type")) == 0)
+ process = false;
+
+ dom_string_unref(value);
+ } else {
+ bool yes;
+
+ error = dom_element_has_attribute(node,
+ corestring_dom_charset, &yes);
+ if (error != DOM_NO_ERR) {
+ dom_string_unref(name);
+ return false;
+ }
+
+ if (yes)
+ process = false;
+ }
+ }
+ } else if (event_type == EVENT_LEAVE &&
+ ((name_len == SLEN("link") &&
+ strncasecmp(name_data, "link", name_len) == 0))) {
+ /* Don't emit close tags for void elements */
+ process = false;
+ }
+
+ if (process == false) {
dom_string_unref(name);
return true;
}
@@ -833,6 +908,12 @@ static bool save_complete_handle_element(save_complete_ctx *ctx,
}
ctx->iter_state = STATE_IN_STYLE;
+ } else if (event_type == EVENT_ENTER && name_len == SLEN("head") &&
+ strncasecmp(name_data, "head", name_len) == 0) {
+ /* If this is a HEAD element, insert a meta charset */
+ fputs("<META http-equiv=\"Content-Type\" "
+ "content=\"text/html; charset=utf-8\">",
+ ctx->fp);
}
dom_string_unref(name);
@@ -846,6 +927,7 @@ static bool save_complete_node_handler(dom_node *node,
save_complete_ctx *ctx = ctxin;
dom_node_type type;
dom_exception error;
+ utf8_convert_ret ret;
error = dom_node_get_node_type(node, &type);
if (error != DOM_NO_ERR)
@@ -872,11 +954,20 @@ static bool save_complete_node_handler(dom_node *node,
fwrite("<!--", 1, sizeof("<!--") - 1, ctx->fp);
if (text != NULL) {
+ char *escaped;
+
text_data = dom_string_data(text);
text_len = dom_string_byte_length(text);
- fwrite(text_data, sizeof(*text_data),
- text_len, ctx->fp);
+ ret = utf8_to_html(text_data, "UTF-8",
+ text_len, &escaped);
+ if (ret != UTF8_CONVERT_OK)
+ return false;
+
+ fwrite(escaped, sizeof(*escaped),
+ strlen(escaped), ctx->fp);
+
+ free(escaped);
dom_string_unref(text);
}
@@ -917,8 +1008,9 @@ static bool save_complete_node_handler(dom_node *node,
name_data = dom_string_data(name);
name_len = dom_string_byte_length(name);
- fprintf(ctx->fp, " PUBLIC \"%.*s\"",
- (int) name_len, name_data);
+ if (name_len > 0)
+ fprintf(ctx->fp, " PUBLIC \"%.*s\"",
+ (int) name_len, name_data);
dom_string_unref(name);
}
@@ -931,8 +1023,9 @@ static bool save_complete_node_handler(dom_node *node,
name_data = dom_string_data(name);
name_len = dom_string_byte_length(name);
- fprintf(ctx->fp, " \"%.*s\"",
- (int) name_len, name_data);
+ if (name_len > 0)
+ fprintf(ctx->fp, " \"%.*s\"",
+ (int) name_len, name_data);
dom_string_unref(name);
}
diff --git a/desktop/tree_url_node.c b/desktop/tree_url_node.c
index d2701e5..5305fa1 100644
--- a/desktop/tree_url_node.c
+++ b/desktop/tree_url_node.c
@@ -817,11 +817,11 @@ static bool tree_url_save_entry(struct node *entry, FILE *fp)
if (href == NULL)
return false;
- ret = utf8_to_enc(text, "iso-8859-1", strlen(text), &latin1_text);
+ ret = utf8_to_html(text, "iso-8859-1", strlen(text), &latin1_text);
if (ret != UTF8_CONVERT_OK)
return false;
- ret = utf8_to_enc(href, "iso-8859-1", strlen(href), &latin1_href);
+ ret = utf8_to_html(href, "iso-8859-1", strlen(href), &latin1_href);
if (ret != UTF8_CONVERT_OK) {
free(latin1_text);
return false;
@@ -872,7 +872,7 @@ static bool tree_url_save_directory(struct node *directory, FILE *fp)
if (text == NULL)
return false;
- ret = utf8_to_enc(text, "iso-8859-1",
+ ret = utf8_to_html(text, "iso-8859-1",
strlen(text), &latin1_text);
if (ret != UTF8_CONVERT_OK)
return false;
@@ -919,7 +919,7 @@ bool tree_urlfile_save(struct tree *tree, const char *filename,
fputs("<meta http-equiv=\"Content-Type\" "
"content=\"text/html; charset=iso-8859-1\">\n", fp);
fprintf(fp, "<title>%s</title>\n", page_title);
- fputs("<body>", fp);
+ fputs("</head>\n<body>", fp);
if (tree_url_save_directory(tree_get_root(tree), fp) == false) {
warn_user("HotlistSaveError", 0);
diff --git a/utils/corestrings.c b/utils/corestrings.c
index f970c10..9fee96d 100644
--- a/utils/corestrings.c
+++ b/utils/corestrings.c
@@ -133,6 +133,7 @@ dom_string *corestring_dom_canplaythrough;
dom_string *corestring_dom_cellpadding;
dom_string *corestring_dom_cellspacing;
dom_string *corestring_dom_change;
+dom_string *corestring_dom_charset;
dom_string *corestring_dom_click;
dom_string *corestring_dom_close;
dom_string *corestring_dom_color;
@@ -355,6 +356,7 @@ void corestrings_fini(void)
CSS_DOM_STRING_UNREF(cellpadding);
CSS_DOM_STRING_UNREF(cellspacing);
CSS_DOM_STRING_UNREF(change);
+ CSS_DOM_STRING_UNREF(charset);
CSS_DOM_STRING_UNREF(click);
CSS_DOM_STRING_UNREF(close);
CSS_DOM_STRING_UNREF(color);
@@ -608,6 +610,7 @@ nserror corestrings_init(void)
CSS_DOM_STRING_INTERN(cellpadding);
CSS_DOM_STRING_INTERN(cellspacing);
CSS_DOM_STRING_INTERN(change);
+ CSS_DOM_STRING_INTERN(charset);
CSS_DOM_STRING_INTERN(click);
CSS_DOM_STRING_INTERN(close);
CSS_DOM_STRING_INTERN(color);
diff --git a/utils/corestrings.h b/utils/corestrings.h
index 61771c1..08d2545 100644
--- a/utils/corestrings.h
+++ b/utils/corestrings.h
@@ -139,6 +139,7 @@ extern struct dom_string *corestring_dom_canplaythrough;
extern struct dom_string *corestring_dom_cellpadding;
extern struct dom_string *corestring_dom_cellspacing;
extern struct dom_string *corestring_dom_change;
+extern struct dom_string *corestring_dom_charset;
extern struct dom_string *corestring_dom_click;
extern struct dom_string *corestring_dom_close;
extern struct dom_string *corestring_dom_color;
diff --git a/utils/utf8.c b/utils/utf8.c
index 5c27fa7..c0f6b10 100644
--- a/utils/utf8.c
+++ b/utils/utf8.c
@@ -297,7 +297,7 @@ utf8_convert_ret utf8_convert(const char *string, size_t len,
}
slen = len ? len : strlen(string);
- /* Worst case = ACSII -> UCS4, so allocate an output buffer
+ /* Worst case = ASCII -> UCS4, so allocate an output buffer
* 4 times larger than the input buffer, and add 4 bytes at
* the end for the NULL terminator
*/
@@ -337,3 +337,140 @@ utf8_convert_ret utf8_convert(const char *string, size_t len,
return UTF8_CONVERT_OK;
}
+
+static utf8_convert_ret utf8_convert_html_chunk(iconv_t cd,
+ const char *chunk, size_t inlen,
+ char **out, size_t *outlen)
+{
+ size_t ret, esclen;
+ uint32_t ucs4;
+ char *pescape, escape[11];
+
+ while (inlen > 0) {
+ ret = iconv(cd, (void *) &chunk, &inlen, (void *) out, outlen);
+ if (ret != (size_t) -1)
+ break;
+
+ if (errno != EILSEQ)
+ return UTF8_CONVERT_NOMEM;
+
+ ucs4 = utf8_to_ucs4(chunk, inlen);
+ esclen = snprintf(escape, sizeof(escape), "&#x%06x;", ucs4);
+ pescape = escape;
+ ret = iconv(cd, (void *) &pescape, &esclen,
+ (void *) out, outlen);
+ if (ret == (size_t) -1)
+ return UTF8_CONVERT_NOMEM;
+
+ esclen = utf8_next(chunk, inlen, 0);
+ chunk += esclen;
+ inlen -= esclen;
+ }
+
+ return UTF8_CONVERT_OK;
+}
+
+/**
+ * Convert a UTF-8 encoded string into a string of the given encoding,
+ * applying HTML escape sequences where necessary.
+ *
+ * \param string String to convert (NUL-terminated)
+ * \param encname Name of encoding to convert to
+ * \param len Length, in bytes, of the input string, or 0
+ * \param result Pointer to location to receive result
+ * \return Appropriate utf8_convert_ret value
+ */
+utf8_convert_ret utf8_to_html(const char *string, const char *encname,
+ size_t len, char **result)
+{
+ iconv_t cd;
+ const char *in;
+ char *out, *origout;
+ size_t off, prev_off, inlen, outlen, origoutlen, esclen;
+ utf8_convert_ret ret;
+ char *pescape, escape[11];
+
+ if (len == 0)
+ len = strlen(string);
+
+ cd = iconv_open(encname, "UTF-8");
+ if (cd == (iconv_t) -1) {
+ if (errno == EINVAL)
+ return UTF8_CONVERT_BADENC;
+ /* default to no memory */
+ return UTF8_CONVERT_NOMEM;
+ }
+
+ /* Worst case is ASCII -> UCS4, with all characters escaped:
+ * "&#xYYYYYY;", thus each input character may become a string
+ * of 10 UCS4 characters, each 4 bytes in length */
+ origoutlen = outlen = len * 10 * 4;
+ origout = out = malloc(outlen);
+ if (out == NULL) {
+ iconv_close(cd);
+ return UTF8_CONVERT_NOMEM;
+ }
+
+ /* Process input in chunks between characters we must escape */
+ prev_off = off = 0;
+ while (off < len) {
+ /* Must escape '&', '<', and '>' */
+ if (string[off] == '&' || string[off] == '<' ||
+ string[off] == '>') {
+ if (off - prev_off > 0) {
+ /* Emit chunk */
+ in = string + prev_off;
+ inlen = off - prev_off;
+ ret = utf8_convert_html_chunk(cd, in, inlen,
+ &out, &outlen);
+ if (ret != UTF8_CONVERT_OK) {
+ free(origout);
+ iconv_close(cd);
+ return ret;
+ }
+ }
+
+ /* Emit mandatory escape */
+ esclen = snprintf(escape, sizeof(escape),
+ "&#x%06x;", string[off]);
+ pescape = escape;
+ ret = utf8_convert_html_chunk(cd, pescape, esclen,
+ &out, &outlen);
+ if (ret != UTF8_CONVERT_OK) {
+ free(origout);
+ iconv_close(cd);
+ return ret;
+ }
+
+ prev_off = off = utf8_next(string, len, off);
+ } else {
+ off = utf8_next(string, len, off);
+ }
+ }
+
+ /* Process final chunk */
+ if (prev_off < len) {
+ in = string + prev_off;
+ inlen = len - prev_off;
+ ret = utf8_convert_html_chunk(cd, in, inlen, &out, &outlen);
+ if (ret != UTF8_CONVERT_OK) {
+ free(origout);
+ iconv_close(cd);
+ return ret;
+ }
+ }
+
+ iconv_close(cd);
+
+ /* Shrink-wrap */
+ *result = realloc(origout, origoutlen - outlen + 4);
+ if (*result == NULL) {
+ free(origout);
+ return UTF8_CONVERT_NOMEM;
+ }
+ memset(*result + (origoutlen - outlen), 0, 4);
+
+ return UTF8_CONVERT_OK;
+}
+
+
diff --git a/utils/utf8.h b/utils/utf8.h
index 9d8ec74..22aee1a 100644
--- a/utils/utf8.h
+++ b/utils/utf8.h
@@ -47,6 +47,9 @@ utf8_convert_ret utf8_to_enc(const char *string, const char *encname,
utf8_convert_ret utf8_from_enc(const char *string, const char *encname,
size_t len, char **result);
+utf8_convert_ret utf8_to_html(const char *string, const char *encname,
+ size_t len, char **result);
+
/* These two are platform specific */
utf8_convert_ret utf8_to_local_encoding(const char *string, size_t len,
char **result);
-----------------------------------------------------------------------
Summary of changes:
desktop/save_complete.c | 115 +++++++++++++++++++++++++++++++++++----
desktop/tree_url_node.c | 8 ++--
utils/corestrings.c | 3 +
utils/corestrings.h | 1 +
utils/utf8.c | 139 ++++++++++++++++++++++++++++++++++++++++++++++-
utils/utf8.h | 3 +
6 files changed, 253 insertions(+), 16 deletions(-)
diff --git a/desktop/save_complete.c b/desktop/save_complete.c
index 7137f0b..d9bd507 100644
--- a/desktop/save_complete.c
+++ b/desktop/save_complete.c
@@ -39,8 +39,10 @@
#include "desktop/save_complete.h"
#include "render/box.h"
#include "render/html.h"
+#include "utils/corestrings.h"
#include "utils/log.h"
#include "utils/nsurl.h"
+#include "utils/utf8.h"
#include "utils/utils.h"
regex_t save_complete_import_re;
@@ -551,7 +553,9 @@ static bool save_complete_rewrite_url_value(save_complete_ctx *ctx,
{
nsurl *url;
hlcache_handle *content;
+ char *escaped;
nserror error;
+ utf8_convert_ret ret;
error = nsurl_join(ctx->base, value, &url);
if (error == NSERROR_NOMEM)
@@ -566,11 +570,25 @@ static bool save_complete_rewrite_url_value(save_complete_ctx *ctx,
fprintf(ctx->fp, "\"%p\"", content);
} else {
/* no match found */
- fprintf(ctx->fp, "\"%s\"", nsurl_access(url));
+ ret = utf8_to_html(nsurl_access(url), "UTF-8",
+ nsurl_length(url), &escaped);
nsurl_unref(url);
+
+ if (ret != UTF8_CONVERT_OK)
+ return false;
+
+ fprintf(ctx->fp, "\"%s\"", escaped);
+
+ free(escaped);
}
} else {
- fprintf(ctx->fp, "\"%.*s\"", (int) value_len, value);
+ ret = utf8_to_html(value, "UTF-8", value_len, &escaped);
+ if (ret != UTF8_CONVERT_OK)
+ return false;
+
+ fprintf(ctx->fp, "\"%s\"", escaped);
+
+ free(escaped);
}
return true;
@@ -579,7 +597,16 @@ static bool save_complete_rewrite_url_value(save_complete_ctx *ctx,
static bool save_complete_write_value(save_complete_ctx *ctx,
const char *value, size_t value_len)
{
- fprintf(ctx->fp, "\"%.*s\"", (int) value_len, value);
+ char *escaped;
+ utf8_convert_ret ret;
+
+ ret = utf8_to_html(value, "UTF-8", value_len, &escaped);
+ if (ret != UTF8_CONVERT_OK)
+ return false;
+
+ fprintf(ctx->fp, "\"%s\"", escaped);
+
+ free(escaped);
return true;
}
@@ -728,7 +755,7 @@ static bool save_complete_handle_attrs(save_complete_ctx *ctx,
for (i = 0; i < length; i++) {
dom_attr *attr;
- error = dom_namednodemap_item(attrs, i, &attr);
+ error = dom_namednodemap_item(attrs, i, (void *) &attr);
if (error != DOM_NO_ERR)
return false;
@@ -753,6 +780,7 @@ static bool save_complete_handle_element(save_complete_ctx *ctx,
dom_namednodemap *attrs;
const char *name_data;
size_t name_len;
+ bool process = true;
dom_exception error;
ctx->iter_state = STATE_NORMAL;
@@ -767,9 +795,56 @@ static bool save_complete_handle_element(save_complete_ctx *ctx,
name_data = dom_string_data(name);
name_len = dom_string_byte_length(name);
- /* Elide BASE elements from the output */
if (name_len == SLEN("base") &&
strncasecmp(name_data, "base", name_len) == 0) {
+ /* Elide BASE elements from the output */
+ process = false;
+ } else if (name_len == SLEN("meta") &&
+ strncasecmp(name_data, "meta", name_len) == 0) {
+ /* Don't emit close tags for META elements */
+ if (event_type == EVENT_LEAVE) {
+ process = false;
+ } else {
+ /* Elide meta charsets */
+ dom_string *value;
+ error = dom_element_get_attribute(node,
+ corestring_dom_http_equiv, &value);
+ if (error != DOM_NO_ERR) {
+ dom_string_unref(name);
+ return false;
+ }
+
+ if (value != NULL) {
+ if (dom_string_length(value) ==
+ SLEN("Content-Type") &&
+ strncasecmp(dom_string_data(value),
+ "Content-Type",
+ SLEN("Content-Type")) == 0)
+ process = false;
+
+ dom_string_unref(value);
+ } else {
+ bool yes;
+
+ error = dom_element_has_attribute(node,
+ corestring_dom_charset, &yes);
+ if (error != DOM_NO_ERR) {
+ dom_string_unref(name);
+ return false;
+ }
+
+ if (yes)
+ process = false;
+ }
+ }
+ } else if (event_type == EVENT_LEAVE &&
+ ((name_len == SLEN("link") &&
+ strncasecmp(name_data, "link", name_len) == 0))) {
+ /* Don't emit close tags for void elements */
+ process = false;
+ }
+
+ if (process == false) {
dom_string_unref(name);
return true;
}
@@ -833,6 +908,12 @@ static bool save_complete_handle_element(save_complete_ctx *ctx,
}
ctx->iter_state = STATE_IN_STYLE;
+ } else if (event_type == EVENT_ENTER && name_len == SLEN("head") &&
+ strncasecmp(name_data, "head", name_len) == 0) {
+ /* If this is a HEAD element, insert a meta charset */
+ fputs("<META http-equiv=\"Content-Type\" "
+ "content=\"text/html; charset=utf-8\">",
+ ctx->fp);
}
dom_string_unref(name);
@@ -846,6 +927,7 @@ static bool save_complete_node_handler(dom_node *node,
save_complete_ctx *ctx = ctxin;
dom_node_type type;
dom_exception error;
+ utf8_convert_ret ret;
error = dom_node_get_node_type(node, &type);
if (error != DOM_NO_ERR)
@@ -872,11 +954,20 @@ static bool save_complete_node_handler(dom_node *node,
fwrite("<!--", 1, sizeof("<!--") - 1, ctx->fp);
if (text != NULL) {
+ char *escaped;
+
text_data = dom_string_data(text);
text_len = dom_string_byte_length(text);
- fwrite(text_data, sizeof(*text_data),
- text_len, ctx->fp);
+ ret = utf8_to_html(text_data, "UTF-8",
+ text_len, &escaped);
+ if (ret != UTF8_CONVERT_OK)
+ return false;
+
+ fwrite(escaped, sizeof(*escaped),
+ strlen(escaped), ctx->fp);
+
+ free(escaped);
dom_string_unref(text);
}
@@ -917,8 +1008,9 @@ static bool save_complete_node_handler(dom_node *node,
name_data = dom_string_data(name);
name_len = dom_string_byte_length(name);
- fprintf(ctx->fp, " PUBLIC \"%.*s\"",
- (int) name_len, name_data);
+ if (name_len > 0)
+ fprintf(ctx->fp, " PUBLIC \"%.*s\"",
+ (int) name_len, name_data);
dom_string_unref(name);
}
@@ -931,8 +1023,9 @@ static bool save_complete_node_handler(dom_node *node,
name_data = dom_string_data(name);
name_len = dom_string_byte_length(name);
- fprintf(ctx->fp, " \"%.*s\"",
- (int) name_len, name_data);
+ if (name_len > 0)
+ fprintf(ctx->fp, " \"%.*s\"",
+ (int) name_len, name_data);
dom_string_unref(name);
}
diff --git a/desktop/tree_url_node.c b/desktop/tree_url_node.c
index d2701e5..5305fa1 100644
--- a/desktop/tree_url_node.c
+++ b/desktop/tree_url_node.c
@@ -817,11 +817,11 @@ static bool tree_url_save_entry(struct node *entry, FILE *fp)
if (href == NULL)
return false;
- ret = utf8_to_enc(text, "iso-8859-1", strlen(text), &latin1_text);
+ ret = utf8_to_html(text, "iso-8859-1", strlen(text), &latin1_text);
if (ret != UTF8_CONVERT_OK)
return false;
- ret = utf8_to_enc(href, "iso-8859-1", strlen(href), &latin1_href);
+ ret = utf8_to_html(href, "iso-8859-1", strlen(href), &latin1_href);
if (ret != UTF8_CONVERT_OK) {
free(latin1_text);
return false;
@@ -872,7 +872,7 @@ static bool tree_url_save_directory(struct node *directory, FILE *fp)
if (text == NULL)
return false;
- ret = utf8_to_enc(text, "iso-8859-1",
+ ret = utf8_to_html(text, "iso-8859-1",
strlen(text), &latin1_text);
if (ret != UTF8_CONVERT_OK)
return false;
@@ -919,7 +919,7 @@ bool tree_urlfile_save(struct tree *tree, const char *filename,
fputs("<meta http-equiv=\"Content-Type\" "
"content=\"text/html; charset=iso-8859-1\">\n", fp);
fprintf(fp, "<title>%s</title>\n", page_title);
- fputs("<body>", fp);
+ fputs("</head>\n<body>", fp);
if (tree_url_save_directory(tree_get_root(tree), fp) == false) {
warn_user("HotlistSaveError", 0);
diff --git a/utils/corestrings.c b/utils/corestrings.c
index f970c10..9fee96d 100644
--- a/utils/corestrings.c
+++ b/utils/corestrings.c
@@ -133,6 +133,7 @@ dom_string *corestring_dom_canplaythrough;
dom_string *corestring_dom_cellpadding;
dom_string *corestring_dom_cellspacing;
dom_string *corestring_dom_change;
+dom_string *corestring_dom_charset;
dom_string *corestring_dom_click;
dom_string *corestring_dom_close;
dom_string *corestring_dom_color;
@@ -355,6 +356,7 @@ void corestrings_fini(void)
CSS_DOM_STRING_UNREF(cellpadding);
CSS_DOM_STRING_UNREF(cellspacing);
CSS_DOM_STRING_UNREF(change);
+ CSS_DOM_STRING_UNREF(charset);
CSS_DOM_STRING_UNREF(click);
CSS_DOM_STRING_UNREF(close);
CSS_DOM_STRING_UNREF(color);
@@ -608,6 +610,7 @@ nserror corestrings_init(void)
CSS_DOM_STRING_INTERN(cellpadding);
CSS_DOM_STRING_INTERN(cellspacing);
CSS_DOM_STRING_INTERN(change);
+ CSS_DOM_STRING_INTERN(charset);
CSS_DOM_STRING_INTERN(click);
CSS_DOM_STRING_INTERN(close);
CSS_DOM_STRING_INTERN(color);
diff --git a/utils/corestrings.h b/utils/corestrings.h
index 61771c1..08d2545 100644
--- a/utils/corestrings.h
+++ b/utils/corestrings.h
@@ -139,6 +139,7 @@ extern struct dom_string *corestring_dom_canplaythrough;
extern struct dom_string *corestring_dom_cellpadding;
extern struct dom_string *corestring_dom_cellspacing;
extern struct dom_string *corestring_dom_change;
+extern struct dom_string *corestring_dom_charset;
extern struct dom_string *corestring_dom_click;
extern struct dom_string *corestring_dom_close;
extern struct dom_string *corestring_dom_color;
diff --git a/utils/utf8.c b/utils/utf8.c
index 5c27fa7..c0f6b10 100644
--- a/utils/utf8.c
+++ b/utils/utf8.c
@@ -297,7 +297,7 @@ utf8_convert_ret utf8_convert(const char *string, size_t len,
}
slen = len ? len : strlen(string);
- /* Worst case = ACSII -> UCS4, so allocate an output buffer
+ /* Worst case = ASCII -> UCS4, so allocate an output buffer
* 4 times larger than the input buffer, and add 4 bytes at
* the end for the NULL terminator
*/
@@ -337,3 +337,140 @@ utf8_convert_ret utf8_convert(const char *string, size_t len,
return UTF8_CONVERT_OK;
}
+
+static utf8_convert_ret utf8_convert_html_chunk(iconv_t cd,
+ const char *chunk, size_t inlen,
+ char **out, size_t *outlen)
+{
+ size_t ret, esclen;
+ uint32_t ucs4;
+ char *pescape, escape[11];
+
+ while (inlen > 0) {
+ ret = iconv(cd, (void *) &chunk, &inlen, (void *) out, outlen);
+ if (ret != (size_t) -1)
+ break;
+
+ if (errno != EILSEQ)
+ return UTF8_CONVERT_NOMEM;
+
+ ucs4 = utf8_to_ucs4(chunk, inlen);
+ esclen = snprintf(escape, sizeof(escape), "&#x%06x;", ucs4);
+ pescape = escape;
+ ret = iconv(cd, (void *) &pescape, &esclen,
+ (void *) out, outlen);
+ if (ret == (size_t) -1)
+ return UTF8_CONVERT_NOMEM;
+
+ esclen = utf8_next(chunk, inlen, 0);
+ chunk += esclen;
+ inlen -= esclen;
+ }
+
+ return UTF8_CONVERT_OK;
+}
+
+/**
+ * Convert a UTF-8 encoded string into a string of the given encoding,
+ * applying HTML escape sequences where necessary.
+ *
+ * \param string String to convert (NUL-terminated)
+ * \param encname Name of encoding to convert to
+ * \param len Length, in bytes, of the input string, or 0
+ * \param result Pointer to location to receive result
+ * \return Appropriate utf8_convert_ret value
+ */
+utf8_convert_ret utf8_to_html(const char *string, const char *encname,
+ size_t len, char **result)
+{
+ iconv_t cd;
+ const char *in;
+ char *out, *origout;
+ size_t off, prev_off, inlen, outlen, origoutlen, esclen;
+ utf8_convert_ret ret;
+ char *pescape, escape[11];
+
+ if (len == 0)
+ len = strlen(string);
+
+ cd = iconv_open(encname, "UTF-8");
+ if (cd == (iconv_t) -1) {
+ if (errno == EINVAL)
+ return UTF8_CONVERT_BADENC;
+ /* default to no memory */
+ return UTF8_CONVERT_NOMEM;
+ }
+
+ /* Worst case is ASCII -> UCS4, with all characters escaped:
+ * "&#xYYYYYY;", thus each input character may become a string
+ * of 10 UCS4 characters, each 4 bytes in length */
+ origoutlen = outlen = len * 10 * 4;
+ origout = out = malloc(outlen);
+ if (out == NULL) {
+ iconv_close(cd);
+ return UTF8_CONVERT_NOMEM;
+ }
+
+ /* Process input in chunks between characters we must escape */
+ prev_off = off = 0;
+ while (off < len) {
+ /* Must escape '&', '<', and '>' */
+ if (string[off] == '&' || string[off] == '<' ||
+ string[off] == '>') {
+ if (off - prev_off > 0) {
+ /* Emit chunk */
+ in = string + prev_off;
+ inlen = off - prev_off;
+ ret = utf8_convert_html_chunk(cd, in, inlen,
+ &out, &outlen);
+ if (ret != UTF8_CONVERT_OK) {
+ free(origout);
+ iconv_close(cd);
+ return ret;
+ }
+ }
+
+ /* Emit mandatory escape */
+ esclen = snprintf(escape, sizeof(escape),
+ "&#x%06x;", string[off]);
+ pescape = escape;
+ ret = utf8_convert_html_chunk(cd, pescape, esclen,
+ &out, &outlen);
+ if (ret != UTF8_CONVERT_OK) {
+ free(origout);
+ iconv_close(cd);
+ return ret;
+ }
+
+ prev_off = off = utf8_next(string, len, off);
+ } else {
+ off = utf8_next(string, len, off);
+ }
+ }
+
+ /* Process final chunk */
+ if (prev_off < len) {
+ in = string + prev_off;
+ inlen = len - prev_off;
+ ret = utf8_convert_html_chunk(cd, in, inlen, &out, &outlen);
+ if (ret != UTF8_CONVERT_OK) {
+ free(origout);
+ iconv_close(cd);
+ return ret;
+ }
+ }
+
+ iconv_close(cd);
+
+ /* Shrink-wrap */
+ *result = realloc(origout, origoutlen - outlen + 4);
+ if (*result == NULL) {
+ free(origout);
+ return UTF8_CONVERT_NOMEM;
+ }
+ memset(*result + (origoutlen - outlen), 0, 4);
+
+ return UTF8_CONVERT_OK;
+}
+
+
diff --git a/utils/utf8.h b/utils/utf8.h
index 9d8ec74..22aee1a 100644
--- a/utils/utf8.h
+++ b/utils/utf8.h
@@ -47,6 +47,9 @@ utf8_convert_ret utf8_to_enc(const char *string, const char *encname,
utf8_convert_ret utf8_from_enc(const char *string, const char *encname,
size_t len, char **result);
+utf8_convert_ret utf8_to_html(const char *string, const char *encname,
+ size_t len, char **result);
+
/* These two are platform specific */
utf8_convert_ret utf8_to_local_encoding(const char *string, size_t len,
char **result);
--
NetSurf Browser
10 years, 9 months
netsurf: branch mono/removing-windom-dependency updated. f0f57e34314b1a2e3327ab0ae65ec840efa3ee3a
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/f0f57e34314b1a2e3327a...
...commit http://git.netsurf-browser.org/netsurf.git/commit/f0f57e34314b1a2e3327ab0...
...tree http://git.netsurf-browser.org/netsurf.git/tree/f0f57e34314b1a2e3327ab0ae...
The branch, mono/removing-windom-dependency has been updated
via f0f57e34314b1a2e3327ab0ae65ec840efa3ee3a (commit)
via 6840c98efed4cbfe0be7d3add2b821421666a31b (commit)
from 2caa45d53979caf46d5f748b28f2267a59a3aad5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/f0f57e34314b1a2e332...
commit f0f57e34314b1a2e3327ab0ae65ec840efa3ee3a
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
Almost done.
diff --git a/atari/settings.c b/atari/settings.c
index afbf8bd..90404c1 100644
--- a/atari/settings.c
+++ b/atari/settings.c
@@ -55,7 +55,7 @@ static OBJECT * dlgtree;
guiwin_send_redraw(settings_guiwin, \
obj_screen_rect(dlgtree, idx));
-#define ENABLE_OBJ(idx) (dlgtree[idx].ob_state &= ~(OS_DISABLED)) \
+#define ENABLE_OBJ(idx) (dlgtree[idx].ob_state &= ~(OS_DISABLED)); \
guiwin_send_redraw(settings_guiwin, \
obj_screen_rect(dlgtree, idx));
@@ -78,6 +78,8 @@ static OBJECT * dlgtree;
static void on_close(void);
static void on_redraw(GRECT *clip);
static void form_event(int index, int external, void *unused2);
+static void apply_settings(void);
+static void save_settings(void);
static bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
{
@@ -87,7 +89,8 @@ static bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
objc_offset(tree, obj, &obj_screen.g_x, &obj_screen.g_y);
obj_screen.g_w = dlgtree[obj].ob_width;
obj_screen.g_h = dlgtree[obj].ob_height;
- ret = rc_intersect(area, &obj_screen);
+
+ ret = RC_WITHIN(&obj_screen, area);
return(ret);
}
@@ -101,6 +104,7 @@ static GRECT * obj_screen_rect(OBJECT * tree, short obj)
return(&obj_screen);
}
+
static void set_text( short idx, char * text, int len )
{
char spare[255];
@@ -116,11 +120,40 @@ static void set_text( short idx, char * text, int len )
set_string( dlgtree, idx, spare);
}
+
+
+static char *get_text(OBJECT * tree, short idx)
+{
+ static char p[]="";
+ USERBLK *user;
+ char *retval;
+
+ switch (tree[idx].ob_type & 0x00FF) {
+ case G_BUTTON:
+ case G_STRING:
+ case G_TITLE:
+ return( tree[idx].ob_spec.free_string);
+ case G_TEXT:
+ case G_BOXTEXT:
+ case G_FTEXT:
+ case G_FBOXTEXT:
+ return (tree[idx].ob_spec.tedinfo->te_ptext);
+ case G_ICON:
+ case G_CICON:
+ return (tree[idx].ob_spec.iconblk->ib_ptext);
+ break;
+
+ default: break;
+ }
+ return (p);
+}
+
+
/**
* Toogle all objects which are directly influenced by other GUI elements
* ( like checkbox )
*/
-static void toggle_objects( void )
+static void toggle_objects(void)
{
/* enable / disable (refresh) objects depending on radio button values: */
FORMEVENT(SETTINGS_CB_USE_PROXY);
@@ -128,12 +161,24 @@ static void toggle_objects( void )
FORMEVENT(SETTINGS_BT_SEL_FONT_RENDERER);
}
+
+static void save_settings(void)
+{
+ apply_settings();
+ // Save settings
+ nsoption_write( (const char*)&options );
+ nsoption_read( (const char*)&options );
+ close_settings();
+ form_alert(1, "[1][Some options require an netsurf restart!][OK]");
+ deskmenu_update();
+}
/* this gets called each time the settings dialog is opened: */
static void display_settings(void)
{
char spare[255];
// read current settings and display them
+
/* "Browser" tab: */
set_text( SETTINGS_EDIT_HOMEPAGE, nsoption_charp(homepage_url),
@@ -169,7 +214,7 @@ static void display_settings(void)
set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
/* "Cache" tab: */
- tmp_option_memory_cache_size = nsoption_int(memory_cache_size) / 100000;
+ tmp_option_memory_cache_size = nsoption_int(memory_cache_size) / 1000000;
snprintf( spare, 255, "%03.1f", tmp_option_memory_cache_size );
set_text( SETTINGS_STR_MAX_MEM_CACHE, spare, 5 );
@@ -253,16 +298,17 @@ static void display_settings(void)
tmp_option_font_size = nsoption_int(font_size);
snprintf( spare, 255, "%3d", nsoption_int(font_size) );
- set_text( SETTINGS_EDIT_DEF_FONT_SIZE, spare , 3 );
+ set_text( SETTINGS_EDIT_DEF_FONT_SIZE, spare , 3 );
+
+ toggle_objects();
}
-static void
-form_event(int index, int external, void *unused2)
+static void form_event(int index, int external, void *unused2)
{
char spare[255];
bool is_button = false;
- bool checked = OBJ_SELECTED( index );
+ bool checked = OBJ_SELECTED(index);
char * tmp;
/* For font driver popup: */
@@ -281,11 +327,193 @@ form_event(int index, int external, void *unused2)
short x, y;
int choice;
- switch( index ){
+ // TODO: set correct form coords.
+
+ switch( index ){
+
+ case SETTINGS_SAVE:
+ save_settings();
+ //save_settings();
+ break;
case SETTINGS_INC_HISTORY_AGE:
case SETTINGS_DEC_HISTORY_AGE:
+ if(index == SETTINGS_INC_HISTORY_AGE)
+ tmp_option_expire_url += 1;
+ else
+ tmp_option_expire_url -= 1;
+
+ if(tmp_option_expire_url > 99)
+ tmp_option_expire_url = 0;
+
+ snprintf( spare, 255, "%02d", tmp_option_expire_url);
+ set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
+ OBJ_REDRAW(SETTINGS_EDIT_HISTORY_AGE);
+ is_button = true;
+
+ default: break;
+ }
+
+
+ switch(index){
+
+ case SETTINGS_CB_USE_PROXY:
+ if( checked ){
+ ENABLE_OBJ(SETTINGS_EDIT_PROXY_HOST);
+ ENABLE_OBJ(SETTINGS_EDIT_PROXY_PORT);
+ ENABLE_OBJ(SETTINGS_CB_PROXY_AUTH);
+ ENABLE_OBJ(SETTINGS_LBL_PROXY_AUTH);
+ }
+ else {
+ DISABLE_OBJ(SETTINGS_EDIT_PROXY_HOST);
+ DISABLE_OBJ(SETTINGS_EDIT_PROXY_PORT);
+ DISABLE_OBJ(SETTINGS_CB_PROXY_AUTH);
+ DISABLE_OBJ(SETTINGS_LBL_PROXY_AUTH);
+ }
+ FORMEVENT(SETTINGS_CB_PROXY_AUTH);
+ OBJ_REDRAW(SETTINGS_CB_USE_PROXY);
+ break;
+
+ case SETTINGS_CB_PROXY_AUTH:
+ if( checked && OBJ_SELECTED( SETTINGS_CB_USE_PROXY ) ){
+ ENABLE_OBJ(SETTINGS_EDIT_PROXY_USERNAME);
+ ENABLE_OBJ(SETTINGS_EDIT_PROXY_PASSWORD);
+ }
+ else {
+ DISABLE_OBJ(SETTINGS_EDIT_PROXY_USERNAME);
+ DISABLE_OBJ(SETTINGS_EDIT_PROXY_PASSWORD);
+ }
+ break;
+
+ case SETTINGS_CB_ENABLE_ANIMATION:
+ if( checked ){
+ ENABLE_OBJ( SETTINGS_EDIT_MIN_GIF_DELAY );
+ }
+ else {
+ DISABLE_OBJ( SETTINGS_EDIT_MIN_GIF_DELAY );
+ }
+ break;
+
+ case SETTINGS_BT_SEL_FONT_RENDERER:
+ if( external ){
+ objc_offset(dlgtree, SETTINGS_BT_SEL_FONT_RENDERER, &x, &y);
+ choice = MenuPopUp ( font_driver_items, x, y,
+ num_font_drivers,
+ -1, -1, P_LIST + P_WNDW + P_CHCK );
+ if( choice > 0 &&
+ choice <= num_font_drivers ){
+ set_text(SETTINGS_BT_SEL_FONT_RENDERER,
+ font_driver_items[choice-1],
+ LABEL_FONT_RENDERER_MAX_LEN);
+ OBJ_REDRAW(SETTINGS_BT_SEL_FONT_RENDERER);
+ }
+ }
+ tmp = get_text(dlgtree, SETTINGS_BT_SEL_FONT_RENDERER);
+ if( strcmp(tmp, "freetype") == 0 ){
+ ENABLE_OBJ(SETTINGS_CB_ANTI_ALIASING);
+ } else {
+ DISABLE_OBJ(SETTINGS_CB_ANTI_ALIASING);
+ }
+ break;
+
+ case SETTINGS_BT_SEL_LOCALE:
+ objc_offset(dlgtree, SETTINGS_BT_SEL_LOCALE, &x, &y);
+ choice = MenuPopUp ( locales, x, y,
+ num_locales,
+ -1, -1, P_LIST + P_WNDW + P_CHCK );
+ if( choice > 0 && choice <= num_locales ){
+ set_text(SETTINGS_BT_SEL_LOCALE, locales[choice-1], 5);
+ }
+ OBJ_REDRAW(SETTINGS_BT_SEL_LOCALE);
+ break;
+
+/*
+ case SETTINGS_INPUT_TOOLBAR_BGCOLOR:
+ objc_offset( FORM(win), SETTINGS_INPUT_TOOLBAR_BGCOLOR, &x, &y );
+ choice = color_popup(x, y, tmp_option_atari_toolbar_bg);
+ snprintf( spare, 255, "%06x", choice );
+ tmp_option_atari_toolbar_bg = choice;
+ ObjcStrCpy( dlgtree, SETTINGS_INPUT_TOOLBAR_BGCOLOR,
+ spare );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_INPUT_TOOLBAR_BGCOLOR);
+ break;
+*/
+/*
+ case SETTINGS_BT_TOOLBAR_ICONSET:
+ objc_offset( FORM(win), SETTINGS_BT_TOOLBAR_ICONSET, &x, &y );
+ tmp = toolbar_iconset_popup(x,y);
+ if( tmp != NULL ){
+ ObjcStrCpy( dlgtree, SETTINGS_BT_TOOLBAR_ICONSET, tmp );
+ }
+ is_button = true;
+ break;
+*/
+ case SETTINGS_INC_MEM_CACHE:
+ case SETTINGS_DEC_MEM_CACHE:
+ if( index == SETTINGS_DEC_MEM_CACHE )
+ tmp_option_memory_cache_size -= 0.1;
+ else
+ tmp_option_memory_cache_size += 0.1;
+
+ if( tmp_option_memory_cache_size < 0.5 )
+ tmp_option_memory_cache_size = 0.5;
+ if( tmp_option_memory_cache_size > 999.9 )
+ tmp_option_memory_cache_size = 999.9;
+ snprintf( spare, 255, "%03.1f", tmp_option_memory_cache_size );
+ set_text( SETTINGS_STR_MAX_MEM_CACHE, spare, 5 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_STR_MAX_MEM_CACHE);
+ break;
+
+ case SETTINGS_INC_CACHED_CONNECTIONS:
+ case SETTINGS_DEC_CACHED_CONNECTIONS:
+ if( index == SETTINGS_INC_CACHED_CONNECTIONS )
+ tmp_option_max_cached_fetch_handles += 1;
+ else
+ tmp_option_max_cached_fetch_handles -= 1;
+ if( tmp_option_max_cached_fetch_handles > 31 )
+ tmp_option_max_cached_fetch_handles = 31;
+
+ snprintf( spare, 255, "%02d", tmp_option_max_cached_fetch_handles );
+ set_text( SETTINGS_EDIT_MAX_CACHED_CONNECTIONS, spare, 2 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MAX_CACHED_CONNECTIONS);
+ break;
+
+ case SETTINGS_INC_MAX_FETCHERS:
+ case SETTINGS_DEC_MAX_FETCHERS:
+ if( index == SETTINGS_INC_MAX_FETCHERS )
+ tmp_option_max_fetchers += 1;
+ else
+ tmp_option_max_fetchers -= 1;
+ if( tmp_option_max_fetchers > 31 )
+ tmp_option_max_fetchers = 31;
+
+ snprintf( spare, 255, "%02d", tmp_option_max_fetchers );
+ set_text( SETTINGS_EDIT_MAX_FETCHERS, spare, 2 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MAX_FETCHERS);
+ break;
+
+ case SETTINGS_INC_MAX_FETCHERS_PER_HOST:
+ case SETTINGS_DEC_MAX_FETCHERS_PER_HOST:
+ if( index == SETTINGS_INC_MAX_FETCHERS_PER_HOST )
+ tmp_option_max_fetchers_per_host += 1;
+ else
+ tmp_option_max_fetchers_per_host -= 1;
+ if( tmp_option_max_fetchers_per_host > 31 )
+ tmp_option_max_fetchers_per_host = 31;
+
+ snprintf( spare, 255, "%02d", tmp_option_max_fetchers_per_host );
+ set_text( SETTINGS_EDIT_MAX_FETCHERS_PER_HOST, spare, 2 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MAX_FETCHERS_PER_HOST);
+ break;
+
+ case SETTINGS_INC_HISTORY_AGE:
+ case SETTINGS_DEC_HISTORY_AGE:
if( index == SETTINGS_INC_HISTORY_AGE )
tmp_option_expire_url += 1;
else
@@ -295,12 +523,83 @@ form_event(int index, int external, void *unused2)
tmp_option_expire_url = 0;
snprintf( spare, 255, "%02d", tmp_option_expire_url );
- set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
+ set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
+ is_button = true;
OBJ_REDRAW(SETTINGS_EDIT_HISTORY_AGE);
- is_button = true;
+ break;
+ case SETTINGS_INC_GIF_DELAY:
+ case SETTINGS_DEC_GIF_DELAY:
+ if( index == SETTINGS_INC_GIF_DELAY )
+ tmp_option_minimum_gif_delay += 0.1;
+ else
+ tmp_option_minimum_gif_delay -= 0.1;
+
+ if( tmp_option_minimum_gif_delay < 0.1 )
+ tmp_option_minimum_gif_delay = 0.1;
+ if( tmp_option_minimum_gif_delay > 9.0 )
+ tmp_option_minimum_gif_delay = 9.0;
+ snprintf( spare, 255, "%01.1f", tmp_option_minimum_gif_delay );
+ set_text( SETTINGS_EDIT_MIN_GIF_DELAY, spare, 3 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MIN_GIF_DELAY);
+ break;
+
+ case SETTINGS_INC_MIN_FONT_SIZE:
+ case SETTINGS_DEC_MIN_FONT_SIZE:
+ if( index == SETTINGS_INC_MIN_FONT_SIZE )
+ tmp_option_font_min_size += 1;
+ else
+ tmp_option_font_min_size -= 1;
+
+ if( tmp_option_font_min_size > 500 )
+ tmp_option_font_min_size = 500;
+ if( tmp_option_font_min_size < 10 )
+ tmp_option_font_min_size = 10;
+
+ snprintf( spare, 255, "%03d", tmp_option_font_min_size );
+ set_text( SETTINGS_EDIT_MIN_FONT_SIZE, spare, 3 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MIN_FONT_SIZE);
+ break;
+
+ case SETTINGS_INC_DEF_FONT_SIZE:
+ case SETTINGS_DEC_DEF_FONT_SIZE:
+ if( index == SETTINGS_INC_DEF_FONT_SIZE )
+ tmp_option_font_size += 1;
+ else
+ tmp_option_font_size -= 1;
+
+ if( tmp_option_font_size > 999 )
+ tmp_option_font_size = 999;
+ if( tmp_option_font_size < 50 )
+ tmp_option_font_size = 50;
+
+ snprintf( spare, 255, "%03d", tmp_option_font_size );
+ set_text( SETTINGS_EDIT_DEF_FONT_SIZE, spare, 3 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_DEF_FONT_SIZE);
+ break;
+/*
+ case SETTINGS_INC_INCREMENTAL_REFLOW:
+ case SETTINGS_DEC_INCREMENTAL_REFLOW:
+ if( index == SETTINGS_INC_INCREMENTAL_REFLOW )
+ tmp_option_min_reflow_period += 1;
+ else
+ tmp_option_min_reflow_period -= 1;
+
+ if( tmp_option_min_reflow_period > 9999 )
+ tmp_option_min_reflow_period = 10;
+
+ snprintf( spare, 255, "%04d", tmp_option_min_reflow_period );
+ set_text( SETTINGS_EDIT_MIN_REFLOW_PERIOD, spare, 4 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MIN_REFLOW_PERIOD);
+ break;
+*/
default: break;
- }
+ }
+
if( is_button ){
// remove selection indicator from button element:
OBJ_UNCHECK(index);
@@ -345,6 +644,89 @@ static void on_redraw(GRECT *clip)
}
}
+
+static void apply_settings(void)
+{
+ /* "Network" tab: */
+ nsoption_set_bool(http_proxy, OBJ_SELECTED(SETTINGS_CB_USE_PROXY));
+ if ( OBJ_SELECTED(SETTINGS_CB_PROXY_AUTH) ) {
+ nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_BASIC);
+ } else {
+ nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE);
+ }
+ nsoption_set_charp(http_proxy_auth_pass,
+ get_text(dlgtree, SETTINGS_EDIT_PROXY_PASSWORD));
+ nsoption_set_charp(http_proxy_auth_user,
+ get_text(dlgtree, SETTINGS_EDIT_PROXY_USERNAME));
+ nsoption_set_charp(http_proxy_host,
+ get_text(dlgtree, SETTINGS_EDIT_PROXY_HOST));
+ nsoption_set_int(http_proxy_port,
+ atoi( get_text(dlgtree, SETTINGS_EDIT_PROXY_PORT) ));
+ nsoption_set_int(max_fetchers_per_host,
+ atoi( get_text(dlgtree, SETTINGS_EDIT_MAX_FETCHERS_PER_HOST)));
+ nsoption_set_int(max_cached_fetch_handles,
+ atoi( get_text(dlgtree, SETTINGS_EDIT_MAX_CACHED_CONNECTIONS)));
+ nsoption_set_int(max_fetchers,
+ atoi( get_text(dlgtree, SETTINGS_EDIT_MAX_FETCHERS) ));
+ nsoption_set_bool(foreground_images,
+ OBJ_SELECTED( SETTINGS_CB_FG_IMAGES ));
+ nsoption_set_bool(background_images,
+ OBJ_SELECTED( SETTINGS_CB_BG_IMAGES ));
+
+ /* "Style" tab: */
+ nsoption_set_int(font_min_size, tmp_option_font_min_size);
+ nsoption_set_int(font_size, tmp_option_font_size);
+
+ /* "Rendering" tab: */
+ nsoption_set_charp(atari_font_driver,
+ get_text(dlgtree, SETTINGS_BT_SEL_FONT_RENDERER));
+ nsoption_set_bool(atari_transparency,
+ OBJ_SELECTED(SETTINGS_CB_TRANSPARENCY));
+ nsoption_set_bool(animate_images,
+ OBJ_SELECTED(SETTINGS_CB_ENABLE_ANIMATION));
+ nsoption_set_int(minimum_gif_delay,
+ (int)(tmp_option_minimum_gif_delay*100+0.5));
+/* nsoption_set_bool(incremental_reflow,
+ OBJ_SELECTED(SETTINGS_CB_INCREMENTAL_REFLOW));*/
+ nsoption_set_int(min_reflow_period, tmp_option_min_reflow_period);
+ nsoption_set_int(atari_font_monochrom,
+ !OBJ_SELECTED( SETTINGS_CB_ANTI_ALIASING ));
+
+ /* "Paths" tabs: */
+ nsoption_set_charp(ca_bundle,
+ get_text(dlgtree, SETTINGS_EDIT_CA_BUNDLE));
+ nsoption_set_charp(ca_path,
+ get_text(dlgtree, SETTINGS_EDIT_CA_CERTS_PATH));
+ nsoption_set_charp(homepage_url,
+ get_text(dlgtree, SETTINGS_EDIT_CA_CERTS_PATH));
+ nsoption_set_charp(hotlist_file,
+ get_text(dlgtree, SETTINGS_EDIT_HOTLIST_FILE));
+ nsoption_set_charp(atari_editor,
+ get_text(dlgtree, SETTINGS_EDIT_EDITOR));
+ nsoption_set_charp(downloads_path,
+ get_text(dlgtree, SETTINGS_EDIT_DOWNLOAD_PATH));
+
+ /* "Cache" tab: */
+ nsoption_set_int(memory_cache_size,
+ tmp_option_memory_cache_size * 1000000);
+
+ /* "Browser" tab: */
+ nsoption_set_bool(target_blank,
+ !OBJ_SELECTED(SETTINGS_CB_DISABLE_POPUP_WINDOWS));
+ nsoption_set_bool(block_ads,
+ OBJ_SELECTED(SETTINGS_CB_HIDE_ADVERTISEMENT));
+ nsoption_set_charp(accept_language,
+ get_text(dlgtree, SETTINGS_BT_SEL_LOCALE));
+ nsoption_set_int(expire_url,
+ atoi(get_text(dlgtree, SETTINGS_EDIT_HISTORY_AGE)));
+ nsoption_set_bool(send_referer,
+ OBJ_SELECTED(SETTINGS_CB_SEND_HTTP_REFERRER));
+ nsoption_set_bool(do_not_track,
+ OBJ_SELECTED(SETTINGS_CB_SEND_DO_NOT_TRACK));
+ nsoption_set_charp(homepage_url,
+ get_text(dlgtree, SETTINGS_EDIT_HOMEPAGE));
+}
+
static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
{
short retval = 0;
@@ -353,7 +735,7 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
if ((ev_out->emo_events & MU_MESAG) != 0) {
// handle message
- printf("settings win msg: %d\n", msg[0]);
+ // printf("settings win msg: %d\n", msg[0]);
switch (msg[0]) {
case WM_REDRAW:
@@ -386,7 +768,7 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
}
if ((ev_out->emo_events & MU_KEYBD) != 0) {
- if((edit_obj > -1) && obj_is_inside(dlgtree, edit_obj, &work)){
+ if((edit_obj > -1) /* && obj_is_inside(dlgtree, edit_obj, &work) */){
short next_edit_obj = edit_obj;
short next_char = -1;
@@ -425,10 +807,11 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
any_obj = objc_find(dlgtree, 0, 8, ev_out->emo_mouse.p_x,
ev_out->emo_mouse.p_y);
-
+ if((dlgtree[any_obj].ob_state & OS_DISABLED) != 0) {
+ return(retval);
+ }
uint16_t type = (dlgtree[any_obj].ob_type & 0xFF);
if (type == G_FTEXT || type == G_FBOXTEXT) {
- printf("text??\n");
ret = form_button(dlgtree, any_obj, ev_out->emo_mclicks, &nextobj);
if(edit_obj != -1){
if (obj_is_inside(dlgtree, edit_obj, &work)) {
@@ -444,7 +827,6 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx, EDEND);
}
edit_obj = -1;
- printf("xtype: %d\n", dlgtree[any_obj].ob_type & 0xff00 );
if (((dlgtree[any_obj].ob_type & 0xff00) & GW_XTYPE_CHECKBOX) != 0) {
if (OBJ_SELECTED(any_obj)) {
dlgtree[any_obj].ob_state &= ~(OS_SELECTED|OS_CROSSED);
@@ -455,7 +837,7 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
}
form_event(any_obj, 1, NULL);
}
- printf("clicked: %d / %d\n", any_obj, ret);
+ //printf("clicked: %d / %d\n", any_obj, ret);
evnt_timer(150);
}
@@ -482,22 +864,28 @@ void open_settings(void)
settings_guiwin = guiwin_add(h_aes_win, GW_FLAG_DEFAULTS,
on_aes_event);
curr.g_w = MIN(dlgtree->ob_width, desk_area.g_w);
- curr.g_h = 200;
- curr.g_x = (desk_area.g_w / 2) - (curr.g_w / 2);
+ curr.g_h = MIN(dlgtree->ob_height, desk_area.g_h-64);
+ curr.g_x = 1;
+ curr.g_y = desk_area.g_y;
+ //curr.g_x = (desk_area.g_w / 2) - (curr.g_w / 2);
curr.g_y = (desk_area.g_h / 2) - (curr.g_h / 2);
+
wind_calc_grect(WC_BORDER, kind, &curr, &curr);
+ dlgtree->ob_x = curr.g_x;
+ dlgtree->ob_y = curr.g_y;
+
/* set current config values: */
display_settings();
wind_open_grect(h_aes_win, &curr);
- slid = guiwin_get_scroll_info(settings_guiwin);
- slid->y_unit_px = 32;
- slid->x_unit_px = 32;
+ guiwin_set_scroll_grid(settings_guiwin, 32, 32);
guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &area);
- slid->x_units = (dlgtree->ob_width/slid->x_unit_px);
- slid->y_units = (dlgtree->ob_height/slid->y_unit_px);
+ slid = guiwin_get_scroll_info(settings_guiwin);
+ guiwin_set_content_units(settings_guiwin,
+ (dlgtree->ob_width/slid->x_unit_px),
+ (dlgtree->ob_height/slid->y_unit_px));
guiwin_update_slider(settings_guiwin, GUIWIN_VH_SLIDER);
}
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/6840c98efed4cbfe0be...
commit 6840c98efed4cbfe0be7d3add2b821421666a31b
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
wip
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h
index f931e62..c77b0d9 100644
--- a/atari/gemtk/gemtk.h
+++ b/atari/gemtk/gemtk.h
@@ -137,6 +137,8 @@ void guiwin_set_event_handler(GUIWIN *win,guiwin_event_handler_f cb);
void guiwin_set_user_data(GUIWIN *win, void *data);
void *guiwin_get_user_data(GUIWIN *win);
struct guiwin_scroll_info_s * guiwin_get_scroll_info(GUIWIN *win);
+void guiwin_set_scroll_grid(GUIWIN * win, short x, short y);
+void guiwin_set_content_units(GUIWIN * win, short x, short y);
bool guiwin_update_slider(GUIWIN *win, short mode);
void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh);
void guiwin_send_msg(GUIWIN *win, short msgtype, short a, short b, short c,
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index 4371fa3..a471fc9 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -675,6 +675,26 @@ struct guiwin_scroll_info_s *guiwin_get_scroll_info(GUIWIN *win) {
return(&win->scroll_info);
}
+void guiwin_set_scroll_grid(GUIWIN * win, short x, short y)
+{
+ struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
+
+ assert(slid != NULL);
+
+ slid->y_unit_px = x;
+ slid->x_unit_px = y;
+}
+
+void guiwin_set_content_units(GUIWIN * win, short x, short y)
+{
+ struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
+
+ assert(slid != NULL);
+
+ slid->x_units = x;
+ slid->y_units = y;
+}
+
void guiwin_send_msg(GUIWIN *win, short msg_type, short a, short b, short c,
short d)
{
diff --git a/atari/res/netsurf.rsh b/atari/res/netsurf.rsh
index 70426ba..d1ba037 100755
--- a/atari/res/netsurf.rsh
+++ b/atari/res/netsurf.rsh
@@ -215,6 +215,7 @@
#define SETTINGS_EDIT_PROXY_HOST 36 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_PORT 38 /* FTEXT in tree SETTINGS */
#define SETTINGS_CB_PROXY_AUTH 39 /* BOXCHAR in tree SETTINGS */
+#define SETTINGS_LBL_PROXY_AUTH 40 /* STRING in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_USERNAME 41 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_PASSWORD 42 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_MAX_FETCHERS 47 /* FTEXT in tree SETTINGS */
diff --git a/atari/res/netsurf.rsm b/atari/res/netsurf.rsm
index b9bbe71..b759953 100755
--- a/atari/res/netsurf.rsm
+++ b/atari/res/netsurf.rsm
@@ -3,7 +3,7 @@ ResourceMaster v3.65
#N 99@32@AZAaza___ _@AZAaza090___ _@@_@
#FoC-Header@rsm2out@C-Header@rsh@@@[C-Header@0@
#R 0@0@2@1@2@1@
-#M 20010100@0@7728@628@
+#M 20010100@0@7728@629@
#T 0@1@MAINMENU@@62@@
#O 4@32@T_FILE@@
#O 5@32@T_EDIT@@
@@ -204,6 +204,7 @@ ResourceMaster v3.65
#O 36@29@EDIT_PROXY_HOST@@
#O 38@29@EDIT_PROXY_PORT@@
#O 39@27@CB_PROXY_AUTH@@
+#O 40@28@LBL_PROXY_AUTH@@
#O 41@29@EDIT_PROXY_USERNAME@@
#O 42@29@EDIT_PROXY_PASSWORD@@
#O 47@29@EDIT_MAX_FETCHERS@@
-----------------------------------------------------------------------
Summary of changes:
atari/gemtk/gemtk.h | 2 +
atari/gemtk/guiwin.c | 20 +++
atari/res/netsurf.rsh | 1 +
atari/res/netsurf.rsm | 3 +-
atari/settings.c | 438 ++++++++++++++++++++++++++++++++++++++++++++++---
5 files changed, 438 insertions(+), 26 deletions(-)
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h
index f931e62..c77b0d9 100644
--- a/atari/gemtk/gemtk.h
+++ b/atari/gemtk/gemtk.h
@@ -137,6 +137,8 @@ void guiwin_set_event_handler(GUIWIN *win,guiwin_event_handler_f cb);
void guiwin_set_user_data(GUIWIN *win, void *data);
void *guiwin_get_user_data(GUIWIN *win);
struct guiwin_scroll_info_s * guiwin_get_scroll_info(GUIWIN *win);
+void guiwin_set_scroll_grid(GUIWIN * win, short x, short y);
+void guiwin_set_content_units(GUIWIN * win, short x, short y);
bool guiwin_update_slider(GUIWIN *win, short mode);
void guiwin_scroll(GUIWIN *gw, short orientation, int units, bool refresh);
void guiwin_send_msg(GUIWIN *win, short msgtype, short a, short b, short c,
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index 4371fa3..a471fc9 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -675,6 +675,26 @@ struct guiwin_scroll_info_s *guiwin_get_scroll_info(GUIWIN *win) {
return(&win->scroll_info);
}
+void guiwin_set_scroll_grid(GUIWIN * win, short x, short y)
+{
+ struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
+
+ assert(slid != NULL);
+
+ slid->y_unit_px = x;
+ slid->x_unit_px = y;
+}
+
+void guiwin_set_content_units(GUIWIN * win, short x, short y)
+{
+ struct guiwin_scroll_info_s *slid = guiwin_get_scroll_info(win);
+
+ assert(slid != NULL);
+
+ slid->x_units = x;
+ slid->y_units = y;
+}
+
void guiwin_send_msg(GUIWIN *win, short msg_type, short a, short b, short c,
short d)
{
diff --git a/atari/res/netsurf.rsh b/atari/res/netsurf.rsh
index 70426ba..d1ba037 100755
--- a/atari/res/netsurf.rsh
+++ b/atari/res/netsurf.rsh
@@ -215,6 +215,7 @@
#define SETTINGS_EDIT_PROXY_HOST 36 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_PORT 38 /* FTEXT in tree SETTINGS */
#define SETTINGS_CB_PROXY_AUTH 39 /* BOXCHAR in tree SETTINGS */
+#define SETTINGS_LBL_PROXY_AUTH 40 /* STRING in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_USERNAME 41 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_PROXY_PASSWORD 42 /* FTEXT in tree SETTINGS */
#define SETTINGS_EDIT_MAX_FETCHERS 47 /* FTEXT in tree SETTINGS */
diff --git a/atari/res/netsurf.rsm b/atari/res/netsurf.rsm
index b9bbe71..b759953 100755
--- a/atari/res/netsurf.rsm
+++ b/atari/res/netsurf.rsm
@@ -3,7 +3,7 @@ ResourceMaster v3.65
#N 99@32@AZAaza___ _@AZAaza090___ _@@_@
#FoC-Header@rsm2out@C-Header@rsh@@@[C-Header@0@
#R 0@0@2@1@2@1@
-#M 20010100@0@7728@628@
+#M 20010100@0@7728@629@
#T 0@1@MAINMENU@@62@@
#O 4@32@T_FILE@@
#O 5@32@T_EDIT@@
@@ -204,6 +204,7 @@ ResourceMaster v3.65
#O 36@29@EDIT_PROXY_HOST@@
#O 38@29@EDIT_PROXY_PORT@@
#O 39@27@CB_PROXY_AUTH@@
+#O 40@28@LBL_PROXY_AUTH@@
#O 41@29@EDIT_PROXY_USERNAME@@
#O 42@29@EDIT_PROXY_PASSWORD@@
#O 47@29@EDIT_MAX_FETCHERS@@
diff --git a/atari/settings.c b/atari/settings.c
index afbf8bd..90404c1 100644
--- a/atari/settings.c
+++ b/atari/settings.c
@@ -55,7 +55,7 @@ static OBJECT * dlgtree;
guiwin_send_redraw(settings_guiwin, \
obj_screen_rect(dlgtree, idx));
-#define ENABLE_OBJ(idx) (dlgtree[idx].ob_state &= ~(OS_DISABLED)) \
+#define ENABLE_OBJ(idx) (dlgtree[idx].ob_state &= ~(OS_DISABLED)); \
guiwin_send_redraw(settings_guiwin, \
obj_screen_rect(dlgtree, idx));
@@ -78,6 +78,8 @@ static OBJECT * dlgtree;
static void on_close(void);
static void on_redraw(GRECT *clip);
static void form_event(int index, int external, void *unused2);
+static void apply_settings(void);
+static void save_settings(void);
static bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
{
@@ -87,7 +89,8 @@ static bool obj_is_inside(OBJECT * tree, short obj, GRECT *area)
objc_offset(tree, obj, &obj_screen.g_x, &obj_screen.g_y);
obj_screen.g_w = dlgtree[obj].ob_width;
obj_screen.g_h = dlgtree[obj].ob_height;
- ret = rc_intersect(area, &obj_screen);
+
+ ret = RC_WITHIN(&obj_screen, area);
return(ret);
}
@@ -101,6 +104,7 @@ static GRECT * obj_screen_rect(OBJECT * tree, short obj)
return(&obj_screen);
}
+
static void set_text( short idx, char * text, int len )
{
char spare[255];
@@ -116,11 +120,40 @@ static void set_text( short idx, char * text, int len )
set_string( dlgtree, idx, spare);
}
+
+
+static char *get_text(OBJECT * tree, short idx)
+{
+ static char p[]="";
+ USERBLK *user;
+ char *retval;
+
+ switch (tree[idx].ob_type & 0x00FF) {
+ case G_BUTTON:
+ case G_STRING:
+ case G_TITLE:
+ return( tree[idx].ob_spec.free_string);
+ case G_TEXT:
+ case G_BOXTEXT:
+ case G_FTEXT:
+ case G_FBOXTEXT:
+ return (tree[idx].ob_spec.tedinfo->te_ptext);
+ case G_ICON:
+ case G_CICON:
+ return (tree[idx].ob_spec.iconblk->ib_ptext);
+ break;
+
+ default: break;
+ }
+ return (p);
+}
+
+
/**
* Toogle all objects which are directly influenced by other GUI elements
* ( like checkbox )
*/
-static void toggle_objects( void )
+static void toggle_objects(void)
{
/* enable / disable (refresh) objects depending on radio button values: */
FORMEVENT(SETTINGS_CB_USE_PROXY);
@@ -128,12 +161,24 @@ static void toggle_objects( void )
FORMEVENT(SETTINGS_BT_SEL_FONT_RENDERER);
}
+
+static void save_settings(void)
+{
+ apply_settings();
+ // Save settings
+ nsoption_write( (const char*)&options );
+ nsoption_read( (const char*)&options );
+ close_settings();
+ form_alert(1, "[1][Some options require an netsurf restart!][OK]");
+ deskmenu_update();
+}
/* this gets called each time the settings dialog is opened: */
static void display_settings(void)
{
char spare[255];
// read current settings and display them
+
/* "Browser" tab: */
set_text( SETTINGS_EDIT_HOMEPAGE, nsoption_charp(homepage_url),
@@ -169,7 +214,7 @@ static void display_settings(void)
set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
/* "Cache" tab: */
- tmp_option_memory_cache_size = nsoption_int(memory_cache_size) / 100000;
+ tmp_option_memory_cache_size = nsoption_int(memory_cache_size) / 1000000;
snprintf( spare, 255, "%03.1f", tmp_option_memory_cache_size );
set_text( SETTINGS_STR_MAX_MEM_CACHE, spare, 5 );
@@ -253,16 +298,17 @@ static void display_settings(void)
tmp_option_font_size = nsoption_int(font_size);
snprintf( spare, 255, "%3d", nsoption_int(font_size) );
- set_text( SETTINGS_EDIT_DEF_FONT_SIZE, spare , 3 );
+ set_text( SETTINGS_EDIT_DEF_FONT_SIZE, spare , 3 );
+
+ toggle_objects();
}
-static void
-form_event(int index, int external, void *unused2)
+static void form_event(int index, int external, void *unused2)
{
char spare[255];
bool is_button = false;
- bool checked = OBJ_SELECTED( index );
+ bool checked = OBJ_SELECTED(index);
char * tmp;
/* For font driver popup: */
@@ -281,11 +327,193 @@ form_event(int index, int external, void *unused2)
short x, y;
int choice;
- switch( index ){
+ // TODO: set correct form coords.
+
+ switch( index ){
+
+ case SETTINGS_SAVE:
+ save_settings();
+ //save_settings();
+ break;
case SETTINGS_INC_HISTORY_AGE:
case SETTINGS_DEC_HISTORY_AGE:
+ if(index == SETTINGS_INC_HISTORY_AGE)
+ tmp_option_expire_url += 1;
+ else
+ tmp_option_expire_url -= 1;
+
+ if(tmp_option_expire_url > 99)
+ tmp_option_expire_url = 0;
+
+ snprintf( spare, 255, "%02d", tmp_option_expire_url);
+ set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
+ OBJ_REDRAW(SETTINGS_EDIT_HISTORY_AGE);
+ is_button = true;
+
+ default: break;
+ }
+
+
+ switch(index){
+
+ case SETTINGS_CB_USE_PROXY:
+ if( checked ){
+ ENABLE_OBJ(SETTINGS_EDIT_PROXY_HOST);
+ ENABLE_OBJ(SETTINGS_EDIT_PROXY_PORT);
+ ENABLE_OBJ(SETTINGS_CB_PROXY_AUTH);
+ ENABLE_OBJ(SETTINGS_LBL_PROXY_AUTH);
+ }
+ else {
+ DISABLE_OBJ(SETTINGS_EDIT_PROXY_HOST);
+ DISABLE_OBJ(SETTINGS_EDIT_PROXY_PORT);
+ DISABLE_OBJ(SETTINGS_CB_PROXY_AUTH);
+ DISABLE_OBJ(SETTINGS_LBL_PROXY_AUTH);
+ }
+ FORMEVENT(SETTINGS_CB_PROXY_AUTH);
+ OBJ_REDRAW(SETTINGS_CB_USE_PROXY);
+ break;
+
+ case SETTINGS_CB_PROXY_AUTH:
+ if( checked && OBJ_SELECTED( SETTINGS_CB_USE_PROXY ) ){
+ ENABLE_OBJ(SETTINGS_EDIT_PROXY_USERNAME);
+ ENABLE_OBJ(SETTINGS_EDIT_PROXY_PASSWORD);
+ }
+ else {
+ DISABLE_OBJ(SETTINGS_EDIT_PROXY_USERNAME);
+ DISABLE_OBJ(SETTINGS_EDIT_PROXY_PASSWORD);
+ }
+ break;
+
+ case SETTINGS_CB_ENABLE_ANIMATION:
+ if( checked ){
+ ENABLE_OBJ( SETTINGS_EDIT_MIN_GIF_DELAY );
+ }
+ else {
+ DISABLE_OBJ( SETTINGS_EDIT_MIN_GIF_DELAY );
+ }
+ break;
+
+ case SETTINGS_BT_SEL_FONT_RENDERER:
+ if( external ){
+ objc_offset(dlgtree, SETTINGS_BT_SEL_FONT_RENDERER, &x, &y);
+ choice = MenuPopUp ( font_driver_items, x, y,
+ num_font_drivers,
+ -1, -1, P_LIST + P_WNDW + P_CHCK );
+ if( choice > 0 &&
+ choice <= num_font_drivers ){
+ set_text(SETTINGS_BT_SEL_FONT_RENDERER,
+ font_driver_items[choice-1],
+ LABEL_FONT_RENDERER_MAX_LEN);
+ OBJ_REDRAW(SETTINGS_BT_SEL_FONT_RENDERER);
+ }
+ }
+ tmp = get_text(dlgtree, SETTINGS_BT_SEL_FONT_RENDERER);
+ if( strcmp(tmp, "freetype") == 0 ){
+ ENABLE_OBJ(SETTINGS_CB_ANTI_ALIASING);
+ } else {
+ DISABLE_OBJ(SETTINGS_CB_ANTI_ALIASING);
+ }
+ break;
+
+ case SETTINGS_BT_SEL_LOCALE:
+ objc_offset(dlgtree, SETTINGS_BT_SEL_LOCALE, &x, &y);
+ choice = MenuPopUp ( locales, x, y,
+ num_locales,
+ -1, -1, P_LIST + P_WNDW + P_CHCK );
+ if( choice > 0 && choice <= num_locales ){
+ set_text(SETTINGS_BT_SEL_LOCALE, locales[choice-1], 5);
+ }
+ OBJ_REDRAW(SETTINGS_BT_SEL_LOCALE);
+ break;
+
+/*
+ case SETTINGS_INPUT_TOOLBAR_BGCOLOR:
+ objc_offset( FORM(win), SETTINGS_INPUT_TOOLBAR_BGCOLOR, &x, &y );
+ choice = color_popup(x, y, tmp_option_atari_toolbar_bg);
+ snprintf( spare, 255, "%06x", choice );
+ tmp_option_atari_toolbar_bg = choice;
+ ObjcStrCpy( dlgtree, SETTINGS_INPUT_TOOLBAR_BGCOLOR,
+ spare );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_INPUT_TOOLBAR_BGCOLOR);
+ break;
+*/
+/*
+ case SETTINGS_BT_TOOLBAR_ICONSET:
+ objc_offset( FORM(win), SETTINGS_BT_TOOLBAR_ICONSET, &x, &y );
+ tmp = toolbar_iconset_popup(x,y);
+ if( tmp != NULL ){
+ ObjcStrCpy( dlgtree, SETTINGS_BT_TOOLBAR_ICONSET, tmp );
+ }
+ is_button = true;
+ break;
+*/
+ case SETTINGS_INC_MEM_CACHE:
+ case SETTINGS_DEC_MEM_CACHE:
+ if( index == SETTINGS_DEC_MEM_CACHE )
+ tmp_option_memory_cache_size -= 0.1;
+ else
+ tmp_option_memory_cache_size += 0.1;
+
+ if( tmp_option_memory_cache_size < 0.5 )
+ tmp_option_memory_cache_size = 0.5;
+ if( tmp_option_memory_cache_size > 999.9 )
+ tmp_option_memory_cache_size = 999.9;
+ snprintf( spare, 255, "%03.1f", tmp_option_memory_cache_size );
+ set_text( SETTINGS_STR_MAX_MEM_CACHE, spare, 5 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_STR_MAX_MEM_CACHE);
+ break;
+
+ case SETTINGS_INC_CACHED_CONNECTIONS:
+ case SETTINGS_DEC_CACHED_CONNECTIONS:
+ if( index == SETTINGS_INC_CACHED_CONNECTIONS )
+ tmp_option_max_cached_fetch_handles += 1;
+ else
+ tmp_option_max_cached_fetch_handles -= 1;
+ if( tmp_option_max_cached_fetch_handles > 31 )
+ tmp_option_max_cached_fetch_handles = 31;
+
+ snprintf( spare, 255, "%02d", tmp_option_max_cached_fetch_handles );
+ set_text( SETTINGS_EDIT_MAX_CACHED_CONNECTIONS, spare, 2 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MAX_CACHED_CONNECTIONS);
+ break;
+
+ case SETTINGS_INC_MAX_FETCHERS:
+ case SETTINGS_DEC_MAX_FETCHERS:
+ if( index == SETTINGS_INC_MAX_FETCHERS )
+ tmp_option_max_fetchers += 1;
+ else
+ tmp_option_max_fetchers -= 1;
+ if( tmp_option_max_fetchers > 31 )
+ tmp_option_max_fetchers = 31;
+
+ snprintf( spare, 255, "%02d", tmp_option_max_fetchers );
+ set_text( SETTINGS_EDIT_MAX_FETCHERS, spare, 2 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MAX_FETCHERS);
+ break;
+
+ case SETTINGS_INC_MAX_FETCHERS_PER_HOST:
+ case SETTINGS_DEC_MAX_FETCHERS_PER_HOST:
+ if( index == SETTINGS_INC_MAX_FETCHERS_PER_HOST )
+ tmp_option_max_fetchers_per_host += 1;
+ else
+ tmp_option_max_fetchers_per_host -= 1;
+ if( tmp_option_max_fetchers_per_host > 31 )
+ tmp_option_max_fetchers_per_host = 31;
+
+ snprintf( spare, 255, "%02d", tmp_option_max_fetchers_per_host );
+ set_text( SETTINGS_EDIT_MAX_FETCHERS_PER_HOST, spare, 2 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MAX_FETCHERS_PER_HOST);
+ break;
+
+ case SETTINGS_INC_HISTORY_AGE:
+ case SETTINGS_DEC_HISTORY_AGE:
if( index == SETTINGS_INC_HISTORY_AGE )
tmp_option_expire_url += 1;
else
@@ -295,12 +523,83 @@ form_event(int index, int external, void *unused2)
tmp_option_expire_url = 0;
snprintf( spare, 255, "%02d", tmp_option_expire_url );
- set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
+ set_text( SETTINGS_EDIT_HISTORY_AGE, spare, 2 );
+ is_button = true;
OBJ_REDRAW(SETTINGS_EDIT_HISTORY_AGE);
- is_button = true;
+ break;
+ case SETTINGS_INC_GIF_DELAY:
+ case SETTINGS_DEC_GIF_DELAY:
+ if( index == SETTINGS_INC_GIF_DELAY )
+ tmp_option_minimum_gif_delay += 0.1;
+ else
+ tmp_option_minimum_gif_delay -= 0.1;
+
+ if( tmp_option_minimum_gif_delay < 0.1 )
+ tmp_option_minimum_gif_delay = 0.1;
+ if( tmp_option_minimum_gif_delay > 9.0 )
+ tmp_option_minimum_gif_delay = 9.0;
+ snprintf( spare, 255, "%01.1f", tmp_option_minimum_gif_delay );
+ set_text( SETTINGS_EDIT_MIN_GIF_DELAY, spare, 3 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MIN_GIF_DELAY);
+ break;
+
+ case SETTINGS_INC_MIN_FONT_SIZE:
+ case SETTINGS_DEC_MIN_FONT_SIZE:
+ if( index == SETTINGS_INC_MIN_FONT_SIZE )
+ tmp_option_font_min_size += 1;
+ else
+ tmp_option_font_min_size -= 1;
+
+ if( tmp_option_font_min_size > 500 )
+ tmp_option_font_min_size = 500;
+ if( tmp_option_font_min_size < 10 )
+ tmp_option_font_min_size = 10;
+
+ snprintf( spare, 255, "%03d", tmp_option_font_min_size );
+ set_text( SETTINGS_EDIT_MIN_FONT_SIZE, spare, 3 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MIN_FONT_SIZE);
+ break;
+
+ case SETTINGS_INC_DEF_FONT_SIZE:
+ case SETTINGS_DEC_DEF_FONT_SIZE:
+ if( index == SETTINGS_INC_DEF_FONT_SIZE )
+ tmp_option_font_size += 1;
+ else
+ tmp_option_font_size -= 1;
+
+ if( tmp_option_font_size > 999 )
+ tmp_option_font_size = 999;
+ if( tmp_option_font_size < 50 )
+ tmp_option_font_size = 50;
+
+ snprintf( spare, 255, "%03d", tmp_option_font_size );
+ set_text( SETTINGS_EDIT_DEF_FONT_SIZE, spare, 3 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_DEF_FONT_SIZE);
+ break;
+/*
+ case SETTINGS_INC_INCREMENTAL_REFLOW:
+ case SETTINGS_DEC_INCREMENTAL_REFLOW:
+ if( index == SETTINGS_INC_INCREMENTAL_REFLOW )
+ tmp_option_min_reflow_period += 1;
+ else
+ tmp_option_min_reflow_period -= 1;
+
+ if( tmp_option_min_reflow_period > 9999 )
+ tmp_option_min_reflow_period = 10;
+
+ snprintf( spare, 255, "%04d", tmp_option_min_reflow_period );
+ set_text( SETTINGS_EDIT_MIN_REFLOW_PERIOD, spare, 4 );
+ is_button = true;
+ OBJ_REDRAW(SETTINGS_EDIT_MIN_REFLOW_PERIOD);
+ break;
+*/
default: break;
- }
+ }
+
if( is_button ){
// remove selection indicator from button element:
OBJ_UNCHECK(index);
@@ -345,6 +644,89 @@ static void on_redraw(GRECT *clip)
}
}
+
+static void apply_settings(void)
+{
+ /* "Network" tab: */
+ nsoption_set_bool(http_proxy, OBJ_SELECTED(SETTINGS_CB_USE_PROXY));
+ if ( OBJ_SELECTED(SETTINGS_CB_PROXY_AUTH) ) {
+ nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_BASIC);
+ } else {
+ nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE);
+ }
+ nsoption_set_charp(http_proxy_auth_pass,
+ get_text(dlgtree, SETTINGS_EDIT_PROXY_PASSWORD));
+ nsoption_set_charp(http_proxy_auth_user,
+ get_text(dlgtree, SETTINGS_EDIT_PROXY_USERNAME));
+ nsoption_set_charp(http_proxy_host,
+ get_text(dlgtree, SETTINGS_EDIT_PROXY_HOST));
+ nsoption_set_int(http_proxy_port,
+ atoi( get_text(dlgtree, SETTINGS_EDIT_PROXY_PORT) ));
+ nsoption_set_int(max_fetchers_per_host,
+ atoi( get_text(dlgtree, SETTINGS_EDIT_MAX_FETCHERS_PER_HOST)));
+ nsoption_set_int(max_cached_fetch_handles,
+ atoi( get_text(dlgtree, SETTINGS_EDIT_MAX_CACHED_CONNECTIONS)));
+ nsoption_set_int(max_fetchers,
+ atoi( get_text(dlgtree, SETTINGS_EDIT_MAX_FETCHERS) ));
+ nsoption_set_bool(foreground_images,
+ OBJ_SELECTED( SETTINGS_CB_FG_IMAGES ));
+ nsoption_set_bool(background_images,
+ OBJ_SELECTED( SETTINGS_CB_BG_IMAGES ));
+
+ /* "Style" tab: */
+ nsoption_set_int(font_min_size, tmp_option_font_min_size);
+ nsoption_set_int(font_size, tmp_option_font_size);
+
+ /* "Rendering" tab: */
+ nsoption_set_charp(atari_font_driver,
+ get_text(dlgtree, SETTINGS_BT_SEL_FONT_RENDERER));
+ nsoption_set_bool(atari_transparency,
+ OBJ_SELECTED(SETTINGS_CB_TRANSPARENCY));
+ nsoption_set_bool(animate_images,
+ OBJ_SELECTED(SETTINGS_CB_ENABLE_ANIMATION));
+ nsoption_set_int(minimum_gif_delay,
+ (int)(tmp_option_minimum_gif_delay*100+0.5));
+/* nsoption_set_bool(incremental_reflow,
+ OBJ_SELECTED(SETTINGS_CB_INCREMENTAL_REFLOW));*/
+ nsoption_set_int(min_reflow_period, tmp_option_min_reflow_period);
+ nsoption_set_int(atari_font_monochrom,
+ !OBJ_SELECTED( SETTINGS_CB_ANTI_ALIASING ));
+
+ /* "Paths" tabs: */
+ nsoption_set_charp(ca_bundle,
+ get_text(dlgtree, SETTINGS_EDIT_CA_BUNDLE));
+ nsoption_set_charp(ca_path,
+ get_text(dlgtree, SETTINGS_EDIT_CA_CERTS_PATH));
+ nsoption_set_charp(homepage_url,
+ get_text(dlgtree, SETTINGS_EDIT_CA_CERTS_PATH));
+ nsoption_set_charp(hotlist_file,
+ get_text(dlgtree, SETTINGS_EDIT_HOTLIST_FILE));
+ nsoption_set_charp(atari_editor,
+ get_text(dlgtree, SETTINGS_EDIT_EDITOR));
+ nsoption_set_charp(downloads_path,
+ get_text(dlgtree, SETTINGS_EDIT_DOWNLOAD_PATH));
+
+ /* "Cache" tab: */
+ nsoption_set_int(memory_cache_size,
+ tmp_option_memory_cache_size * 1000000);
+
+ /* "Browser" tab: */
+ nsoption_set_bool(target_blank,
+ !OBJ_SELECTED(SETTINGS_CB_DISABLE_POPUP_WINDOWS));
+ nsoption_set_bool(block_ads,
+ OBJ_SELECTED(SETTINGS_CB_HIDE_ADVERTISEMENT));
+ nsoption_set_charp(accept_language,
+ get_text(dlgtree, SETTINGS_BT_SEL_LOCALE));
+ nsoption_set_int(expire_url,
+ atoi(get_text(dlgtree, SETTINGS_EDIT_HISTORY_AGE)));
+ nsoption_set_bool(send_referer,
+ OBJ_SELECTED(SETTINGS_CB_SEND_HTTP_REFERRER));
+ nsoption_set_bool(do_not_track,
+ OBJ_SELECTED(SETTINGS_CB_SEND_DO_NOT_TRACK));
+ nsoption_set_charp(homepage_url,
+ get_text(dlgtree, SETTINGS_EDIT_HOMEPAGE));
+}
+
static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
{
short retval = 0;
@@ -353,7 +735,7 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
if ((ev_out->emo_events & MU_MESAG) != 0) {
// handle message
- printf("settings win msg: %d\n", msg[0]);
+ // printf("settings win msg: %d\n", msg[0]);
switch (msg[0]) {
case WM_REDRAW:
@@ -386,7 +768,7 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
}
if ((ev_out->emo_events & MU_KEYBD) != 0) {
- if((edit_obj > -1) && obj_is_inside(dlgtree, edit_obj, &work)){
+ if((edit_obj > -1) /* && obj_is_inside(dlgtree, edit_obj, &work) */){
short next_edit_obj = edit_obj;
short next_char = -1;
@@ -425,10 +807,11 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
any_obj = objc_find(dlgtree, 0, 8, ev_out->emo_mouse.p_x,
ev_out->emo_mouse.p_y);
-
+ if((dlgtree[any_obj].ob_state & OS_DISABLED) != 0) {
+ return(retval);
+ }
uint16_t type = (dlgtree[any_obj].ob_type & 0xFF);
if (type == G_FTEXT || type == G_FBOXTEXT) {
- printf("text??\n");
ret = form_button(dlgtree, any_obj, ev_out->emo_mclicks, &nextobj);
if(edit_obj != -1){
if (obj_is_inside(dlgtree, edit_obj, &work)) {
@@ -444,7 +827,6 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
objc_edit(dlgtree, edit_obj, ev_out->emo_kreturn, &edit_idx, EDEND);
}
edit_obj = -1;
- printf("xtype: %d\n", dlgtree[any_obj].ob_type & 0xff00 );
if (((dlgtree[any_obj].ob_type & 0xff00) & GW_XTYPE_CHECKBOX) != 0) {
if (OBJ_SELECTED(any_obj)) {
dlgtree[any_obj].ob_state &= ~(OS_SELECTED|OS_CROSSED);
@@ -455,7 +837,7 @@ static short on_aes_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
}
form_event(any_obj, 1, NULL);
}
- printf("clicked: %d / %d\n", any_obj, ret);
+ //printf("clicked: %d / %d\n", any_obj, ret);
evnt_timer(150);
}
@@ -482,22 +864,28 @@ void open_settings(void)
settings_guiwin = guiwin_add(h_aes_win, GW_FLAG_DEFAULTS,
on_aes_event);
curr.g_w = MIN(dlgtree->ob_width, desk_area.g_w);
- curr.g_h = 200;
- curr.g_x = (desk_area.g_w / 2) - (curr.g_w / 2);
+ curr.g_h = MIN(dlgtree->ob_height, desk_area.g_h-64);
+ curr.g_x = 1;
+ curr.g_y = desk_area.g_y;
+ //curr.g_x = (desk_area.g_w / 2) - (curr.g_w / 2);
curr.g_y = (desk_area.g_h / 2) - (curr.g_h / 2);
+
wind_calc_grect(WC_BORDER, kind, &curr, &curr);
+ dlgtree->ob_x = curr.g_x;
+ dlgtree->ob_y = curr.g_y;
+
/* set current config values: */
display_settings();
wind_open_grect(h_aes_win, &curr);
- slid = guiwin_get_scroll_info(settings_guiwin);
- slid->y_unit_px = 32;
- slid->x_unit_px = 32;
+ guiwin_set_scroll_grid(settings_guiwin, 32, 32);
guiwin_get_grect(settings_guiwin, GUIWIN_AREA_CONTENT, &area);
- slid->x_units = (dlgtree->ob_width/slid->x_unit_px);
- slid->y_units = (dlgtree->ob_height/slid->y_unit_px);
+ slid = guiwin_get_scroll_info(settings_guiwin);
+ guiwin_set_content_units(settings_guiwin,
+ (dlgtree->ob_width/slid->x_unit_px),
+ (dlgtree->ob_height/slid->y_unit_px));
guiwin_update_slider(settings_guiwin, GUIWIN_VH_SLIDER);
}
--
NetSurf Browser
10 years, 9 months
netsurf: branch mono/removing-windom-dependency updated. 2caa45d53979caf46d5f748b28f2267a59a3aad5
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/2caa45d53979caf46d5f7...
...commit http://git.netsurf-browser.org/netsurf.git/commit/2caa45d53979caf46d5f748...
...tree http://git.netsurf-browser.org/netsurf.git/tree/2caa45d53979caf46d5f748b2...
The branch, mono/removing-windom-dependency has been updated
via 2caa45d53979caf46d5f748b28f2267a59a3aad5 (commit)
from a2cbfced0ff3e8b2c7f6fe0ec89c5095e45d4cf4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/2caa45d53979caf46d5...
commit 2caa45d53979caf46d5f748b28f2267a59a3aad5
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
Settings are now written when save is clicked.
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index 6e8cfa2..4371fa3 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -26,8 +26,8 @@
#include <mt_gem.h>
#include "gemtk.h"
-#define DEBUG_PRINT(x) printf x
-//#define DEBUG_PRINT(x)
+//#define DEBUG_PRINT(x) printf x
+#define DEBUG_PRINT(x)
struct gui_window_s {
short handle;
diff --git a/atari/res/netsurf.rsc b/atari/res/netsurf.rsc
index 3844f5a..2ead38d 100755
Binary files a/atari/res/netsurf.rsc and b/atari/res/netsurf.rsc differ
diff --git a/atari/res/netsurf.rsm b/atari/res/netsurf.rsm
index b302e72..b9bbe71 100755
--- a/atari/res/netsurf.rsm
+++ b/atari/res/netsurf.rsm
@@ -237,4 +237,4 @@ ResourceMaster v3.65
#O 92@29@EDIT_CA_BUNDLE@@
#O 93@29@EDIT_CA_CERTS_PATH@@
#O 94@29@EDIT_EDITOR@@
-#c 20992@
+#c 20608@
-----------------------------------------------------------------------
Summary of changes:
atari/gemtk/guiwin.c | 4 ++--
atari/res/netsurf.rsc | Bin 38600 -> 38600 bytes
atari/res/netsurf.rsm | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/atari/gemtk/guiwin.c b/atari/gemtk/guiwin.c
index 6e8cfa2..4371fa3 100644
--- a/atari/gemtk/guiwin.c
+++ b/atari/gemtk/guiwin.c
@@ -26,8 +26,8 @@
#include <mt_gem.h>
#include "gemtk.h"
-#define DEBUG_PRINT(x) printf x
-//#define DEBUG_PRINT(x)
+//#define DEBUG_PRINT(x) printf x
+#define DEBUG_PRINT(x)
struct gui_window_s {
short handle;
diff --git a/atari/res/netsurf.rsc b/atari/res/netsurf.rsc
index 3844f5a..2ead38d 100755
Binary files a/atari/res/netsurf.rsc and b/atari/res/netsurf.rsc differ
diff --git a/atari/res/netsurf.rsm b/atari/res/netsurf.rsm
index b302e72..b9bbe71 100755
--- a/atari/res/netsurf.rsm
+++ b/atari/res/netsurf.rsm
@@ -237,4 +237,4 @@ ResourceMaster v3.65
#O 92@29@EDIT_CA_BUNDLE@@
#O 93@29@EDIT_CA_CERTS_PATH@@
#O 94@29@EDIT_EDITOR@@
-#c 20992@
+#c 20608@
--
NetSurf Browser
10 years, 9 months
netsurf: branch master updated. f12be4ed854d9dd44fa6e3117fe8bd9525deae51
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/f12be4ed854d9dd44fa6e...
...commit http://git.netsurf-browser.org/netsurf.git/commit/f12be4ed854d9dd44fa6e31...
...tree http://git.netsurf-browser.org/netsurf.git/tree/f12be4ed854d9dd44fa6e3117...
The branch, master has been updated
via f12be4ed854d9dd44fa6e3117fe8bd9525deae51 (commit)
via 0402b5ca91a9c05e325d7ad94fb7fcfbe9633165 (commit)
from 68565113f382cc742dd6cb4f685f68996ed32779 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/f12be4ed854d9dd44fa...
commit f12be4ed854d9dd44fa6e3117fe8bd9525deae51
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
restructure GTK frontend options dialog to be compiant with the gnome HIG and actually work
diff --git a/gtk/dialogs/options.c b/gtk/dialogs/options.c
index a449e6f..8bd5665 100644
--- a/gtk/dialogs/options.c
+++ b/gtk/dialogs/options.c
@@ -46,8 +46,6 @@ static GtkBuilder *gladeFile;
static struct browser_window *current_browser;
-static int proxy_type;
-
static void dialog_response_handler (GtkDialog *dlg, gint res_id);
static gboolean on_dialog_close (GtkDialog *dlg, gboolean stay_alive);
static void nsgtk_options_theme_combo(void);
@@ -66,30 +64,35 @@ DECLARE(checkDisablePlugins);
DECLARE(spinHistoryAge);
DECLARE(checkHoverURLs);
DECLARE(checkDisplayRecentURLs);
-DECLARE(comboLanguage);
+//DECLARE(comboboxLanguage);
+static GtkWidget *comboboxLanguage;
+static gboolean on_comboboxLanguage_changed(GtkComboBox *combo, gpointer data);
DECLARE(checkSendReferer);
+DECLARE(checkSendDNT);
DECLARE(comboProxyType);
DECLARE(entryProxyHost);
-DECLARE(entryProxyPort);
+DECLARE(spinProxyPort);
DECLARE(entryProxyUser);
DECLARE(entryProxyPassword);
DECLARE(spinMaxFetchers);
DECLARE(spinFetchesPerHost);
DECLARE(spinCachedConnections);
+DECLARE(checkEnableJavascript);
+
DECLARE(checkResampleImages);
DECLARE(spinAnimationSpeed);
-DECLARE(checkDisableAnimations);
+DECLARE(checkEnableAnimations);
-DECLARE(fontSansSerif);
-DECLARE(fontSerif);
-DECLARE(fontMonospace);
-DECLARE(fontCursive);
-DECLARE(fontFantasy);
+//DECLARE(fontSansSerif);
+//DECLARE(fontSerif);
+//DECLARE(fontMonospace);
+//DECLARE(fontCursive);
+//DECLARE(fontFantasy);
DECLARE(comboDefault);
DECLARE(spinDefaultSize);
-DECLARE(spinMinimumSize);
+//DECLARE(spinMinimumSize);
DECLARE(fontPreview);
DECLARE(comboButtonType);
@@ -123,7 +126,7 @@ DECLARE(checkRemoveBackgrounds);
DECLARE(checkFitPage);
DECLARE(checkCompressPDF);
DECLARE(checkPasswordPDF);
-DECLARE(setDefaultExportOptions);
+//DECLARE(setDefaultExportOptions);
/* Used when the feature is not implemented yet */
#define FIND_WIDGET(wname) \
@@ -135,12 +138,22 @@ DECLARE(setDefaultExportOptions);
/* Assigns widget and connects it to its callback function */
#define CONNECT(wname, event) \
+ do { \
+ if ((wname) == NULL) \
+ LOG(("Unable to find widget '%s'!", #wname)); \
+ else \
g_signal_connect(G_OBJECT(wname), event, \
- G_CALLBACK(on_##wname##_changed), NULL)
+ G_CALLBACK(on_##wname##_changed), NULL); \
+ } while (0)
-GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
+/* exported interface documented in gtk/dialogs/options.h */
+GtkDialog*
+nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
{
- GError* error = NULL;
+ GError *error = NULL;
+ GObject *dlgobject;
+ //GSList *group;
+
gladeFile = gtk_builder_new();
if (!gtk_builder_add_from_file(gladeFile, glade_file_location->options, &error)) {
g_warning("Couldn't load builder file: %s", error->message);
@@ -148,18 +161,25 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
return NULL;
}
+
+ dlgobject = gtk_builder_get_object(gladeFile, "dialogPreferences");
+ if (dlgobject == NULL) {
+ LOG(("Unable to get object for preferences dialog"));
+ return NULL;
+ }
+
current_browser = bw;
- wndPreferences = GTK_DIALOG(gtk_builder_get_object(gladeFile, "dlgPreferences"));
+ wndPreferences = GTK_DIALOG(dlgobject);
gtk_window_set_transient_for(GTK_WINDOW(wndPreferences), parent);
+
+ /* set the widgets to reflect the current options */
+ nsgtk_options_load();
FIND_WIDGET(sourceButtonTab);
FIND_WIDGET(sourceButtonWindow);
- GSList *group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(
- sourceButtonWindow));
- gtk_radio_button_set_group(GTK_RADIO_BUTTON(sourceButtonTab), group);
+ //group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(sourceButtonWindow));
+ //gtk_radio_button_set_group(GTK_RADIO_BUTTON(sourceButtonTab), group);
- /* set the widgets to reflect the current options */
- nsgtk_options_load();
/* Connect all widgets to their appropriate callbacks */
CONNECT(entryHomePageURL, "focus-out-event");
@@ -172,33 +192,37 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
CONNECT(spinHistoryAge, "focus-out-event");
CONNECT(checkHoverURLs, "toggled");
- CONNECT(comboLanguage, "changed");
+ CONNECT(comboboxLanguage, "changed");
CONNECT(checkDisplayRecentURLs, "toggled");
CONNECT(checkSendReferer, "toggled");
+ CONNECT(checkSendDNT, "toggled");
CONNECT(checkShowSingleTab, "toggled");
CONNECT(comboProxyType, "changed");
CONNECT(entryProxyHost, "focus-out-event");
- CONNECT(entryProxyPort, "focus-out-event");
+ CONNECT(spinProxyPort, "focus-out-event");
CONNECT(entryProxyUser, "focus-out-event");
CONNECT(entryProxyPassword, "focus-out-event");
CONNECT(spinMaxFetchers, "value-changed");
CONNECT(spinFetchesPerHost, "value-changed");
CONNECT(spinCachedConnections, "value-changed");
+ CONNECT(checkEnableJavascript, "toggled");
+
CONNECT(checkResampleImages, "toggled");
CONNECT(spinAnimationSpeed, "value-changed");
- CONNECT(checkDisableAnimations, "toggled");
+ CONNECT(checkEnableAnimations, "toggled");
- CONNECT(fontSansSerif, "font-set");
+/* CONNECT(fontSansSerif, "font-set");
CONNECT(fontSerif, "font-set");
CONNECT(fontMonospace, "font-set");
CONNECT(fontCursive, "font-set");
CONNECT(fontFantasy, "font-set");
+ CONNECT(spinMinimumSize, "value-changed");
+*/
CONNECT(comboDefault, "changed");
CONNECT(spinDefaultSize, "value-changed");
- CONNECT(spinMinimumSize, "value-changed");
CONNECT(fontPreview, "clicked");
CONNECT(comboButtonType, "changed");
@@ -231,7 +255,7 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
CONNECT(checkFitPage, "toggled");
CONNECT(checkCompressPDF, "toggled");
CONNECT(checkPasswordPDF, "toggled");
- CONNECT(setDefaultExportOptions, "clicked");
+// CONNECT(setDefaultExportOptions, "clicked");
g_signal_connect(G_OBJECT(wndPreferences), "response",
G_CALLBACK (dialog_response_handler), NULL);
@@ -291,53 +315,122 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
(widget) = GTK_WIDGET(gtk_builder_get_object(gladeFile, #widget)); \
} while (0)
+static void set_proxy_widgets_sensitivity(int proxyval)
+{
+ switch (proxyval) {
+ case 0: /* no proxy */
+ gtk_widget_set_sensitive(entryProxyHost, FALSE);
+ gtk_widget_set_sensitive(spinProxyPort, FALSE);
+ gtk_widget_set_sensitive(entryProxyUser, FALSE);
+ gtk_widget_set_sensitive(entryProxyPassword, FALSE);
+ break;
+
+ case 1: /* proxy with no auth */
+ gtk_widget_set_sensitive(entryProxyHost, TRUE);
+ gtk_widget_set_sensitive(spinProxyPort, TRUE);
+ gtk_widget_set_sensitive(entryProxyUser, FALSE);
+ gtk_widget_set_sensitive(entryProxyPassword, FALSE);
+ break;
+
+ case 2: /* proxy with basic auth */
+ gtk_widget_set_sensitive(entryProxyHost, TRUE);
+ gtk_widget_set_sensitive(spinProxyPort, TRUE);
+ gtk_widget_set_sensitive(entryProxyUser, TRUE);
+ gtk_widget_set_sensitive(entryProxyPassword, TRUE);
+ break;
+
+ case 3: /* proxy with ntlm auth */
+ gtk_widget_set_sensitive(entryProxyHost, TRUE);
+ gtk_widget_set_sensitive(spinProxyPort, TRUE);
+ gtk_widget_set_sensitive(entryProxyUser, TRUE);
+ gtk_widget_set_sensitive(entryProxyPassword, TRUE);
+ break;
+
+ case 4: /* system proxy */
+ gtk_widget_set_sensitive(entryProxyHost, FALSE);
+ gtk_widget_set_sensitive(spinProxyPort, FALSE);
+ gtk_widget_set_sensitive(entryProxyUser, FALSE);
+ gtk_widget_set_sensitive(entryProxyPassword, FALSE);
+ break;
+
+ }
+}
void nsgtk_options_load(void)
{
- GtkBox *box;
const char *default_accept_language = "en";
const char *default_homepage_url = "";
- const char *default_http_proxy_host = "";
- const char *default_http_proxy_auth_user = "";
- const char *default_http_proxy_auth_pass = "";
- int combo_row_count = 0;
+ const char *default_http_proxy_host;
+ const char *default_http_proxy_auth_user;
+ const char *default_http_proxy_auth_pass;
+
int active_language = 0;
+ GtkListStore *liststore;
+ GtkTreeIter iter;
+
int proxytype = 0;
FILE *fp;
char buf[50];
- /* get widget text */
- if (nsoption_charp(accept_language) != NULL) {
- default_accept_language = nsoption_charp(accept_language);
- }
+ /* Network - HTTP Proxy */
+ default_http_proxy_host = nsoption_charp(http_proxy_host);
+ default_http_proxy_auth_user = nsoption_charp(http_proxy_auth_user);
+ default_http_proxy_auth_pass = nsoption_charp(http_proxy_auth_pass);
- if (nsoption_charp(homepage_url) != NULL) {
- default_homepage_url = nsoption_charp(homepage_url);
+ if (nsoption_bool(http_proxy) == true) {
+ /* proxy type combo box starts with disabled, to allow
+ * for this the http_proxy option needs combining with
+ * the http_proxy_auth option
+ */
+ proxytype = nsoption_int(http_proxy_auth) + 1;
+ if (default_http_proxy_host == NULL) {
+ /* set to use a proxy without a host, turn proxy off */
+ proxytype = 0;
+ } else if (((proxytype == 2) ||
+ (proxytype == 3)) &&
+ ((default_http_proxy_auth_user == NULL) ||
+ (default_http_proxy_auth_pass == NULL))) {
+ /* authentication selected with empty credentials, turn proxy off */
+ proxytype = 0;
+ }
}
- if (nsoption_charp(http_proxy_host) != NULL) {
- default_http_proxy_host = nsoption_charp(http_proxy_host);
+ if (default_http_proxy_host == NULL) {
+ default_http_proxy_host = "";
}
- if (nsoption_charp(http_proxy_auth_user) != NULL) {
- default_http_proxy_auth_user = nsoption_charp(http_proxy_auth_user);
+ if (default_http_proxy_auth_user == NULL) {
+ default_http_proxy_auth_user = "";
}
- if (nsoption_charp(http_proxy_auth_pass) != NULL) {
- default_http_proxy_auth_pass = nsoption_charp(http_proxy_auth_pass);
+ if (default_http_proxy_auth_pass == NULL) {
+ default_http_proxy_auth_pass = "";
}
- if (nsoption_bool(http_proxy) == true) {
- proxytype = nsoption_int(http_proxy_auth) + 1;
- }
+ SET_COMBO(comboProxyType, proxytype);
+ SET_ENTRY(entryProxyHost, default_http_proxy_host);
+ SET_SPIN(spinProxyPort, nsoption_int(http_proxy_port));
+ SET_ENTRY(entryProxyUser, default_http_proxy_auth_user);
+ SET_ENTRY(entryProxyPassword, default_http_proxy_auth_pass);
- /* Create combobox */
- box = GTK_BOX(gtk_builder_get_object(gladeFile, "combolanguagevbox"));
- comboLanguage = nsgtk_combo_box_text_new();
+ set_proxy_widgets_sensitivity(proxytype);
- /* Populate combobox from languages file */
- if ((languages_file_location != NULL) &&
+
+ /* accept language selection */
+ if (nsoption_charp(accept_language) != NULL) {
+ default_accept_language = nsoption_charp(accept_language);
+ }
+
+ /* Fill content language list store */
+ liststore = GTK_LIST_STORE(gtk_builder_get_object(gladeFile, "liststore_content_language"));
+ if ((liststore != NULL) &&
+ (languages_file_location != NULL) &&
((fp = fopen(languages_file_location, "r")) != NULL)) {
+ int combo_row_count = 0;
+
+ gtk_list_store_clear(liststore);
+ active_language = -1;
+
LOG(("Used %s for languages", languages_file_location));
while (fgets(buf, sizeof(buf), fp)) {
/* Ignore blank lines */
@@ -347,34 +440,44 @@ void nsgtk_options_load(void)
/* Remove trailing \n */
buf[strlen(buf) - 1] = '\0';
- nsgtk_combo_box_text_append_text(comboLanguage, buf);
+ gtk_list_store_append(liststore, &iter);
+ gtk_list_store_set(liststore, &iter, 0, buf, -1 );
- if (strcmp(buf, default_accept_language) == 0)
+ if (strcmp(buf, default_accept_language) == 0) {
active_language = combo_row_count;
+ }
combo_row_count++;
}
- fclose(fp);
+ if (active_language == -1) {
+ /* configured language was not in list, add it */
+ gtk_list_store_append(liststore, &iter);
+ gtk_list_store_set(liststore, &iter, 0, default_accept_language, -1 );
+ active_language = combo_row_count;
+
+ }
+
+ fclose(fp);
} else {
LOG(("Failed opening languages file"));
- warn_user("FileError", languages_file_location);
- nsgtk_combo_box_text_append_text(comboLanguage, "en");
}
+ SET_COMBO(comboboxLanguage, active_language);
- gtk_combo_box_set_active(GTK_COMBO_BOX(comboLanguage), active_language);
- /** \todo localisation */
- gtk_widget_set_tooltip_text(GTK_WIDGET(comboLanguage),
- "set preferred language for web pages");
- gtk_box_pack_start(box, comboLanguage, FALSE, FALSE, 0);
- gtk_widget_show(comboLanguage);
-
- nsgtk_options_theme_combo();
+
+ /* Startup */
+ if (nsoption_charp(homepage_url) != NULL) {
+ default_homepage_url = nsoption_charp(homepage_url);
+ }
SET_ENTRY(entryHomePageURL, default_homepage_url);
SET_BUTTON(setCurrentPage);
SET_BUTTON(setDefaultPage);
+
+ /* Theme */
+ nsgtk_options_theme_combo();
+
SET_CHECK(checkHideAdverts, nsoption_bool(block_ads));
SET_CHECK(checkDisablePopups, nsoption_bool(disable_popups));
@@ -384,42 +487,28 @@ void nsgtk_options_load(void)
SET_CHECK(checkDisplayRecentURLs, nsoption_bool(url_suggestion));
SET_CHECK(checkSendReferer, nsoption_bool(send_referer));
+ SET_CHECK(checkSendDNT, nsoption_bool(do_not_track));
SET_CHECK(checkShowSingleTab, nsoption_bool(show_single_tab));
- SET_COMBO(comboProxyType, proxytype);
- SET_ENTRY(entryProxyHost, default_http_proxy_host);
-
- gtk_widget_set_sensitive(entryProxyHost, proxytype != 0);
-
- snprintf(buf, sizeof(buf), "%d", nsoption_int(http_proxy_port));
-
- SET_ENTRY(entryProxyPort, buf);
- gtk_widget_set_sensitive(entryProxyPort, proxytype != 0);
-
- SET_ENTRY(entryProxyUser, default_http_proxy_auth_user);
-
- gtk_widget_set_sensitive(entryProxyUser, proxytype != 0);
-
- SET_ENTRY(entryProxyPassword, default_http_proxy_auth_pass);
-
- gtk_widget_set_sensitive(entryProxyPassword, proxytype != 0);
-
SET_SPIN(spinMaxFetchers, nsoption_int(max_fetchers));
SET_SPIN(spinFetchesPerHost, nsoption_int(max_fetchers_per_host));
SET_SPIN(spinCachedConnections, nsoption_int(max_cached_fetch_handles));
+ SET_CHECK(checkEnableJavascript, nsoption_bool(enable_javascript));
+
SET_CHECK(checkResampleImages, nsoption_bool(render_resample));
SET_SPIN(spinAnimationSpeed, nsoption_int(minimum_gif_delay) / 100.0);
- SET_CHECK(checkDisableAnimations, !nsoption_bool(animate_images));
+ SET_CHECK(checkEnableAnimations, nsoption_bool(animate_images));
- SET_FONT(fontSansSerif, nsoption_charp(font_sans));
+/* SET_FONT(fontSansSerif, nsoption_charp(font_sans));
SET_FONT(fontSerif, nsoption_charp(font_serif));
SET_FONT(fontMonospace, nsoption_charp(font_mono));
SET_FONT(fontCursive, nsoption_charp(font_cursive));
SET_FONT(fontFantasy, nsoption_charp(font_fantasy));
+ SET_SPIN(spinMinimumSize, nsoption_bool(font_min_size) / 10);
+*/
SET_COMBO(comboDefault, nsoption_int(font_default));
SET_SPIN(spinDefaultSize, nsoption_int(font_size) / 10);
- SET_SPIN(spinMinimumSize, nsoption_bool(font_min_size) / 10);
SET_BUTTON(fontPreview);
SET_COMBO(comboButtonType, nsoption_int(button_type) -1);
@@ -451,16 +540,12 @@ void nsgtk_options_load(void)
SET_CHECK(checkFitPage, nsoption_bool(enable_loosening));
SET_CHECK(checkCompressPDF, nsoption_bool(enable_PDF_compression));
SET_CHECK(checkPasswordPDF, nsoption_bool(enable_PDF_password));
- SET_BUTTON(setDefaultExportOptions);
+// SET_BUTTON(setDefaultExportOptions);
}
-static void dialog_response_handler (GtkDialog *dlg, gint res_id)
+static void dialog_response_handler(GtkDialog *dlg, gint res_id)
{
switch (res_id) {
- case GTK_RESPONSE_HELP:
- /* Ready to implement Help */
- break;
-
case GTK_RESPONSE_CLOSE:
on_dialog_close(dlg, TRUE);
}
@@ -572,18 +657,28 @@ static gboolean on_##widget##_changed(GtkWidget *widget, gpointer data) \
return FALSE; \
}
-static gboolean on_comboLanguage_changed(GtkWidget *widget, gpointer data)
+static gboolean on_comboboxLanguage_changed(GtkComboBox *combo, gpointer data)
{
- gchar *lang;
-
- lang = nsgtk_combo_box_text_get_active_text(comboLanguage);
- if (lang == NULL)
- return FALSE;
+ gchar *lang = NULL;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+
+ /* Obtain currently selected item from combo box.
+ * If nothing is selected, do nothing.
+ */
+ if (gtk_combo_box_get_active_iter(combo, &iter)) {
+ /* Obtain data model from combo box. */
+ model = gtk_combo_box_get_model(combo);
+
+ /* Obtain string from model. */
+ gtk_tree_model_get(model, &iter, 0, &lang, -1);
+ }
- nsoption_set_charp(accept_language, strdup(lang));
+ if (lang != NULL) {
+ nsoption_set_charp(accept_language, strdup(lang));
+ g_free(lang);
+ }
- g_free(lang);
-
return FALSE;
}
@@ -621,6 +716,11 @@ CHECK_CHANGED(checkSendReferer, send_referer)
{
}
END_HANDLER
+
+CHECK_CHANGED(checkSendDNT, do_not_track)
+{
+}
+END_HANDLER
CHECK_CHANGED(checkShowSingleTab, show_single_tab)
{
@@ -628,54 +728,48 @@ CHECK_CHANGED(checkShowSingleTab, show_single_tab)
}
END_HANDLER
+
COMBO_CHANGED(comboProxyType, http_proxy_auth)
{
LOG(("proxy auth: %d", nsoption_int(http_proxy_auth)));
+
+ set_proxy_widgets_sensitivity(nsoption_int(http_proxy_auth));
switch (nsoption_int(http_proxy_auth)) {
- case 0:
+ case 0: /* no proxy */
nsoption_set_bool(http_proxy, false);
nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE);
break;
- case 1:
+
+ case 1: /* proxy with no auth */
nsoption_set_bool(http_proxy, true);
nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE);
break;
- case 2:
+
+ case 2: /* proxy with basic auth */
nsoption_set_bool(http_proxy, true);
nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_BASIC);
break;
- case 3:
+
+ case 3: /* proxy with ntlm auth */
nsoption_set_bool(http_proxy, true);
nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NTLM);
break;
+
+ case 4: /* system proxy */
+ nsoption_set_bool(http_proxy, true);
+ nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE);
+ break;
+
}
- gboolean sensitive = (!proxy_type == 0);
- gtk_widget_set_sensitive(entryProxyHost, sensitive);
- gtk_widget_set_sensitive(entryProxyPort, sensitive);
- gtk_widget_set_sensitive(entryProxyUser, sensitive);
- gtk_widget_set_sensitive(entryProxyPassword, sensitive);
}
END_HANDLER
ENTRY_CHANGED(entryProxyHost, http_proxy_host)
-gboolean on_entryProxyPort_changed(GtkWidget *widget, gpointer data)
+SPIN_CHANGED(spinProxyPort, http_proxy_port)
{
- long port;
-
- errno = 0;
- port = strtol((char *)gtk_entry_get_text(GTK_ENTRY(entryProxyPort)),
- NULL, 10) & 0xffff;
- if ((port != 0) && (errno == 0)) {
- nsoption_set_int(http_proxy_port, port);
- } else {
- char buf[32];
- snprintf(buf, sizeof(buf), "%d", nsoption_int(http_proxy_port));
- SET_ENTRY(entryProxyPort, buf);
- }
-
- return FALSE;
}
+END_HANDLER
ENTRY_CHANGED(entryProxyUser, http_proxy_auth_user)
@@ -709,9 +803,13 @@ static gboolean on_spinAnimationSpeed_changed(GtkWidget *widget, gpointer data)
return FALSE;
}
-CHECK_CHANGED(checkDisableAnimations, animate_images)
+CHECK_CHANGED(checkEnableAnimations, animate_images)
+{
+}
+END_HANDLER
+
+CHECK_CHANGED(checkEnableJavascript, enable_javascript)
{
- nsoption_set_bool(animate_images, !nsoption_bool(animate_images));
}
END_HANDLER
@@ -734,7 +832,7 @@ CHECK_CHANGED(checkHoverURLs, hover_urls)
{
}
END_HANDLER
-
+/*
FONT_CHANGED(fontSansSerif, font_sans)
{
}
@@ -759,7 +857,7 @@ FONT_CHANGED(fontFantasy, font_fantasy)
{
}
END_HANDLER
-
+*/
COMBO_CHANGED(comboDefault, font_default)
{
}
@@ -771,12 +869,12 @@ SPIN_CHANGED(spinDefaultSize, font_size)
}
END_HANDLER
-SPIN_CHANGED(spinMinimumSize, font_min_size)
+/*SPIN_CHANGED(spinMinimumSize, font_min_size)
{
nsoption_set_int(font_min_size, nsoption_int(font_min_size) * 10);
}
END_HANDLER
-
+*/
BUTTON_CLICKED(fontPreview)
{
nsgtk_reflow_all_windows();
@@ -1057,6 +1155,7 @@ CHECK_CHANGED(checkPasswordPDF, enable_PDF_password)
}
END_HANDLER
+/*
BUTTON_CLICKED(setDefaultExportOptions)
{
nsoption_set_int(margin_top, DEFAULT_MARGIN_TOP_MM);
@@ -1082,3 +1181,4 @@ BUTTON_CLICKED(setDefaultExportOptions)
SET_CHECK(checkFitPage, nsoption_bool(enable_loosening));
}
END_HANDLER
+*/
diff --git a/gtk/res/options.gtk2.ui b/gtk/res/options.gtk2.ui
index 1a17cc1..5dd7930 100644
--- a/gtk/res/options.gtk2.ui
+++ b/gtk/res/options.gtk2.ui
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 2.12 -->
- <!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkDialog" id="dlgPreferences">
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkDialog" id="dialogPreferences">
<property name="border_width">5</property>
<property name="title" translatable="yes">Netsurf Preferences</property>
<property name="window_position">center-on-parent</property>
@@ -10,42 +10,43 @@
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox6">
+ <object class="GtkVBox" id="vbox_dialog">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <object class="GtkNotebook" id="notebook2">
+ <object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="border_width">4</property>
<child>
- <object class="GtkVBox" id="vbox_general">
+ <object class="GtkVBox" id="vbox_main">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame14">
+ <object class="GtkFrame" id="frame_main_startup">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment18">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox16">
+ <object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="spacing">5</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label64">
+ <object class="GtkLabel" id="label_startup_page">
<property name="visible">True</property>
- <property name="label" translatable="yes">URL</property>
+ <property name="label" translatable="yes">Page:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -60,6 +61,7 @@
<property name="invisible_char">●</property>
</object>
<packing>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -69,38 +71,42 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
- <property name="spacing">5</property>
+ <property name="spacing">6</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
<object class="GtkButton" id="setCurrentPage">
- <property name="label" translatable="yes">Current Page</property>
+ <property name="label" translatable="yes">Use Current Page</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="receives_default">True</property>
</object>
<packing>
- <property name="padding">5</property>
- <property name="position">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="setDefaultPage">
- <property name="label" translatable="yes">Default Page</property>
+ <property name="label" translatable="yes">Use Default Page</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="receives_default">True</property>
</object>
<packing>
- <property name="padding">5</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -109,44 +115,55 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label65">
+ <object class="GtkLabel" id="label_main_startup">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Home page</b></property>
+ <property name="label" translatable="yes"><b>Startup</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox6">
+ <object class="GtkFrame" id="frame_main_search">
<property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkFrame" id="frame15">
+ <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkAlignment" id="alignment19">
+ <object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
- <property name="left_padding">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="checkUrlSearch">
+ <property name="label" translatable="yes">Search from URL bar</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
- <object class="GtkVBox" id="vbox17">
+ <object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkCheckButton" id="checkHideAdverts">
- <property name="label" translatable="yes">Hide advertisements</property>
+ <object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="label" translatable="yes">Provider:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -155,185 +172,112 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkDisablePopups">
- <property name="label" translatable="yes">Disable pop-up windows</property>
+ <object class="GtkComboBox" id="comboSearch">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="model">liststore_search_provider</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="checkDisablePlugins">
- <property name="label" translatable="yes">Disable plug-ins</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
</child>
- <child type="label">
- <object class="GtkLabel" id="label66">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Content blocking</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
</child>
- <child>
- <object class="GtkFrame" id="frame7">
+ <child type="label">
+ <object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hbox8">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkVBox" id="combolanguagevbox">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Content Language</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
+ <property name="label" translatable="yes"><b>Search</b></property>
+ <property name="use_markup">True</property>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame16">
+ <object class="GtkFrame" id="frame_main_downloads">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment20">
+ <object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox18">
+ <object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
- <property name="border_width">1</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox17">
+ <object class="GtkCheckButton" id="checkClearDownloads">
+ <property name="label" translatable="yes">Remove download from list when complete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkRequestOverwrite">
+ <property name="label" translatable="yes">Confirm before overwriting files</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
- <property name="border_width">4</property>
- <property name="spacing">4</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label67">
+ <object class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="label" translatable="yes">Keep history for</property>
+ <property name="label" translatable="yes">Location:</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinHistoryAge">
+ <object class="GtkFileChooserButton" id="fileChooserDownloads">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
+ <property name="action">select-folder</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label68">
- <property name="visible">True</property>
- <property name="label" translatable="yes">days</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkHoverURLs">
- <property name="label" translatable="yes">Hover URLs by pointer in local history</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -341,62 +285,63 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label69">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>History</b></property>
+ <property name="label" translatable="yes"><b>Downloads</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="padding">6</property>
<property name="position">2</property>
</packing>
</child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Main</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox_appearance">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame17">
+ <object class="GtkFrame" id="frame_appearance_theme">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment21">
+ <object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox19">
+ <object class="GtkHBox" id="themehbox">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkCheckButton" id="checkDisplayRecentURLs">
- <property name="label" translatable="yes">Display recently visited URLs as you type</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
<child>
- <object class="GtkCheckButton" id="checkSendReferer">
- <property name="label" translatable="yes">Send site referral information</property>
+ <object class="GtkButton" id="buttonaddtheme">
+ <property name="label" translatable="yes">Add Theme...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -405,189 +350,104 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label70">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Misc</b></property>
+ <property name="label" translatable="yes"><b>Themes</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">3</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
</packing>
</child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label71">
- <property name="visible">True</property>
- <property name="label" translatable="yes">General</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_network">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkFrame" id="frame18">
+ <object class="GtkFrame" id="frame_appearance_tabs">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment22">
+ <object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table7">
+ <object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkEntry" id="entryProxyUser">
+ <object class="GtkCheckButton" id="checkShowSingleTab">
+ <property name="label" translatable="yes">Always show tab bar</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="comboProxyType">
+ <object class="GtkCheckButton" id="checkFocusNew">
+ <property name="label" translatable="yes">Switch to newly opened tabs immediately</property>
<property name="visible">True</property>
- <property name="model">liststore_proxytype</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext4"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox18">
+ <object class="GtkCheckButton" id="checkNewBlank">
+ <property name="label" translatable="yes">Newly opened tabs are blank</property>
<property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkEntry" id="entryProxyHost">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label72">
+ <object class="GtkLabel" id="label9">
<property name="visible">True</property>
- <property name="label" translatable="yes">:</property>
+ <property name="label" translatable="yes">Position:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="entryProxyPort">
- <property name="width_request">64</property>
+ <object class="GtkComboBox" id="comboTabPosition">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="model">liststore_tab_position</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entryProxyPassword">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- <property name="invisible_char">●</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label75">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Host</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label76">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Proxy type</property>
- </object>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label74">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Username</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label73">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Password</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -595,176 +455,121 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label77">
+ <object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>HTTP Proxy</b></property>
+ <property name="label" translatable="yes"><b>Tabs</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame19">
+ <object class="GtkFrame" id="frame_appearance_source">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment23">
+ <object class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table8">
+ <object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="border_width">3</property>
- <property name="n_rows">3</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
- <child>
- <object class="GtkSpinButton" id="spinMaxFetchers">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinFetchesPerHost">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinCachedConnections">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label78">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Maximum fetchers</property>
- </object>
- <packing>
- <property name="y_options"></property>
- </packing>
- </child>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label79">
+ <object class="GtkLabel" id="label13">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Fetches per host</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Open source view in new:</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label80">
+ <object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Cached connections</property>
+ <child>
+ <object class="GtkRadioButton" id="sourceButtonWindow">
+ <property name="label" translatable="yes">window</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0.54000002145767212</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">sourceButtonTab</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="sourceButtonTab">
+ <property name="label" translatable="yes">tab</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="position">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label81">
+ <object class="GtkLabel" id="label12">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Fetching</b></property>
+ <property name="label" translatable="yes"><b>Source</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">1</property>
+ <property name="padding">6</property>
+ <property name="position">2</property>
</packing>
</child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label82">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Network</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_rendering">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkFrame" id="frame20">
+ <object class="GtkFrame" id="frame_appearance_url">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment24">
+ <object class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkResampleImages">
- <property name="label" translatable="yes">Resample images when not at natural size</property>
+ <object class="GtkCheckButton" id="checkDisplayRecentURLs">
+ <property name="label" translatable="yes">Display recently visited URLs as you type</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -776,319 +581,223 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label83">
+ <object class="GtkLabel" id="label14">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Quality</b></property>
+ <property name="label" translatable="yes"><b>URLbar</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
+ <property name="padding">7</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame21">
+ <object class="GtkFrame" id="frame_appearance_toolbar">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment25">
+ <object class="GtkAlignment" id="alignment9">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox23">
+ <object class="GtkVBox" id="vbox8">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox19">
+ <object class="GtkHBox" id="hbox7">
<property name="visible">True</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label84">
+ <object class="GtkLabel" id="label16">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Limit speed to</property>
+ <property name="label" translatable="yes">Buttons:</property>
</object>
<packing>
+ <property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinAnimationSpeed">
+ <object class="GtkComboBox" id="comboButtonType">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- <property name="update_policy">if-valid</property>
+ <property name="model">liststore_toolbar_buttontype</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext3"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label85">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">seconds between frames</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="checkDisableAnimations">
- <property name="label" translatable="yes">Disable animations</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label86">
+ <object class="GtkLabel" id="label15">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Animations</b></property>
+ <property name="label" translatable="yes"><b>Toolbar</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="padding">6</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label87">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="label" translatable="yes">Rendering</property>
+ <property name="label" translatable="yes">Appearance</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_style">
+ <object class="GtkVBox" id="vbox_content">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame22">
+ <object class="GtkFrame" id="frame_content_control">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment26">
+ <object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table9">
+ <object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
- <property name="border_width">2</property>
- <property name="n_rows">6</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFontButton" id="fontSansSerif">
+ <object class="GtkCheckButton" id="checkDisablePopups">
+ <property name="label" translatable="yes">Prevent pop-up windows</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label88">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Sans-serif</property>
- </object>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label89">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Serif</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label90">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Monospace</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label91">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Cursive</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label92">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Fantasy</property>
- </object>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label93">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Default</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkFontButton" id="fontSerif">
+ <object class="GtkCheckButton" id="checkHideAdverts">
+ <property name="label" translatable="yes">Hide Adverts</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFontButton" id="fontMonospace">
+ <object class="GtkCheckButton" id="checkEnableJavascript">
+ <property name="label" translatable="yes">Enable JavaScript</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkFontButton" id="fontCursive">
+ <object class="GtkCheckButton" id="checkDisablePlugins">
+ <property name="label" translatable="yes">Disable plug-ins</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkFontButton" id="fontFantasy">
+ <object class="GtkCheckButton" id="checkResampleImages">
+ <property name="label" translatable="yes">High quality image scaling</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">4</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="comboDefault">
+ <object class="GtkHBox" id="hbox8">
<property name="visible">True</property>
- <property name="model">liststore_defaultfont</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCellRendererText" id="cellrenderertext3"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
+ <object class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Load and display</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="comboboxLoadImages">
+ <property name="visible">True</property>
+ <property name="model">liststore_image_loading</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext4"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">5</property>
</packing>
</child>
</object>
@@ -1096,152 +805,82 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label94">
+ <object class="GtkLabel" id="label11">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Font faces</b></property>
+ <property name="label" translatable="yes"><b>Control</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame23">
+ <object class="GtkFrame" id="frame_content_animation">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment27">
+ <object class="GtkAlignment" id="alignment10">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table10">
+ <object class="GtkVBox" id="vbox9">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">4</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkButton" id="fontPreview">
+ <object class="GtkCheckButton" id="checkEnableAnimations">
+ <property name="label" translatable="yes">Enable</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <child>
- <object class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="border_width">2</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-apply</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Preview</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- <property name="x_padding">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinDefaultSize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinMinimumSize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label97">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">pt</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label98">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">pt</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label96">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Minimum</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label95">
+ <object class="GtkHBox" id="hbox9">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Default</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Minimum time between frames:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinAnimationSpeed">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Do not update animations any more often than this.</property>
+ <property name="invisible_char">●</property>
+ <property name="adjustment">adjustment_animation_time</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">if-valid</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -1249,137 +888,117 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label99">
+ <object class="GtkLabel" id="label18">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Font size</b></property>
+ <property name="label" translatable="yes"><b>Animation</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame6">
+ <object class="GtkFrame" id="frame_content_fonts">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment6">
+ <object class="GtkAlignment" id="alignment14">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table3">
+ <object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">3</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkComboBox" id="comboButtonType">
+ <object class="GtkHBox" id="hbox12">
<property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Default</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="comboDefault">
+ <property name="visible">True</property>
+ <property name="model">liststore_defaultfont</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext5"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label19">
+ <object class="GtkHBox" id="hbox13">
<property name="visible">True</property>
- <property name="label" translatable="yes">Toolbar buttons</property>
- <property name="justify">right</property>
- </object>
- <packing>
- <property name="x_options"></property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Icons</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label100">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Style</property>
- </object>
- <packing>
- <property name="position">3</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_cache">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkFrame" id="frame24">
- <property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment28">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hbox20">
- <property name="visible">True</property>
- <property name="border_width">2</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label101">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Size</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinMemoryCacheSize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Size</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinDefaultSize">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">The base-line font size to use.</property>
+ <property name="max_length">3</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_font_default_size</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label102">
+ <object class="GtkButton" id="fontPreview">
+ <property name="label" translatable="yes">_Preview</property>
<property name="visible">True</property>
- <property name="label" translatable="yes">MB</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image1</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
@@ -1388,142 +1007,78 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label103">
+ <object class="GtkLabel" id="label20">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Memory cache</b></property>
+ <property name="label" translatable="yes"><b>Fonts</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame25">
+ <object class="GtkFrame" id="frame_content_font">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment29">
+ <object class="GtkAlignment" id="alignment11">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox26">
+ <object class="GtkVBox" id="vbox10">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">5</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox21">
+ <object class="GtkHBox" id="hbox10">
<property name="visible">True</property>
- <property name="spacing">3</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label104">
+ <object class="GtkLabel" id="label21">
<property name="visible">True</property>
- <property name="label" translatable="yes">Duration</property>
+ <property name="label" translatable="yes">Preferred language:</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinDiscCacheAge">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label105">
- <property name="visible">True</property>
- <property name="label" translatable="yes">days</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox22">
- <property name="visible">True</property>
- <property name="border_width">4</property>
- <property name="spacing">4</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkButton" id="button4">
+ <object class="GtkComboBox" id="comboboxLanguage">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">set preferred language for web pages</property>
+ <property name="model">liststore_content_language</property>
<child>
- <object class="GtkAlignment" id="alignment30">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox23">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image399">
- <property name="visible">True</property>
- <property name="stock">gtk-delete</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label106">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="label" translatable="yes">Perform maintainance</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
+ <object class="GtkCellRendererText" id="cellrenderertext7">
+ <property name="xalign">0</property>
+ </object>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext8">
+ <property name="xalign">1</property>
</object>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
@@ -1531,59 +1086,60 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label107">
+ <object class="GtkLabel" id="label25">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Disc cache</b></property>
+ <property name="label" translatable="yes"><b>Language</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
<packing>
- <property name="position">4</property>
+ <property name="position">2</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label108">
+ <object class="GtkLabel" id="label10">
<property name="visible">True</property>
- <property name="label" translatable="yes">Cache</property>
+ <property name="label" translatable="yes">Content</property>
</object>
<packing>
- <property name="position">4</property>
+ <property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_advanced">
+ <object class="GtkVBox" id="vbox_privacy">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame_downloads">
+ <object class="GtkFrame" id="frame_privacy_history">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment1">
+ <object class="GtkAlignment" id="alignment12">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkVBox" id="vbox11">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkClearDownloads">
- <property name="label" translatable="yes">Automatically clear downloads when completed</property>
+ <object class="GtkCheckButton" id="checkHoverURLs">
+ <property name="label" translatable="yes">Local history shows URL in tooltip</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -1591,50 +1147,48 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkRequestOverwrite">
- <property name="label" translatable="yes">Request confirmation before overwriting files</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkHBox" id="hbox14">
<property name="visible">True</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label4">
+ <object class="GtkLabel" id="label28">
<property name="visible">True</property>
- <property name="xpad">2</property>
- <property name="label" translatable="yes">Download directory</property>
+ <property name="label" translatable="yes">Remember browsing history for up to</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkFileChooserButton" id="fileChooserDownloads">
+ <object class="GtkSpinButton" id="spinHistoryAge">
<property name="visible">True</property>
- <property name="show_hidden">True</property>
- <property name="action">select-folder</property>
- <property name="width_chars">23</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">4</property>
+ <property name="adjustment">adjustment_history_age</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
+ <property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label29">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">days</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -1642,166 +1196,251 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label3">
+ <object class="GtkLabel" id="label23">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Downloads</b></property>
+ <property name="label" translatable="yes"><b>History</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame_tabs">
+ <object class="GtkFrame" id="frame_privacy_cache">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment8">
+ <object class="GtkAlignment" id="alignment13">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="advanced_tabs_vbox">
+ <object class="GtkVBox" id="vbox12">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkShowSingleTab">
- <property name="label" translatable="yes">Show tab bar with only one tab</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkFocusNew">
- <property name="label" translatable="yes">Shift focus to new tab</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkNewBlank">
- <property name="label" translatable="yes">Open blank window</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox10">
+ <object class="GtkTable" id="table3">
<property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
<child>
- <object class="GtkLabel" id="label26">
+ <object class="GtkLabel" id="label30">
<property name="visible">True</property>
- <property name="xalign">0.4699999988079071</property>
- <property name="xpad">2</property>
- <property name="label" translatable="yes">Tabs position</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Memory cache size</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">2</property>
- <property name="position">0</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="comboTabPosition">
+ <object class="GtkLabel" id="label31">
<property name="visible">True</property>
- <property name="model">liststore_tabpositions</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Disc cache size</property>
</object>
<packing>
- <property name="position">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
- </object>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Tabs</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
+ <child>
+ <object class="GtkLabel" id="label34">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Expire cache entries after</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMemoryCacheSize">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="adjustment">adjustment_cache_memory_size</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinDiscCacheSize">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="adjustment">adjustment_cache_disc_size</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinDiscCacheAge">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_disc_cache_age</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">MB</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label33">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">MB</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label35">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">days</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox17">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkButton" id="buttonCacheMaintinance">
+ <property name="label" translatable="yes">Maintinance</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label24">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Cache</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame_view_source">
+ <object class="GtkFrame" id="frame_privacy_general">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment10">
+ <object class="GtkAlignment" id="alignment20">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkHBox" id="hbox11">
+ <object class="GtkVBox" id="vbox15">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkRadioButton" id="sourceButtonWindow">
- <property name="label" translatable="yes">in own window </property>
+ <object class="GtkCheckButton" id="checkSendReferer">
+ <property name="label" translatable="yes">Enable referral submission</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="sourceButtonTab">
- <property name="label" translatable="yes">in new tab</property>
+ <object class="GtkCheckButton" id="checkSendDNT">
+ <property name="label" translatable="yes">Enable sending "Do Not Track" request</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -1810,117 +1449,329 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label24">
+ <object class="GtkLabel" id="label61">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>View Source</b></property>
+ <property name="label" translatable="yes"><b>General</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Privacy</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox_network">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame_search">
+ <object class="GtkFrame" id="frame_network_proxy">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment9">
+ <object class="GtkAlignment" id="alignment15">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkHBox" id="hbox9">
+ <object class="GtkTable" id="table2">
<property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkUrlSearch">
- <property name="label" translatable="yes">Search from URL bar </property>
+ <object class="GtkLabel" id="label42">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Proxy type</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label43">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Host</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label44">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Username</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label45">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="comboProxyType">
+ <property name="visible">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">The type of HTTP proxy server.</property>
+ <property name="model">liststore_proxy_type</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext6"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox19">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="entryProxyHost">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Host name of your proxy server.</property>
+ <property name="invisible_char">●</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label46">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinProxyPort">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Port number to connect to on proxy server.</property>
+ <property name="max_length">5</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="adjustment">adjustment_proxy_port</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">if-valid</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="entryProxyUser">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Username to access the proxy</property>
+ <property name="invisible_char">●</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="position">0</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label23">
+ <object class="GtkEntry" id="entryProxyPassword">
<property name="visible">True</property>
- <property name="label" translatable="yes">Default provider</property>
- <property name="justify">right</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Password to access the proxy</property>
+ <property name="invisible_char">●</property>
</object>
<packing>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label37">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>HTTP Proxy</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame_network_fetching">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment16">
+ <property name="visible">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">12</property>
+ <child>
+ <object class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label39">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Maximum fetchers</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label40">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Fetches per host</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label41">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Cached connections</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="comboSearch">
+ <object class="GtkSpinButton" id="spinMaxFetchers">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Maximum number of concurrent items to fetch at once.</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_fetching_max</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinFetchesPerHost">
<property name="visible">True</property>
- <property name="model">liststore_searchproviders</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext2"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Maximum number of item fetches per web server.</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_fetching_perhost</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Search</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame_select_themes">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment11">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="themehbox">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
<child>
- <object class="GtkButton" id="buttonaddtheme">
- <property name="label" translatable="yes">Add theme…</property>
+ <object class="GtkSpinButton" id="spinCachedConnections">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Number of connections to keep in case they are needed again.</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_fetching_cached</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -1928,204 +1779,371 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label25">
+ <object class="GtkLabel" id="label38">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Select themes</b></property>
+ <property name="label" translatable="yes"><b>Fetching</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">4</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label109">
+ <object class="GtkLabel" id="label36">
<property name="visible">True</property>
- <property name="label" translatable="yes">Advanced</property>
+ <property name="label" translatable="yes">Network</property>
</object>
<packing>
- <property name="position">5</property>
+ <property name="position">4</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_export">
+ <object class="GtkVBox" id="vbox_pdfexport">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame2">
+ <object class="GtkFrame" id="frame_pdfexport_appearance">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment2">
+ <object class="GtkAlignment" id="alignment17">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkHBox" id="hbox4">
+ <object class="GtkVBox" id="vbox13">
<property name="visible">True</property>
- <property name="homogeneous">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkCheckButton" id="checkSuppressImages">
+ <property name="label" translatable="yes">No images in output</property>
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">4</property>
- <property name="row_spacing">5</property>
- <child>
- <object class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">mm</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkRemoveBackgrounds">
+ <property name="label" translatable="yes">No background images in output</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkFitPage">
+ <property name="label" translatable="yes">Scale output to fit page</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox15">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label9">
+ <object class="GtkLabel" id="label59">
<property name="visible">True</property>
- <property name="label" translatable="yes">mm</property>
+ <property name="label" translatable="yes">Scale output</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="expand">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinMarginBottom">
+ <object class="GtkSpinButton" id="spinExportScale">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">4</property>
+ <property name="xalign">1</property>
+ <property name="adjustment">adjustment_pdf_scale</property>
<property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="expand">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinMarginTop">
+ <object class="GtkLabel" id="label60">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
+ <property name="label" translatable="yes">%</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="expand">False</property>
+ <property name="position">2</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label48">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Appearance</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame_pdfexport_margins">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment18">
+ <property name="visible">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox16">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox22">
+ <property name="visible">True</property>
<child>
- <object class="GtkLabel" id="label6">
+ <object class="GtkLabel" id="label62">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Bottom</property>
+ <property name="label" translatable="yes">measurements in mm</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="expand">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Top</property>
- </object>
+ <placeholder/>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkTable" id="table2">
+ <object class="GtkTable" id="table4">
<property name="visible">True</property>
- <property name="n_rows">2</property>
+ <property name="n_rows">3</property>
<property name="n_columns">3</property>
- <property name="column_spacing">4</property>
- <property name="row_spacing">5</property>
<child>
- <object class="GtkLabel" id="label12">
+ <object class="GtkHBox" id="hbox16">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label51">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Top</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMarginTop">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="xalign">1</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox18">
<property name="visible">True</property>
- <property name="label" translatable="yes">mm</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label52">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Left</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMarginLeft">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="xalign">1</property>
+ <property name="adjustment">adjustment_pdf_lmargin</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
+ <property name="x_options">GTK_EXPAND</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label11">
+ <object class="GtkHBox" id="hbox20">
<property name="visible">True</property>
- <property name="label" translatable="yes">mm</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label53">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Bottom</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMarginBottom">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="xalign">1</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_EXPAND</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinMarginRight">
+ <object class="GtkHBox" id="hbox21">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label54">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Right</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMarginRight">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="xalign">1</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
+ <property name="x_options">GTK_EXPAND</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinMarginLeft">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
+ <placeholder/>
</child>
<child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Right</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
+ <placeholder/>
</child>
<child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Left</property>
- </object>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -2134,7 +2152,7 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="frame">
+ <object class="GtkLabel" id="label49">
<property name="visible">True</property>
<property name="label" translatable="yes"><b>Margins</b></property>
<property name="use_markup">True</property>
@@ -2143,164 +2161,32 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="spacing">4</property>
- <child>
- <object class="GtkLabel" id="label14">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Scale</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinExportScale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="label" translatable="yes">%</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Scaling</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame4">
- <property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkCheckButton" id="checkSuppressImages">
- <property name="label" translatable="yes">Suppress images</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkRemoveBackgrounds">
- <property name="label" translatable="yes">Remove backgrounds</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkFitPage">
- <property name="label" translatable="yes">Fit page</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Appearance</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame5">
+ <object class="GtkFrame" id="frame_pdfexport_generation">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment5">
+ <object class="GtkAlignment" id="alignment19">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox7">
+ <object class="GtkVBox" id="vbox14">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">7</property>
<child>
<object class="GtkCheckButton" id="checkCompressPDF">
- <property name="label" translatable="yes">Compress PDF</property>
+ <property name="label" translatable="yes">Output is compressed</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -2309,11 +2195,10 @@
</child>
<child>
<object class="GtkCheckButton" id="checkPasswordPDF">
- <property name="label" translatable="yes">Set a password for PDF</property>
+ <property name="label" translatable="yes">Output has a password</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -2325,55 +2210,31 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label17">
+ <object class="GtkLabel" id="label50">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Advanced</b></property>
+ <property name="label" translatable="yes"><b>Generation</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <property name="border_width">10</property>
- <child>
- <object class="GtkButton" id="setDefaultExportOptions">
- <property name="label" translatable="yes">Default</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">4</property>
+ <property name="padding">6</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
- <property name="position">6</property>
+ <property name="position">5</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="label47">
<property name="visible">True</property>
- <property name="label" translatable="yes">Export</property>
+ <property name="label" translatable="yes">PDF</property>
</object>
<packing>
- <property name="position">6</property>
+ <property name="position">5</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -2383,14 +2244,13 @@
</packing>
</child>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area7">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">edge</property>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
@@ -2429,29 +2289,9 @@
<action-widget response="-7">close</action-widget>
</action-widgets>
</object>
- <object class="GtkListStore" id="liststore_tabpositions">
- <columns>
- <!-- column-name Text -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes">Top</col>
- </row>
- <row>
- <col id="0" translatable="yes">Left</col>
- </row>
- <row>
- <col id="0" translatable="yes">Right</col>
- </row>
- <row>
- <col id="0" translatable="yes">Bottom</col>
- </row>
- </data>
- </object>
- <object class="GtkListStore" id="liststore_searchproviders">
+ <object class="GtkListStore" id="liststore_search_provider">
<columns>
- <!-- column-name Text -->
+ <!-- column-name Provider -->
<column type="gchararray"/>
</columns>
<data>
@@ -2465,7 +2305,7 @@
<col id="0" translatable="yes">Microsoft Live</col>
</row>
<row>
- <col id="0" translatable="yes">Buisness.com</col>
+ <col id="0" translatable="yes">Buisiness.com</col>
</row>
<row>
<col id="0" translatable="yes">Omgili</col>
@@ -2489,10 +2329,10 @@
<col id="0" translatable="yes">Dictionary.com</col>
</row>
<row>
- <col id="0" translatable="yes">Youtube</col>
+ <col id="0" translatable="yes">YouTube</col>
</row>
<row>
- <col id="0" translatable="yes">AeroMp3</col>
+ <col id="0" translatable="yes">AeroMP3</col>
</row>
<row>
<col id="0" translatable="yes">AOL</col>
@@ -2507,7 +2347,7 @@
<col id="0" translatable="yes">Ebay</col>
</row>
<row>
- <col id="0" translatable="yes">IMDB</col>
+ <col id="0" translatable="yes">IMBD</col>
</row>
<row>
<col id="0" translatable="yes">ESPN</col>
@@ -2520,6 +2360,66 @@
</row>
</data>
</object>
+ <object class="GtkListStore" id="liststore_tab_position">
+ <columns>
+ <!-- column-name Position -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Top</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Left</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Right</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Bottom</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_toolbar_buttontype">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Small Icons</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Large Icons</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Large Icons and Text</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Text only</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_image_loading">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">foreground and background images</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">foreground images</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">background images</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">no images</col>
+ </row>
+ </data>
+ </object>
<object class="GtkListStore" id="liststore_defaultfont">
<columns>
<!-- column-name Type -->
@@ -2543,23 +2443,122 @@
</row>
</data>
</object>
- <object class="GtkListStore" id="liststore_proxytype">
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="xpad">3</property>
+ <property name="stock">gtk-apply</property>
+ </object>
+ <object class="GtkListStore" id="liststore_proxy_type">
<columns>
<!-- column-name Type -->
<column type="gchararray"/>
</columns>
<data>
<row>
- <col id="0" translatable="yes">No proxy</col>
+ <col id="0" translatable="yes">Direct connection</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Manual with no authentication</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Manual with basic authentication</col>
</row>
<row>
- <col id="0" translatable="yes">Simple proxy</col>
+ <col id="0" translatable="yes">Manual with NTLM authentication</col>
</row>
<row>
- <col id="0" translatable="yes">Basic authentication</col>
+ <col id="0" translatable="yes">System settings</col>
</row>
+ </data>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_animation_time">
+ <property name="value">0.10000000000000001</property>
+ <property name="lower">0.10000000000000001</property>
+ <property name="upper">10</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_font_default_size">
+ <property name="value">16</property>
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_history_age">
+ <property name="value">28</property>
+ <property name="upper">999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">28</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_cache_memory_size">
+ <property name="value">16</property>
+ <property name="upper">2048</property>
+ <property name="step_increment">4</property>
+ <property name="page_increment">16</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_cache_disc_size">
+ <property name="value">16</property>
+ <property name="upper">2048</property>
+ <property name="step_increment">4</property>
+ <property name="page_increment">16</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_disc_cache_age">
+ <property name="value">28</property>
+ <property name="upper">999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_proxy_port">
+ <property name="value">3128</property>
+ <property name="lower">1</property>
+ <property name="upper">65535</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_max">
+ <property name="value">10</property>
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_perhost">
+ <property name="value">1</property>
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_cached">
+ <property name="value">1</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_pdf_scale">
+ <property name="value">100</property>
+ <property name="lower">1</property>
+ <property name="upper">1000</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_pdf_lmargin">
+ <property name="upper">999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="liststore_content_language">
+ <columns>
+ <!-- column-name Code -->
+ <column type="gchararray"/>
+ <!-- column-name Description -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
<row>
- <col id="0" translatable="yes">NTLM authentication</col>
+ <col id="0" translatable="yes">en</col>
+ <col id="1" translatable="yes">English</col>
</row>
</data>
</object>
diff --git a/gtk/res/options.gtk3.ui b/gtk/res/options.gtk3.ui
index b6254a3..7fb513e 100644
--- a/gtk/res/options.gtk3.ui
+++ b/gtk/res/options.gtk3.ui
@@ -263,7 +263,7 @@
</object>
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkDialog" id="dlgPreferences">
+ <object class="GtkDialog" id="dialogPreferences">
<property name="border_width">5</property>
<property name="title" translatable="yes">Netsurf Preferences</property>
<property name="window_position">center-on-parent</property>
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/0402b5ca91a9c05e325...
commit 0402b5ca91a9c05e325d7ad94fb7fcfbe9633165
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
fixup combo boxes to have content, missed in conversion from glade
diff --git a/gtk/res/options.gtk2.ui b/gtk/res/options.gtk2.ui
index 0f50ecc..1a17cc1 100644
--- a/gtk/res/options.gtk2.ui
+++ b/gtk/res/options.gtk2.ui
@@ -297,7 +297,6 @@
<object class="GtkSpinButton" id="spinHistoryAge">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -467,6 +466,13 @@
<child>
<object class="GtkComboBox" id="comboProxyType">
<property name="visible">True</property>
+ <property name="model">liststore_proxytype</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext4"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
<property name="left_attach">1</property>
@@ -623,7 +629,6 @@
<object class="GtkSpinButton" id="spinMaxFetchers">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -636,7 +641,6 @@
<object class="GtkSpinButton" id="spinFetchesPerHost">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -651,7 +655,6 @@
<object class="GtkSpinButton" id="spinCachedConnections">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -815,7 +818,6 @@
<object class="GtkSpinButton" id="spinAnimationSpeed">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
<property name="digits">1</property>
<property name="numeric">True</property>
@@ -1072,6 +1074,13 @@
<child>
<object class="GtkComboBox" id="comboDefault">
<property name="visible">True</property>
+ <property name="model">liststore_defaultfont</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext3"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
<property name="left_attach">1</property>
@@ -1160,8 +1169,8 @@
<object class="GtkSpinButton" id="spinDefaultSize">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -1174,7 +1183,6 @@
<object class="GtkSpinButton" id="spinMinimumSize">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -1356,7 +1364,6 @@
<object class="GtkSpinButton" id="spinMemoryCacheSize">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -1428,7 +1435,6 @@
<object class="GtkSpinButton" id="spinDiscCacheAge">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -1618,9 +1624,9 @@
<child>
<object class="GtkFileChooserButton" id="fileChooserDownloads">
<property name="visible">True</property>
- <property name="action">select-folder</property>
<property name="show_hidden">True</property>
- <property name="width_chars">25</property>
+ <property name="action">select-folder</property>
+ <property name="width_chars">23</property>
</object>
<packing>
<property name="position">1</property>
@@ -1722,6 +1728,13 @@
<child>
<object class="GtkComboBox" id="comboTabPosition">
<property name="visible">True</property>
+ <property name="model">liststore_tabpositions</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
<property name="position">1</property>
@@ -1850,6 +1863,13 @@
<child>
<object class="GtkComboBox" id="comboSearch">
<property name="visible">True</property>
+ <property name="model">liststore_searchproviders</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
<property name="position">2</property>
@@ -1986,7 +2006,6 @@
<object class="GtkSpinButton" id="spinMarginBottom">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -2000,7 +2019,6 @@
<object class="GtkSpinButton" id="spinMarginTop">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -2066,7 +2084,6 @@
<object class="GtkSpinButton" id="spinMarginRight">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -2080,7 +2097,6 @@
<object class="GtkSpinButton" id="spinMarginLeft">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -2158,7 +2174,6 @@
<object class="GtkSpinButton" id="spinExportScale">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
<property name="climb_rate">1</property>
</object>
<packing>
@@ -2414,4 +2429,138 @@
<action-widget response="-7">close</action-widget>
</action-widgets>
</object>
+ <object class="GtkListStore" id="liststore_tabpositions">
+ <columns>
+ <!-- column-name Text -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Top</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Left</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Right</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Bottom</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_searchproviders">
+ <columns>
+ <!-- column-name Text -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Google</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Yahoo!</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Microsoft Live</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Buisness.com</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Omgili</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">BBC News</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Ubuntu Packages</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Creative Commons</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Ask</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Answers</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Dictionary.com</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Youtube</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">AeroMp3</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">AOL</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Baidu</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Amazon</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Ebay</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">IMDB</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">ESPN</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Wikipedia</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">DuckDuckGo</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_defaultfont">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Sans-serif</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Serif</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Monospace</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Cursive</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Fantasy</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_proxytype">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">No proxy</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Simple proxy</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Basic authentication</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">NTLM authentication</col>
+ </row>
+ </data>
+ </object>
</interface>
-----------------------------------------------------------------------
Summary of changes:
gtk/dialogs/options.c | 362 ++++---
gtk/res/options.gtk2.ui | 2916 +++++++++++++++++++++++++----------------------
gtk/res/options.gtk3.ui | 2 +-
3 files changed, 1764 insertions(+), 1516 deletions(-)
diff --git a/gtk/dialogs/options.c b/gtk/dialogs/options.c
index a449e6f..8bd5665 100644
--- a/gtk/dialogs/options.c
+++ b/gtk/dialogs/options.c
@@ -46,8 +46,6 @@ static GtkBuilder *gladeFile;
static struct browser_window *current_browser;
-static int proxy_type;
-
static void dialog_response_handler (GtkDialog *dlg, gint res_id);
static gboolean on_dialog_close (GtkDialog *dlg, gboolean stay_alive);
static void nsgtk_options_theme_combo(void);
@@ -66,30 +64,35 @@ DECLARE(checkDisablePlugins);
DECLARE(spinHistoryAge);
DECLARE(checkHoverURLs);
DECLARE(checkDisplayRecentURLs);
-DECLARE(comboLanguage);
+//DECLARE(comboboxLanguage);
+static GtkWidget *comboboxLanguage;
+static gboolean on_comboboxLanguage_changed(GtkComboBox *combo, gpointer data);
DECLARE(checkSendReferer);
+DECLARE(checkSendDNT);
DECLARE(comboProxyType);
DECLARE(entryProxyHost);
-DECLARE(entryProxyPort);
+DECLARE(spinProxyPort);
DECLARE(entryProxyUser);
DECLARE(entryProxyPassword);
DECLARE(spinMaxFetchers);
DECLARE(spinFetchesPerHost);
DECLARE(spinCachedConnections);
+DECLARE(checkEnableJavascript);
+
DECLARE(checkResampleImages);
DECLARE(spinAnimationSpeed);
-DECLARE(checkDisableAnimations);
+DECLARE(checkEnableAnimations);
-DECLARE(fontSansSerif);
-DECLARE(fontSerif);
-DECLARE(fontMonospace);
-DECLARE(fontCursive);
-DECLARE(fontFantasy);
+//DECLARE(fontSansSerif);
+//DECLARE(fontSerif);
+//DECLARE(fontMonospace);
+//DECLARE(fontCursive);
+//DECLARE(fontFantasy);
DECLARE(comboDefault);
DECLARE(spinDefaultSize);
-DECLARE(spinMinimumSize);
+//DECLARE(spinMinimumSize);
DECLARE(fontPreview);
DECLARE(comboButtonType);
@@ -123,7 +126,7 @@ DECLARE(checkRemoveBackgrounds);
DECLARE(checkFitPage);
DECLARE(checkCompressPDF);
DECLARE(checkPasswordPDF);
-DECLARE(setDefaultExportOptions);
+//DECLARE(setDefaultExportOptions);
/* Used when the feature is not implemented yet */
#define FIND_WIDGET(wname) \
@@ -135,12 +138,22 @@ DECLARE(setDefaultExportOptions);
/* Assigns widget and connects it to its callback function */
#define CONNECT(wname, event) \
+ do { \
+ if ((wname) == NULL) \
+ LOG(("Unable to find widget '%s'!", #wname)); \
+ else \
g_signal_connect(G_OBJECT(wname), event, \
- G_CALLBACK(on_##wname##_changed), NULL)
+ G_CALLBACK(on_##wname##_changed), NULL); \
+ } while (0)
-GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
+/* exported interface documented in gtk/dialogs/options.h */
+GtkDialog*
+nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
{
- GError* error = NULL;
+ GError *error = NULL;
+ GObject *dlgobject;
+ //GSList *group;
+
gladeFile = gtk_builder_new();
if (!gtk_builder_add_from_file(gladeFile, glade_file_location->options, &error)) {
g_warning("Couldn't load builder file: %s", error->message);
@@ -148,18 +161,25 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
return NULL;
}
+
+ dlgobject = gtk_builder_get_object(gladeFile, "dialogPreferences");
+ if (dlgobject == NULL) {
+ LOG(("Unable to get object for preferences dialog"));
+ return NULL;
+ }
+
current_browser = bw;
- wndPreferences = GTK_DIALOG(gtk_builder_get_object(gladeFile, "dlgPreferences"));
+ wndPreferences = GTK_DIALOG(dlgobject);
gtk_window_set_transient_for(GTK_WINDOW(wndPreferences), parent);
+
+ /* set the widgets to reflect the current options */
+ nsgtk_options_load();
FIND_WIDGET(sourceButtonTab);
FIND_WIDGET(sourceButtonWindow);
- GSList *group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(
- sourceButtonWindow));
- gtk_radio_button_set_group(GTK_RADIO_BUTTON(sourceButtonTab), group);
+ //group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(sourceButtonWindow));
+ //gtk_radio_button_set_group(GTK_RADIO_BUTTON(sourceButtonTab), group);
- /* set the widgets to reflect the current options */
- nsgtk_options_load();
/* Connect all widgets to their appropriate callbacks */
CONNECT(entryHomePageURL, "focus-out-event");
@@ -172,33 +192,37 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
CONNECT(spinHistoryAge, "focus-out-event");
CONNECT(checkHoverURLs, "toggled");
- CONNECT(comboLanguage, "changed");
+ CONNECT(comboboxLanguage, "changed");
CONNECT(checkDisplayRecentURLs, "toggled");
CONNECT(checkSendReferer, "toggled");
+ CONNECT(checkSendDNT, "toggled");
CONNECT(checkShowSingleTab, "toggled");
CONNECT(comboProxyType, "changed");
CONNECT(entryProxyHost, "focus-out-event");
- CONNECT(entryProxyPort, "focus-out-event");
+ CONNECT(spinProxyPort, "focus-out-event");
CONNECT(entryProxyUser, "focus-out-event");
CONNECT(entryProxyPassword, "focus-out-event");
CONNECT(spinMaxFetchers, "value-changed");
CONNECT(spinFetchesPerHost, "value-changed");
CONNECT(spinCachedConnections, "value-changed");
+ CONNECT(checkEnableJavascript, "toggled");
+
CONNECT(checkResampleImages, "toggled");
CONNECT(spinAnimationSpeed, "value-changed");
- CONNECT(checkDisableAnimations, "toggled");
+ CONNECT(checkEnableAnimations, "toggled");
- CONNECT(fontSansSerif, "font-set");
+/* CONNECT(fontSansSerif, "font-set");
CONNECT(fontSerif, "font-set");
CONNECT(fontMonospace, "font-set");
CONNECT(fontCursive, "font-set");
CONNECT(fontFantasy, "font-set");
+ CONNECT(spinMinimumSize, "value-changed");
+*/
CONNECT(comboDefault, "changed");
CONNECT(spinDefaultSize, "value-changed");
- CONNECT(spinMinimumSize, "value-changed");
CONNECT(fontPreview, "clicked");
CONNECT(comboButtonType, "changed");
@@ -231,7 +255,7 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
CONNECT(checkFitPage, "toggled");
CONNECT(checkCompressPDF, "toggled");
CONNECT(checkPasswordPDF, "toggled");
- CONNECT(setDefaultExportOptions, "clicked");
+// CONNECT(setDefaultExportOptions, "clicked");
g_signal_connect(G_OBJECT(wndPreferences), "response",
G_CALLBACK (dialog_response_handler), NULL);
@@ -291,53 +315,122 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent)
(widget) = GTK_WIDGET(gtk_builder_get_object(gladeFile, #widget)); \
} while (0)
+static void set_proxy_widgets_sensitivity(int proxyval)
+{
+ switch (proxyval) {
+ case 0: /* no proxy */
+ gtk_widget_set_sensitive(entryProxyHost, FALSE);
+ gtk_widget_set_sensitive(spinProxyPort, FALSE);
+ gtk_widget_set_sensitive(entryProxyUser, FALSE);
+ gtk_widget_set_sensitive(entryProxyPassword, FALSE);
+ break;
+
+ case 1: /* proxy with no auth */
+ gtk_widget_set_sensitive(entryProxyHost, TRUE);
+ gtk_widget_set_sensitive(spinProxyPort, TRUE);
+ gtk_widget_set_sensitive(entryProxyUser, FALSE);
+ gtk_widget_set_sensitive(entryProxyPassword, FALSE);
+ break;
+
+ case 2: /* proxy with basic auth */
+ gtk_widget_set_sensitive(entryProxyHost, TRUE);
+ gtk_widget_set_sensitive(spinProxyPort, TRUE);
+ gtk_widget_set_sensitive(entryProxyUser, TRUE);
+ gtk_widget_set_sensitive(entryProxyPassword, TRUE);
+ break;
+
+ case 3: /* proxy with ntlm auth */
+ gtk_widget_set_sensitive(entryProxyHost, TRUE);
+ gtk_widget_set_sensitive(spinProxyPort, TRUE);
+ gtk_widget_set_sensitive(entryProxyUser, TRUE);
+ gtk_widget_set_sensitive(entryProxyPassword, TRUE);
+ break;
+
+ case 4: /* system proxy */
+ gtk_widget_set_sensitive(entryProxyHost, FALSE);
+ gtk_widget_set_sensitive(spinProxyPort, FALSE);
+ gtk_widget_set_sensitive(entryProxyUser, FALSE);
+ gtk_widget_set_sensitive(entryProxyPassword, FALSE);
+ break;
+
+ }
+}
void nsgtk_options_load(void)
{
- GtkBox *box;
const char *default_accept_language = "en";
const char *default_homepage_url = "";
- const char *default_http_proxy_host = "";
- const char *default_http_proxy_auth_user = "";
- const char *default_http_proxy_auth_pass = "";
- int combo_row_count = 0;
+ const char *default_http_proxy_host;
+ const char *default_http_proxy_auth_user;
+ const char *default_http_proxy_auth_pass;
+
int active_language = 0;
+ GtkListStore *liststore;
+ GtkTreeIter iter;
+
int proxytype = 0;
FILE *fp;
char buf[50];
- /* get widget text */
- if (nsoption_charp(accept_language) != NULL) {
- default_accept_language = nsoption_charp(accept_language);
- }
+ /* Network - HTTP Proxy */
+ default_http_proxy_host = nsoption_charp(http_proxy_host);
+ default_http_proxy_auth_user = nsoption_charp(http_proxy_auth_user);
+ default_http_proxy_auth_pass = nsoption_charp(http_proxy_auth_pass);
- if (nsoption_charp(homepage_url) != NULL) {
- default_homepage_url = nsoption_charp(homepage_url);
+ if (nsoption_bool(http_proxy) == true) {
+ /* proxy type combo box starts with disabled, to allow
+ * for this the http_proxy option needs combining with
+ * the http_proxy_auth option
+ */
+ proxytype = nsoption_int(http_proxy_auth) + 1;
+ if (default_http_proxy_host == NULL) {
+ /* set to use a proxy without a host, turn proxy off */
+ proxytype = 0;
+ } else if (((proxytype == 2) ||
+ (proxytype == 3)) &&
+ ((default_http_proxy_auth_user == NULL) ||
+ (default_http_proxy_auth_pass == NULL))) {
+ /* authentication selected with empty credentials, turn proxy off */
+ proxytype = 0;
+ }
}
- if (nsoption_charp(http_proxy_host) != NULL) {
- default_http_proxy_host = nsoption_charp(http_proxy_host);
+ if (default_http_proxy_host == NULL) {
+ default_http_proxy_host = "";
}
- if (nsoption_charp(http_proxy_auth_user) != NULL) {
- default_http_proxy_auth_user = nsoption_charp(http_proxy_auth_user);
+ if (default_http_proxy_auth_user == NULL) {
+ default_http_proxy_auth_user = "";
}
- if (nsoption_charp(http_proxy_auth_pass) != NULL) {
- default_http_proxy_auth_pass = nsoption_charp(http_proxy_auth_pass);
+ if (default_http_proxy_auth_pass == NULL) {
+ default_http_proxy_auth_pass = "";
}
- if (nsoption_bool(http_proxy) == true) {
- proxytype = nsoption_int(http_proxy_auth) + 1;
- }
+ SET_COMBO(comboProxyType, proxytype);
+ SET_ENTRY(entryProxyHost, default_http_proxy_host);
+ SET_SPIN(spinProxyPort, nsoption_int(http_proxy_port));
+ SET_ENTRY(entryProxyUser, default_http_proxy_auth_user);
+ SET_ENTRY(entryProxyPassword, default_http_proxy_auth_pass);
- /* Create combobox */
- box = GTK_BOX(gtk_builder_get_object(gladeFile, "combolanguagevbox"));
- comboLanguage = nsgtk_combo_box_text_new();
+ set_proxy_widgets_sensitivity(proxytype);
- /* Populate combobox from languages file */
- if ((languages_file_location != NULL) &&
+
+ /* accept language selection */
+ if (nsoption_charp(accept_language) != NULL) {
+ default_accept_language = nsoption_charp(accept_language);
+ }
+
+ /* Fill content language list store */
+ liststore = GTK_LIST_STORE(gtk_builder_get_object(gladeFile, "liststore_content_language"));
+ if ((liststore != NULL) &&
+ (languages_file_location != NULL) &&
((fp = fopen(languages_file_location, "r")) != NULL)) {
+ int combo_row_count = 0;
+
+ gtk_list_store_clear(liststore);
+ active_language = -1;
+
LOG(("Used %s for languages", languages_file_location));
while (fgets(buf, sizeof(buf), fp)) {
/* Ignore blank lines */
@@ -347,34 +440,44 @@ void nsgtk_options_load(void)
/* Remove trailing \n */
buf[strlen(buf) - 1] = '\0';
- nsgtk_combo_box_text_append_text(comboLanguage, buf);
+ gtk_list_store_append(liststore, &iter);
+ gtk_list_store_set(liststore, &iter, 0, buf, -1 );
- if (strcmp(buf, default_accept_language) == 0)
+ if (strcmp(buf, default_accept_language) == 0) {
active_language = combo_row_count;
+ }
combo_row_count++;
}
- fclose(fp);
+ if (active_language == -1) {
+ /* configured language was not in list, add it */
+ gtk_list_store_append(liststore, &iter);
+ gtk_list_store_set(liststore, &iter, 0, default_accept_language, -1 );
+ active_language = combo_row_count;
+
+ }
+
+ fclose(fp);
} else {
LOG(("Failed opening languages file"));
- warn_user("FileError", languages_file_location);
- nsgtk_combo_box_text_append_text(comboLanguage, "en");
}
+ SET_COMBO(comboboxLanguage, active_language);
- gtk_combo_box_set_active(GTK_COMBO_BOX(comboLanguage), active_language);
- /** \todo localisation */
- gtk_widget_set_tooltip_text(GTK_WIDGET(comboLanguage),
- "set preferred language for web pages");
- gtk_box_pack_start(box, comboLanguage, FALSE, FALSE, 0);
- gtk_widget_show(comboLanguage);
-
- nsgtk_options_theme_combo();
+
+ /* Startup */
+ if (nsoption_charp(homepage_url) != NULL) {
+ default_homepage_url = nsoption_charp(homepage_url);
+ }
SET_ENTRY(entryHomePageURL, default_homepage_url);
SET_BUTTON(setCurrentPage);
SET_BUTTON(setDefaultPage);
+
+ /* Theme */
+ nsgtk_options_theme_combo();
+
SET_CHECK(checkHideAdverts, nsoption_bool(block_ads));
SET_CHECK(checkDisablePopups, nsoption_bool(disable_popups));
@@ -384,42 +487,28 @@ void nsgtk_options_load(void)
SET_CHECK(checkDisplayRecentURLs, nsoption_bool(url_suggestion));
SET_CHECK(checkSendReferer, nsoption_bool(send_referer));
+ SET_CHECK(checkSendDNT, nsoption_bool(do_not_track));
SET_CHECK(checkShowSingleTab, nsoption_bool(show_single_tab));
- SET_COMBO(comboProxyType, proxytype);
- SET_ENTRY(entryProxyHost, default_http_proxy_host);
-
- gtk_widget_set_sensitive(entryProxyHost, proxytype != 0);
-
- snprintf(buf, sizeof(buf), "%d", nsoption_int(http_proxy_port));
-
- SET_ENTRY(entryProxyPort, buf);
- gtk_widget_set_sensitive(entryProxyPort, proxytype != 0);
-
- SET_ENTRY(entryProxyUser, default_http_proxy_auth_user);
-
- gtk_widget_set_sensitive(entryProxyUser, proxytype != 0);
-
- SET_ENTRY(entryProxyPassword, default_http_proxy_auth_pass);
-
- gtk_widget_set_sensitive(entryProxyPassword, proxytype != 0);
-
SET_SPIN(spinMaxFetchers, nsoption_int(max_fetchers));
SET_SPIN(spinFetchesPerHost, nsoption_int(max_fetchers_per_host));
SET_SPIN(spinCachedConnections, nsoption_int(max_cached_fetch_handles));
+ SET_CHECK(checkEnableJavascript, nsoption_bool(enable_javascript));
+
SET_CHECK(checkResampleImages, nsoption_bool(render_resample));
SET_SPIN(spinAnimationSpeed, nsoption_int(minimum_gif_delay) / 100.0);
- SET_CHECK(checkDisableAnimations, !nsoption_bool(animate_images));
+ SET_CHECK(checkEnableAnimations, nsoption_bool(animate_images));
- SET_FONT(fontSansSerif, nsoption_charp(font_sans));
+/* SET_FONT(fontSansSerif, nsoption_charp(font_sans));
SET_FONT(fontSerif, nsoption_charp(font_serif));
SET_FONT(fontMonospace, nsoption_charp(font_mono));
SET_FONT(fontCursive, nsoption_charp(font_cursive));
SET_FONT(fontFantasy, nsoption_charp(font_fantasy));
+ SET_SPIN(spinMinimumSize, nsoption_bool(font_min_size) / 10);
+*/
SET_COMBO(comboDefault, nsoption_int(font_default));
SET_SPIN(spinDefaultSize, nsoption_int(font_size) / 10);
- SET_SPIN(spinMinimumSize, nsoption_bool(font_min_size) / 10);
SET_BUTTON(fontPreview);
SET_COMBO(comboButtonType, nsoption_int(button_type) -1);
@@ -451,16 +540,12 @@ void nsgtk_options_load(void)
SET_CHECK(checkFitPage, nsoption_bool(enable_loosening));
SET_CHECK(checkCompressPDF, nsoption_bool(enable_PDF_compression));
SET_CHECK(checkPasswordPDF, nsoption_bool(enable_PDF_password));
- SET_BUTTON(setDefaultExportOptions);
+// SET_BUTTON(setDefaultExportOptions);
}
-static void dialog_response_handler (GtkDialog *dlg, gint res_id)
+static void dialog_response_handler(GtkDialog *dlg, gint res_id)
{
switch (res_id) {
- case GTK_RESPONSE_HELP:
- /* Ready to implement Help */
- break;
-
case GTK_RESPONSE_CLOSE:
on_dialog_close(dlg, TRUE);
}
@@ -572,18 +657,28 @@ static gboolean on_##widget##_changed(GtkWidget *widget, gpointer data) \
return FALSE; \
}
-static gboolean on_comboLanguage_changed(GtkWidget *widget, gpointer data)
+static gboolean on_comboboxLanguage_changed(GtkComboBox *combo, gpointer data)
{
- gchar *lang;
-
- lang = nsgtk_combo_box_text_get_active_text(comboLanguage);
- if (lang == NULL)
- return FALSE;
+ gchar *lang = NULL;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+
+ /* Obtain currently selected item from combo box.
+ * If nothing is selected, do nothing.
+ */
+ if (gtk_combo_box_get_active_iter(combo, &iter)) {
+ /* Obtain data model from combo box. */
+ model = gtk_combo_box_get_model(combo);
+
+ /* Obtain string from model. */
+ gtk_tree_model_get(model, &iter, 0, &lang, -1);
+ }
- nsoption_set_charp(accept_language, strdup(lang));
+ if (lang != NULL) {
+ nsoption_set_charp(accept_language, strdup(lang));
+ g_free(lang);
+ }
- g_free(lang);
-
return FALSE;
}
@@ -621,6 +716,11 @@ CHECK_CHANGED(checkSendReferer, send_referer)
{
}
END_HANDLER
+
+CHECK_CHANGED(checkSendDNT, do_not_track)
+{
+}
+END_HANDLER
CHECK_CHANGED(checkShowSingleTab, show_single_tab)
{
@@ -628,54 +728,48 @@ CHECK_CHANGED(checkShowSingleTab, show_single_tab)
}
END_HANDLER
+
COMBO_CHANGED(comboProxyType, http_proxy_auth)
{
LOG(("proxy auth: %d", nsoption_int(http_proxy_auth)));
+
+ set_proxy_widgets_sensitivity(nsoption_int(http_proxy_auth));
switch (nsoption_int(http_proxy_auth)) {
- case 0:
+ case 0: /* no proxy */
nsoption_set_bool(http_proxy, false);
nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE);
break;
- case 1:
+
+ case 1: /* proxy with no auth */
nsoption_set_bool(http_proxy, true);
nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE);
break;
- case 2:
+
+ case 2: /* proxy with basic auth */
nsoption_set_bool(http_proxy, true);
nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_BASIC);
break;
- case 3:
+
+ case 3: /* proxy with ntlm auth */
nsoption_set_bool(http_proxy, true);
nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NTLM);
break;
+
+ case 4: /* system proxy */
+ nsoption_set_bool(http_proxy, true);
+ nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE);
+ break;
+
}
- gboolean sensitive = (!proxy_type == 0);
- gtk_widget_set_sensitive(entryProxyHost, sensitive);
- gtk_widget_set_sensitive(entryProxyPort, sensitive);
- gtk_widget_set_sensitive(entryProxyUser, sensitive);
- gtk_widget_set_sensitive(entryProxyPassword, sensitive);
}
END_HANDLER
ENTRY_CHANGED(entryProxyHost, http_proxy_host)
-gboolean on_entryProxyPort_changed(GtkWidget *widget, gpointer data)
+SPIN_CHANGED(spinProxyPort, http_proxy_port)
{
- long port;
-
- errno = 0;
- port = strtol((char *)gtk_entry_get_text(GTK_ENTRY(entryProxyPort)),
- NULL, 10) & 0xffff;
- if ((port != 0) && (errno == 0)) {
- nsoption_set_int(http_proxy_port, port);
- } else {
- char buf[32];
- snprintf(buf, sizeof(buf), "%d", nsoption_int(http_proxy_port));
- SET_ENTRY(entryProxyPort, buf);
- }
-
- return FALSE;
}
+END_HANDLER
ENTRY_CHANGED(entryProxyUser, http_proxy_auth_user)
@@ -709,9 +803,13 @@ static gboolean on_spinAnimationSpeed_changed(GtkWidget *widget, gpointer data)
return FALSE;
}
-CHECK_CHANGED(checkDisableAnimations, animate_images)
+CHECK_CHANGED(checkEnableAnimations, animate_images)
+{
+}
+END_HANDLER
+
+CHECK_CHANGED(checkEnableJavascript, enable_javascript)
{
- nsoption_set_bool(animate_images, !nsoption_bool(animate_images));
}
END_HANDLER
@@ -734,7 +832,7 @@ CHECK_CHANGED(checkHoverURLs, hover_urls)
{
}
END_HANDLER
-
+/*
FONT_CHANGED(fontSansSerif, font_sans)
{
}
@@ -759,7 +857,7 @@ FONT_CHANGED(fontFantasy, font_fantasy)
{
}
END_HANDLER
-
+*/
COMBO_CHANGED(comboDefault, font_default)
{
}
@@ -771,12 +869,12 @@ SPIN_CHANGED(spinDefaultSize, font_size)
}
END_HANDLER
-SPIN_CHANGED(spinMinimumSize, font_min_size)
+/*SPIN_CHANGED(spinMinimumSize, font_min_size)
{
nsoption_set_int(font_min_size, nsoption_int(font_min_size) * 10);
}
END_HANDLER
-
+*/
BUTTON_CLICKED(fontPreview)
{
nsgtk_reflow_all_windows();
@@ -1057,6 +1155,7 @@ CHECK_CHANGED(checkPasswordPDF, enable_PDF_password)
}
END_HANDLER
+/*
BUTTON_CLICKED(setDefaultExportOptions)
{
nsoption_set_int(margin_top, DEFAULT_MARGIN_TOP_MM);
@@ -1082,3 +1181,4 @@ BUTTON_CLICKED(setDefaultExportOptions)
SET_CHECK(checkFitPage, nsoption_bool(enable_loosening));
}
END_HANDLER
+*/
diff --git a/gtk/res/options.gtk2.ui b/gtk/res/options.gtk2.ui
index 0f50ecc..5dd7930 100644
--- a/gtk/res/options.gtk2.ui
+++ b/gtk/res/options.gtk2.ui
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 2.12 -->
- <!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkDialog" id="dlgPreferences">
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkDialog" id="dialogPreferences">
<property name="border_width">5</property>
<property name="title" translatable="yes">Netsurf Preferences</property>
<property name="window_position">center-on-parent</property>
@@ -10,42 +10,43 @@
<property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox6">
+ <object class="GtkVBox" id="vbox_dialog">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <object class="GtkNotebook" id="notebook2">
+ <object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="border_width">4</property>
<child>
- <object class="GtkVBox" id="vbox_general">
+ <object class="GtkVBox" id="vbox_main">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame14">
+ <object class="GtkFrame" id="frame_main_startup">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment18">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox16">
+ <object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="spacing">5</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label64">
+ <object class="GtkLabel" id="label_startup_page">
<property name="visible">True</property>
- <property name="label" translatable="yes">URL</property>
+ <property name="label" translatable="yes">Page:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -60,6 +61,7 @@
<property name="invisible_char">●</property>
</object>
<packing>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -69,38 +71,42 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
- <property name="spacing">5</property>
+ <property name="spacing">6</property>
+ <child>
+ <placeholder/>
+ </child>
<child>
<object class="GtkButton" id="setCurrentPage">
- <property name="label" translatable="yes">Current Page</property>
+ <property name="label" translatable="yes">Use Current Page</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="receives_default">True</property>
</object>
<packing>
- <property name="padding">5</property>
- <property name="position">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="setDefaultPage">
- <property name="label" translatable="yes">Default Page</property>
+ <property name="label" translatable="yes">Use Default Page</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="receives_default">True</property>
</object>
<packing>
- <property name="padding">5</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -109,44 +115,55 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label65">
+ <object class="GtkLabel" id="label_main_startup">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Home page</b></property>
+ <property name="label" translatable="yes"><b>Startup</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox6">
+ <object class="GtkFrame" id="frame_main_search">
<property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkFrame" id="frame15">
+ <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkAlignment" id="alignment19">
+ <object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
- <property name="left_padding">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="checkUrlSearch">
+ <property name="label" translatable="yes">Search from URL bar</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
- <object class="GtkVBox" id="vbox17">
+ <object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkCheckButton" id="checkHideAdverts">
- <property name="label" translatable="yes">Hide advertisements</property>
+ <object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="label" translatable="yes">Provider:</property>
</object>
<packing>
<property name="expand">False</property>
@@ -155,186 +172,112 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkDisablePopups">
- <property name="label" translatable="yes">Disable pop-up windows</property>
+ <object class="GtkComboBox" id="comboSearch">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="model">liststore_search_provider</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="checkDisablePlugins">
- <property name="label" translatable="yes">Disable plug-ins</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
</child>
- <child type="label">
- <object class="GtkLabel" id="label66">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Content blocking</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
</child>
- <child>
- <object class="GtkFrame" id="frame7">
+ <child type="label">
+ <object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hbox8">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkVBox" id="combolanguagevbox">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Content Language</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
+ <property name="label" translatable="yes"><b>Search</b></property>
+ <property name="use_markup">True</property>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame16">
+ <object class="GtkFrame" id="frame_main_downloads">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment20">
+ <object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox18">
+ <object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
- <property name="border_width">1</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox17">
+ <object class="GtkCheckButton" id="checkClearDownloads">
+ <property name="label" translatable="yes">Remove download from list when complete</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkRequestOverwrite">
+ <property name="label" translatable="yes">Confirm before overwriting files</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
- <property name="border_width">4</property>
- <property name="spacing">4</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="label67">
+ <object class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="label" translatable="yes">Keep history for</property>
+ <property name="label" translatable="yes">Location:</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinHistoryAge">
+ <object class="GtkFileChooserButton" id="fileChooserDownloads">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
+ <property name="action">select-folder</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label68">
- <property name="visible">True</property>
- <property name="label" translatable="yes">days</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkHoverURLs">
- <property name="label" translatable="yes">Hover URLs by pointer in local history</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -342,62 +285,63 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label69">
+ <object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>History</b></property>
+ <property name="label" translatable="yes"><b>Downloads</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="padding">6</property>
<property name="position">2</property>
</packing>
</child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Main</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox_appearance">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame17">
+ <object class="GtkFrame" id="frame_appearance_theme">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment21">
+ <object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox19">
+ <object class="GtkHBox" id="themehbox">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkCheckButton" id="checkDisplayRecentURLs">
- <property name="label" translatable="yes">Display recently visited URLs as you type</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
<child>
- <object class="GtkCheckButton" id="checkSendReferer">
- <property name="label" translatable="yes">Send site referral information</property>
+ <object class="GtkButton" id="buttonaddtheme">
+ <property name="label" translatable="yes">Add Theme...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -406,182 +350,104 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label70">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Misc</b></property>
+ <property name="label" translatable="yes"><b>Themes</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">3</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
</packing>
</child>
- </object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label71">
- <property name="visible">True</property>
- <property name="label" translatable="yes">General</property>
- </object>
- <packing>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_network">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkFrame" id="frame18">
+ <object class="GtkFrame" id="frame_appearance_tabs">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment22">
+ <object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table7">
+ <object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkEntry" id="entryProxyUser">
+ <object class="GtkCheckButton" id="checkShowSingleTab">
+ <property name="label" translatable="yes">Always show tab bar</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="comboProxyType">
+ <object class="GtkCheckButton" id="checkFocusNew">
+ <property name="label" translatable="yes">Switch to newly opened tabs immediately</property>
<property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox18">
+ <object class="GtkCheckButton" id="checkNewBlank">
+ <property name="label" translatable="yes">Newly opened tabs are blank</property>
<property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkEntry" id="entryProxyHost">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label72">
+ <object class="GtkLabel" id="label9">
<property name="visible">True</property>
- <property name="label" translatable="yes">:</property>
+ <property name="label" translatable="yes">Position:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="entryProxyPort">
- <property name="width_request">64</property>
+ <object class="GtkComboBox" id="comboTabPosition">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="model">liststore_tab_position</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entryProxyPassword">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- <property name="invisible_char">●</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label75">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Host</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label76">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Proxy type</property>
- </object>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label74">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Username</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label73">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Password</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -589,179 +455,121 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label77">
+ <object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>HTTP Proxy</b></property>
+ <property name="label" translatable="yes"><b>Tabs</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame19">
+ <object class="GtkFrame" id="frame_appearance_source">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment23">
+ <object class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table8">
+ <object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="border_width">3</property>
- <property name="n_rows">3</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
- <child>
- <object class="GtkSpinButton" id="spinMaxFetchers">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinFetchesPerHost">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinCachedConnections">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label78">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Maximum fetchers</property>
- </object>
- <packing>
- <property name="y_options"></property>
- </packing>
- </child>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label79">
+ <object class="GtkLabel" id="label13">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Fetches per host</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Open source view in new:</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label80">
+ <object class="GtkHBox" id="hbox6">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Cached connections</property>
+ <child>
+ <object class="GtkRadioButton" id="sourceButtonWindow">
+ <property name="label" translatable="yes">window</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0.54000002145767212</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">sourceButtonTab</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="sourceButtonTab">
+ <property name="label" translatable="yes">tab</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
+ <property name="position">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label81">
+ <object class="GtkLabel" id="label12">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Fetching</b></property>
+ <property name="label" translatable="yes"><b>Source</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">1</property>
+ <property name="padding">6</property>
+ <property name="position">2</property>
</packing>
</child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label82">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Network</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_rendering">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkFrame" id="frame20">
+ <object class="GtkFrame" id="frame_appearance_url">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment24">
+ <object class="GtkAlignment" id="alignment8">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkResampleImages">
- <property name="label" translatable="yes">Resample images when not at natural size</property>
+ <object class="GtkCheckButton" id="checkDisplayRecentURLs">
+ <property name="label" translatable="yes">Display recently visited URLs as you type</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -773,313 +581,223 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label83">
+ <object class="GtkLabel" id="label14">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Quality</b></property>
+ <property name="label" translatable="yes"><b>URLbar</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
+ <property name="padding">7</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame21">
+ <object class="GtkFrame" id="frame_appearance_toolbar">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment25">
+ <object class="GtkAlignment" id="alignment9">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox23">
+ <object class="GtkVBox" id="vbox8">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox19">
+ <object class="GtkHBox" id="hbox7">
<property name="visible">True</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label84">
+ <object class="GtkLabel" id="label16">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Limit speed to</property>
+ <property name="label" translatable="yes">Buttons:</property>
</object>
<packing>
+ <property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinAnimationSpeed">
+ <object class="GtkComboBox" id="comboButtonType">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- <property name="update_policy">if-valid</property>
+ <property name="model">liststore_toolbar_buttontype</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext3"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
</object>
<packing>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label85">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">seconds between frames</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="checkDisableAnimations">
- <property name="label" translatable="yes">Disable animations</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label86">
+ <object class="GtkLabel" id="label15">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Animations</b></property>
+ <property name="label" translatable="yes"><b>Toolbar</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="padding">6</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label87">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="label" translatable="yes">Rendering</property>
+ <property name="label" translatable="yes">Appearance</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_style">
+ <object class="GtkVBox" id="vbox_content">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame22">
+ <object class="GtkFrame" id="frame_content_control">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment26">
+ <object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table9">
+ <object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
- <property name="border_width">2</property>
- <property name="n_rows">6</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFontButton" id="fontSansSerif">
+ <object class="GtkCheckButton" id="checkDisablePopups">
+ <property name="label" translatable="yes">Prevent pop-up windows</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label88">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Sans-serif</property>
- </object>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label89">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Serif</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label90">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Monospace</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label91">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Cursive</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label92">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Fantasy</property>
- </object>
- <packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label93">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Default</property>
- </object>
- <packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkFontButton" id="fontSerif">
+ <object class="GtkCheckButton" id="checkHideAdverts">
+ <property name="label" translatable="yes">Hide Adverts</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFontButton" id="fontMonospace">
+ <object class="GtkCheckButton" id="checkEnableJavascript">
+ <property name="label" translatable="yes">Enable JavaScript</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkFontButton" id="fontCursive">
+ <object class="GtkCheckButton" id="checkDisablePlugins">
+ <property name="label" translatable="yes">Disable plug-ins</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkFontButton" id="fontFantasy">
+ <object class="GtkCheckButton" id="checkResampleImages">
+ <property name="label" translatable="yes">High quality image scaling</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="show_style">False</property>
- <property name="show_size">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">4</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="comboDefault">
+ <object class="GtkHBox" id="hbox8">
<property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Load and display</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="comboboxLoadImages">
+ <property name="visible">True</property>
+ <property name="model">liststore_image_loading</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext4"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">5</property>
</packing>
</child>
</object>
@@ -1087,153 +805,82 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label94">
+ <object class="GtkLabel" id="label11">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Font faces</b></property>
+ <property name="label" translatable="yes"><b>Control</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame23">
+ <object class="GtkFrame" id="frame_content_animation">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment27">
+ <object class="GtkAlignment" id="alignment10">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table10">
+ <object class="GtkVBox" id="vbox9">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">4</property>
- <property name="column_spacing">3</property>
- <property name="row_spacing">3</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkButton" id="fontPreview">
+ <object class="GtkCheckButton" id="checkEnableAnimations">
+ <property name="label" translatable="yes">Enable</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <child>
- <object class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="border_width">2</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-apply</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Preview</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- <property name="x_padding">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinDefaultSize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinMinimumSize">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label97">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">pt</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label98">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">pt</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label96">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Minimum</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label95">
+ <object class="GtkHBox" id="hbox9">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Default</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Minimum time between frames:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinAnimationSpeed">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Do not update animations any more often than this.</property>
+ <property name="invisible_char">●</property>
+ <property name="adjustment">adjustment_animation_time</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">if-valid</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -1241,53 +888,118 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label99">
+ <object class="GtkLabel" id="label18">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Font size</b></property>
+ <property name="label" translatable="yes"><b>Animation</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame6">
+ <object class="GtkFrame" id="frame_content_fonts">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment6">
+ <object class="GtkAlignment" id="alignment14">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkTable" id="table3">
+ <object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">3</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkComboBox" id="comboButtonType">
+ <object class="GtkHBox" id="hbox12">
<property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Default</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="comboDefault">
+ <property name="visible">True</property>
+ <property name="model">liststore_defaultfont</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext5"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox13">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Size</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinDefaultSize">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">The base-line font size to use.</property>
+ <property name="max_length">3</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_font_default_size</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label19">
+ <object class="GtkButton" id="fontPreview">
+ <property name="label" translatable="yes">_Preview</property>
<property name="visible">True</property>
- <property name="label" translatable="yes">Toolbar buttons</property>
- <property name="justify">right</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image1</property>
+ <property name="use_underline">True</property>
</object>
<packing>
- <property name="x_options"></property>
- <property name="y_options">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -1295,157 +1007,355 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label18">
+ <object class="GtkLabel" id="label20">
<property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes"><b>Icons</b></property>
+ <property name="label" translatable="yes"><b>Fonts</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
+ <property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkFrame" id="frame_content_font">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment11">
+ <property name="visible">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox10">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Preferred language:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="comboboxLanguage">
+ <property name="visible">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">set preferred language for web pages</property>
+ <property name="model">liststore_content_language</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext7">
+ <property name="xalign">0</property>
+ </object>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext8">
+ <property name="xalign">1</property>
+ </object>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Language</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label100">
+ <object class="GtkLabel" id="label10">
<property name="visible">True</property>
- <property name="label" translatable="yes">Style</property>
+ <property name="label" translatable="yes">Content</property>
</object>
<packing>
- <property name="position">3</property>
+ <property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox_cache">
+ <object class="GtkVBox" id="vbox_privacy">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame24">
+ <object class="GtkFrame" id="frame_privacy_history">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment28">
+ <object class="GtkAlignment" id="alignment12">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkHBox" id="hbox20">
+ <object class="GtkVBox" id="vbox11">
<property name="visible">True</property>
- <property name="border_width">2</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label101">
+ <object class="GtkCheckButton" id="checkHoverURLs">
+ <property name="label" translatable="yes">Local history shows URL in tooltip</property>
<property name="visible">True</property>
- <property name="label" translatable="yes">Size</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinMemoryCacheSize">
+ <object class="GtkHBox" id="hbox14">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Remember browsing history for up to</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinHistoryAge">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">4</property>
+ <property name="adjustment">adjustment_history_age</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label29">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">days</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label102">
- <property name="visible">True</property>
- <property name="label" translatable="yes">MB</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label103">
+ <object class="GtkLabel" id="label23">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Memory cache</b></property>
+ <property name="label" translatable="yes"><b>History</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame25">
+ <object class="GtkFrame" id="frame_privacy_cache">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment29">
+ <object class="GtkAlignment" id="alignment13">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox26">
+ <object class="GtkVBox" id="vbox12">
<property name="visible">True</property>
<property name="orientation">vertical</property>
- <property name="spacing">5</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox21">
+ <object class="GtkTable" id="table3">
<property name="visible">True</property>
- <property name="spacing">3</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
<child>
- <object class="GtkLabel" id="label104">
+ <object class="GtkLabel" id="label30">
<property name="visible">True</property>
- <property name="label" translatable="yes">Duration</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Memory cache size</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label31">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Disc cache size</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label34">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Expire cache entries after</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMemoryCacheSize">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="adjustment">adjustment_cache_memory_size</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinDiscCacheSize">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="adjustment">adjustment_cache_disc_size</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spinDiscCacheAge">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_disc_cache_age</property>
<property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">MB</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label105">
+ <object class="GtkLabel" id="label33">
<property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">MB</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label35">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">days</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -1454,69 +1364,25 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox22">
+ <object class="GtkHBox" id="hbox17">
<property name="visible">True</property>
- <property name="border_width">4</property>
- <property name="spacing">4</property>
<child>
<placeholder/>
</child>
<child>
- <object class="GtkButton" id="button4">
+ <object class="GtkButton" id="buttonCacheMaintinance">
+ <property name="label" translatable="yes">Maintinance</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <child>
- <object class="GtkAlignment" id="alignment30">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox23">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image399">
- <property name="visible">True</property>
- <property name="stock">gtk-delete</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label106">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="label" translatable="yes">Perform maintainance</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
+ <property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -1525,59 +1391,41 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label107">
+ <object class="GtkLabel" id="label24">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Disc cache</b></property>
+ <property name="label" translatable="yes"><b>Cache</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
+ <property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
- </object>
- <packing>
- <property name="position">4</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label108">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Cache</property>
- </object>
- <packing>
- <property name="position">4</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_advanced">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
- <object class="GtkFrame" id="frame_downloads">
+ <object class="GtkFrame" id="frame_privacy_general">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment1">
+ <object class="GtkAlignment" id="alignment20">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkVBox" id="vbox15">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkClearDownloads">
- <property name="label" translatable="yes">Automatically clear downloads when completed</property>
+ <object class="GtkCheckButton" id="checkSendReferer">
+ <property name="label" translatable="yes">Enable referral submission</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -1585,211 +1433,217 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkRequestOverwrite">
- <property name="label" translatable="yes">Request confirmation before overwriting files</property>
+ <object class="GtkCheckButton" id="checkSendDNT">
+ <property name="label" translatable="yes">Enable sending "Do Not Track" request</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="xpad">2</property>
- <property name="label" translatable="yes">Download directory</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">2</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFileChooserButton" id="fileChooserDownloads">
- <property name="visible">True</property>
- <property name="action">select-folder</property>
- <property name="show_hidden">True</property>
- <property name="width_chars">25</property>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label3">
+ <object class="GtkLabel" id="label61">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Downloads</b></property>
+ <property name="label" translatable="yes"><b>General</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
+ <property name="position">2</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Privacy</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox_network">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame_tabs">
+ <object class="GtkFrame" id="frame_network_proxy">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment8">
+ <object class="GtkAlignment" id="alignment15">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="advanced_tabs_vbox">
+ <object class="GtkTable" id="table2">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkShowSingleTab">
- <property name="label" translatable="yes">Show tab bar with only one tab</property>
+ <object class="GtkLabel" id="label42">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Proxy type</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkFocusNew">
- <property name="label" translatable="yes">Shift focus to new tab</property>
+ <object class="GtkLabel" id="label43">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Host</property>
</object>
<packing>
- <property name="position">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkNewBlank">
- <property name="label" translatable="yes">Open blank window</property>
+ <object class="GtkLabel" id="label44">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Username</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox10">
+ <object class="GtkLabel" id="label45">
<property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="comboProxyType">
+ <property name="visible">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">The type of HTTP proxy server.</property>
+ <property name="model">liststore_proxy_type</property>
<child>
- <object class="GtkLabel" id="label26">
+ <object class="GtkCellRendererText" id="cellrenderertext6"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox19">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="entryProxyHost">
<property name="visible">True</property>
- <property name="xalign">0.4699999988079071</property>
- <property name="xpad">2</property>
- <property name="label" translatable="yes">Tabs position</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Host name of your proxy server.</property>
+ <property name="invisible_char">●</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="comboTabPosition">
+ <object class="GtkLabel" id="label46">
<property name="visible">True</property>
+ <property name="label" translatable="yes">:</property>
</object>
<packing>
+ <property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkSpinButton" id="spinProxyPort">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Port number to connect to on proxy server.</property>
+ <property name="max_length">5</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="adjustment">adjustment_proxy_port</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">if-valid</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="position">3</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Tabs</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame_view_source">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment10">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hbox11">
- <property name="visible">True</property>
<child>
- <object class="GtkRadioButton" id="sourceButtonWindow">
- <property name="label" translatable="yes">in own window </property>
+ <object class="GtkEntry" id="entryProxyUser">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Username to access the proxy</property>
+ <property name="invisible_char">●</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="sourceButtonTab">
- <property name="label" translatable="yes">in new tab</property>
+ <object class="GtkEntry" id="entryProxyPassword">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Password to access the proxy</property>
+ <property name="invisible_char">●</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
</object>
@@ -1797,320 +1651,127 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label24">
+ <object class="GtkLabel" id="label37">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>View Source</b></property>
+ <property name="label" translatable="yes"><b>HTTP Proxy</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame_search">
+ <object class="GtkFrame" id="frame_network_fetching">
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment9">
+ <object class="GtkAlignment" id="alignment16">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkHBox" id="hbox9">
+ <object class="GtkTable" id="table1">
<property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkUrlSearch">
- <property name="label" translatable="yes">Search from URL bar </property>
+ <object class="GtkLabel" id="label39">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Maximum fetchers</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="position">0</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label23">
+ <object class="GtkLabel" id="label40">
<property name="visible">True</property>
- <property name="label" translatable="yes">Default provider</property>
- <property name="justify">right</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Fetches per host</property>
</object>
<packing>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="comboSearch">
+ <object class="GtkLabel" id="label41">
<property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Cached connections</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Search</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame_select_themes">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment11">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="themehbox">
- <property name="visible">True</property>
- <child>
- <placeholder/>
- </child>
<child>
- <object class="GtkButton" id="buttonaddtheme">
- <property name="label" translatable="yes">Add theme…</property>
+ <object class="GtkSpinButton" id="spinMaxFetchers">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Maximum number of concurrent items to fetch at once.</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_fetching_max</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label25">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Select themes</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">4</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">5</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label109">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Advanced</property>
- </object>
- <packing>
- <property name="position">5</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox_export">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">True</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkSpinButton" id="spinFetchesPerHost">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">4</property>
- <property name="row_spacing">5</property>
- <child>
- <object class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">mm</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">mm</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinMarginBottom">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinMarginTop">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Bottom</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Top</property>
- </object>
- </child>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Maximum number of item fetches per web server.</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_fetching_perhost</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkTable" id="table2">
+ <object class="GtkSpinButton" id="spinCachedConnections">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">4</property>
- <property name="row_spacing">5</property>
- <child>
- <object class="GtkLabel" id="label12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">mm</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">mm</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinMarginRight">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkSpinButton" id="spinMarginLeft">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Right</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Left</property>
- </object>
- </child>
+ <property name="can_focus">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Number of connections to keep in case they are needed again.</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">3</property>
+ <property name="adjustment">adjustment_fetching_cached</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -2118,174 +1779,414 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="frame">
+ <object class="GtkLabel" id="label38">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Margins</b></property>
+ <property name="label" translatable="yes"><b>Fetching</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="position">0</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label36">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Network</property>
+ </object>
+ <packing>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox_pdfexport">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkFrame" id="frame3">
+ <object class="GtkFrame" id="frame_pdfexport_appearance">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment3">
+ <object class="GtkAlignment" id="alignment17">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkHBox" id="hbox5">
+ <object class="GtkVBox" id="vbox13">
<property name="visible">True</property>
- <property name="spacing">4</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label14">
+ <object class="GtkCheckButton" id="checkSuppressImages">
+ <property name="label" translatable="yes">No images in output</property>
<property name="visible">True</property>
- <property name="label" translatable="yes">Scale</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="spinExportScale">
+ <object class="GtkCheckButton" id="checkRemoveBackgrounds">
+ <property name="label" translatable="yes">No background images in output</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment"></property>
- <property name="climb_rate">1</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label15">
+ <object class="GtkCheckButton" id="checkFitPage">
+ <property name="label" translatable="yes">Scale output to fit page</property>
<property name="visible">True</property>
- <property name="label" translatable="yes">%</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
- <property name="expand">False</property>
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkHBox" id="hbox15">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label59">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Scale output</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinExportScale">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">4</property>
+ <property name="xalign">1</property>
+ <property name="adjustment">adjustment_pdf_scale</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label60">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">%</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label13">
+ <object class="GtkLabel" id="label48">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Scaling</b></property>
+ <property name="label" translatable="yes"><b>Appearance</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="padding">6</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame4">
+ <object class="GtkFrame" id="frame_pdfexport_margins">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment4">
+ <object class="GtkAlignment" id="alignment18">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox6">
+ <object class="GtkVBox" id="vbox16">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkSuppressImages">
- <property name="label" translatable="yes">Suppress images</property>
+ <object class="GtkHBox" id="hbox22">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <child>
+ <object class="GtkLabel" id="label62">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">measurements in mm</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkRemoveBackgrounds">
- <property name="label" translatable="yes">Remove backgrounds</property>
+ <object class="GtkTable" id="table4">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <child>
+ <object class="GtkHBox" id="hbox16">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label51">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Top</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMarginTop">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="xalign">1</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox18">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label52">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Left</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMarginLeft">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="xalign">1</property>
+ <property name="adjustment">adjustment_pdf_lmargin</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox20">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label53">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Bottom</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMarginBottom">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="xalign">1</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHBox" id="hbox21">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label54">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Right</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="spinMarginRight">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">4</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">5</property>
+ <property name="xalign">1</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_EXPAND</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="checkFitPage">
- <property name="label" translatable="yes">Fit page</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label16">
+ <object class="GtkLabel" id="label49">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Appearance</b></property>
+ <property name="label" translatable="yes"><b>Margins</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="expand">False</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame5">
+ <object class="GtkFrame" id="frame_pdfexport_generation">
<property name="visible">True</property>
- <property name="border_width">5</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="alignment5">
+ <object class="GtkAlignment" id="alignment19">
<property name="visible">True</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
+ <property name="right_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox7">
+ <object class="GtkVBox" id="vbox14">
<property name="visible">True</property>
<property name="orientation">vertical</property>
+ <property name="spacing">7</property>
<child>
<object class="GtkCheckButton" id="checkCompressPDF">
- <property name="label" translatable="yes">Compress PDF</property>
+ <property name="label" translatable="yes">Output is compressed</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -2294,11 +2195,10 @@
</child>
<child>
<object class="GtkCheckButton" id="checkPasswordPDF">
- <property name="label" translatable="yes">Set a password for PDF</property>
+ <property name="label" translatable="yes">Output has a password</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
@@ -2310,55 +2210,31 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label17">
+ <object class="GtkLabel" id="label50">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Advanced</b></property>
+ <property name="label" translatable="yes"><b>Generation</b></property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <property name="border_width">10</property>
- <child>
- <object class="GtkButton" id="setDefaultExportOptions">
- <property name="label" translatable="yes">Default</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">4</property>
+ <property name="padding">6</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
- <property name="position">6</property>
+ <property name="position">5</property>
</packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="label47">
<property name="visible">True</property>
- <property name="label" translatable="yes">Export</property>
+ <property name="label" translatable="yes">PDF</property>
</object>
<packing>
- <property name="position">6</property>
+ <property name="position">5</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -2368,14 +2244,13 @@
</packing>
</child>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area7">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">edge</property>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
@@ -2414,4 +2289,277 @@
<action-widget response="-7">close</action-widget>
</action-widgets>
</object>
+ <object class="GtkListStore" id="liststore_search_provider">
+ <columns>
+ <!-- column-name Provider -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Google</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Yahoo!</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Microsoft Live</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Buisiness.com</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Omgili</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">BBC News</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Ubuntu Packages</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Creative Commons</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Ask</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Answers</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Dictionary.com</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">YouTube</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">AeroMP3</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">AOL</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Baidu</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Amazon</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Ebay</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">IMBD</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">ESPN</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Wikipedia</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">DuckDuckGo</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_tab_position">
+ <columns>
+ <!-- column-name Position -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Top</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Left</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Right</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Bottom</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_toolbar_buttontype">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Small Icons</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Large Icons</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Large Icons and Text</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Text only</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_image_loading">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">foreground and background images</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">foreground images</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">background images</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">no images</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="liststore_defaultfont">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Sans-serif</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Serif</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Monospace</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Cursive</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Fantasy</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="xpad">3</property>
+ <property name="stock">gtk-apply</property>
+ </object>
+ <object class="GtkListStore" id="liststore_proxy_type">
+ <columns>
+ <!-- column-name Type -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Direct connection</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Manual with no authentication</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Manual with basic authentication</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Manual with NTLM authentication</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">System settings</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_animation_time">
+ <property name="value">0.10000000000000001</property>
+ <property name="lower">0.10000000000000001</property>
+ <property name="upper">10</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_font_default_size">
+ <property name="value">16</property>
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_history_age">
+ <property name="value">28</property>
+ <property name="upper">999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">28</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_cache_memory_size">
+ <property name="value">16</property>
+ <property name="upper">2048</property>
+ <property name="step_increment">4</property>
+ <property name="page_increment">16</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_cache_disc_size">
+ <property name="value">16</property>
+ <property name="upper">2048</property>
+ <property name="step_increment">4</property>
+ <property name="page_increment">16</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_disc_cache_age">
+ <property name="value">28</property>
+ <property name="upper">999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_proxy_port">
+ <property name="value">3128</property>
+ <property name="lower">1</property>
+ <property name="upper">65535</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_max">
+ <property name="value">10</property>
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_perhost">
+ <property name="value">1</property>
+ <property name="lower">1</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_fetching_cached">
+ <property name="value">1</property>
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_pdf_scale">
+ <property name="value">100</property>
+ <property name="lower">1</property>
+ <property name="upper">1000</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment_pdf_lmargin">
+ <property name="upper">999</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkListStore" id="liststore_content_language">
+ <columns>
+ <!-- column-name Code -->
+ <column type="gchararray"/>
+ <!-- column-name Description -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">en</col>
+ <col id="1" translatable="yes">English</col>
+ </row>
+ </data>
+ </object>
</interface>
diff --git a/gtk/res/options.gtk3.ui b/gtk/res/options.gtk3.ui
index b6254a3..7fb513e 100644
--- a/gtk/res/options.gtk3.ui
+++ b/gtk/res/options.gtk3.ui
@@ -263,7 +263,7 @@
</object>
<!-- interface-requires gtk+ 2.6 -->
<!-- interface-naming-policy toplevel-contextual -->
- <object class="GtkDialog" id="dlgPreferences">
+ <object class="GtkDialog" id="dialogPreferences">
<property name="border_width">5</property>
<property name="title" translatable="yes">Netsurf Preferences</property>
<property name="window_position">center-on-parent</property>
--
NetSurf Browser
10 years, 9 months