diff options
Diffstat (limited to 'src/bookmarks.c')
-rw-r--r-- | src/bookmarks.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/bookmarks.c b/src/bookmarks.c index e54c6239..7cf7f5a1 100644 --- a/src/bookmarks.c +++ b/src/bookmarks.c | |||
@@ -216,6 +216,23 @@ iBool remove_Bookmarks(iBookmarks *d, uint32_t id) { | |||
216 | return bm != NULL; | 216 | return bm != NULL; |
217 | } | 217 | } |
218 | 218 | ||
219 | iBool updateBookmarkIcon_Bookmarks(iBookmarks *d, const iString *url, iChar icon) { | ||
220 | iBool changed = iFalse; | ||
221 | lock_Mutex(d->mtx); | ||
222 | const uint32_t id = findUrl_Bookmarks(d, url); | ||
223 | if (id) { | ||
224 | iBookmark *bm = get_Bookmarks(d, id); | ||
225 | if (!hasTag_Bookmark(bm, "remote")) { | ||
226 | if (icon != bm->icon) { | ||
227 | bm->icon = icon; | ||
228 | changed = iTrue; | ||
229 | } | ||
230 | } | ||
231 | } | ||
232 | unlock_Mutex(d->mtx); | ||
233 | return changed; | ||
234 | } | ||
235 | |||
219 | iBookmark *get_Bookmarks(iBookmarks *d, uint32_t id) { | 236 | iBookmark *get_Bookmarks(iBookmarks *d, uint32_t id) { |
220 | return (iBookmark *) value_Hash(&d->bookmarks, id); | 237 | return (iBookmark *) value_Hash(&d->bookmarks, id); |
221 | } | 238 | } |