2002-09-25 14:26:13 +00:00
|
|
|
/**
|
|
|
|
* \file GError.C
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2000-10-12 15:17:42 +00:00
|
|
|
*
|
2002-03-31 23:17:11 +00:00
|
|
|
* \author Michael Koziarski
|
2001-04-03 21:00:26 +00:00
|
|
|
* \author Baruch Even
|
2002-09-25 14:26:13 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2000-10-12 15:17:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2001-04-03 21:00:26 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "gnomeBC.h"
|
2002-03-27 10:07:57 +00:00
|
|
|
#include "GError.h"
|
2000-10-12 15:17:42 +00:00
|
|
|
|
2002-06-02 04:15:33 +00:00
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/textview.h>
|
2000-10-12 15:17:42 +00:00
|
|
|
|
2003-02-08 00:25:34 +00:00
|
|
|
GErrorDialog::GErrorDialog()
|
2003-02-25 14:51:38 +00:00
|
|
|
: GControlledView<ControlError>("GError")
|
2001-04-03 21:00:26 +00:00
|
|
|
{}
|
2000-10-12 15:17:42 +00:00
|
|
|
|
|
|
|
|
2002-06-02 04:15:33 +00:00
|
|
|
void GErrorDialog::build()
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2001-04-03 21:00:26 +00:00
|
|
|
// Connect the buttons.
|
2002-06-02 04:15:33 +00:00
|
|
|
button_close()->signal_clicked().connect(
|
|
|
|
SigC::slot(*this, &GErrorDialog::CloseClicked)
|
|
|
|
);
|
2000-10-12 15:17:42 +00:00
|
|
|
|
2001-04-03 21:00:26 +00:00
|
|
|
// Manage the buttons state
|
2002-01-16 12:30:17 +00:00
|
|
|
bc().setCancel(button_close());
|
2000-10-12 15:17:42 +00:00
|
|
|
|
2001-04-03 21:00:26 +00:00
|
|
|
// Make sure everything is in the correct state.
|
|
|
|
bc().refresh();
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-06-02 04:15:33 +00:00
|
|
|
void GErrorDialog::update()
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2002-06-02 04:15:33 +00:00
|
|
|
textarea()->get_buffer()->set_text(controller().params());
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|
2000-10-13 12:20:38 +00:00
|
|
|
|
2002-12-01 22:59:25 +00:00
|
|
|
Gtk::Button * GErrorDialog::button_close() const
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2002-12-01 22:59:25 +00:00
|
|
|
return getWidget<Gtk::Button>("r_button_close");
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|
|
|
|
|
2002-12-01 22:59:25 +00:00
|
|
|
Gtk::TextView * GErrorDialog::textarea() const
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2002-12-01 22:59:25 +00:00
|
|
|
return getWidget<Gtk::TextView>("r_textarea");
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|