[project @ 2003-12-26 18:18:17 by jmb]
Keypress handling in dialog boxes. svn path=/import/netsurf/; revision=446
This commit is contained in:
parent
1b2b1ebe1c
commit
78f9b20b3e
|
@ -104,6 +104,18 @@ void ro_gui_401login_open(char *host, char* realm, char *fetchurl)
|
|||
-1, -1, -1, 0);
|
||||
}
|
||||
|
||||
bool ro_gui_401login_keypress(wimp_key *key) {
|
||||
|
||||
if (key->c == wimp_KEY_RETURN) {
|
||||
get_unamepwd();
|
||||
ro_gui_dialog_close(dialog_401li);
|
||||
browser_window_open_location(bwin, url);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Login Clicked -> create a new fetch request, specifying uname & pwd
|
||||
* CURLOPT_USERPWD takes a string "username:password"
|
||||
*/
|
||||
|
|
|
@ -144,6 +144,16 @@ void ro_gui_dialog_open(wimp_w w)
|
|||
wimp_open_window((wimp_open *) &open);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle key presses in one of the dialog boxes.
|
||||
*/
|
||||
|
||||
bool ro_gui_dialog_keypress(wimp_key *key)
|
||||
{
|
||||
if (key->w == dialog_401li)
|
||||
return ro_gui_401login_keypress(key);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle clicks in one of the dialog boxes.
|
||||
|
|
|
@ -596,7 +596,9 @@ void ro_gui_keypress(wimp_key *key)
|
|||
gui_window *g = ro_gui_window_lookup(key->w);
|
||||
|
||||
if (!g) {
|
||||
wimp_process_key(key->c);
|
||||
handled = ro_gui_dialog_keypress(key);
|
||||
if (!handled)
|
||||
wimp_process_key(key->c);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ void ro_gui_dialog_init(void);
|
|||
wimp_w ro_gui_dialog_create(const char *template_name);
|
||||
void ro_gui_dialog_open(wimp_w w);
|
||||
void ro_gui_dialog_click(wimp_pointer *pointer);
|
||||
bool ro_gui_dialog_keypress(wimp_key *key);
|
||||
void ro_gui_dialog_close(wimp_w close);
|
||||
void ro_gui_redraw_config_th(wimp_draw* redraw);
|
||||
void ro_gui_theme_menu_selection(char *theme);
|
||||
|
@ -133,6 +134,7 @@ void ro_gui_drag_end(wimp_dragged* drag);
|
|||
void ro_gui_401login_init(void);
|
||||
void ro_gui_401login_open(char* host, char * realm, char* fetchurl);
|
||||
void ro_gui_401login_click(wimp_pointer *pointer);
|
||||
bool ro_gui_401login_keypress(wimp_key *key);
|
||||
|
||||
/* in window.c */
|
||||
void ro_gui_window_click(gui_window* g, wimp_pointer* mouse);
|
||||
|
|
Loading…
Reference in New Issue