summaryrefslogtreecommitdiff
path: root/atari
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-06-21 22:01:41 +0000
committerOle Loots <ole@monochrom.net>2012-06-21 22:01:41 +0000
commit4cb8c980ac8e95aad0488ad6daba32acc40530fe (patch)
tree81e045b857778437fd3042dcd7b967585a1c1c64 /atari
parent1b5771e44eb8c4c2ce117e5e583822bb55926c21 (diff)
downloadnetsurf-4cb8c980ac8e95aad0488ad6daba32acc40530fe.tar.gz
netsurf-4cb8c980ac8e95aad0488ad6daba32acc40530fe.tar.bz2
apply background color option and removed unused struct member of struct s_tb_button.
svn path=/trunk/netsurf/; revision=13981
Diffstat (limited to 'atari')
-rwxr-xr-xatari/toolbar.c20
-rwxr-xr-xatari/toolbar.h3
2 files changed, 12 insertions, 11 deletions
diff --git a/atari/toolbar.c b/atari/toolbar.c
index 62c09903c..307e50aed 100755
--- a/atari/toolbar.c
+++ b/atari/toolbar.c
@@ -85,7 +85,6 @@ static struct s_tb_button tb_buttons[] =
{
TOOLBAR_BT_BACK,
tb_back_click,
- "toolbar/%s/bck_%s.png",
0,
{0,0},
0, 0, 0
@@ -93,13 +92,11 @@ static struct s_tb_button tb_buttons[] =
{
TOOLBAR_BT_HOME,
tb_home_click,
- "toolbar/%s/hme_%s.png",
0, {0,0}, 0, 0, 0
},
{
TOOLBAR_BT_FORWARD,
tb_forward_click,
- "toolbar/%s/fwd_%s.png",
0,
{0,0},
0, 0, 0
@@ -107,7 +104,6 @@ static struct s_tb_button tb_buttons[] =
{
TOOLBAR_BT_STOP,
tb_stop_click,
- "toolbar/%s/stp_%s.png",
0,
{0,0},
0, 0, 0
@@ -115,12 +111,11 @@ static struct s_tb_button tb_buttons[] =
{
TOOLBAR_BT_RELOAD,
tb_reload_click,
- "toolbar/%s/rld_%s.png",
0,
{0,0},
0, 0, 0
},
- { 0, 0, 0, 0, {0,0}, 0, 0, -1 }
+ { 0, 0, 0, {0,0}, 0, 0, -1 }
};
struct s_toolbar_style {
@@ -158,6 +153,7 @@ void toolbar_init( void )
short vdicolor[3];
uint32_t rgbcolor;
+ toolbar_bg_color = MIN(15,nsoption_int(atari_toolbar_bg));
img_toolbar = (nsoption_int( atari_image_toolbar ) > 0 ) ? true : false;
if( img_toolbar ){
@@ -576,9 +572,15 @@ void __CDECL evnt_url_click( COMPONENT *c, long buff[8] )
/* TODO: recognize click + shift key */
int mstate = BROWSER_MOUSE_PRESS_1;
if( (kstat & (K_LSHIFT|K_RSHIFT)) != 0 )
- mstate = BROWSER_MOUSE_MOD_1;
- textarea_mouse_action( tb->url.textarea,
- BROWSER_MOUSE_PRESS_1, mx, my );
+ mstate = BROWSER_MOUSE_MOD_1;
+ if( evnt.nb_click == 2 ){
+ textarea_mouse_action( tb->url.textarea,
+ BROWSER_MOUSE_DOUBLE_CLICK | BROWSER_MOUSE_CLICK_1,
+ mx, my );
+ } else {
+ textarea_mouse_action( tb->url.textarea,
+ BROWSER_MOUSE_PRESS_1, mx, my );
+ }
}
}
// TODO: do not send an complete redraw!
diff --git a/atari/toolbar.h b/atari/toolbar.h
index 8d52d144c..66b998840 100755
--- a/atari/toolbar.h
+++ b/atari/toolbar.h
@@ -44,8 +44,7 @@ enum e_toolbar_button_states {
struct s_tb_button
{
short rsc_id;
- void (*cb_click)(struct gui_window * gw);
- const char * iconfile;
+ void (*cb_click)(struct gui_window * gw);
COMPONENT * comp;
hlcache_handle * icon[TOOLBAR_BUTTON_NUM_STATES];
struct gui_window * gw;