diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-24 16:00:22 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-24 16:00:22 +0300 |
commit | 53f0596cfd6060cd63cc8e6f92f981672da97ee2 (patch) | |
tree | 313eaa75bf3311e368678bac70871d2059abc14a /src/ui/util.c | |
parent | 446df26adb969dcb4dd9cf5e171fbb9453a8e27c (diff) |
Bookmark folders
The user can now create bookmark folders, and drag bookmarks into them. Folders can also be nested.
The bookmark sorting menu item sorts inside the chosen folder/root.
Remote bookmark sources appear also as folders, although they cannot be sorted/edited.
IssueID #339
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 7fa5d675..5b9f15a9 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -816,6 +816,14 @@ iWidget *makeMenu_Widget(iWidget *parent, const iMenuItem *items, size_t n) { | |||
816 | setUserData_Object(menu, deepCopyMenuItems_(menu, items, n)); | 816 | setUserData_Object(menu, deepCopyMenuItems_(menu, items, n)); |
817 | addChild_Widget(parent, menu); | 817 | addChild_Widget(parent, menu); |
818 | iRelease(menu); /* owned by parent now */ | 818 | iRelease(menu); /* owned by parent now */ |
819 | /* Keyboard shortcuts still need to triggerable via the menu, although the items don't exist. */ { | ||
820 | for (size_t i = 0; i < n; i++) { | ||
821 | const iMenuItem *item = &items[i]; | ||
822 | if (item->key) { | ||
823 | addAction_Widget(menu, item->key, item->kmods, item->command); | ||
824 | } | ||
825 | } | ||
826 | } | ||
819 | #else | 827 | #else |
820 | /* Non-native custom popup menu. This may still be displayed inside a separate window. */ | 828 | /* Non-native custom popup menu. This may still be displayed inside a separate window. */ |
821 | setDrawBufferEnabled_Widget(menu, iTrue); | 829 | setDrawBufferEnabled_Widget(menu, iTrue); |