diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/sidebarwidget.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 6c2934ec..e8aa69c1 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -446,7 +446,7 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
446 | { "---", 0, 0, NULL }, | 446 | { "---", 0, 0, NULL }, |
447 | { delete_Icon " " uiTextCaution_ColorEscape "${bookmark.delete}", 0, 0, "bookmark.delete" }, | 447 | { delete_Icon " " uiTextCaution_ColorEscape "${bookmark.delete}", 0, 0, "bookmark.delete" }, |
448 | { "---", 0, 0, NULL }, | 448 | { "---", 0, 0, NULL }, |
449 | { add_Icon " ${menu.newfolder}", 0, 0, "bookmarks.addfolder" }, | 449 | { add_Icon " ${menu.newfolder}", 0, 0, "bookmark.addfolder" }, |
450 | { reload_Icon " ${bookmarks.reload}", 0, 0, "bookmarks.reload.remote" }, | 450 | { reload_Icon " ${bookmarks.reload}", 0, 0, "bookmarks.reload.remote" }, |
451 | { "---", 0, 0, NULL }, | 451 | { "---", 0, 0, NULL }, |
452 | { upDownArrow_Icon " ${menu.sort.alpha}", 0, 0, "bookmark.sortfolder" } }, | 452 | { upDownArrow_Icon " ${menu.sort.alpha}", 0, 0, "bookmark.sortfolder" } }, |
@@ -1319,6 +1319,17 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1319 | } | 1319 | } |
1320 | return iTrue; | 1320 | return iTrue; |
1321 | } | 1321 | } |
1322 | else if (isCommand_Widget(w, ev, "bookmark.addfolder")) { | ||
1323 | const iSidebarItem *item = d->contextItem; | ||
1324 | if (d->mode == bookmarks_SidebarMode) { | ||
1325 | postCommandf_App("bookmarks.addfolder parent:%zu", | ||
1326 | !item ? 0 | ||
1327 | : item->listItem.isDropTarget | ||
1328 | ? item->id | ||
1329 | : get_Bookmarks(bookmarks_App(), item->id)->parentId); | ||
1330 | } | ||
1331 | return iTrue; | ||
1332 | } | ||
1322 | else if (isCommand_Widget(w, ev, "bookmark.sortfolder")) { | 1333 | else if (isCommand_Widget(w, ev, "bookmark.sortfolder")) { |
1323 | const iSidebarItem *item = d->contextItem; | 1334 | const iSidebarItem *item = d->contextItem; |
1324 | if (d->mode == bookmarks_SidebarMode && item) { | 1335 | if (d->mode == bookmarks_SidebarMode && item) { |