aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui/GladeXml.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-20 03:27:08 +0000
committerDavid Robillard <d@drobilla.net>2011-05-20 03:27:08 +0000
commite86465f6b554033be89e7e0a0b8c50fd1105c80a (patch)
tree420700bdd5d63ffb2972e05ea558186ed0f6a7b1 /src/gui/GladeXml.hpp
parent4735eba0accf93893930abaf0a117e6bad77e0d0 (diff)
downloadmachina-e86465f6b554033be89e7e0a0b8c50fd1105c80a.tar.gz
machina-e86465f6b554033be89e7e0a0b8c50fd1105c80a.tar.bz2
machina-e86465f6b554033be89e7e0a0b8c50fd1105c80a.zip
Remove dependency on glade and glademm (migrate to GtkBuilder).
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@3295 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/GladeXml.hpp')
-rw-r--r--src/gui/GladeXml.hpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/gui/GladeXml.hpp b/src/gui/GladeXml.hpp
deleted file mode 100644
index a889693..0000000
--- a/src/gui/GladeXml.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This file is part of Machina.
- * Copyright 2007-2011 David Robillard <http://drobilla.net>
- *
- * Machina 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 3 of the License, or
- * (at your option) any later version.
- *
- * Machina 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 Machina. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <fstream>
-#include <iostream>
-#include <string>
-
-#include <gtkmm.h>
-#include <libglademm/xml.h>
-
-#include "machina-config.h"
-
-class GladeXml
-{
-public:
- static Glib::RefPtr<Gnome::Glade::Xml> create() {
- Glib::RefPtr<Gnome::Glade::Xml> xml;
-
- // Check for the .glade file in current directory
- std::string glade_filename = "./machina.glade";
- std::ifstream fs(glade_filename.c_str());
- if (fs.fail()) { // didn't find it, check PKGDATADIR
- fs.clear();
- glade_filename = MACHINA_DATA_DIR;
- glade_filename += "/machina.glade";
-
- fs.open(glade_filename.c_str());
- if (fs.fail()) {
- std::cerr << "Unable to find machina.glade in current directory or "
- << MACHINA_DATA_DIR << "." << std::endl;
- exit(EXIT_FAILURE);
- }
- fs.close();
- }
-
- try {
- xml = Gnome::Glade::Xml::create(glade_filename);
- } catch(const Gnome::Glade::XmlError& ex) {
- std::cerr << ex.what() << std::endl;
- throw ex;
- }
-
- return xml;
- }
-};
-