2 /* This file is part of
3 * =================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich.
7 * Copyright 1995-2000 The LyX Team.
9 * ================================================= */
12 #pragma implementation
16 #include "GnomeBase.h"
17 #include "support/LAssert.h"
19 #include "support/filetools.h"
22 GnomeBase::GnomeBase(ControlBase & c, string const & glade_file, string const & name)
23 : ViewBC<gnomeBC>(c), file_(glade_file), widget_name_(name), xml_(0)
26 GnomeBase::~GnomeBase()
29 gtk_object_unref(GTK_OBJECT(xml_));
33 void GnomeBase::loadXML() const
35 #warning Change this before declaring it production code! (be 20010325)
36 string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;/home/baruch/prog/lyx/graphics/src/frontends/gnome/dialogs/");
37 string const file = FileOpenSearch(path, file_, "glade");
40 lyxerr << "Cannot find glade file. Aborting." << std::endl;
44 lyxerr[Debug::GUI] << "Glade file to open is " << file << '\n';
46 xml_ = glade_xml_new(file.c_str(), widget_name_.c_str());