remove unused API (and ifstream)

This commit is contained in:
Robin Gareus
2015-10-05 21:14:37 +02:00
parent eb4c9b022a
commit c3b2cc46c5
2 changed files with 0 additions and 27 deletions

View File

@@ -46,7 +46,6 @@ class LIBGTKMM2EXT_API TextViewer : public Gtk::Window, public Transmitter
Gtk::TextView& text() { return etext; }
Gtk::Button& dismiss_button() { return dismiss; }
void insert_file (const std::string &);
void scroll_to_bottom ();
void deliver ();

View File

@@ -73,32 +73,6 @@ TextViewer::signal_released_handler()
hide();
}
void
TextViewer::insert_file (const string &path)
{
char buf[1024];
ifstream f (path.c_str());
if (!f) {
return;
}
Glib::RefPtr<Gtk::TextBuffer> tb (etext.get_buffer());
tb->begin_user_action();
while (f) {
f.read (buf, sizeof (buf));
if (f.gcount()) {
buf[f.gcount()] = '\0';
string foo (buf);
tb->insert (tb->end(), foo);
}
}
tb->end_user_action();
}
void
TextViewer::scroll_to_bottom ()