|
@@ -147,6 +147,7 @@ int main(int argc, char* argv[])
|
|
String path = model->page_path(tree_view.selection().first());
|
|
String path = model->page_path(tree_view.selection().first());
|
|
if (path.is_null()) {
|
|
if (path.is_null()) {
|
|
page_view.set_document(nullptr);
|
|
page_view.set_document(nullptr);
|
|
|
|
+ window->set_title("Help");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
history.push(path);
|
|
history.push(path);
|
|
@@ -154,6 +155,10 @@ int main(int argc, char* argv[])
|
|
open_page(path);
|
|
open_page(path);
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ tree_view.on_toggle = [&](const GUI::ModelIndex& index, const bool open) {
|
|
|
|
+ model->update_section_node_on_toggle(index, open);
|
|
|
|
+ };
|
|
|
|
+
|
|
page_view.on_link_click = [&](auto& url, auto&, unsigned) {
|
|
page_view.on_link_click = [&](auto& url, auto&, unsigned) {
|
|
char* current_path = strdup(history.current().characters());
|
|
char* current_path = strdup(history.current().characters());
|
|
char* path = realpath(url.path().characters(), nullptr);
|
|
char* path = realpath(url.path().characters(), nullptr);
|