Set default window title when opening window.

svn path=/trunk/netsurf/; revision=11543
This commit is contained in:
Ole Loots 2011-01-30 22:15:15 +00:00
parent 609b4118cf
commit 25d9f8cd19
2 changed files with 15 additions and 0 deletions

View File

@ -209,6 +209,7 @@ void window_open( struct gui_window * gw)
{
LGRECT br;
WindOpen(gw->root->handle, 20, 20, app.w/2, app.h/2 );
WindSetStr( gw->root->handle, WF_NAME, (char *)"" );
/* apply focus to the root frame: */
long lfbuff[8] = { CM_GETFOCUS };
mt_CompEvntExec( gl_appvar, gw->browser->comp, lfbuff );
@ -283,6 +284,19 @@ static void window_redraw_controls(struct gui_window *gw, uint32_t flags)
rect.g_x, rect.g_y, rect.g_w, rect.g_h );
}
void window_set_stauts( struct gui_window * gw , char * text )
{
if( gw->root == NULL )
return;
CMP_STATUSBAR sb = gw->root->statusbar;
if( sb == NULL || gw->browser->attached == false )
return;
sb_set_text( sb, text );
}
/* set focus to an arbitary element */
void window_set_focus( struct gui_window * gw, enum focus_element_type type, void * element )
{

View File

@ -53,6 +53,7 @@ void window_set_scroll_info(struct gui_window *gw, int content_h, int content_w)
bool window_widget_has_focus( struct gui_window * gw, enum focus_element_type t, void * element);
bool window_url_widget_has_focus( struct gui_window * gw );
void window_set_url( struct gui_window * gw, const char * text);
void window_set_stauts( struct gui_window * gw , char * text );
void window_center(struct gui_window * gw);
//void window_set_icon(struct gui_window * gw, void * data, bool is_rsc );