Prepare session-metadata export to external command
[ardour.git] / libs / gtkmm2ext / textviewer.cc
index 8c89b845b7c4aceb41c207ec461d127626368cbd..22c26aa1b772f83bcb2107bfa319095f71eac385 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 1999 Paul Barton-Davis 
+    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
 */
 
 #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 ()