]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gnome/FormUrl.C
Clean-up of the button controller.
[lyx.git] / src / frontends / gnome / FormUrl.C
index b3b3a02b42b982b72acfd4d461a0d4124b336e93..84e00f07a34a725a23069a9ac4a547727a146d05 100644 (file)
@@ -1,4 +1,3 @@
-// -*- 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)
 {}
 
 
@@ -40,9 +37,6 @@ FormUrl::~FormUrl()
 
 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));
@@ -53,7 +47,7 @@ void FormUrl::build()
        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();
@@ -82,22 +76,6 @@ void FormUrl::disconnect_signals()
 }
 
 
-void FormUrl::show()
-{
-       if (!dialog_)
-               build();
-       
-       update();
-       dialog_->show();
-}
-
-
-void FormUrl::hide()
-{
-       dialog_->hide();
-}
-
-
 void FormUrl::apply()
 {
        controller().params().setContents(url()->get_text());
@@ -135,11 +113,6 @@ bool FormUrl::validate() const
 }
 
 
-Gnome::Dialog * FormUrl::dialog()
-{
-       return getWidget<Gnome::Dialog>("DiaInsertUrl");
-}
-
 Gtk::Entry * FormUrl::url() const
 {
        return getWidget<Gtk::Entry>("url");