mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-15 22:14:27 +03:00
Make URL completion ignore unvisited URLs
svn path=/trunk/netsurf/; revision=2621
This commit is contained in:
parent
026ba672ae
commit
cc226c0293
@ -46,7 +46,8 @@ static wimp_icon url_complete_sprite;
|
|||||||
static int mouse_x;
|
static int mouse_x;
|
||||||
static int mouse_y;
|
static int mouse_y;
|
||||||
|
|
||||||
static bool url_complete_callback(const char *url);
|
static bool url_complete_callback(const char *url,
|
||||||
|
const struct url_data *data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should be called when the caret is placed into a URL completion icon.
|
* Should be called when the caret is placed into a URL completion icon.
|
||||||
@ -327,12 +328,17 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, int key)
|
|||||||
* Callback function for urldb_iterate_partial
|
* Callback function for urldb_iterate_partial
|
||||||
*
|
*
|
||||||
* \param url URL which matches
|
* \param url URL which matches
|
||||||
|
* \param data Data associated with URL
|
||||||
* \return true to continue iteration, false otherwise
|
* \return true to continue iteration, false otherwise
|
||||||
*/
|
*/
|
||||||
bool url_complete_callback(const char *url)
|
bool url_complete_callback(const char *url, const struct url_data *data)
|
||||||
{
|
{
|
||||||
const char **array_extend;
|
const char **array_extend;
|
||||||
|
|
||||||
|
/* Ignore unvisited URLs */
|
||||||
|
if (data->visits == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
url_complete_matches_available++;
|
url_complete_matches_available++;
|
||||||
|
|
||||||
if (url_complete_matches_available >
|
if (url_complete_matches_available >
|
||||||
|
Loading…
x
Reference in New Issue
Block a user