]> git.lyx.org Git - features.git/commitdiff
Fixed bug that disabled permanently addition of new converters using the
authorAngus Leeming <leeming@lyx.org>
Tue, 12 Jun 2001 11:32:34 +0000 (11:32 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 12 Jun 2001 11:32:34 +0000 (11:32 +0000)
Preferences dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2104 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/converter.h
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormPreferences.C

index 31408ed78a8889bcc5a83ed17ba6c90c8cc7d6e1..648ddae7de04e5d49e5f83352e72b8c898154528 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-12  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * converter.h (Get): changed argument type from int to
+       FormatList::size_type to avoid unnecessary conversion.
+
 2001-06-07  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * gettext.h: include LString.h even when --disable-nls is on. 
index 743e74a3527df5a8016e074d0ab9b97b9e6ae806..6bac8b87ff96420044a29e081df1f6fed1957eb6 100644 (file)
@@ -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];
        }
        ///
index f73a0e10ba00bdc0305fb04443b3867d7dc90626..fd4ee4a1ad1cf273c0cecfb6fcb3069b63be4397 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-12  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * 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  <larsbj@birdstep.com>
 
        * FormToc.C (input): change test slightly.
index cd38bcfb657fc0d13b3dc48df4709363ea5884a3..041c2519d23852ca7a82730e15e98906e91680be 100644 (file)
@@ -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();