From 5adfaae50f1857b33b3f032e8edbe8661100c7f0 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 12 Jul 2016 08:04:11 +0200 Subject: [PATCH] Minor cleanup: removed Directories::on_row_activated --- src/directories.cc | 8 +++----- src/directories.h | 1 - src/window.cc | 4 ---- 3 files changed, 3 insertions(+), 10 deletions(-) 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();