Browse Source

Minor cleanup: removed Directories::on_row_activated

merge-requests/365/head
eidheim 10 years ago
parent
commit
5adfaae50f
  1. 8
      src/directories.cc
  2. 1
      src/directories.h
  3. 4
      src/window.cc

8
src/directories.cc

@ -151,12 +151,10 @@ Directories::Directories() : Gtk::ListViewText(1) {
if (iter) { if (iter) {
auto filesystem_path=iter->get_value(column_record.path); auto filesystem_path=iter->get_value(column_record.path);
if(filesystem_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); row_expanded(path) ? collapse_row(path) : expand_row(path, false);
} else { else
if(on_row_activated) Notebook::get().open(filesystem_path);
on_row_activated(filesystem_path);
}
} }
} }
}); });

1
src/directories.h

@ -65,7 +65,6 @@ public:
void on_save_file(boost::filesystem::path file_path); void on_save_file(boost::filesystem::path file_path);
void select(const boost::filesystem::path &path); void select(const boost::filesystem::path &path);
std::function<void(const boost::filesystem::path &path)> on_row_activated;
boost::filesystem::path path; boost::filesystem::path path;
protected: protected:

4
src/window.cc

@ -80,10 +80,6 @@ Window::Window() {
show_all_children(); show_all_children();
Info::get().hide(); 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 //Scroll to end of terminal whenever info is printed
Terminal::get().signal_size_allocate().connect([this](Gtk::Allocation& allocation){ Terminal::get().signal_size_allocate().connect([this](Gtk::Allocation& allocation){
auto adjustment=terminal_scrolled_window.get_vadjustment(); auto adjustment=terminal_scrolled_window.get_vadjustment();

Loading…
Cancel
Save