]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormPreferences.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormPreferences.C
index 3a0a1b5290d2c76a77bf90c9d1734e07507f4e4b..a63609fc4db56a9ed55637b393e6d9181b28be9d 100644 (file)
@@ -28,6 +28,7 @@
 #include "Lsstream.h"
 #include "FormPreferences.h"
 #include "form_preferences.h"
+#include "ButtonController.tmpl"
 #include "input_validators.h"
 #include "LyXView.h"
 #include "language.h"
@@ -37,7 +38,7 @@
 #include "combox.h"
 #include "debug.h"
 #include "support/filetools.h"
-#include "lyx_gui_misc.h" // idex, scex
+#include "support/LAssert.h"
 #include "lyxlex.h"
 #include "input_validators.h"
 #include "xforms_helpers.h"
@@ -68,35 +69,18 @@ Converters local_converters;
 
 
 FormPreferences::FormPreferences(LyXView * lv, Dialogs * d)
-       : FormBaseBI(lv, d, _("Preferences")),
+       : FormBaseBI(lv, d, _("Preferences"), false),
          warningPosted(false),
          colors_(*this), converters_(*this), inputs_misc_(*this),
          formats_(*this), interface_(*this), language_(*this), 
          lnf_misc_(*this), outputs_misc_(*this), paths_(*this),
-         printer_(*this), screen_fonts_(*this), spellchecker_(*this)
+         printer_(*this), screen_fonts_(*this), spelloptions_(*this)
 {
        // let the dialog be shown
        // This is a permanent connection so we won't bother
        // storing a copy because we won't be disconnecting.
        d->showPreferences.connect(slot(this, &FormPreferences::show));
-}
-
-
-void FormPreferences::connect()
-{
-       fl_set_form_maxsize( dialog_->form, minw_, minh_ );
-
-       FormBaseBI::connect();
-}
-
-
-void FormPreferences::disconnect()
-{
-       // colors_->disconnect();
-       // converters_->disconnect(); //local_converters.Clear();
-       // formats_->disconnect();    //local_formats.Clear();
-
-       FormBaseBI::disconnect();
+       d->showSpellcheckerPreferences.connect(slot(this, &FormPreferences::showSpellPref));
 }
 
 
@@ -113,19 +97,19 @@ void FormPreferences::redraw()
 
        FL_FORM * form3 = 0;
        if (form2 == converters_tab_->form)
-               form3 = fl_get_active_folder(converters_tab_->tabfolder_outer);
+               form3 = fl_get_active_folder(converters_tab_->tabfolder_inner);
 
        else if (form2 == look_n_feel_tab_->form)
-               form3 = fl_get_active_folder(look_n_feel_tab_->tabfolder_outer);
+               form3 = fl_get_active_folder(look_n_feel_tab_->tabfolder_inner);
 
        else if (form2 == inputs_tab_->form)
-               form3 = fl_get_active_folder(inputs_tab_->tabfolder_outer);
+               form3 = fl_get_active_folder(inputs_tab_->tabfolder_inner);
 
        else if (form2 == outputs_tab_->form)
-               form3 = fl_get_active_folder(outputs_tab_->tabfolder_outer);
+               form3 = fl_get_active_folder(outputs_tab_->tabfolder_inner);
 
        else if (form2 == lang_opts_tab_->form)
-               form3 = fl_get_active_folder(lang_opts_tab_->tabfolder_outer);
+               form3 = fl_get_active_folder(lang_opts_tab_->tabfolder_inner);
 
        if (form3 && form3->visible)
                fl_redraw_form(form3);
@@ -139,6 +123,14 @@ FL_FORM * FormPreferences::form() const
 }
 
 
+void FormPreferences::showSpellPref()
+{
+       show();
+       fl_set_folder(dialog_->tabfolder_prefs, lang_opts_tab_->form);
+       fl_set_folder(lang_opts_tab_->tabfolder_inner, spelloptions_.dialog()->form);
+}
+
+
 void FormPreferences::ok()
 {
        FormBaseDeprecated::ok();
@@ -149,18 +141,18 @@ void FormPreferences::ok()
                colors_.modifiedXformsPrefs = !XformsColor::write(filename);
        }
        
