mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-24 23:39:51 +03:00
Init toolbar.
svn path=/trunk/netsurf/; revision=13849
This commit is contained in:
parent
786be41d01
commit
56ec72f044
@ -235,10 +235,10 @@ void window_open( struct gui_window * gw, GRECT pos )
|
||||
if( gw->root->statusbar != NULL ){
|
||||
gw->root->statusbar->attached = true;
|
||||
}
|
||||
tb_adjust_size( gw );
|
||||
tb_adjust_size( gw );
|
||||
/*TBD: get already present content and set size? */
|
||||
input_window = gw;
|
||||
window_set_focus( gw, BROWSER, gw->browser );
|
||||
window_set_focus( gw, BROWSER, gw->browser );
|
||||
}
|
||||
|
||||
|
||||
@ -246,7 +246,7 @@ void window_open( struct gui_window * gw, GRECT pos )
|
||||
/* update back forward buttons (see tb_update_buttons (bug) ) */
|
||||
void window_update_back_forward( struct gui_window * gw)
|
||||
{
|
||||
tb_update_buttons( gw );
|
||||
tb_update_buttons( gw, -1 );
|
||||
}
|
||||
|
||||
void window_set_stauts( struct gui_window * gw , char * text )
|
||||
|
@ -496,26 +496,24 @@ void __CDECL global_evnt_keybd( WINDOW * win, short buff[8], void * data)
|
||||
}
|
||||
sascii = keybd2ascii( evnt.keybd, K_LSHIFT);
|
||||
while( menu_evnt_tbl[i].rid != -1 && done == false) {
|
||||
if(menu_evnt_tbl[i].nsid[0] != 0 ) {
|
||||
if( kstate == menu_evnt_tbl[i].accel.mod && menu_evnt_tbl[i].accel.ascii != 0) {
|
||||
if( menu_evnt_tbl[i].accel.ascii == sascii) {
|
||||
menu_evnt_tbl[i].menu_func( NULL, menu_evnt_tbl[i].rid, MAINMENU, buff);
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/* the accel code hides in the keycode: */
|
||||
if( menu_evnt_tbl[i].accel.keycode != 0) {
|
||||
if( menu_evnt_tbl[i].accel.keycode == (nkc & 0xFF) &&
|
||||
kstate == menu_evnt_tbl[i].accel.mod &&
|
||||
menu_evnt_tbl[i].menu_func != NULL) {
|
||||
menu_evnt_tbl[i].menu_func( NULL,
|
||||
menu_evnt_tbl[i].rid,
|
||||
MAINMENU, buff
|
||||
);
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
if( kstate == menu_evnt_tbl[i].accel.mod && menu_evnt_tbl[i].accel.ascii != 0) {
|
||||
if( menu_evnt_tbl[i].accel.ascii == sascii) {
|
||||
menu_evnt_tbl[i].menu_func( NULL, menu_evnt_tbl[i].rid, MAINMENU, buff);
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/* the accel code hides in the keycode: */
|
||||
if( menu_evnt_tbl[i].accel.keycode != 0) {
|
||||
if( menu_evnt_tbl[i].accel.keycode == (nkc & 0xFF) &&
|
||||
kstate == menu_evnt_tbl[i].accel.mod &&
|
||||
menu_evnt_tbl[i].menu_func != NULL) {
|
||||
menu_evnt_tbl[i].menu_func( NULL,
|
||||
menu_evnt_tbl[i].rid,
|
||||
MAINMENU, buff
|
||||
);
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ gui_create_browser_window(struct browser_window *bw,
|
||||
window_open( gw , pos );
|
||||
/* Recalculate windows browser area now */
|
||||
browser_update_rects( gw );
|
||||
tb_update_buttons( gw );
|
||||
tb_update_buttons( gw, -1 );
|
||||
input_window = gw;
|
||||
/* TODO:... this line: placeholder to create a local history widget ... */
|
||||
}
|
||||
@ -989,7 +989,8 @@ static void gui_init2(int argc, char** argv)
|
||||
menu_register( _AESapid, (char*)" NetSurf ");
|
||||
}
|
||||
tree_set_icon_dir( nsoption_charp(tree_icons_path) );
|
||||
hotlist_init();
|
||||
hotlist_init();
|
||||
toolbar_init();
|
||||
}
|
||||
|
||||
/* #define WITH_DBG_LOGFILE 1 */
|
||||
|
@ -76,9 +76,9 @@ struct s_focus_info
|
||||
#define CDT_OWNER 0x03UL
|
||||
#define CDT_ICON 0x04UL
|
||||
#define CDT_ICON_TYPE 0x05UL
|
||||
#define CDT_ICON_TYPE_NONE 0x00UL
|
||||
#define CDT_ICON_TYPE_OBJECT 0x01UL
|
||||
#define CDT_ICON_TYPE_BITMAP 0x02UL
|
||||
# define CDT_ICON_TYPE_NONE 0x00UL
|
||||
# define CDT_ICON_TYPE_OBJECT 0x01UL
|
||||
# define CDT_ICON_TYPE_BITMAP 0x02UL
|
||||
|
||||
|
||||
struct gui_window;
|
||||
|
Loading…
Reference in New Issue
Block a user