diff --git a/src/directories.cc b/src/directories.cc index 736e599..2ca5998 100644 --- a/src/directories.cc +++ b/src/directories.cc @@ -151,12 +151,10 @@ Directories::Directories() : Gtk::ListViewText(1) { if (iter) { auto filesystem_path=iter->get_value(column_record.path); if(filesystem_path!="") { - if (boost::filesystem::is_directory(boost::filesystem::path(filesystem_path))) { + if (boost::filesystem::is_directory(boost::filesystem::path(filesystem_path))) row_expanded(path) ? collapse_row(path) : expand_row(path, false); - } else { - if(on_row_activated) - on_row_activated(filesystem_path); - } + else + Notebook::get().open(filesystem_path); } } }); diff --git a/src/directories.h b/src/directories.h index 4453879..264736c 100644 --- a/src/directories.h +++ b/src/directories.h @@ -65,7 +65,6 @@ public: void on_save_file(boost::filesystem::path file_path); void select(const boost::filesystem::path &path); - std::function on_row_activated; boost::filesystem::path path; protected: diff --git a/src/window.cc b/src/window.cc index ae1fa87..4b1ad40 100644 --- a/src/window.cc +++ b/src/window.cc @@ -80,10 +80,6 @@ Window::Window() { show_all_children(); Info::get().hide(); - Directories::get().on_row_activated=[this](const boost::filesystem::path &path) { - Notebook::get().open(path); - }; - //Scroll to end of terminal whenever info is printed Terminal::get().signal_size_allocate().connect([this](Gtk::Allocation& allocation){ auto adjustment=terminal_scrolled_window.get_vadjustment();