3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS
12 #pragma implementation
16 #include "GnomeBase.h"
17 #include "support/LAssert.h"
19 #include "support/filetools.h"
21 #include <gtkmm/dialog.h>
23 GnomeBase::GnomeBase(ControlButtons & c,
26 , file_(name + ".glade"), widget_name_(name), xml_(0)
32 GnomeBase::~GnomeBase()
36 void GnomeBase::loadXML()
39 #warning Change this before declaring it production code! (be 20010325)
41 string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;");
42 string const file = FileOpenSearch(path, file_, "glade");
45 lyxerr << "Cannot find glade file. Aborting." << std::endl;
49 lyxerr[Debug::GUI] << "Glade file to open is " << file << '\n';
51 xml_ = Gnome::Glade::Xml::create (file, widget_name_);
55 void GnomeBase::show()
62 void GnomeBase::hide()
67 bool GnomeBase::validate()
72 void GnomeBase::OKClicked()
74 lyxerr[Debug::GUI] << "GnomeBase::OKClicked()\n";
78 void GnomeBase::CancelClicked()
80 lyxerr[Debug::GUI] << "GnomeBase::CancelClicked()\n";
84 void GnomeBase::ApplyClicked()
86 lyxerr[Debug::GUI] << "GnomeBase::ApplyClicked()\n";
90 void GnomeBase::RestoreClicked()
92 lyxerr[Debug::GUI] << "GnomeBase::RestoreClicked()\n";
96 void GnomeBase::InputChanged()
98 bc().valid(validate());
101 Gtk::Dialog * GnomeBase::dialog()
104 dialog_ = getWidget<Gtk::Dialog>(widget_name_);