summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-12-13 00:51:06 +0100
committerOle Loots <ole@monochrom.net>2013-12-13 00:51:06 +0100
commite9f2c3a9bfc831fe9177564225236e2588e257df (patch)
tree68a7787871e12ce356a3c9e6a7871094e43310ce
parent35115ed6061a7e4d1c3b3c38ea385960dbc5c5b8 (diff)
downloadnetsurf-e9f2c3a9bfc831fe9177564225236e2588e257df.tar.gz
netsurf-e9f2c3a9bfc831fe9177564225236e2588e257df.tar.bz2
Check if URL is already added to bookmark
-rw-r--r--atari/hotlist.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/atari/hotlist.c b/atari/hotlist.c
index 1644935f5..b4e36ae1a 100644
--- a/atari/hotlist.c
+++ b/atari/hotlist.c
@@ -308,6 +308,12 @@ void atari_hotlist_add_page( const char * url, const char * title )
if (nsurl_create(url, &nsurl) != NSERROR_OK)
return;
+ if (hotlist_has_url(nsurl)) {
+ LOG(("URL already added as Bookmark"));
+ nsurl_unref(nsurl);
+ return;
+ }
+
/* doesn't look nice:
if( hl.tv->click.x >= 0 && hl.tv->click.y >= 0 ){
hotlist_add_entry( nsurl, title, true, hl.tv->click.y );