-       lv_->getLyXFunc()->Dispatch(LFUN_SAVEPREFERENCES);
+       lv_->getLyXFunc()->dispatch(LFUN_SAVEPREFERENCES);
 }
 
 
 void FormPreferences::hide()
 {
        // We need to hide the active tabfolder otherwise we get a
-       // BadDrawable error from X windows and LyX crashes without saving.
-       FL_FORM * outer_form = fl_get_active_folder(dialog_->tabfolder_prefs);
-       if (outer_form
-           && outer_form->visible) {
-               fl_hide_form(outer_form);
+       // BadDrawable error from X window and LyX crashes without saving.
+       FL_FORM * inner_form = fl_get_active_folder(dialog_->tabfolder_prefs);
+       if (inner_form
+           && inner_form->visible) {
+               fl_hide_form(inner_form);
        }
        FormBaseDeprecated::hide();
 }
@@ -177,11 +169,11 @@ void FormPreferences::build()
        bc().setRestore(dialog_->button_restore);
 
        // build the tab folders
-       converters_tab_.reset(build_outer_tab());
-       look_n_feel_tab_.reset(build_outer_tab());
-       inputs_tab_.reset(build_outer_tab());
-       outputs_tab_.reset(build_outer_tab());
-       lang_opts_tab_.reset(build_outer_tab());
+       converters_tab_.reset(build_inner_tab());
+       look_n_feel_tab_.reset(build_inner_tab());
+       inputs_tab_.reset(build_inner_tab());
+       outputs_tab_.reset(build_inner_tab());
+       lang_opts_tab_.reset(build_inner_tab());
 
        // build actual tabfolder contents
        // these will become nested tabfolders
@@ -196,7 +188,7 @@ void FormPreferences::build()
        paths_.build();
        printer_.build();
        screen_fonts_.build();
-       spellchecker_.build();
+       spelloptions_.build();
 
        // Now add them to the tabfolder
        fl_addto_tabfolder(dialog_->tabfolder_prefs,
@@ -206,7 +198,7 @@ void FormPreferences::build()
                           _("Lang Opts"),
                           lang_opts_tab_->form);
        fl_addto_tabfolder(dialog_->tabfolder_prefs,
-                          _("Converters"),
+                          _("Conversion"),
                           converters_tab_->form);
        fl_addto_tabfolder(dialog_->tabfolder_prefs,
                           _("Inputs"),
@@ -217,49 +209,49 @@ void FormPreferences::build()
 
        // now build the nested tabfolders
        // Starting with look and feel
-       fl_addto_tabfolder(look_n_feel_tab_->tabfolder_outer,
+       fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
                           _("Screen Fonts"),
                           screen_fonts_.dialog()->form);
-       fl_addto_tabfolder(look_n_feel_tab_->tabfolder_outer,
+       fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
                           _("Interface"),
                           interface_.dialog()->form);
-       fl_addto_tabfolder(look_n_feel_tab_->tabfolder_outer,
+       fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
                           _("Colors"),
                           colors_.dialog()->form);
-       fl_addto_tabfolder(look_n_feel_tab_->tabfolder_outer,
+       fl_addto_tabfolder(look_n_feel_tab_->tabfolder_inner,
                           _("Misc"),
                           lnf_misc_.dialog()->form);
 
        // then build converters
-       fl_addto_tabfolder(converters_tab_->tabfolder_outer,
+       fl_addto_tabfolder(converters_tab_->tabfolder_inner,
                           _("Formats"),
                           formats_.dialog()->form);
-       fl_addto_tabfolder(converters_tab_->tabfolder_outer,
+       fl_addto_tabfolder(converters_tab_->tabfolder_inner,
                           _("Converters"),
                           converters_.dialog()->form);
 
        // then build inputs
-       // Paths should probably go in a few outer_tab called Files
-       fl_addto_tabfolder(inputs_tab_->tabfolder_outer,
+       // Paths should probably go in a few inner_tab called Files
+       fl_addto_tabfolder(inputs_tab_->tabfolder_inner,
                           _("Paths"),
                           paths_.dialog()->form);
-       fl_addto_tabfolder(inputs_tab_->tabfolder_outer,
+       fl_addto_tabfolder(inputs_tab_->tabfolder_inner,
                           _("Misc"),
                           inputs_misc_.dialog()->form);
 
        // then building outputs
-       fl_addto_tabfolder(outputs_tab_->tabfolder_outer,
+       fl_addto_tabfolder(outputs_tab_->tabfolder_inner,
                           _("Printer"),
                           printer_.dialog()->form);
-       fl_addto_tabfolder(outputs_tab_->tabfolder_outer,
+       fl_addto_tabfolder(outputs_tab_->tabfolder_inner,
                           _("Misc"),
                           outputs_misc_.dialog()->form);
 
        // then building usage
-       fl_addto_tabfolder(lang_opts_tab_->tabfolder_outer,
+       fl_addto_tabfolder(lang_opts_tab_->tabfolder_inner,
                           _("Spell checker"),
-                          spellchecker_.dialog()->form);
-       fl_addto_tabfolder(lang_opts_tab_->tabfolder_outer,
+                          spelloptions_.dialog()->form);
+       fl_addto_tabfolder(lang_opts_tab_->tabfolder_inner,
                           _("Language"),
                           language_.dialog()->form);
 }
@@ -289,7 +281,7 @@ void FormPreferences::apply()
        paths_.apply();
        printer_.apply();
        screen_fonts_.apply();
-       spellchecker_.apply();
+       spelloptions_.apply();
 }
 
 
@@ -321,8 +313,8 @@ void FormPreferences::feedback(FL_OBJECT * ob)
                str = printer_.feedback(ob);
        } else if (ob->form->fdui == screen_fonts_.dialog()) {
                str = screen_fonts_.feedback(ob);
-       } else if (ob->form->fdui == spellchecker_.dialog()) {
-               str = spellchecker_.feedback(ob);
+       } else if (ob->form->fdui == spelloptions_.dialog()) {
+               str = spelloptions_.feedback(ob);
        }
 
        str = formatted(_(str), dialog_->text_warning->w-10, FL_SMALL_SIZE);
@@ -355,8 +347,8 @@ bool FormPreferences::input(FL_OBJECT * ob, long)
                return paths_.input(ob);
        else if (ob->form->fdui == screen_fonts_.dialog())
                return screen_fonts_.input();
-       else if (ob->form->fdui == spellchecker_.dialog())
-               return spellchecker_.input(ob);
+       else if (ob->form->fdui == spelloptions_.dialog())
+               return spelloptions_.input(ob);
 
        return true;
 }
@@ -378,12 +370,12 @@ void FormPreferences::update()
        paths_.update();
        printer_.update();
        screen_fonts_.update();
-       spellchecker_.update();
+       spelloptions_.update();
 }
 
 
 FormPreferences::Colors::Colors(FormPreferences & p)
-       : parent_(p)
+       : modifiedXformsPrefs(false), parent_(p)
 {}
 
 
@@ -401,12 +393,12 @@ void FormPreferences::Colors::apply()
        for (vector<XformsColor>::const_iterator cit = xformsColorDB.begin();
             cit != xformsColorDB.end(); ++cit) {
                RGBColor col;
-               fl_getmcolor((*cit).colorID, &col.r, &col.g, &col.b);
-               if (col != (*cit).color()) {
+               fl_getmcolor(cit->colorID, &col.r, &col.g, &col.b);
+               if (col != cit->color()) {
                        modifiedXformsPrefs = true;
-                       if ((*cit).colorID == FL_BLACK)
+                       if (cit->colorID == FL_BLACK)
                                modifiedText = true;
-                       if ((*cit).colorID == FL_COL1)
+                       if (cit->colorID == FL_COL1)
                                modifiedBackground = true;
                }
        }
@@ -415,14 +407,13 @@ void FormPreferences::Colors::apply()
                for (vector<XformsColor>::const_iterator cit =
                             xformsColorDB.begin(); 
                     cit != xformsColorDB.end(); ++cit) {
-                       fl_mapcolor((*cit).colorID,
-                                   (*cit).r, (*cit).g, (*cit).b);
+                       fl_mapcolor(cit->colorID, cit->r, cit->g, cit->b);
 
-                       if (modifiedText && (*cit).colorID == FL_BLACK) {
+                       if (modifiedText && cit->colorID == FL_BLACK) {
                                AdjustVal(FL_INACTIVE, FL_BLACK, 0.5);
                        }
 
-                       if (modifiedBackground && (*cit).colorID == FL_COL1) {
+                       if (modifiedBackground && cit->colorID == FL_COL1) {
                                AdjustVal(FL_MCOL,      FL_COL1, 0.1);
                                AdjustVal(FL_TOP_BCOL,  FL_COL1, 0.1);
                                AdjustVal(FL_LEFT_BCOL, FL_COL1, 0.1);
@@ -431,9 +422,9 @@ void FormPreferences::Colors::apply()
                                AdjustVal(FL_BOTTOM_BCOL, FL_COL1, -0.5);
                        }
 
-                       if ((*cit).colorID == GUI_COLOR_CURSOR) {
+                       if (cit->colorID == GUI_COLOR_CURSOR) {
                                fl_mapcolor(GUI_COLOR_CURSOR,
-                                           (*cit).r, (*cit).g, (*cit).b);
+                                           cit->r, cit->g, cit->b);
                                fl_set_cursor_color(FL_DEFAULT_CURSOR,
                                                    GUI_COLOR_CURSOR, FL_WHITE);
                        }
@@ -444,11 +435,11 @@ void FormPreferences::Colors::apply()
        // Now do the same for the LyX LColors...
        for (vector<NamedColor>::const_iterator cit = lyxColorDB.begin();
             cit != lyxColorDB.end(); ++cit) {
-               LColor::color lc = lcolor.getFromGUIName((*cit).getname());
+               LColor::color lc = lcolor.getFromGUIName(cit->getname());
                if (lc == LColor::inherit) continue;
 
                // Create a valid X11 name of the form "#rrggbb"
-               string const hexname = X11hexname((*cit).color());
+               string const hexname = X11hexname(cit->color());
                
                if (lcolor.getX11Name(lc) != hexname) {
                        lyxerr[Debug::GUI]
@@ -460,7 +451,7 @@ void FormPreferences::Colors::apply()
 
                        string const s = lcolor.getLyXName(lc) + string(" ") +
                                hexname;
-                       parent_.lv_->getLyXFunc()->Dispatch(LFUN_SET_COLOR, s);
+                       parent_.lv_->getLyXFunc()->dispatch(LFUN_SET_COLOR, s);
                }
        }
 }
@@ -508,7 +499,8 @@ void FormPreferences::Colors::build()
        setPreHandler(dialog_->slider_red);
        setPreHandler(dialog_->slider_green);
        setPreHandler(dialog_->slider_blue);
-       setPreHandler(dialog_->button_colorspace);
+       setPreHandler(dialog_->radio_rgb);
+       setPreHandler(dialog_->radio_hsv);
 }
 
 string const
@@ -530,7 +522,8 @@ FormPreferences::Colors::feedback(FL_OBJECT const * const ob) const
                   ob == dialog_->slider_blue) {
                str = N_("Find a new color.");
 
-       } else if (ob == dialog_->button_colorspace) {
+       } else if (ob == dialog_->radio_rgb ||
+                  ob == dialog_->radio_hsv) {
                str = N_("Toggle between RGB and HSV color spaces.");
        }
 
@@ -553,7 +546,8 @@ void FormPreferences::Colors::input(FL_OBJECT const * const ob)
                   ob == dialog_->slider_blue) {
                InputRGB();
 
-       } else if (ob == dialog_->button_colorspace) {
+       } else if (ob == dialog_->radio_rgb ||
+                  ob == dialog_->radio_hsv) {
                SwitchColorSpace();
 
        } else if (ob == dialog_->button_modify) {
@@ -770,7 +764,7 @@ void FormPreferences::Colors::LoadBrowserLyX()
 
                        string const arg = lcolor.getLyXName(lc) + " black";
                        parent_.lv_->getLyXFunc()->
-                               Dispatch(LFUN_SET_COLOR, arg);
+                               dispatch(LFUN_SET_COLOR, arg);
                        continue;
                }
 
@@ -807,11 +801,11 @@ void FormPreferences::Colors::LoadBrowserLyX()
        fl_clear_browser(colbr);
        for (vector<XformsColor>::const_iterator cit = xformsColorDB.begin();
             cit != xformsColorDB.end(); ++cit) {
-               fl_addto_browser(colbr, (*cit).getname().c_str());
+               fl_addto_browser(colbr, cit->getname().c_str());
        }
        for (vector<NamedColor>::const_iterator cit = lyxColorDB.begin();
             cit != lyxColorDB.end(); ++cit) {
-               fl_addto_browser(colbr, (*cit).getname().c_str());
+               fl_addto_browser(colbr, cit->getname().c_str());
        }
 
        // just to be safe...
@@ -856,16 +850,14 @@ void FormPreferences::Colors::Modify()
 
 void FormPreferences::Colors::SwitchColorSpace() const
 {
-       bool const pressed = fl_get_button(dialog_->button_colorspace);
+       bool const hsv = fl_get_button(dialog_->radio_hsv);
 
        RGBColor col;
        fl_getmcolor(GUI_COLOR_CHOICE, &col.r, &col.g, &col.b);
 
        fl_freeze_form(dialog_->form);
 
-       if (pressed) {
-               fl_set_object_label(dialog_->button_colorspace, _("HSV"));
-
+       if (hsv) {
                fl_hide_object(dialog_->slider_red);
                fl_hide_object(dialog_->slider_blue);
                fl_hide_object(dialog_->slider_green);
@@ -896,8 +888,6 @@ void FormPreferences::Colors::SwitchColorSpace() const
                fl_set_object_label(dialog_->text_color_values, label.c_str());
                
        } else {
-               fl_set_object_label(dialog_->button_colorspace, _("RGB"));
-
                fl_show_object(dialog_->slider_red);
                fl_show_object(dialog_->slider_blue);
                fl_show_object(dialog_->slider_green);
@@ -948,8 +938,8 @@ FD_form_converters const * FormPreferences::Converters::dialog()
 void FormPreferences::Converters::apply() const
 {
        converters = local_converters;
-       converters.Update(formats);
-       converters.BuildGraph();
+       converters.update(formats);
+       converters.buildGraph();
 }
 
 
@@ -1014,7 +1004,7 @@ bool FormPreferences::Converters::input(FL_OBJECT const * const ob)
                return Add();
 
        } else if (ob == dialog_->button_delete) {
-               return Delete();
+               return erase();
        }
 
        return true;
@@ -1024,21 +1014,21 @@ bool FormPreferences::Converters::input(FL_OBJECT const * const ob)
 void FormPreferences::Converters::update()
 {
        local_converters = converters;
-       local_converters.Update(local_formats);
+       local_converters.update(local_formats);
        UpdateBrowser();
 }
 
 
 void FormPreferences::Converters::UpdateBrowser()
 {
-       local_converters.Sort();
+       local_converters.sort();
 
        fl_freeze_form(dialog_->form);
        fl_clear_browser(dialog_->browser_all);
        for (::Converters::const_iterator cit = local_converters.begin();
             cit != local_converters.end(); ++cit) {
-               string const name = (*cit).From->prettyname() + " -> "
-                       + (*cit).To->prettyname();
+               string const name = cit->From->prettyname() + " -> "
+                       + cit->To->prettyname();
                fl_addto_browser(dialog_->browser_all, name.c_str());
        }
        Input();
@@ -1053,10 +1043,10 @@ bool FormPreferences::Converters::Add()
        string const command = fl_get_input(dialog_->input_converter);
        string const flags = fl_get_input(dialog_->input_flags);
 
-       Converter const * old = local_converters.GetConverter(from, to);
-       local_converters.Add(from, to, command, flags);
+       Converter const * old = local_converters.getConverter(from, to);
+       local_converters.add(from, to, command, flags);
        if (!old) {
-               local_converters.UpdateLast(local_formats);
+               local_converters.updateLast(local_formats);
                UpdateBrowser();
        }
        setEnabled(dialog_->button_add, false);
@@ -1072,14 +1062,14 @@ bool FormPreferences::Converters::Browser()
 
        fl_freeze_form(dialog_->form);
 
-       Converter const & c = local_converters.Get(i-1);
-       int j = local_formats.GetNumber(c.from);
+       Converter const & c = local_converters.get(i - 1);
+       int j = local_formats.getNumber(c.from);
        if (j >= 0)
-               fl_set_choice(dialog_->choice_from, j+1);
+               fl_set_choice(dialog_->choice_from, j + 1);
 
-       j = local_formats.GetNumber(c.to);
+       j = local_formats.getNumber(c.to);
        if (j >= 0)
-               fl_set_choice(dialog_->choice_to, j+1);
+               fl_set_choice(dialog_->choice_to, j + 1);
 
        fl_set_input(dialog_->input_converter, c.command.c_str());
        fl_set_input(dialog_->input_flags, c.flags.c_str());
@@ -1095,12 +1085,12 @@ bool FormPreferences::Converters::Browser()
 }
 
 
-bool FormPreferences::Converters::Delete()
+bool FormPreferences::Converters::erase()
 {
        string const from = GetFrom();
        string const to = GetTo();
 
-       local_converters.Delete(from, to);
+       local_converters.erase(from, to);
        UpdateBrowser();
        return true;
 }
@@ -1110,7 +1100,7 @@ bool FormPreferences::Converters::Input()
 {
        string const from = GetFrom();
        string const to = GetTo();
-       int const sel = local_converters.GetNumber(from, to);
+       int const sel = local_converters.getNumber(from, to);
        
        fl_freeze_form(dialog_->form);
 
@@ -1148,7 +1138,7 @@ string const FormPreferences::Converters::GetFrom() const
                fl_get_choice(dialog_->choice_from);
 
        if (i > 0 && i <= local_formats.size())
-               return local_formats.Get(i-1).name();
+               return local_formats.get(i - 1).name();
        else {
                lyxerr << "FormPreferences::Converters::GetFrom: No choice!"
                       << endl;
@@ -1163,7 +1153,7 @@ string const FormPreferences::Converters::GetTo() const
                fl_get_choice(dialog_->choice_to);
 
        if (i > 0 && i <= local_formats.size())
-               return local_formats.Get(i-1).name();
+               return local_formats.get(i - 1).name();
        else {
                lyxerr << "FormPreferences::Converters::GetTo: No choice!"
                       << endl;
@@ -1181,7 +1171,7 @@ void FormPreferences::Converters::UpdateChoices() const
                        choice += " | ";
                else
                        choice += " ";
-               choice += (*cit).prettyname();
+               choice += cit->prettyname();
        }
        choice += " ";
 
@@ -1280,7 +1270,7 @@ bool FormPreferences::Formats::input(FL_OBJECT const * const ob)
                return Add();
 
        } else if (ob == dialog_->button_delete) {
-               return Delete();
+               return erase();
        }
 
        return false;
@@ -1296,7 +1286,7 @@ void FormPreferences::Formats::update()
 
 void FormPreferences::Formats::UpdateBrowser()
 {
-       local_formats.Sort();
+       local_formats.sort();
 
        fl_freeze_form(dialog_->form);
        fl_deselect_browser(dialog_->browser_all);
@@ -1304,14 +1294,14 @@ void FormPreferences::Formats::UpdateBrowser()
        for (::Formats::const_iterator cit = local_formats.begin();
             cit != local_formats.end(); ++cit)
                fl_addto_browser(dialog_->browser_all,
-                                (*cit).prettyname().c_str());
+                                cit->prettyname().c_str());
 
        Input();
        fl_unfreeze_form(dialog_->form);
 
        // Mustn't forget to update the Formats available to the converters_
        parent_.converters_.UpdateChoices();
-       local_converters.Update(local_formats);
+       local_converters.update(local_formats);
 }
 
 
@@ -1323,10 +1313,10 @@ bool FormPreferences::Formats::Add()
        string const shortcut =  fl_get_input(dialog_->input_shrtcut);
        string const viewer =  fl_get_input(dialog_->input_viewer);
 
-       Format const * old = local_formats.GetFormat(name);
+       Format const * old = local_formats.getFormat(name);
        string const old_prettyname = old ? old->prettyname() : string();
-       local_formats.Add(name, extension, prettyname, shortcut);
-       local_formats.SetViewer(name, viewer);
+       local_formats.add(name, extension, prettyname, shortcut);
+       local_formats.setViewer(name, viewer);
        if (!old || prettyname != old_prettyname) {
                UpdateBrowser();
                if (old)
@@ -1345,7 +1335,7 @@ bool FormPreferences::Formats::Browser()
 
        fl_freeze_form(dialog_->form);
 
-       Format const & f = local_formats.Get(i-1);
+       Format const & f = local_formats.get(i - 1);
 
        fl_set_input(dialog_->input_format, f.name().c_str());
        fl_set_input(dialog_->input_gui_name, f.prettyname().c_str());
@@ -1364,17 +1354,17 @@ bool FormPreferences::Formats::Browser()
 }
 
 
-bool FormPreferences::Formats::Delete()
+bool FormPreferences::Formats::erase()
 {
        string const name = fl_get_input(dialog_->input_format);
 
-       if (local_converters.FormatIsUsed(name)) {
+       if (local_converters.formatIsUsed(name)) {
                parent_.printWarning(_("Cannot remove a Format used by a Converter. Remove the converter first."));
                setEnabled(dialog_->button_delete, false);
                return false;
        }
 
-       local_formats.Delete(name);
+       local_formats.erase(name);
        UpdateBrowser();
        return true;
 }
@@ -1383,7 +1373,7 @@ bool FormPreferences::Formats::Delete()
 bool FormPreferences::Formats::Input()
 {
        string const name = fl_get_input(dialog_->input_format);
-       int const sel = local_formats.GetNumber(name);
+       int const sel = local_formats.getNumber(name);
        fl_freeze_form(dialog_->form);
 
        if (sel < 0) {
@@ -1479,11 +1469,11 @@ FD_form_interface const * FormPreferences::Interface::dialog()
 
 void FormPreferences::Interface::apply() const
 {
-       lyxrc.popup_font_name =
-               fl_get_input(dialog_->input_popup_font);
-       lyxrc.menu_font_name = fl_get_input(dialog_->input_menu_font);
-       lyxrc.font_norm_menu =
-               fl_get_input(dialog_->input_popup_encoding);
+       lyxrc.popup_normal_font =
+               fl_get_input(dialog_->input_popup_normal_font);
+       lyxrc.popup_bold_font = fl_get_input(dialog_->input_popup_bold_font);
+       lyxrc.popup_font_encoding =
+               fl_get_input(dialog_->input_popup_font_encoding);
        lyxrc.bind_file = fl_get_input(dialog_->input_bind_file);
        lyxrc.ui_file = fl_get_input(dialog_->input_ui_file);
        lyxrc.override_x_deadkeys =
@@ -1495,16 +1485,16 @@ void FormPreferences::Interface::build()
 {
        dialog_.reset(parent_.build_interface());
 
-       fl_set_input_return(dialog_->input_popup_font, FL_RETURN_CHANGED);
-       fl_set_input_return(dialog_->input_menu_font, FL_RETURN_CHANGED);
-       fl_set_input_return(dialog_->input_popup_encoding, FL_RETURN_CHANGED);
+       fl_set_input_return(dialog_->input_popup_normal_font, FL_RETURN_CHANGED);
+       fl_set_input_return(dialog_->input_popup_bold_font, FL_RETURN_CHANGED);
+       fl_set_input_return(dialog_->input_popup_font_encoding, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_bind_file, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_ui_file, FL_RETURN_CHANGED);
 
        // set up the feedback mechanism
-       setPreHandler(dialog_->input_popup_font);
-       setPreHandler(dialog_->input_menu_font);
-       setPreHandler(dialog_->input_popup_encoding);
+       setPreHandler(dialog_->input_popup_normal_font);
+       setPreHandler(dialog_->input_popup_bold_font);
+       setPreHandler(dialog_->input_popup_font_encoding);
        setPreHandler(dialog_->input_bind_file);
        setPreHandler(dialog_->button_bind_file_browse);
        setPreHandler(dialog_->input_ui_file);
@@ -1518,12 +1508,12 @@ FormPreferences::Interface::feedback(FL_OBJECT const * const ob) const
 {
        string str;
 
-       if (ob == dialog_->input_popup_font)
-               str = lyxrc.getDescription(LyXRC::RC_SCREEN_FONT_POPUP);
-       else if (ob == dialog_->input_menu_font)
-               str = lyxrc.getDescription(LyXRC::RC_SCREEN_FONT_MENU);
-       else if (ob == dialog_->input_popup_encoding)
-               str = lyxrc.getDescription(LyXRC::RC_SCREEN_FONT_ENCODING_MENU);
+       if (ob == dialog_->input_popup_normal_font)
+               str = lyxrc.getDescription(LyXRC::RC_POPUP_NORMAL_FONT);
+       else if (ob == dialog_->input_popup_bold_font)
+               str = lyxrc.getDescription(LyXRC::RC_POPUP_BOLD_FONT);
+       else if (ob == dialog_->input_popup_font_encoding)
+               str = lyxrc.getDescription(LyXRC::RC_POPUP_FONT_ENCODING);
        else if (ob == dialog_->input_bind_file)
                str = lyxrc.getDescription(LyXRC::RC_BINDFILE);
        else if (ob == dialog_->input_ui_file)
@@ -1539,11 +1529,11 @@ bool FormPreferences::Interface::input(FL_OBJECT const * const ob)
 {
        if (ob == dialog_->button_bind_file_browse) {
                string dir  = AddName(system_lyxdir, "bind");
-               string name = N_("Sys Bind");
+               string name = N_("Sys Bind|#S#s");
                pair<string,string> dir1(name, dir);
 
                dir = AddName(user_lyxdir, "bind");
-               name = N_("User Bind");
+               name = N_("User Bind|#U#u");
                pair<string,string> dir2(name, dir);
 
                parent_.browse(dialog_->input_bind_file,
@@ -1551,11 +1541,11 @@ bool FormPreferences::Interface::input(FL_OBJECT const * const ob)
                
        } else if (ob == dialog_->button_ui_file_browse) {
                string dir  = AddName(system_lyxdir, "ui");
-               string name = N_("Sys UI");
+               string name = N_("Sys UI|#S#s");
                pair<string,string> dir1(name, dir);
 
                dir = AddName(user_lyxdir, "ui");
-               name = N_("User UI");
+               name = N_("User UI|#U#u");
                pair<string,string> dir2(name, dir);
 
                parent_.browse(dialog_->input_ui_file,
@@ -1568,12 +1558,12 @@ bool FormPreferences::Interface::input(FL_OBJECT const * const ob)
 
 void FormPreferences::Interface::update()
 {
-       fl_set_input(dialog_->input_popup_font,
-                    lyxrc.popup_font_name.c_str());
-       fl_set_input(dialog_->input_menu_font,
-                    lyxrc.menu_font_name.c_str());
-       fl_set_input(dialog_->input_popup_encoding,
-                    lyxrc.font_norm_menu.c_str());
+       fl_set_input(dialog_->input_popup_normal_font,
+                    lyxrc.popup_normal_font.c_str());
+       fl_set_input(dialog_->input_popup_bold_font,
+                    lyxrc.popup_bold_font.c_str());
+       fl_set_input(dialog_->input_popup_font_encoding,
+                    lyxrc.popup_font_encoding.c_str());
        fl_set_input(dialog_->input_bind_file,
                     lyxrc.bind_file.c_str());
        fl_set_input(dialog_->input_ui_file,
@@ -1653,14 +1643,14 @@ void FormPreferences::Language::build()
        fl_deactivate_object(dialog_->choice_default_lang);
        combo_default_lang.reset(new Combox(FL_COMBOX_DROPLIST));
        combo_default_lang->add(obj->x, obj->y, obj->w, obj->h, 400,
-                               parent_.lang_opts_tab_->tabfolder_outer,
+                               parent_.lang_opts_tab_->tabfolder_inner,
                                parent_.dialog_->tabfolder_prefs);
        combo_default_lang->shortcut("#L",1);
        combo_default_lang->setcallback(ComboCB, &parent_);
 
        for (Languages::const_iterator cit = languages.begin();
            cit != languages.end(); ++cit) {
-               combo_default_lang->addto((*cit).second.lang());
+               combo_default_lang->addto(cit->second.lang());
        }
 
        fl_end_form();
@@ -1747,20 +1737,18 @@ bool FormPreferences::Language::input(FL_OBJECT const * const ob)
 
        if (ob == dialog_->button_kbmap1_browse) {
                string const dir  = AddName(system_lyxdir, "kbd");
-               string const name = N_("Key maps");
+               string const name = N_("Key maps|#K#k");
                pair<string, string> dir1(name, dir);
 
                parent_.browse(dialog_->input_kbmap1,
-                              N_("Keyboard map"), "*.kmap", dir1,
-                              make_pair(string(), string()));
+                              N_("Keyboard map"), "*.kmap", dir1);
        } else if (ob == dialog_->button_kbmap2_browse) {
                string const dir  = AddName(system_lyxdir, "kbd");
-               string const name = N_("Key maps");
+               string const name = N_("Key maps|#K#k");
                pair<string, string> dir1(name, dir);
 
                parent_.browse(dialog_->input_kbmap2,
-                              N_("Keyboard map"), "*.kmap", dir1,
-                              make_pair(string(), string()));
+                              N_("Keyboard map"), "*.kmap", dir1);
        }
 
        return activate;
@@ -1772,7 +1760,7 @@ void FormPreferences::Language::update()
        fl_set_button(dialog_->check_use_kbmap,
                      lyxrc.use_kbmap);
 
-       combo_default_lang->select_text(lyxrc.default_language);
+       combo_default_lang->select(lyxrc.default_language);
 
        if (lyxrc.use_kbmap) {
                fl_set_input(dialog_->input_kbmap1,
@@ -1837,10 +1825,22 @@ void FormPreferences::LnFmisc::apply() const
        lyxrc.new_ask_filename = fl_get_button(dialog_->check_ask_new_file);
        lyxrc.cursor_follows_scrollbar =
                fl_get_button(dialog_->check_cursor_follows_scrollbar);
+       lyxrc.dialogs_iconify_with_main =
+               fl_get_button(dialog_->check_dialogs_iconify_with_main);
        lyxrc.autosave = static_cast<unsigned int>
                (fl_get_counter_value(dialog_->counter_autosave));
        lyxrc.wheel_jump = static_cast<unsigned int>
                (fl_get_counter_value(dialog_->counter_wm_jump));
+
+       if (fl_get_button(dialog_->radio_display_monochrome)) {
+               lyxrc.display_graphics = "mono";
+       } else if (fl_get_button(dialog_->radio_display_grayscale)) {
+               lyxrc.display_graphics = "gray";
+       } else if (fl_get_button(dialog_->radio_display_color)) {
+               lyxrc.display_graphics = "color";
+       } else {
+               lyxrc.display_graphics = "no";
+       }
 }
 
 
@@ -1862,7 +1862,12 @@ void FormPreferences::LnFmisc::build()
        setPreHandler(dialog_->counter_autosave);
        setPreHandler(dialog_->check_ask_new_file);
        setPreHandler(dialog_->check_cursor_follows_scrollbar);
+       setPreHandler(dialog_->check_dialogs_iconify_with_main);
        setPreHandler(dialog_->counter_wm_jump);
+       setPreHandler(dialog_->radio_display_monochrome);
+       setPreHandler(dialog_->radio_display_grayscale);
+       setPreHandler(dialog_->radio_display_color);
+       setPreHandler(dialog_->radio_no_display);
 }
 
 
@@ -1883,10 +1888,17 @@ FormPreferences::LnFmisc::feedback(FL_OBJECT const * const ob) const
                str = lyxrc.getDescription(LyXRC::RC_NEW_ASK_FILENAME);
        else if (ob == dialog_->check_cursor_follows_scrollbar)
                str = lyxrc.getDescription(LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR);
+       else if (ob == dialog_->check_dialogs_iconify_with_main)
+               str = lyxrc.getDescription(LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN);
        else if (ob == dialog_->counter_autosave)
                str = lyxrc.getDescription(LyXRC::RC_AUTOSAVE);
        else if (ob == dialog_->counter_wm_jump)
                str = lyxrc.getDescription(LyXRC::RC_WHEEL_JUMP);
+       else if (ob == dialog_->radio_display_monochrome ||
+                ob == dialog_->radio_display_grayscale ||
+                ob == dialog_->radio_display_color ||
+                ob == dialog_->radio_no_display)
+               str = lyxrc.getDescription(LyXRC::RC_DISPLAY_GRAPHICS);
 
        return str;
 }
@@ -1902,8 +1914,20 @@ void FormPreferences::LnFmisc::update()
        fl_set_button(dialog_->check_ask_new_file, lyxrc.new_ask_filename);
        fl_set_button(dialog_->check_cursor_follows_scrollbar,
                      lyxrc.cursor_follows_scrollbar);
+       fl_set_button(dialog_->check_dialogs_iconify_with_main,
+                     lyxrc.dialogs_iconify_with_main);
        fl_set_counter_value(dialog_->counter_autosave, lyxrc.autosave);
        fl_set_counter_value(dialog_->counter_wm_jump, lyxrc.wheel_jump);
+
+       if (lyxrc.display_graphics == "mono") {
+               fl_set_button(dialog_->radio_display_monochrome, 1);
+       } else if (lyxrc.display_graphics == "gray") {
+               fl_set_button(dialog_->radio_display_grayscale, 1);
+       } else if (lyxrc.display_graphics == "color") {
+               fl_set_button(dialog_->radio_display_color, 1);
+       } else {
+               fl_set_button(dialog_->radio_no_display, 1);
+       }
 }
 
 
@@ -1930,6 +1954,8 @@ void FormPreferences::OutputsMisc::apply() const
 
        lyxrc.ascii_roff_command = fl_get_input(dialog_->input_ascii_roff);
        lyxrc.chktex_command = fl_get_input(dialog_->input_checktex);
+       lyxrc.view_dvi_paper_option = fl_get_input(dialog_->input_paperoption);
+       lyxrc.auto_reset_options = fl_get_button(dialog_->check_autoreset_classopt);
 }
 
 
@@ -1943,6 +1969,7 @@ void FormPreferences::OutputsMisc::build()
        fl_set_input_return(dialog_->input_tex_encoding, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_ascii_roff,   FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_checktex,     FL_RETURN_CHANGED);
+       fl_set_input_return(dialog_->input_paperoption,  FL_RETURN_CHANGED);
 
        fl_addto_choice(dialog_->choice_default_papersize,
                        _(" default | US letter | legal | executive | A3 | A4 | A5 | B5 "));
@@ -1953,6 +1980,8 @@ void FormPreferences::OutputsMisc::build()
        setPreHandler(dialog_->choice_default_papersize);
        setPreHandler(dialog_->input_ascii_roff);
        setPreHandler(dialog_->input_checktex);
+       setPreHandler(dialog_->input_paperoption);
+       setPreHandler(dialog_->check_autoreset_classopt);
 }
 
 
@@ -1971,6 +2000,10 @@ FormPreferences::OutputsMisc::feedback(FL_OBJECT const * const ob) const
                str = lyxrc.getDescription(LyXRC::RC_CHKTEX_COMMAND);
        else if (ob == dialog_->choice_default_papersize)
                str = lyxrc.getDescription(LyXRC::RC_DEFAULT_PAPERSIZE);
+       else if (ob == dialog_->input_paperoption)
+               str = lyxrc.getDescription(LyXRC::RC_VIEWDVI_PAPEROPTION);
+       else if (ob == dialog_->check_autoreset_classopt)
+               str = lyxrc.getDescription(LyXRC::RC_AUTORESET_OPTIONS);
 
        return str;
 }
@@ -1988,6 +2021,11 @@ void FormPreferences::OutputsMisc::update()
                     lyxrc.ascii_roff_command.c_str());
        fl_set_input(dialog_->input_checktex,
                     lyxrc.chktex_command.c_str());
+       fl_set_input(dialog_->input_paperoption,
+                     lyxrc.view_dvi_paper_option.c_str());
+       fl_set_button(dialog_->check_autoreset_classopt,
+                     lyxrc.auto_reset_options);
+
 }
 
 
@@ -2118,7 +2156,7 @@ bool FormPreferences::Paths::input(FL_OBJECT const * const ob)
 
        if (!ob || ob == dialog_->input_default_path) {
                string const name = fl_get_input(dialog_->input_default_path);
-               if (!RWInfo::WriteableDir(name)) {
+               if (!name.empty() && !RWInfo::WriteableDir(name)) {
                        parent_.printWarning(RWInfo::ErrorMessage());
                        return false;
                }
@@ -2126,7 +2164,7 @@ bool FormPreferences::Paths::input(FL_OBJECT const * const ob)
 
        if (!ob || ob == dialog_->input_template_path) {
                string const name = fl_get_input(dialog_->input_template_path);
-               if (!RWInfo::ReadableDir(name)) {
+               if (!name.empty() && !RWInfo::ReadableDir(name)) {
                        parent_.printWarning(RWInfo::ErrorMessage());
                        return false;
                }
@@ -2180,35 +2218,24 @@ bool FormPreferences::Paths::input(FL_OBJECT const * const ob)
 
        if (ob == dialog_->button_default_path_browse) {
                parent_.browse(dialog_->input_default_path,
-                              N_("Default path"), string(),
-                              make_pair(string(), string()),
-                              make_pair(string(), string()));
+                              N_("Default path"), string());
        } else if (ob == dialog_->button_template_path_browse) {
                parent_.browse(dialog_->input_template_path,
-                              N_("Template path"), string(),
-                              make_pair(string(), string()),
-                              make_pair(string(), string()));
+                              N_("Template path"), string());
        } else if (ob == dialog_->button_temp_dir_browse) {
                parent_.browse(dialog_->input_temp_dir,
-                              N_("Temp dir"), string(),
-                              make_pair(string(), string()),
-                              make_pair(string(), string()));
+                              N_("Temp dir"), string());
        } else if (ob == dialog_->button_lastfiles_browse) {
-               pair<string, string> dir(_("User"), user_lyxdir);
+               pair<string, string> dir(_("User|#U#u"), user_lyxdir);
 
                parent_.browse(dialog_->input_lastfiles,
-                              N_("Lastfiles"), string(), dir,
-                              make_pair(string(), string()));
+                              N_("Lastfiles"), string(), dir);
        } else if (ob == dialog_->button_backup_path_browse) {
                parent_.browse(dialog_->input_backup_path,
-                              N_("Backup path"), string(),
-                              make_pair(string(), string()),
-                              make_pair(string(), string()));
+                              N_("Backup path"), string());
        } else if (ob == dialog_->button_serverpipe_browse) {
                parent_.browse(dialog_->input_serverpipe,
-                              N_("LyX Server pipes"), string(),
-                              make_pair(string(), string()),
-                              make_pair(string(), string()));
+                              N_("LyX Server pipes"), string());
        }
        
        return activate;
@@ -2545,7 +2572,7 @@ void FormPreferences::ScreenFonts::apply() const
        if (changed) {
                // Now update the buffers
                // Can anything below here affect the redraw process?
-               parent_.lv_->getLyXFunc()->Dispatch(LFUN_SCREEN_FONT_UPDATE);
+               parent_.lv_->getLyXFunc()->dispatch(LFUN_SCREEN_FONT_UPDATE);
        }
 }
 
@@ -2731,18 +2758,18 @@ void FormPreferences::ScreenFonts::update()
 
 
 
-FormPreferences::SpellChecker::SpellChecker( FormPreferences &  p )
+FormPreferences::SpellOptions::SpellOptions( FormPreferences &  p )
        : parent_(p)
 {}
 
 
-FD_form_spellchecker const * FormPreferences::SpellChecker::dialog()
+FD_form_spelloptions const * FormPreferences::SpellOptions::dialog()
 {
        return dialog_.get();
 }
 
 
-void FormPreferences::SpellChecker::apply()
+void FormPreferences::SpellOptions::apply()
 {
 
        string choice = fl_get_choice_text(dialog_->choice_spell_command);
@@ -2750,6 +2777,7 @@ void FormPreferences::SpellChecker::apply()
        
        lyxrc.isp_command = choice;
 
+#if 0
        // If spell checker == "none", all other input set to off.
        if (fl_get_choice(dialog_->choice_spell_command) == 1) {
                lyxrc.isp_use_alt_lang = false;
@@ -2764,6 +2792,7 @@ void FormPreferences::SpellChecker::apply()
                lyxrc.isp_accept_compound = false;
                lyxrc.isp_use_input_encoding = false;
        } else {
+#else
                int button = fl_get_button(dialog_->check_alt_lang);
                choice = fl_get_input(dialog_->input_alt_lang);
                if (button && choice.empty()) button = 0;
@@ -2793,19 +2822,26 @@ void FormPreferences::SpellChecker::apply()
 
                button = fl_get_button(dialog_->check_input_enc);
                lyxrc.isp_use_input_encoding = static_cast<bool>(button);
+#endif
+#if 0
        }
+#endif
 
        // Reset view
        update();
 }
 
 
-void FormPreferences::SpellChecker::build()
+void FormPreferences::SpellOptions::build()
 {
-       dialog_.reset(parent_.build_spellchecker());
+       dialog_.reset(parent_.build_spelloptions());
 
        fl_addto_choice(dialog_->choice_spell_command,
+#if 0
                        _(" none | ispell | aspell "));
+#else
+                       _(" ispell | aspell "));
+#endif
        fl_set_input_return(dialog_->input_alt_lang,      FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_escape_chars,  FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_personal_dict, FL_RETURN_CHANGED);
@@ -2825,7 +2861,7 @@ void FormPreferences::SpellChecker::build()
 
 
 string const
-FormPreferences::SpellChecker::feedback(FL_OBJECT const * const ob) const
+FormPreferences::SpellOptions::feedback(FL_OBJECT const * const ob) const
 {
        string str;
 
@@ -2852,12 +2888,13 @@ FormPreferences::SpellChecker::feedback(FL_OBJECT const * const ob) const
 }
 
 
-bool FormPreferences::SpellChecker::input(FL_OBJECT const * const ob)
+bool FormPreferences::SpellOptions::input(FL_OBJECT const * const ob)
 {
-       // !ob if function is called from updateSpellChecker() to de/activate
+       // !ob if function is called from updateSpellOptions() to de/activate
        // objects,
        // otherwise the function is called by an xforms CB via input().
 
+#if 0
        // If spell checker == "none", disable all input.
        if (!ob || ob == dialog_->choice_spell_command) {
                if (fl_get_choice(dialog_->choice_spell_command) == 1) {
@@ -2878,6 +2915,7 @@ bool FormPreferences::SpellChecker::input(FL_OBJECT const * const ob)
                        fl_activate_object(dialog_->check_input_enc);
                }
        }
+#endif
 
        if (!ob || ob == dialog_->check_alt_lang) {
                bool const enable = fl_get_button(dialog_->check_alt_lang);
@@ -2896,24 +2934,29 @@ bool FormPreferences::SpellChecker::input(FL_OBJECT const * const ob)
 
        if (ob == dialog_->button_personal_dict) {
                parent_.browse(dialog_->input_personal_dict,
-                              N_("Personal dictionary"), "*.ispell",
-                              make_pair(string(), string()),
-                              make_pair(string(), string()));
+                              N_("Personal dictionary"), "*.ispell");
        }
        
        return true; // All input is valid!
 }
 
 
-void FormPreferences::SpellChecker::update()
+void FormPreferences::SpellOptions::update()
 {
        int choice = 1;
+#if 0
        if (lyxrc.isp_command == "none")
                choice = 1;
        else if (lyxrc.isp_command == "ispell")
                choice = 2;
        else if (lyxrc.isp_command == "aspell")
                choice = 3;
+#else
+       if (lyxrc.isp_command == "ispell")
+               choice = 1;
+       else if (lyxrc.isp_command == "aspell")
+               choice = 2;
+#endif
        fl_set_choice(dialog_->choice_spell_command, choice);
        
        string str;
@@ -2982,13 +3025,20 @@ void FormPreferences::browse(FL_OBJECT * inpt,
 
 
 // C function wrapper, required by xforms.
-extern "C" int C_FormPreferencesFeedbackCB(FL_OBJECT * ob, int event,
-                                          FL_Coord mx, FL_Coord my,
-                                          int key, void * xev)
-{
-       return FormPreferences::FeedbackCB(ob, event, mx, my, key, xev);
+extern "C" {
+       
+       static
+       int C_FormPreferencesFeedbackCB(FL_OBJECT * ob, int event,
+                                       FL_Coord mx, FL_Coord my,
+                                       int key, void * xev)
+       {
+               return FormPreferences::FeedbackCB(ob, event,
+                                                  mx, my, key, xev);
+       }
+       
 }
 
+
 int FormPreferences::FeedbackCB(FL_OBJECT * ob, int event,
                                FL_Coord, FL_Coord, int, void *)
 {