/*
- 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;
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 ()
adj = scrollwin.get_vadjustment();
adj->set_value (MAX(0,(adj->get_upper() - adj->get_page_size())));
}
-
+
void
TextViewer::deliver ()