2000-10-12 15:17:42 +00:00
|
|
|
/* This file is part of
|
2001-04-03 21:00:26 +00:00
|
|
|
* =================================================
|
2002-03-21 21:21:28 +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-21 21:21:28 +00:00
|
|
|
* =================================================
|
2000-10-12 15:17:42 +00:00
|
|
|
*
|
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"
|
2000-10-12 15:17:42 +00:00
|
|
|
#include "FormError.h"
|
|
|
|
|
|
|
|
#include <gtk--/button.h>
|
2001-04-03 21:00:26 +00:00
|
|
|
#include <gtk--/text.h>
|
2000-10-12 15:17:42 +00:00
|
|
|
|
2001-04-03 21:00:26 +00:00
|
|
|
FormError::FormError(ControlError & c)
|
2002-01-16 12:30:17 +00:00
|
|
|
: FormCB<ControlError>(c, "FormError")
|
2001-04-03 21:00:26 +00:00
|
|
|
{}
|
2000-10-12 15:17:42 +00:00
|
|
|
|
|
|
|
|
2001-04-03 21:00:26 +00:00
|
|
|
void FormError::build()
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2001-04-03 21:00:26 +00:00
|
|
|
// Connect the buttons.
|
2002-01-16 12:30:17 +00:00
|
|
|
button_close()->clicked.connect(SigC::slot(this, &FormError::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
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-04-03 21:00:26 +00:00
|
|
|
void FormError::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-21 21:21:28 +00:00
|
|
|
Gtk::Button * FormError::button_close() const
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2002-03-21 21:21:28 +00:00
|
|
|
return getWidget<Gtk::Button>("r_button_close");
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
Gtk::Text * FormError::textarea() const
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2002-03-21 21:21:28 +00:00
|
|
|
return getWidget<Gtk::Text>("r_textarea");
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|