From d83c0123ed3e51ef1e8d6a164e87343dd5335331 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 17 Sep 2020 02:10:10 +0200 Subject: Show error message on failure to load image for same page Show title of manga when viewing pages --- src/QuickMedia.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/QuickMedia.cpp') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 44e6bd9..377729f 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1990,9 +1990,9 @@ namespace QuickMedia { bool redraw = true; sf::Event event; - sf::Text chapter_text(chapter_title + " | Page " + std::to_string(image_index + 1) + "/" + std::to_string(num_images), font, 14); + sf::Text chapter_text(content_title + " | " + chapter_title + " | Page " + std::to_string(image_index + 1) + "/" + std::to_string(num_images), font, 14); if(image_index == num_images) - chapter_text.setString(chapter_title + " | End"); + chapter_text.setString(content_title + " | " + chapter_title + " | End"); chapter_text.setFillColor(sf::Color::White); sf::RectangleShape chapter_text_background; chapter_text_background.setFillColor(sf::Color(0, 0, 0, 150)); @@ -2062,6 +2062,7 @@ namespace QuickMedia { texture_size_f = sf::Vector2f(texture_size.x, texture_size.y); } else if(load_image_result == LoadImageResult::FAILED) { download_in_progress = false; + error = true; } error_message.setString(error_msg); redraw = true; @@ -2143,7 +2144,7 @@ namespace QuickMedia { json_chapter = Json::Value(Json::objectValue); } - ImageViewer image_viewer(image_plugin, images_url, chapter_title, image_index, content_cache_dir, &font); + ImageViewer image_viewer(image_plugin, images_url, content_title, chapter_title, image_index, content_cache_dir, &font); json_chapter["current"] = std::min(latest_read, image_viewer.get_num_pages()); json_chapter["total"] = image_viewer.get_num_pages(); -- cgit v1.2.3