From c3b2cc46c5b5c0d53be4271a852cc07fd67ac046 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 5 Oct 2015 21:14:37 +0200 Subject: remove unused API (and ifstream) --- libs/gtkmm2ext/gtkmm2ext/textviewer.h | 1 - libs/gtkmm2ext/textviewer.cc | 26 -------------------------- 2 files changed, 27 deletions(-) diff --git a/libs/gtkmm2ext/gtkmm2ext/textviewer.h b/libs/gtkmm2ext/gtkmm2ext/textviewer.h index 51af88c005..65c0bad65e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/textviewer.h +++ b/libs/gtkmm2ext/gtkmm2ext/textviewer.h @@ -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 (); diff --git a/libs/gtkmm2ext/textviewer.cc b/libs/gtkmm2ext/textviewer.cc index 995cbc8eaa..91882c3280 100644 --- a/libs/gtkmm2ext/textviewer.cc +++ b/libs/gtkmm2ext/textviewer.cc @@ -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 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 () -- cgit v1.2.3