diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/sidebarwidget.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 6c29136e..d6c74298 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -158,6 +158,17 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
158 | addItem_ListWidget(d->list, item); | 158 | addItem_ListWidget(d->list, item); |
159 | iRelease(item); | 159 | iRelease(item); |
160 | } | 160 | } |
161 | d->menu = makeMenu_Widget( | ||
162 | as_Widget(d), | ||
163 | (iMenuItem[]){ { "Open Entry in New Tab", 0, 0, "feed.entry.opentab" }, | ||
164 | { "Open Feed Page", 0, 0, "feed.entry.openfeed" }, | ||
165 | { "---", 0, 0, NULL }, | ||
166 | { "Mark as Read", 0, 0, "feed.entry.toggleread" }, | ||
167 | { "Add Bookmark...", 0, 0, "feed.entry.bookmark" }, | ||
168 | { "Edit Feed...", 0, 0, "feed.entry.edit" }, | ||
169 | { "---", 0, 0, NULL }, | ||
170 | { uiTextCaution_ColorEscape "Unsubscribe", 0, 0, "feed.entry.unsubscribe" } }, | ||
171 | 8); | ||
161 | break; | 172 | break; |
162 | } | 173 | } |
163 | case documentOutline_SidebarMode: { | 174 | case documentOutline_SidebarMode: { |
@@ -202,7 +213,7 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
202 | (iMenuItem[]){ { "Edit Bookmark...", 0, 0, "bookmark.edit" }, | 213 | (iMenuItem[]){ { "Edit Bookmark...", 0, 0, "bookmark.edit" }, |
203 | { "Copy URL", 0, 0, "bookmark.copy" }, | 214 | { "Copy URL", 0, 0, "bookmark.copy" }, |
204 | { "---", 0, 0, NULL }, | 215 | { "---", 0, 0, NULL }, |
205 | { "Subscribe", 0, 0, "bookmark.tag tag:subscribed" }, | 216 | { "Subscribe to Feed", 0, 0, "bookmark.tag tag:subscribed" }, |
206 | { "Use as Homepage", 0, 0, "bookmark.tag tag:homepage" }, | 217 | { "Use as Homepage", 0, 0, "bookmark.tag tag:homepage" }, |
207 | { "---", 0, 0, NULL }, | 218 | { "---", 0, 0, NULL }, |
208 | { uiTextCaution_ColorEscape "Delete Bookmark", 0, 0, "bookmark.delete" } }, | 219 | { uiTextCaution_ColorEscape "Delete Bookmark", 0, 0, "bookmark.delete" } }, |
@@ -248,7 +259,7 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
248 | { "Copy URL", 0, 0, "history.copy" }, | 259 | { "Copy URL", 0, 0, "history.copy" }, |
249 | { "Add Bookmark...", 0, 0, "history.addbookmark" }, | 260 | { "Add Bookmark...", 0, 0, "history.addbookmark" }, |
250 | { "---", 0, 0, NULL }, | 261 | { "---", 0, 0, NULL }, |
251 | { "Remove URL", 0, 0, "history.delete" }, | 262 | { "Forget URL", 0, 0, "history.delete" }, |
252 | { "---", 0, 0, NULL }, | 263 | { "---", 0, 0, NULL }, |
253 | { uiTextCaution_ColorEscape "Clear History...", 0, 0, "history.clear confirm:1" }, | 264 | { uiTextCaution_ColorEscape "Clear History...", 0, 0, "history.clear confirm:1" }, |
254 | }, 6); | 265 | }, 6); |
@@ -929,6 +940,12 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, | |||
929 | const int fg = isHover ? (isPressing ? uiTextPressed_ColorId : uiTextFramelessHover_ColorId) | 940 | const int fg = isHover ? (isPressing ? uiTextPressed_ColorId : uiTextFramelessHover_ColorId) |
930 | : uiText_ColorId; | 941 | : uiText_ColorId; |
931 | if (d->listItem.isSeparator) { | 942 | if (d->listItem.isSeparator) { |
943 | if (itemRect.pos.y > 0) { | ||
944 | drawHLine_Paint(p, | ||
945 | addY_I2(pos, 2 * gap_UI), | ||
946 | width_Rect(itemRect) - scrollBarWidth, | ||
947 | uiSeparator_ColorId); | ||
948 | } | ||
932 | drawRange_Text( | 949 | drawRange_Text( |
933 | uiLabelLarge_FontId, | 950 | uiLabelLarge_FontId, |
934 | add_I2(pos, | 951 | add_I2(pos, |
@@ -944,12 +961,6 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, | |||
944 | const int iconPad = 9 * gap_UI; | 961 | const int iconPad = 9 * gap_UI; |
945 | iRect iconArea = { addY_I2(pos, 0), init_I2(iconPad, itemHeight) }; | 962 | iRect iconArea = { addY_I2(pos, 0), init_I2(iconPad, itemHeight) }; |
946 | if (isUnread) { | 963 | if (isUnread) { |
947 | /* | ||
948 | iString str; | ||
949 | initUnicodeN_String(&str, &d->icon, 1); | ||
950 | drawCentered_Text( | ||
951 | uiContent_FontId, iconArea, iFalse, iconColor, "%s", cstr_String(&str)); | ||
952 | deinit_String(&str);*/ | ||
953 | fillRect_Paint( | 964 | fillRect_Paint( |
954 | p, | 965 | p, |
955 | (iRect){ topLeft_Rect(iconArea), init_I2(gap_UI / 2, height_Rect(iconArea)) }, | 966 | (iRect){ topLeft_Rect(iconArea), init_I2(gap_UI / 2, height_Rect(iconArea)) }, |
@@ -1036,7 +1047,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, | |||
1036 | drawHLine_Paint(p, | 1047 | drawHLine_Paint(p, |
1037 | addY_I2(drawPos, -gap_UI), | 1048 | addY_I2(drawPos, -gap_UI), |
1038 | width_Rect(itemRect) - scrollBarWidth, | 1049 | width_Rect(itemRect) - scrollBarWidth, |
1039 | uiIcon_ColorId); | 1050 | uiSeparator_ColorId); |
1040 | drawRange_Text( | 1051 | drawRange_Text( |
1041 | uiLabelLarge_FontId, | 1052 | uiLabelLarge_FontId, |
1042 | add_I2(drawPos, | 1053 | add_I2(drawPos, |