-// -*- C++ -*-
/* This file is part of
* =================================================
*
#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)
{}
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));
bc().setOK(ok_btn());
bc().setCancel(cancel_btn());
bc().setApply(apply_btn());
- bc().setUndoAll(restore_btn());
+ bc().setRestore(restore_btn());
// Make sure everything is in the correct state.
bc().refresh();
}
-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");