summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-05 15:22:13 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-05 15:22:13 +0300
commit8cd4fbea6da42c2df77dd17eb0b1626d8611c0a2 (patch)
treef0a33dc68947de1d408179a1860cdc4361ce6481 /src/ui/util.c
parenta47d8d7051e9d5b0eaddf2c3895c439c4f26a104 (diff)
Bookmark editor has toggles for some special tags
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index d2f27a8b..92cf85b7 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -2506,11 +2506,18 @@ static iBool handleBookmarkCreationCommands_SidebarWidget_(iWidget *editor, cons
2506 const iString *tags = text_InputWidget(findChild_Widget(editor, "bmed.tags")); 2506 const iString *tags = text_InputWidget(findChild_Widget(editor, "bmed.tags"));
2507 const iString *icon = collect_String(trimmed_String(text_InputWidget(findChild_Widget(editor, "bmed.icon")))); 2507 const iString *icon = collect_String(trimmed_String(text_InputWidget(findChild_Widget(editor, "bmed.icon"))));
2508 const uint32_t id = add_Bookmarks(bookmarks_App(), url, title, tags, first_String(icon)); 2508 const uint32_t id = add_Bookmarks(bookmarks_App(), url, title, tags, first_String(icon));
2509 iBookmark * bm = get_Bookmarks(bookmarks_App(), id);
2509 if (!isEmpty_String(icon)) { 2510 if (!isEmpty_String(icon)) {
2510 iBookmark *bm = get_Bookmarks(bookmarks_App(), id); 2511 addTagIfMissing_Bookmark(bm, userIcon_BookmarkTag);
2511 if (!hasTag_Bookmark(bm, userIcon_BookmarkTag)) { 2512 }
2512 addTag_Bookmark(bm, userIcon_BookmarkTag); 2513 if (isSelected_Widget(findChild_Widget(editor, "bmed.tag.home"))) {
2513 } 2514 addTag_Bookmark(bm, homepage_BookmarkTag);
2515 }
2516 if (isSelected_Widget(findChild_Widget(editor, "bmed.tag.remote"))) {
2517 addTag_Bookmark(bm, remoteSource_BookmarkTag);
2518 }
2519 if (isSelected_Widget(findChild_Widget(editor, "bmed.tag.linksplit"))) {
2520 addTag_Bookmark(bm, linkSplit_BookmarkTag);
2514 } 2521 }
2515 postCommand_App("bookmarks.changed"); 2522 postCommand_App("bookmarks.changed");
2516 } 2523 }