1 /* This file is part of
2 * =================================================
4 * LyX, The Document Processor
5 * Copyright 1995 Matthias Ettrich.
6 * Copyright 1995-2000 The LyX Team.
8 * ================================================= */
11 #pragma implementation
15 #include "GnomeBase.h"
16 #include "support/LAssert.h"
18 #include "support/filetools.h"
20 #include <gtkmm/dialog.h>
22 GnomeBase::GnomeBase(ControlButtons & c,
25 , file_(name + ".glade"), widget_name_(name), xml_(0)
31 GnomeBase::~GnomeBase()
35 void GnomeBase::loadXML()
38 #warning Change this before declaring it production code! (be 20010325)
40 string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;");
41 string const file = FileOpenSearch(path, file_, "glade");
44 lyxerr << "Cannot find glade file. Aborting." << std::endl;
48 lyxerr[Debug::GUI] << "Glade file to open is " << file << '\n';
50 xml_ = Gnome::Glade::Xml::create (file, widget_name_);
54 void GnomeBase::show()
61 void GnomeBase::hide()
66 bool GnomeBase::validate()
71 void GnomeBase::OKClicked()
73 lyxerr[Debug::GUI] << "GnomeBase::OKClicked()\n";
77 void GnomeBase::CancelClicked()
79 lyxerr[Debug::GUI] << "GnomeBase::CancelClicked()\n";
83 void GnomeBase::ApplyClicked()
85 lyxerr[Debug::GUI] << "GnomeBase::ApplyClicked()\n";
89 void GnomeBase::RestoreClicked()
91 lyxerr[Debug::GUI] << "GnomeBase::RestoreClicked()\n";
95 void GnomeBase::InputChanged()
97 bc().valid(validate());
100 Gtk::Dialog * GnomeBase::dialog()
103 dialog_ = getWidget<Gtk::Dialog>(widget_name_);