diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-30 08:12:13 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-30 08:12:13 +0200 |
commit | 0e5047069b5782b39620af8a5fd31d57ba9809e5 (patch) | |
tree | 8f3e01ca20213721154c997b9442a96303918403 /src/ui/documentwidget.c | |
parent | c5f9a431f3b42c3a34578f5406b5e39a9eec9cd0 (diff) |
DocumentWidget: Update banner while loading
The banner would sometimes appear only after the page had finished loading, because the site icon got lost when the GmDocument was switched.
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 65de157b..cbd32066 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -2129,12 +2129,17 @@ static void showOrHidePinningIndicator_DocumentWidget_(iDocumentWidget *d) { | |||
2129 | isPinned_DocumentWidget_(d)); | 2129 | isPinned_DocumentWidget_(d)); |
2130 | } | 2130 | } |
2131 | 2131 | ||
2132 | static void updateBanner_DocumentWidget_(iDocumentWidget *d) { | ||
2133 | setSite_Banner(d->banner, siteText_DocumentWidget_(d), siteIcon_GmDocument(d->view.doc)); | ||
2134 | } | ||
2135 | |||
2132 | static void documentWasChanged_DocumentWidget_(iDocumentWidget *d) { | 2136 | static void documentWasChanged_DocumentWidget_(iDocumentWidget *d) { |
2133 | iChangeFlags(d->flags, selecting_DocumentWidgetFlag, iFalse); | 2137 | iChangeFlags(d->flags, selecting_DocumentWidgetFlag, iFalse); |
2134 | setFlags_Widget(as_Widget(d), touchDrag_WidgetFlag, iFalse); | 2138 | setFlags_Widget(as_Widget(d), touchDrag_WidgetFlag, iFalse); |
2135 | updateVisitedLinks_GmDocument(d->view.doc); | 2139 | updateVisitedLinks_GmDocument(d->view.doc); |
2136 | documentRunsInvalidated_DocumentWidget_(d); | 2140 | documentRunsInvalidated_DocumentWidget_(d); |
2137 | updateWindowTitle_DocumentWidget_(d); | 2141 | updateWindowTitle_DocumentWidget_(d); |
2142 | updateBanner_DocumentWidget_(d); | ||
2138 | updateVisible_DocumentView_(&d->view); | 2143 | updateVisible_DocumentView_(&d->view); |
2139 | d->view.drawBufs->flags |= updateSideBuf_DrawBufsFlag; | 2144 | d->view.drawBufs->flags |= updateSideBuf_DrawBufsFlag; |
2140 | invalidate_DocumentWidget_(d); | 2145 | invalidate_DocumentWidget_(d); |
@@ -2161,10 +2166,6 @@ static void replaceDocument_DocumentWidget_(iDocumentWidget *d, iGmDocument *new | |||
2161 | documentWasChanged_DocumentWidget_(d); | 2166 | documentWasChanged_DocumentWidget_(d); |
2162 | } | 2167 | } |
2163 | 2168 | ||
2164 | static void updateBanner_DocumentWidget_(iDocumentWidget *d) { | ||
2165 | setSite_Banner(d->banner, siteText_DocumentWidget_(d), siteIcon_GmDocument(d->view.doc)); | ||
2166 | } | ||
2167 | |||
2168 | static void updateTheme_DocumentWidget_(iDocumentWidget *d) { | 2169 | static void updateTheme_DocumentWidget_(iDocumentWidget *d) { |
2169 | if (document_App() != d || category_GmStatusCode(d->sourceStatus) == categoryInput_GmStatusCode) { | 2170 | if (document_App() != d || category_GmStatusCode(d->sourceStatus) == categoryInput_GmStatusCode) { |
2170 | return; | 2171 | return; |