navigate to home directory by default and add functionality for home button

This commit is contained in:
hippoz 2022-07-28 19:09:04 +03:00
parent e413a7d69d
commit a1e0e82da3
No known key found for this signature in database
GPG key ID: 7C52899193467641

View file

@ -1,4 +1,5 @@
#include "DirectoryView.hpp" #include "DirectoryView.hpp"
#include "src/Dirs.hpp"
#include "src/Forward.hpp" #include "src/Forward.hpp"
DirectoryView::~DirectoryView() {} DirectoryView::~DirectoryView() {}
@ -33,7 +34,7 @@ void DirectoryView::on_init() {
m_target = make_target(); m_target = make_target();
m_target->set_layout<Raven::DocumentLayout>(12.0); m_target->set_layout<Raven::DocumentLayout>(12.0);
navigate("/"); home();
set_did_init(true); set_did_init(true);
} }
@ -46,5 +47,5 @@ void DirectoryView::forward() {
} }
void DirectoryView::home() { void DirectoryView::home() {
std::cerr << "home(): not implemented" << std::endl; navigate(get_home_directory());
} }