goodbye USE_TRACKS_CODE_FEATURES and is_tracks_build
[ardour.git] / libs / gtkmm2ext / textviewer.cc
index e62725acb4fb89854a826c840a84cf5bbcdcbfec..3ad8ac02cf960e703c685ba2c62b48187138b7a8 100644 (file)
@@ -1,28 +1,26 @@
 /*
-    Copyright (C) 1999 Paul Barton-Davis
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-    $Id$
-*/
+ * Copyright (C) 1999-2016 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2015 Robin Gareus <robin@gareus.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
 #include <string>
-#include <fstream>
-
 #include <gtkmm2ext/textviewer.h>
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace Gtkmm2ext;
@@ -73,32 +71,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 ()
 
@@ -108,7 +80,7 @@ TextViewer::scroll_to_bottom ()
        adj = scrollwin.get_vadjustment();
        adj->set_value (MAX(0,(adj->get_upper() - adj->get_page_size())));
 }
-       
+
 void
 TextViewer::deliver ()