summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index 92334d42..99e42fc2 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1242,6 +1242,22 @@ iBool handleCommand_App(const char *cmd) {
1242 postCommand_App("focus.set id:bmed.title"); 1242 postCommand_App("focus.set id:bmed.title");
1243 return iTrue; 1243 return iTrue;
1244 } 1244 }
1245 else if (equal_Command(cmd, "bookmark.addtag")) {
1246 const iString *tag = string_Command(cmd, "tag");
1247 const iString *feedUrl = url_DocumentWidget(document_App());
1248 if (!isEmpty_String(feedUrl)) {
1249 uint32_t id = findUrl_Bookmarks(d->bookmarks, feedUrl);
1250 if (id) {
1251 addTag_Bookmark(get_Bookmarks(d->bookmarks, id), cstr_String(tag));
1252 }
1253 else {
1254 add_Bookmarks(d->bookmarks, feedUrl, bookmarkTitle_DocumentWidget(document_App()),
1255 tag, siteIcon_GmDocument(document_DocumentWidget(document_App())));
1256 }
1257 postCommand_App("bookmarks.changed");
1258 }
1259 return iTrue;
1260 }
1245 else if (equal_Command(cmd, "bookmarks.changed")) { 1261 else if (equal_Command(cmd, "bookmarks.changed")) {
1246 save_Bookmarks(d->bookmarks, dataDir_App_); 1262 save_Bookmarks(d->bookmarks, dataDir_App_);
1247 return iFalse; 1263 return iFalse;