remove unused API (and ifstream)
This commit is contained in:
@@ -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 ();
|
||||
|
||||
@@ -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 ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user