X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormUrl.C;h=276965721708acc310ef2b43e0c74594d0292b05;hb=3e39bef2c13125023f3b72532d90575bbe307335;hp=62ef744794dc19f544efad39b99efcc7eb4502e1;hpb=3b380bf220040189ba9b6de275b98e72eefd4e19;p=lyx.git diff --git a/src/frontends/xforms/FormUrl.C b/src/frontends/xforms/FormUrl.C index 62ef744794..2769657217 100644 --- a/src/frontends/xforms/FormUrl.C +++ b/src/frontends/xforms/FormUrl.C @@ -1,16 +1,12 @@ -/* This file is part of - * ====================================================== +/** + * \file xforms/FormUrl.C + * Copyright 2000-2001 The LyX Team. + * See the file COPYING. * - * LyX, The Document Processor - * - * Copyright 2000-2001 The LyX Team. - * - * ====================================================== - * - * \file FormUrl.C - * \author Angus Leeming, a.leeming@ic.ac.uk + * \author Angus Leeming, a.leeming@ic.ac.uk */ + #include #ifdef __GNUG__ @@ -33,42 +29,44 @@ void FormUrl::build() { dialog_.reset(build_url()); - fl_set_input_return(dialog_->name, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->url, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_name, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_url, FL_RETURN_CHANGED); + + setPrehandler(dialog_->input_name); + setPrehandler(dialog_->input_url); - // Manage the ok, apply, restore and cancel/close buttons + // Manage the ok, apply, restore and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); - bc().setCancel(dialog_->button_cancel); - bc().setUndoAll(dialog_->button_restore); - bc().refresh(); + bc().setCancel(dialog_->button_close); + bc().setRestore(dialog_->button_restore); - bc().addReadOnly(dialog_->name); - bc().addReadOnly(dialog_->url); - bc().addReadOnly(dialog_->radio_html); + bc().addReadOnly(dialog_->input_name); + bc().addReadOnly(dialog_->input_url); + bc().addReadOnly(dialog_->check_html); } void FormUrl::update() { - fl_set_input(dialog_->url, + fl_set_input(dialog_->input_url, controller().params().getContents().c_str()); - fl_set_input(dialog_->name, + fl_set_input(dialog_->input_name, controller().params().getOptions().c_str()); if (controller().params().getCmdName() == "url") - fl_set_button(dialog_->radio_html, 0); + fl_set_button(dialog_->check_html, 0); else - fl_set_button(dialog_->radio_html, 1); + fl_set_button(dialog_->check_html, 1); } void FormUrl::apply() { - controller().params().setContents(fl_get_input(dialog_->url)); - controller().params().setOptions(fl_get_input(dialog_->name)); + controller().params().setContents(fl_get_input(dialog_->input_url)); + controller().params().setOptions(fl_get_input(dialog_->input_name)); - if (fl_get_button(dialog_->radio_html)) + if (fl_get_button(dialog_->check_html)) controller().params().setCmdName("htmlurl"); else controller().params().setCmdName("url");