#include "gnomeBC.h"
#include "FormUrl.h"
-#include <gnome--/dialog.h>
#include <gtk--/entry.h>
#include <gtk--/checkbutton.h>
FormUrl::FormUrl(ControlUrl & c)
: FormCB<ControlUrl>(c, "diainserturl.glade", "DiaInsertUrl")
- , dialog_(0)
{}
// Note that there is no need to destroy the class itself, it seems
// like everything is managed inside it. Deleting the class itself will
// a crash at the end of the program.
- dialog_->destroy();
+ //dialog_->destroy();
}
void FormUrl::build()
{
- // Make sure the dialog is loaded.
- dialog_ = dialog();
-
// Connect the buttons.
ok_btn()->clicked.connect(SigC::slot(this, &FormUrl::OKClicked));
cancel_btn()->clicked.connect(SigC::slot(this, &FormUrl::CancelClicked));
}
-void FormUrl::show()
-{
- if (!dialog_)
- build();
-
- update();
- dialog_->show();
-}
-
-
-void FormUrl::hide()
-{
- dialog_->hide();
-}
-
-
void FormUrl::apply()
{
controller().params().setContents(url()->get_text());
}
-Gnome::Dialog * FormUrl::dialog()
-{
- return getWidget<Gnome::Dialog>("DiaInsertUrl");
-}
-
Gtk::Entry * FormUrl::url() const
{
return getWidget<Gtk::Entry>("url");