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.
15 #include "support/filetools.h"
16 #include "ControlButtons.h"
19 #include <gtkmm/dialog.h>
21 GView::GView(string const & name)
24 file_(name + ".glade"),
38 return static_cast<gnomeBC &>(getController().bc());
44 #warning Change this before declaring it production code! (be 20010325)
46 string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;");
48 string const file = FileOpenSearch(path, file_, "glade");
51 lyxerr << "Cannot find glade file. Aborting." << endl;
55 lyxerr[Debug::GUI] << "Glade file to open is " << file << endl;
57 xml_ = Gnome::Glade::Xml::create (file, widget_name_);
78 void GView::OKClicked()
80 lyxerr[Debug::GUI] << "GView::OKClicked()" << endl;
81 getController().OKButton();
84 void GView::CancelClicked()
86 lyxerr[Debug::GUI] << "GView::CancelClicked()" << endl;
87 getController().CancelButton();
90 void GView::ApplyClicked()
92 lyxerr[Debug::GUI] << "GView::ApplyClicked()" << endl;
93 getController().ApplyButton();
96 void GView::RestoreClicked()
98 lyxerr[Debug::GUI] << "GView::RestoreClicked()" << endl;
99 getController().RestoreButton();
102 void GView::InputChanged()
104 bc().valid(isValid());
107 Gtk::Dialog * GView::dialog()
110 dialog_ = getWidget<Gtk::Dialog>(widget_name_);
115 bool GView::isVisible() const
117 return dialog_ && dialog_->is_visible();