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 #include <gnome--/dialog.h>
24 GnomeBase::GnomeBase(ControlButton & c,
25 string const & glade_file, string const & name)
27 , file_(glade_file), widget_name_(name), xml_(0)
31 GnomeBase::~GnomeBase()
34 gtk_object_unref(GTK_OBJECT(xml_));
38 void GnomeBase::loadXML() const
40 #warning Change this before declaring it production code! (be 20010325)
41 string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;/home/baruch/prog/lyx/graphics/src/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_ = glade_xml_new(file.c_str(), widget_name_.c_str());
55 void GnomeBase::show()
67 void GnomeBase::hide()
74 Gnome::Dialog * GnomeBase::dialog()
77 dialog_ = getWidget<Gnome::Dialog>(widget_name_.c_str());