2000-10-12 15:17:42 +00:00
|
|
|
/* This file is part of
|
2001-04-03 21:00:26 +00:00
|
|
|
* =================================================
|
2002-03-27 10:07:57 +00:00
|
|
|
*
|
2001-04-03 21:00:26 +00:00
|
|
|
* LyX, The Document Processor
|
|
|
|
* Copyright 1995-2000 The LyX Team.
|
2000-10-12 15:17:42 +00:00
|
|
|
*
|
2002-03-27 10:07:57 +00:00
|
|
|
* =================================================
|
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
|
2000-10-12 15:17:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
|
|
|
|
#include <gtk--/button.h>
|
2001-04-03 21:00:26 +00:00
|
|
|
#include <gtk--/text.h>
|
2000-10-12 15:17:42 +00:00
|
|
|
|
2002-03-31 23:17:11 +00:00
|
|
|
GError::GError(ControlError & c)
|
|
|
|
: FormCB<ControlError>(c, "GError")
|
2001-04-03 21:00:26 +00:00
|
|
|
{}
|
2000-10-12 15:17:42 +00:00
|
|
|
|
|
|
|
|
2002-03-31 23:17:11 +00:00
|
|
|
void GError::build()
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2001-04-03 21:00:26 +00:00
|
|
|
// Connect the buttons.
|
2002-03-31 23:17:11 +00:00
|
|
|
button_close()->clicked.connect(SigC::slot(this, &GError::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-03-31 23:17:11 +00:00
|
|
|
void GError::update()
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2001-04-03 21:00:26 +00:00
|
|
|
textarea()->insert(controller().params());
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|
2000-10-13 12:20:38 +00:00
|
|
|
|
2002-03-31 23:17:11 +00:00
|
|
|
Gtk::Button * GError::button_close() const
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2002-03-27 10:07:57 +00:00
|
|
|
return getWidget<Gtk::Button>("r_button_close");
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|
|
|
|
|
2002-03-31 23:17:11 +00:00
|
|
|
Gtk::Text * GError::textarea() const
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2002-03-27 10:07:57 +00:00
|
|
|
return getWidget<Gtk::Text>("r_textarea");
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|