2000-10-12 15:17:42 +00:00
|
|
|
/* This file is part of
|
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
|
|
|
*
|
2001-04-03 21:00:26 +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)
|
|
|
|
: FormCB<ControlError>(c, "diaerror.glade", "DiaError")
|
|
|
|
{}
|
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.
|
|
|
|
close_btn()->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
|
|
|
|
bc().setCancel(close_btn());
|
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
|
|
|
|
2000-10-12 15:17:42 +00:00
|
|
|
|
2001-04-03 21:00:26 +00:00
|
|
|
Gtk::Button * FormError::close_btn() const
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2001-04-03 21:00:26 +00:00
|
|
|
return getWidget<Gtk::Button>("button_close");
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-04-03 21:00:26 +00:00
|
|
|
Gtk::Text * FormError::textarea() const
|
2000-10-12 15:17:42 +00:00
|
|
|
{
|
2001-04-03 21:00:26 +00:00
|
|
|
return getWidget<Gtk::Text>("textarea");
|
2000-10-12 15:17:42 +00:00
|
|
|
}
|