diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 2 | ||||
-rw-r--r-- | src/bookmarks.c | 10 |
2 files changed, 7 insertions, 5 deletions
@@ -632,7 +632,7 @@ static void init_App_(iApp *d, int argc, char **argv) { | |||
632 | add_Bookmarks(d->bookmarks, | 632 | add_Bookmarks(d->bookmarks, |
633 | collectNewCStr_String("gemini://skyjake.fi/lagrange/getting_started.gmi"), | 633 | collectNewCStr_String("gemini://skyjake.fi/lagrange/getting_started.gmi"), |
634 | collectNewCStr_String("Getting Started"), | 634 | collectNewCStr_String("Getting Started"), |
635 | collectNewCStr_String("remotesource"), | 635 | NULL, |
636 | 0x1f306); | 636 | 0x1f306); |
637 | } | 637 | } |
638 | init_Feeds(dataDir_App_()); | 638 | init_Feeds(dataDir_App_()); |
diff --git a/src/bookmarks.c b/src/bookmarks.c index cf29fc69..026b80d6 100644 --- a/src/bookmarks.c +++ b/src/bookmarks.c | |||
@@ -197,13 +197,15 @@ void save_Bookmarks(const iBookmarks *d, const char *dirPath) { | |||
197 | unlock_Mutex(d->mtx); | 197 | unlock_Mutex(d->mtx); |
198 | } | 198 | } |
199 | 199 | ||
200 | uint32_t add_Bookmarks(iBookmarks *d, const iString *url, const iString *title, | 200 | uint32_t add_Bookmarks(iBookmarks *d, const iString *url, const iString *title, const iString *tags, |
201 | const iString *tags, iChar icon) { | 201 | iChar icon) { |
202 | lock_Mutex(d->mtx); | 202 | lock_Mutex(d->mtx); |
203 | iBookmark *bm = new_Bookmark(); | 203 | iBookmark *bm = new_Bookmark(); |
204 | set_String(&bm->url, url); | 204 | set_String(&bm->url, url); |
205 | set_String(&bm->title, title); | 205 | set_String(&bm->title, title); |
206 | if (tags) set_String(&bm->tags, tags); | 206 | if (tags) { |
207 | set_String(&bm->tags, tags); | ||
208 | } | ||
207 | bm->icon = icon; | 209 | bm->icon = icon; |
208 | initCurrent_Time(&bm->when); | 210 | initCurrent_Time(&bm->when); |
209 | insert_Bookmarks_(d, bm); | 211 | insert_Bookmarks_(d, bm); |
@@ -441,7 +443,7 @@ void requestFinished_Bookmarks(iBookmarks *d, iGmRequest *req) { | |||
441 | iRangecc line = srcLine; | 443 | iRangecc line = srcLine; |
442 | trimEnd_Rangecc(&line); | 444 | trimEnd_Rangecc(&line); |
443 | iRegExpMatch m; | 445 | iRegExpMatch m; |
444 | init_RegExpMatch(&m); | 446 | init_RegExpMatch(&m); |
445 | if (matchRange_RegExp(linkPattern, line, &m)) { | 447 | if (matchRange_RegExp(linkPattern, line, &m)) { |
446 | const iRangecc url = capturedRange_RegExpMatch(&m, 1); | 448 | const iRangecc url = capturedRange_RegExpMatch(&m, 1); |
447 | const iRangecc title = capturedRange_RegExpMatch(&m, 3); | 449 | const iRangecc title = capturedRange_RegExpMatch(&m, 3); |