diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-28 18:21:22 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-28 18:22:54 +0200 |
commit | 42243d2e06a28bd2da0420eea49d84cb31bb1a9a (patch) | |
tree | c577dfbbf3bf28d9269964747c069bb2921783ba /Applications/Help | |
parent | 5f8cbe6a1b2c434d7723b05148c299a9e3c01d2d (diff) | |
download | serenity-42243d2e06a28bd2da0420eea49d84cb31bb1a9a.zip |
LibWeb: Rename Web::HtmlView => Web::PageView
This widget doesn't just view HTML, it views a web page. :^)
Diffstat (limited to 'Applications/Help')
-rw-r--r-- | Applications/Help/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Applications/Help/main.cpp b/Applications/Help/main.cpp index 5178e191df..3455d9e7d9 100644 --- a/Applications/Help/main.cpp +++ b/Applications/Help/main.cpp @@ -42,7 +42,7 @@ #include <LibGUI/TreeView.h> #include <LibGUI/Window.h> #include <LibMarkdown/Document.h> -#include <LibWeb/HtmlView.h> +#include <LibWeb/PageView.h> #include <LibWeb/Layout/LayoutNode.h> #include <LibWeb/Parser/CSSParser.h> #include <LibWeb/Parser/HTMLParser.h> @@ -97,7 +97,7 @@ int main(int argc, char* argv[]) tree_view.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill); tree_view.set_preferred_size(200, 500); - auto& html_view = splitter.add<Web::HtmlView>(); + auto& page_view = splitter.add<Web::PageView>(); History history; @@ -111,7 +111,7 @@ int main(int argc, char* argv[]) auto open_page = [&](const String& path) { if (path.is_null()) { - html_view.set_document(nullptr); + page_view.set_document(nullptr); return; } @@ -134,7 +134,7 @@ int main(int argc, char* argv[]) String html = md_document.render_to_html(); auto html_document = Web::parse_html_document(html); - html_view.set_document(html_document); + page_view.set_document(html_document); String page_and_section = model->page_and_section(tree_view.selection().first()); window->set_title(String::format("%s - Help", page_and_section.characters())); @@ -143,7 +143,7 @@ int main(int argc, char* argv[]) tree_view.on_selection_change = [&] { String path = model->page_path(tree_view.selection().first()); if (path.is_null()) { - html_view.set_document(nullptr); + page_view.set_document(nullptr); return; } history.push(path); @@ -151,7 +151,7 @@ int main(int argc, char* argv[]) open_page(path); }; - html_view.on_link_click = [&](const String& href, auto&, unsigned) { + page_view.on_link_click = [&](const String& href, auto&, unsigned) { char* current_path = strdup(history.current().characters()); char* dir_path = dirname(current_path); char* path = realpath(String::format("%s/%s", dir_path, href.characters()).characters(), nullptr); |