From: Angus Leeming Date: Tue, 12 Jun 2001 11:32:34 +0000 (+0000) Subject: Fixed bug that disabled permanently addition of new converters using the X-Git-Tag: 1.6.10~21193 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3171db33d2a1d4984c9b708e19450af5cf045a5b;p=features.git Fixed bug that disabled permanently addition of new converters using the Preferences dialog. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2104 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 31408ed78a..648ddae7de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-06-12 Angus Leeming + + * converter.h (Get): changed argument type from int to + FormatList::size_type to avoid unnecessary conversion. + 2001-06-07 Jean-Marc Lasgouttes * gettext.h: include LString.h even when --disable-nls is on. diff --git a/src/converter.h b/src/converter.h index 743e74a352..6bac8b87ff 100644 --- a/src/converter.h +++ b/src/converter.h @@ -89,7 +89,7 @@ public: /// typedef FormatList::const_iterator const_iterator; /// - Format const & Get(int i) const { + Format const & Get(FormatList::size_type i) const { return formatlist[i]; } /// diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index f73a0e10ba..fd4ee4a1ad 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2001-06-12 Angus Leeming + + * FormPreferences.C white-space change in various places. + (Converters::GetTo): get the contents of "to" not "from"! Thus fix bug + that disabled addition of new converters. + 2001-06-11 Lars Gullik Bjønnes * FormToc.C (input): change test slightly. diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index cd38bcfb65..041c2519d2 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -31,8 +31,8 @@ #include "form_preferences.h" #include "input_validators.h" #include "LyXView.h" -#include "lyxfunc.h" #include "language.h" +#include "lyxfunc.h" #include "Dialogs.h" #include "lyxrc.h" #include "combox.h" @@ -1086,8 +1086,7 @@ bool FormPreferences::Converters::Browser() fl_set_input(dialog_->input_flags, c.flags.c_str()); fl_set_object_label(dialog_->button_add, idex(_("Modify|#M"))); - fl_set_button_shortcut(dialog_->button_add, - scex(_("Modify|#M")), 1); + fl_set_button_shortcut(dialog_->button_add, scex(_("Modify|#M")), 1); setEnabled(dialog_->button_add, false); setEnabled(dialog_->button_delete, true); @@ -1117,17 +1116,15 @@ bool FormPreferences::Converters::Input() fl_freeze_form(dialog_->form); if (sel < 0) { - fl_set_object_label(dialog_->button_add, - idex(_("Add|#A"))); - fl_set_button_shortcut(dialog_->button_add, - scex(_("Add|#A")), 1); + fl_set_object_label(dialog_->button_add, idex(_("Add|#A"))); + fl_set_button_shortcut(dialog_->button_add, + scex(_("Add|#A")), 1); fl_deselect_browser(dialog_->browser_all); setEnabled(dialog_->button_delete, false); } else { - fl_set_object_label(dialog_->button_add, - idex(_("Modify|#M"))); + fl_set_object_label(dialog_->button_add, idex(_("Modify|#M"))); fl_set_button_shortcut(dialog_->button_add, scex(_("Modify|#M")), 1); @@ -1137,7 +1134,7 @@ bool FormPreferences::Converters::Input() setEnabled(dialog_->button_delete, true); } - string const command = fl_get_input(dialog_->input_converter); + string const command = strip(fl_get_input(dialog_->input_converter)); bool const enable = !(command.empty() || from == to); setEnabled(dialog_->button_add, enable); @@ -1164,7 +1161,7 @@ string const FormPreferences::Converters::GetFrom() const string const FormPreferences::Converters::GetTo() const { ::Formats::FormatList::size_type const i = - fl_get_choice(dialog_->choice_from); + fl_get_choice(dialog_->choice_to); if (i > 0 && i <= local_formats.size()) return local_formats.Get(i-1).name();