diff --git a/ChangeLog b/ChangeLog index ce17b02bb1..332612c224 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,35 @@ +2000-11-21 Angus Leeming + + * src/LColor.C (init): + * src/lyxrc.C (getDescription): changed some comments as suggested by + Rob Lahaye. + + * src/frontends/xforms/FormBase.[Ch]: modified to connect and disconnect + the redrawGUI signal in best-practice fashion. + + * src/frontends/xforms/FormPreferences.[Ch]: renamed usage_tab_ as + long_opts_tab to reflect the change in name of this tabfolder, as + suggested by Rob Lahaye. + (connect, disconnect): new methods. Don't do much at present other than + ensuring that we can't resize the dialog. This just makes xforms go + crazy. + (lots of methods in Colors): made void rather than bool. The idea is + to have an isOk() function that keeps track of whether any input is + genuinely invalid and should therefore block Save, Apply. + Easier to manipulate the counters rapidly. + (Colors::InputBrowserLyX, Colors::Modify): rewritten so that Amir's + compiler will like this code. Much cleaner way of doing things. + + * src/frontends/xforms/forms/fdfix.sh: a little speed up fix. + + * src/frontends/xforms/forms/form_preferences.fd: used normal counters + rather than simple counters, following suggestion by Rob Lahaye. + + * src/frontends/xforms/forms/form_print.fd: used labelframe rather + than engraved frame + text. + + * src/frontends/xforms/forms/makefile: removed spurious command. + 2000-11-17 Angus Leeming * src/LColor.C (c-tor): fixed a couple of items in the ColorEntry diff --git a/src/LColor.C b/src/LColor.C index 4392c58886..31a23f0d0e 100644 --- a/src/LColor.C +++ b/src/LColor.C @@ -60,7 +60,7 @@ LColor::LColor() { yellow, N_("yellow"), "yellow", "yellow", "yellow" }, { cursor, N_("cursor"), "cursor", "black", "cursor" }, { background, N_("background"), "background", "linen", "background" }, - { foreground, N_("foreground"), "foreground", "black", "foreground" }, + { foreground, N_("text"), "foreground", "black", "foreground" }, { selection, N_("selection"), "selection", "LightBlue", "selection" }, { latex, N_("latex"), "latex", "DarkRed", "latex" }, { floats, N_("floats"), "floats", "red", "floats" }, diff --git a/src/buffer.C b/src/buffer.C index b2350fa66e..6a625daefb 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -813,7 +813,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, LyXParagraph *& par, for (; tmpret > 0; --tmpret) tmpret2 = tmpret2 * 2; #else - int const tmpret2 = pow(2.0, tmpret); + int const tmpret2 = int(pow(2.0, tmpret)); #endif lyxerr << "Tmpret2 = " << tmpret2 << endl; par->align = LyXAlignment(tmpret2); diff --git a/src/frontends/xforms/FormBase.C b/src/frontends/xforms/FormBase.C index ad845fd570..6053d8e8f4 100644 --- a/src/frontends/xforms/FormBase.C +++ b/src/frontends/xforms/FormBase.C @@ -45,11 +45,10 @@ C_GENERICCB(FormBase, RestoreCB) FormBase::FormBase(LyXView * lv, Dialogs * d, string const & t, ButtonPolicy * bp, char const * close, char const * cancel) - : lv_(lv), bc_(bp, cancel, close), d_(d), h_(0), title(t), bp_(bp), - minw_(0), minh_(0) + : lv_(lv), bc_(bp, cancel, close), d_(d), h_(0), r_(0), title(t), + bp_(bp), minw_(0), minh_(0) { Assert(lv && d && bp); - Dialogs::redrawGUI.connect(slot(this, &FormBase::redraw)); } @@ -70,6 +69,14 @@ void FormBase::redraw() void FormBase::connect() { fl_set_form_minsize(form(), minw_, minh_); + r_ = Dialogs::redrawGUI.connect(slot(this, &FormBase::redraw)); +} + + +void FormBase::disconnect() +{ + h_.disconnect(); + r_.disconnect(); } @@ -186,12 +193,6 @@ void FormBaseBI::connect() } -void FormBaseBI::disconnect() -{ - h_.disconnect(); -} - - FormBaseBD::FormBaseBD(LyXView * lv, Dialogs * d, string const & t, ButtonPolicy * bp, char const * close, char const * cancel) @@ -213,5 +214,5 @@ void FormBaseBD::connect() void FormBaseBD::disconnect() { u_.disconnect(); - h_.disconnect(); + FormBase::disconnect(); } diff --git a/src/frontends/xforms/FormBase.h b/src/frontends/xforms/FormBase.h index ec4c1eec68..4b46673d07 100644 --- a/src/frontends/xforms/FormBase.h +++ b/src/frontends/xforms/FormBase.h @@ -72,7 +72,7 @@ protected: // methods /// Connect signals. Also perform any necessary initialisation. virtual void connect(); /// Disconnect signals. Also perform any necessary housekeeping. - virtual void disconnect() = 0; + virtual void disconnect(); /// Build the dialog virtual void build() = 0; /** Filter the inputs on callback from xforms @@ -110,6 +110,8 @@ protected: // methods Dialogs * d_; /// Hide connection. Connection h_; + /// Redraw connection. + Connection r_; /// dialog title, displayed by WM. string title; private: @@ -137,8 +139,6 @@ protected: /// Connect signals virtual void connect(); - /// Disconnect signals - virtual void disconnect(); }; diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 5e2a5ce83b..4e174dd294 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -50,10 +50,11 @@ using std::endl; using std::find; using std::find_if; using std::pair; +using std::make_pair; using std::max; +using std::min; using std::sort; using std::vector; -using std::make_pair; extern string system_lyxdir; extern string user_lyxdir; @@ -71,7 +72,7 @@ FormPreferences::FormPreferences(LyXView * lv, Dialogs * d) : FormBaseBI(lv, d, _("Preferences"), new PreferencesPolicy), dialog_(0), converters_tab_(0), inputs_tab_(0), look_n_feel_tab_(0), - outputs_tab_(0), usage_tab_(0), + outputs_tab_(0), lang_opts_tab_(0), warningPosted(false), colors_(*this), converters_(*this), inputs_misc_(*this), formats_(*this), interface_(*this), language_(*this), @@ -91,12 +92,30 @@ FormPreferences::~FormPreferences() delete inputs_tab_; delete look_n_feel_tab_; delete outputs_tab_; - delete usage_tab_; + delete lang_opts_tab_; delete dialog_; } +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(); +} + + void FormPreferences::redraw() { if (!(form() && form()->visible)) @@ -121,8 +140,8 @@ void FormPreferences::redraw() else if (form2 == outputs_tab_->form) form3 = fl_get_active_folder(outputs_tab_->tabfolder_outer); - else if (form2 == usage_tab_->form) - form3 = fl_get_active_folder(usage_tab_->tabfolder_outer); + else if (form2 == lang_opts_tab_->form) + form3 = fl_get_active_folder(lang_opts_tab_->tabfolder_outer); if (form3 && form3->visible) fl_redraw_form(form3); @@ -183,7 +202,7 @@ void FormPreferences::build() look_n_feel_tab_ = build_outer_tab(); inputs_tab_ = build_outer_tab(); outputs_tab_ = build_outer_tab(); - usage_tab_ = build_outer_tab(); + lang_opts_tab_ = build_outer_tab(); // build actual tabfolder contents // these will become nested tabfolders @@ -202,11 +221,11 @@ void FormPreferences::build() // Now add them to the tabfolder fl_addto_tabfolder(dialog_->tabfolder_prefs, - _("Look and Feel"), + _("Look & Feel"), look_n_feel_tab_->form); fl_addto_tabfolder(dialog_->tabfolder_prefs, - _("Usage"), - usage_tab_->form); + _("Lang Opts"), + lang_opts_tab_->form); fl_addto_tabfolder(dialog_->tabfolder_prefs, _("Converters"), converters_tab_->form); @@ -258,10 +277,10 @@ void FormPreferences::build() outputs_misc_.dialog()->form); // then building usage - fl_addto_tabfolder(usage_tab_->tabfolder_outer, + fl_addto_tabfolder(lang_opts_tab_->tabfolder_outer, _("Spell checker"), spellchecker_.dialog()->form); - fl_addto_tabfolder(usage_tab_->tabfolder_outer, + fl_addto_tabfolder(lang_opts_tab_->tabfolder_outer, _("Language"), language_.dialog()->form); } @@ -343,9 +362,10 @@ bool FormPreferences::input(FL_OBJECT * ob, long) // some totally ridiculous value somewhere. Change activate to suit. // comments before each test describe what is _valid_ - if (ob->form->fdui == colors_.dialog()) - return colors_.input(ob); - else if (ob->form->fdui == converters_.dialog()) + if (ob->form->fdui == colors_.dialog()) { + colors_.input(ob); + return true; + } else if (ob->form->fdui == converters_.dialog()) return converters_.input(ob); else if (ob->form->fdui == formats_.dialog()) return formats_.input(ob); @@ -440,8 +460,7 @@ void FormPreferences::Colors::apply() // Ascertain the X11 name RGBColor const & col = (*cit).color(); vector::const_iterator cit2 = - find_if(colorDB.begin(), colorDB.end(), - compare_memfun(&NamedColor::color, col)); + find(colorDB.begin(), colorDB.end(), col); if (cit2 == colorDB.end()) continue; if (lcolor.getX11Name(lc) != (*cit2).getname()) { @@ -465,10 +484,9 @@ void FormPreferences::Colors::build() { dialog_ = parent_.build_colors(); - fl_set_object_color(dialog_->button_color, - FL_FREE_COL4, FL_FREE_COL4); + fl_set_object_color(dialog_->button_color, FL_FREE_COL1, FL_FREE_COL1); - fl_set_object_color(dialog_->dial_hue, FL_FREE_COL4+1, FL_BLACK); + fl_set_object_color(dialog_->dial_hue, FL_FREE_COL2, FL_BLACK); fl_set_dial_return(dialog_->dial_hue, FL_RETURN_CHANGED); fl_set_dial_bounds(dialog_->dial_hue, 0.0, 360.0); @@ -551,7 +569,7 @@ FormPreferences::Colors::feedback(FL_OBJECT const * const ob) const } -bool FormPreferences::Colors::input(FL_OBJECT const * const ob) +void FormPreferences::Colors::input(FL_OBJECT const * const ob) { if (ob == dialog_->browser_x11) { InputBrowserX11(); @@ -582,8 +600,6 @@ bool FormPreferences::Colors::input(FL_OBJECT const * const ob) } else if (ob == dialog_->button_modify) { Modify(); } - - return true; } @@ -595,43 +611,38 @@ void FormPreferences::Colors::AdjustVal(int colAdjust, int colParent, HSVColor hsv(rgb); hsv.v += addVal; - if (hsv.v > 1.0) - hsv.v = 1.0; - else if (hsv.v < 0.0) - hsv.v = 0.0; + hsv.v = min( 1.0, max(0.0, hsv.v) ); rgb = RGBColor(hsv); fl_mapcolor(colAdjust, rgb.r, rgb.g, rgb.b); } -bool FormPreferences::Colors::InputBrowserLyX() const +void FormPreferences::Colors::InputBrowserLyX() const { - int const i = fl_get_browser(dialog_->browser_lyx_objs); - if (i < 1) - return true; - - string const name = fl_get_browser_line(dialog_->browser_lyx_objs, i); + vector::size_type const selLyX = + fl_get_browser(dialog_->browser_lyx_objs); + if (selLyX < 1) return; // Is the choice an Xforms color... - vector::const_iterator cit = - find_if(xformColorDB.begin(), xformColorDB.end(), - compare_memfun(&NamedColor::getname, name)); + RGBColor color; + if( selLyX-1 < int(xformColorDB.size()) ) { + vector::size_type const i = selLyX - 1; + color = xformColorDB[i].color(); + } // or a LyX Logical color? - if (cit == xformColorDB.end()) { - cit = find_if(lyxColorDB.begin(), lyxColorDB.end(), - compare_memfun(&NamedColor::getname, name)); - if (cit == lyxColorDB.end()) return true; + else { + vector::size_type const i = selLyX - 1 - + xformColorDB.size(); + color = lyxColorDB[i].color(); } - RGBColor const & col = (*cit).color(); - cit = find_if(colorDB.begin(), colorDB.end(), - compare_memfun(&NamedColor::color, col)); + vector::const_iterator cit = + find(colorDB.begin(), colorDB.end(), color); + if (cit == colorDB.end()) return; - int j = 0; - if (cit != colorDB.end()) - j = static_cast(cit - colorDB.begin()); + int const j = static_cast(cit - colorDB.begin()); fl_set_browser_topline(dialog_->browser_x11, max(j-5, 1)); fl_select_browser_line(dialog_->browser_x11, j+1); @@ -639,21 +650,18 @@ bool FormPreferences::Colors::InputBrowserLyX() const fl_deactivate_object(dialog_->button_modify); fl_set_object_lcol(dialog_->button_modify, FL_INACTIVE); - - return true; } -bool FormPreferences::Colors::InputBrowserX11() const +void FormPreferences::Colors::InputBrowserX11() const { int const i = fl_get_browser(dialog_->browser_x11); - if (i < 1) - return true; + if (i < 1) return; fl_freeze_form(dialog_->form); - RGBColor const & col = colorDB[i - 1].color(); + RGBColor const & col = colorDB[i-1].color(); - fl_mapcolor(FL_FREE_COL4, col.r, col.g, col.b); + fl_mapcolor(FL_FREE_COL1, col.r, col.g, col.b); fl_redraw_object(dialog_->button_color); HSVColor hsv(col); @@ -663,15 +671,14 @@ bool FormPreferences::Colors::InputBrowserX11() const fl_set_slider_value(dialog_->slider_value, hsv.v); RGBColor col2 = HSVColor(hsv.h, 1.0, 1.0); - fl_mapcolor(FL_FREE_COL4+1, col2.r, col2.g, col2.b); + fl_mapcolor(FL_FREE_COL2, col2.r, col2.g, col2.b); fl_redraw_object(dialog_->dial_hue); // Is it valid to activate the "Modify" button? int const line = fl_get_browser(dialog_->browser_lyx_objs); - bool isSelected = (line > 0); - if (isSelected) - if (line > fl_get_browser_maxline(dialog_->browser_lyx_objs)) - isSelected = false; + bool const isSelected = + (line > 0 && + line <= fl_get_browser_maxline(dialog_->browser_lyx_objs)); if (isSelected) { fl_activate_object(dialog_->button_modify); @@ -679,7 +686,6 @@ bool FormPreferences::Colors::InputBrowserX11() const } fl_unfreeze_form(dialog_->form); - return true; } @@ -698,16 +704,15 @@ void FormPreferences::Colors::InputHSV() fl_set_browser_topline(dialog_->browser_x11, max(i-5, 1)); fl_select_browser_line(dialog_->browser_x11, i+1); - fl_mapcolor(FL_FREE_COL4, col.r, col.g, col.b); + fl_mapcolor(FL_FREE_COL1, col.r, col.g, col.b); fl_redraw_object(dialog_->button_color); // Only activate the "Modify" button if the browser and slider colors // are the same AND if a LyX object is selected. int const line = fl_get_browser(dialog_->browser_lyx_objs); - bool isSelected = (line > 0); - if (isSelected) - if (line > fl_get_browser_maxline(dialog_->browser_lyx_objs)) - isSelected = false; + bool const isSelected = + (line > 0 && + line <= fl_get_browser_maxline(dialog_->browser_lyx_objs)); if (isSelected && colorDB[i].color() == col) { fl_activate_object( dialog_->button_modify ); @@ -719,7 +724,7 @@ void FormPreferences::Colors::InputHSV() // Finally, modify the color of the dial. col = HSVColor(hue, 1.0, 1.0); - fl_mapcolor(FL_FREE_COL4 + 1, col.r, col.g, col.b); + fl_mapcolor(FL_FREE_COL2, col.r, col.g, col.b); fl_redraw_object(dialog_->dial_hue); fl_unfreeze_form(dialog_->form); @@ -875,7 +880,7 @@ bool FormPreferences::Colors::LoadBrowserX11(string const & filename) // This can go here and not in update() because we only need to do it // once. fl_freeze_form(dialog_->form); - for (int i = 0; i(i); string name = lowercase(lcolor.getX11Name(lc)); @@ -959,43 +964,39 @@ bool FormPreferences::Colors::LoadDatabase() } -bool FormPreferences::Colors::Modify() const +void FormPreferences::Colors::Modify() { - int const i = fl_get_browser(dialog_->browser_lyx_objs); - if (i < 1) return true; - - string const name = fl_get_browser_line(dialog_->browser_lyx_objs, i); - - // Is the choice an Xforms color... - vector::iterator it = // non-const; it's modified below - const_cast::iterator>( - find_if(xformColorDB.begin(), xformColorDB.end(), - compare_memfun(&NamedColor::getname, name))); - - // or a LyX Logical color? - if (it == xformColorDB.end()) { - it = const_cast::iterator>( - find_if(lyxColorDB.begin(), lyxColorDB.end(), - compare_memfun(&NamedColor::getname, name))); - if (it == lyxColorDB.end()) return true; - } + vector::size_type const selLyX = + fl_get_browser(dialog_->browser_lyx_objs); + if (selLyX < 1) return; + + vector::size_type const selX11 = + fl_get_browser(dialog_->browser_x11); + if (selX11 < 1) return; + + // Is the choice an Xforms color... + if (selLyX-1 < int(xformColorDB.size())) { + vector::size_type const i = selLyX - 1; + vector::size_type const j = selX11 - 1; + xformColorDB[i].r = colorDB[j].r; + xformColorDB[i].g = colorDB[j].g; + xformColorDB[i].b = colorDB[j].b; + } else { // or a LyX Logical color? + vector::size_type const i = selLyX - 1 - + xformColorDB.size(); + vector::size_type const j = selX11 - 1; + lyxColorDB[i].r = colorDB[j].r; + lyxColorDB[i].g = colorDB[j].g; + lyxColorDB[i].b = colorDB[j].b; + } + + fl_freeze_form(dialog_->form); - // Ok! Modify the color. - int const j = fl_get_browser(dialog_->browser_x11); - if (j < 1) return true; - - (*it).r = colorDB[j - 1].r; - (*it).g = colorDB[j - 1].g; - (*it).b = colorDB[j - 1].b; - - fl_freeze_form(dialog_->form); - fl_deselect_browser(dialog_->browser_x11); fl_deactivate_object(dialog_->button_modify); fl_set_object_lcol(dialog_->button_modify, FL_INACTIVE); - + fl_unfreeze_form(dialog_->form); - return true; } @@ -1056,7 +1057,7 @@ void FormPreferences::Colors::Sort() int i = fl_get_browser(dialog_->browser_x11); if (i < 1) return; - RGBColor const col = colorDB[i - 1].color(); + RGBColor const col = colorDB[i-1].color(); if (fl_get_button(dialog_->button_type_sort)) { sort(colorDB.begin(), colorDB.end(), @@ -1076,15 +1077,14 @@ void FormPreferences::Colors::Sort() } vector::const_iterator cit = - find_if(colorDB.begin(), colorDB.end(), - compare_memfun(&NamedColor::color, col)); + find(colorDB.begin(), colorDB.end(), col); i = 0; if (cit != colorDB.end()) i = static_cast(cit - colorDB.begin()); - fl_set_browser_topline(dialog_->browser_x11, max(i - 5, 1)); - fl_select_browser_line(dialog_->browser_x11, i + 1); + fl_set_browser_topline(dialog_->browser_x11, max(i-5, 1)); + fl_select_browser_line(dialog_->browser_x11, i+1); fl_unfreeze_form(dialog_->form); } @@ -1158,9 +1158,12 @@ FormPreferences::Converters::feedback(FL_OBJECT const * const ob) const } else if (ob == dialog_->input_flags) { str = N_("Flags that control the converter behavior"); } else if (ob == dialog_->button_delete) { - str = N_("Remove the current converter from the list of available converters."); + str = N_("Remove the current converter from the list of available converters. Note: you must then \"Apply\" the change."); } else if (ob == dialog_->button_add) { - str = N_("Add the current converter to the list of available converters."); + if (string(ob->label) == _("Add")) + str = N_("Add the current converter to the list of available converters. Note: you must then \"Apply\" the change."); + else + str = N_("Modify the contents of the current converter. Note: you must then \"Apply\" the change."); } return str; @@ -1330,7 +1333,7 @@ string const FormPreferences::Converters::GetFrom() const { int const i = fl_get_choice(dialog_->choice_from); if (i > 0) - return local_formats.Get(i - 1).name(); + return local_formats.Get(i-1).name(); else { lyxerr << "FormPreferences::Converters::GetFrom: No choice!" << endl; @@ -1343,7 +1346,7 @@ string const FormPreferences::Converters::GetTo() const { int const i = fl_get_choice(dialog_->choice_to); if (i > 0) - return local_formats.Get(i - 1).name(); + return local_formats.Get(i-1).name(); else { lyxerr << "FormPreferences::Converters::GetTo: No choice!" << endl; @@ -1427,9 +1430,12 @@ FormPreferences::Formats::feedback(FL_OBJECT const * const ob) const } else if (ob == dialog_->input_viewer) { str = N_("The command used to launch the viewer application."); } else if (ob == dialog_->button_delete) { - str = N_("Remove the current format from the list of available formats."); + str = N_("Remove the current format from the list of available formats. Note: you must then \"Apply\" the change."); } else if (ob == dialog_->button_add) { - str = N_("Add the current format to the list of available formats."); + if (string(ob->label) == _("Add")) + str = N_("Add the current format to the list of available formats. Note: you must then \"Apply\" the change."); + else + str = N_("Modify the contents of the current format. Note: you must then \"Apply\" the change."); } return str; @@ -1518,7 +1524,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()); @@ -1580,7 +1586,7 @@ bool FormPreferences::Formats::Input() fl_set_button_shortcut(dialog_->button_add, scex(_("Modify|#M")), 1); - int const top = max(sel - 5, 0); + int const top = max(sel-5, 0); fl_set_browser_topline(dialog_->browser_all, top); fl_select_browser_line(dialog_->browser_all, sel+1); @@ -1674,8 +1680,7 @@ void FormPreferences::Interface::build() 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_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); @@ -2023,6 +2028,9 @@ void FormPreferences::LnFmisc::build() { dialog_ = parent_.build_lnf_misc(); + fl_set_counter_step(dialog_->counter_autosave, 1, 10); + fl_set_counter_step(dialog_->counter_wm_jump, 1, 10); + fl_set_counter_return(dialog_->counter_autosave, FL_RETURN_CHANGED); fl_set_counter_return(dialog_->counter_wm_jump, FL_RETURN_CHANGED); @@ -2104,14 +2112,13 @@ void FormPreferences::OutputsMisc::build() { dialog_ = parent_.build_outputs_misc(); - fl_set_counter_return(dialog_->counter_line_len, - FL_RETURN_CHANGED); - 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_counter_step(dialog_->counter_line_len, 1, 10); + + fl_set_counter_return(dialog_->counter_line_len, FL_RETURN_CHANGED); + 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_addto_choice(dialog_->choice_default_papersize, _(" default | US letter | legal | executive | A3 | A4 | A5 | B5 ")); @@ -2351,7 +2358,7 @@ bool FormPreferences::Paths::input(FL_OBJECT const * const ob) string const name = fl_get_input(dialog_->input_serverpipe); if (!name.empty()) { // strip off the extension - string str = ChangeExtension(name, ""); + string const str = ChangeExtension(name, ""); if (!RWInfo::WriteableFile(str + ".in")) { parent_.printWarning(RWInfo::ErrorMessage()); return false; @@ -2729,45 +2736,36 @@ void FormPreferences::ScreenFonts::build() { dialog_ = parent_.build_screen_fonts(); - fl_set_input_return(dialog_->input_roman, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_sans, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_typewriter, - FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_screen_encoding, - FL_RETURN_CHANGED); - fl_set_counter_return(dialog_->counter_zoom, FL_RETURN_CHANGED); - fl_set_counter_return(dialog_->counter_dpi, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_tiny, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_script, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_footnote, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_small, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_normal, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_large, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_larger, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_largest, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_huge, FL_RETURN_CHANGED); - fl_set_input_return(dialog_->input_huger, FL_RETURN_CHANGED); + fl_set_counter_step(dialog_->counter_zoom, 1, 10); + fl_set_counter_step(dialog_->counter_dpi, 1, 10); - fl_set_input_filter(dialog_->input_tiny, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_script, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_footnote, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_small, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_normal, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_large, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_larger, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_largest, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_huge, - fl_unsigned_int_filter); - fl_set_input_filter(dialog_->input_huger, - fl_unsigned_int_filter); + fl_set_input_return(dialog_->input_roman, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_sans, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_typewriter, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_screen_encoding, FL_RETURN_CHANGED); + fl_set_counter_return(dialog_->counter_zoom, FL_RETURN_CHANGED); + fl_set_counter_return(dialog_->counter_dpi, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_tiny, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_script, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_footnote, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_small, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_normal, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_large, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_larger, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_largest, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_huge, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->input_huger, FL_RETURN_CHANGED); + + fl_set_input_filter(dialog_->input_tiny, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_script, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_footnote, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_small, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_normal, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_large, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_larger, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_largest, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_huge, fl_unsigned_int_filter); + fl_set_input_filter(dialog_->input_huger, fl_unsigned_int_filter); // set up the feedback mechanism setPreHandler(dialog_->input_roman); @@ -2984,12 +2982,9 @@ void FormPreferences::SpellChecker::build() fl_addto_choice(dialog_->choice_spell_command, _(" none | ispell | aspell ")); - 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); + 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); // set up the feedback mechanism setPreHandler(dialog_->choice_spell_command); @@ -3228,11 +3223,8 @@ void FormPreferences::Feedback(FL_OBJECT * ob, int event) } - - void FormPreferences::setPreHandler(FL_OBJECT * ob) { Assert(ob); fl_set_object_prehandler(ob, C_FormPreferencesFeedbackCB); } - diff --git a/src/frontends/xforms/FormPreferences.h b/src/frontends/xforms/FormPreferences.h index 4558ff5d29..c9f452cc77 100644 --- a/src/frontends/xforms/FormPreferences.h +++ b/src/frontends/xforms/FormPreferences.h @@ -60,6 +60,10 @@ public: FL_Coord, FL_Coord, int, void *); private: + /// Connect signals etc. Set form's max size. + virtual void connect(); + /// Disconnect signals. Also perform any necessary housekeeping. + virtual void disconnect(); /** Redraw the form (on receipt of a Signal indicating, for example, that the xform colours have been re-mapped). */ virtual void redraw(); @@ -134,7 +138,7 @@ private: /// Outputs tabfolder FD_form_outer_tab * outputs_tab_; /// Spellchecker, language stuff, etc - FD_form_outer_tab * usage_tab_; + FD_form_outer_tab * lang_opts_tab_; /** Flag whether a warning has been posted to the text window. If so, don't redraw the window when the mouse leaves an object. */ @@ -158,7 +162,7 @@ private: /// string const feedback(FL_OBJECT const * const) const; /// - bool input(FL_OBJECT const * const); + void input(FL_OBJECT const * const); /// void update() { LoadBrowserLyX(); } @@ -169,9 +173,9 @@ private: /// void AdjustVal( int, int, double ) const; /// - bool InputBrowserLyX() const; + void InputBrowserLyX() const; /// - bool InputBrowserX11() const; + void InputBrowserX11() const; /// void InputHSV(); /// @@ -181,7 +185,7 @@ private: /// bool LoadDatabase(); /// - bool Modify() const; + void Modify(); /// int SearchEntry(RGBColor const &) const; /// diff --git a/src/frontends/xforms/form_preferences.C b/src/frontends/xforms/form_preferences.C index d1bd5df435..1dc84e5385 100644 --- a/src/frontends/xforms/form_preferences.C +++ b/src/frontends/xforms/form_preferences.C @@ -102,7 +102,7 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts() fdui->input_typewriter = obj = fl_add_input(FL_NORMAL_INPUT, 210, 65, 200, 30, _("Typewriter")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->counter_zoom = obj = fl_add_counter(FL_SIMPLE_COUNTER, 345, 130, 65, 30, idex(_("Zoom %|#Z"))); + fdui->counter_zoom = obj = fl_add_counter(FL_NORMAL_COUNTER, 310, 130, 100, 30, idex(_("Zoom %|#Z"))); fl_set_button_shortcut(obj, scex(_("Zoom %|#Z")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); @@ -137,7 +137,7 @@ FD_form_screen_fonts * FormPreferences::build_screen_fonts() fdui->input_normal = obj = fl_add_input(FL_FLOAT_INPUT, 200, 229, 70, 30, _("normal")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->counter_dpi = obj = fl_add_counter(FL_SIMPLE_COUNTER, 345, 162, 65, 30, idex(_("Screen DPI|#D"))); + fdui->counter_dpi = obj = fl_add_counter(FL_NORMAL_COUNTER, 310, 160, 100, 30, idex(_("Screen DPI|#D"))); fl_set_button_shortcut(obj, scex(_("Screen DPI|#D")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); @@ -181,7 +181,8 @@ FD_form_outputs_misc * FormPreferences::build_outputs_misc() fdui->form = fl_bgn_form(FL_NO_BOX, 455, 375); fdui->form->u_vdata = this; obj = fl_add_box(FL_FLAT_BOX, 0, 0, 455, 375, ""); - fdui->counter_line_len = obj = fl_add_counter(FL_SIMPLE_COUNTER, 295, 50, 120, 30, idex(_("Ascii line length|#A"))); + fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); + fdui->counter_line_len = obj = fl_add_counter(FL_NORMAL_COUNTER, 315, 50, 100, 30, idex(_("Ascii line length|#A"))); fl_set_button_shortcut(obj, scex(_("Ascii line length|#A")), 1); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); @@ -607,7 +608,7 @@ FD_form_lnf_misc * FormPreferences::build_lnf_misc() fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); fl_set_button(obj, 1); - fdui->counter_autosave = obj = fl_add_counter(FL_SIMPLE_COUNTER, 320, 255, 115, 30, _("Autosave interval")); + fdui->counter_autosave = obj = fl_add_counter(FL_NORMAL_COUNTER, 320, 255, 115, 30, _("Autosave interval")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); @@ -625,7 +626,7 @@ FD_form_lnf_misc * FormPreferences::build_lnf_misc() fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); fl_set_button(obj, 1); - fdui->counter_wm_jump = obj = fl_add_counter(FL_SIMPLE_COUNTER, 320, 225, 115, 30, _("Wheel mouse jump")); + fdui->counter_wm_jump = obj = fl_add_counter(FL_NORMAL_COUNTER, 320, 225, 115, 30, _("Wheel mouse jump")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_LEFT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); diff --git a/src/frontends/xforms/form_print.C b/src/frontends/xforms/form_print.C index 62f56329b5..41fd617315 100644 --- a/src/frontends/xforms/form_print.C +++ b/src/frontends/xforms/form_print.C @@ -25,12 +25,6 @@ FD_form_print * FormPrint::build_print() fdui->form = fl_bgn_form(FL_NO_BOX, 340, 360); fdui->form->u_vdata = this; obj = fl_add_box(FL_UP_BOX, 0, 0, 340, 360, ""); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 215, 320, 90, ""); - fl_set_object_color(obj, FL_COL1, FL_COL1); - obj = fl_add_text(FL_NORMAL_TEXT, 20, 205, 70, 20, _("Print to")); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); fdui->input_printer = obj = fl_add_input(FL_NORMAL_INPUT, 90, 225, 230, 30, ""); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); @@ -49,10 +43,6 @@ FD_form_print * FormPrint::build_print() fl_set_object_callback(obj, C_FormBaseInputCB, 0); fl_end_group(); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 180, 20, 150, 70, ""); - fl_set_object_color(obj, FL_COL1, FL_COL1); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 20, 160, 180, ""); - fl_set_object_color(obj, FL_COL1, FL_COL1); fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 315, 100, 30, _("OK")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseOKCB, 0); @@ -92,24 +82,10 @@ FD_form_print * FormPrint::build_print() fl_set_object_callback(obj, C_FormBaseInputCB, 0); fl_end_group(); - obj = fl_add_text(FL_NORMAL_TEXT, 200, 10, 60, 20, _("Order")); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); - obj = fl_add_text(FL_NORMAL_TEXT, 20, 10, 50, 20, _("Print")); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); fdui->input_from_page = obj = fl_add_input(FL_INT_INPUT, 20, 160, 50, 30, _("Pages:")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 180, 110, 150, 90, ""); - fl_set_object_color(obj, FL_COL1, FL_COL1); - obj = fl_add_text(FL_NORMAL_TEXT, 200, 95, 50, 20, _("Copies")); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); fdui->input_count = obj = fl_add_input(FL_INT_INPUT, 190, 160, 130, 30, _("Count:")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); @@ -120,6 +96,18 @@ FD_form_print * FormPrint::build_print() fl_set_object_callback(obj, C_FormBaseInputCB, 0); fdui->input_to_page = obj = fl_add_input(FL_INT_INPUT, 110, 160, 50, 30, _("to")); fl_set_object_callback(obj, C_FormBaseInputCB, 0); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 20, 160, 180, _("Print")); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_lstyle(obj, FL_BOLD_STYLE); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 180, 20, 150, 70, _("Order")); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_lstyle(obj, FL_BOLD_STYLE); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 180, 110, 150, 90, _("Copies")); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_lstyle(obj, FL_BOLD_STYLE); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 210, 320, 100, _("Print to")); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_lstyle(obj, FL_BOLD_STYLE); fl_end_form(); fdui->form->fdui = fdui; diff --git a/src/frontends/xforms/forms/fdfix.sh b/src/frontends/xforms/forms/fdfix.sh index d381dede0a..294422fba4 100644 --- a/src/frontends/xforms/forms/fdfix.sh +++ b/src/frontends/xforms/forms/fdfix.sh @@ -48,6 +48,7 @@ done $FDESIGN -convert $1 FDFIXH=fdfixh.sed FDFIXC=fdfixc.sed +FDFIXC_MOD=fdfixc_modified.sed # Modify .h file for use by LyX echo "// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext" > $HOUT @@ -59,6 +60,10 @@ if [ -f "$HOUT.patch" ] ; then patch -s $HOUT < $HOUT.patch fi +# Modify the .c file sed-script +# (Quicker to modify the sed script than the .c file!) +sed -e "s/CLASSNAME/$CLASSNAME/" < $FDFIXC > $FDFIXC_MOD + # Modify .c file for use by LyX echo "// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext" > $COUT echo "#include " >> $COUT @@ -66,7 +71,7 @@ echo "#include \"lyx_gui_misc.h\"" >> $COUT echo "#include \"gettext.h\"" >> $COUT echo >> $COUT -sed -f $FDFIXC < $CIN | sed -e "s/CLASSNAME/$CLASSNAME/" >> $COUT +sed -f $FDFIXC_MOD < $CIN >> $COUT # Patch the .C file if a patch exists if [ -f "$COUT.patch" ] ; then @@ -75,5 +80,5 @@ if [ -f "$COUT.patch" ] ; then fi # Clean up, to leave .C and .h files -rm -f $CIN $HIN +rm -f $CIN $HIN $FDFIXC_MOD mv $HOUT $HIN diff --git a/src/frontends/xforms/forms/fdfixc.sed b/src/frontends/xforms/forms/fdfixc.sed index a625d2625b..191483eca9 100644 --- a/src/frontends/xforms/forms/fdfixc.sed +++ b/src/frontends/xforms/forms/fdfixc.sed @@ -1,6 +1,3 @@ -# Can't seem to input $classname! -# CLASSNAME will be swapped for the true classname later - # Create the destructor. /\(.*\) *create_form_form/{ h diff --git a/src/frontends/xforms/forms/form_preferences.fd b/src/frontends/xforms/forms/form_preferences.fd index f2199ca9a6..87eeecec60 100644 --- a/src/frontends/xforms/forms/form_preferences.fd +++ b/src/frontends/xforms/forms/form_preferences.fd @@ -279,8 +279,8 @@ argument: 0 -------------------- class: FL_COUNTER -type: SIMPLE_COUNTER -box: 345 130 65 30 +type: NORMAL_COUNTER +box: 310 130 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_LEFT @@ -446,8 +446,8 @@ argument: 0 -------------------- class: FL_COUNTER -type: SIMPLE_COUNTER -box: 345 162 65 30 +type: NORMAL_COUNTER +box: 310 160 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_LEFT @@ -557,15 +557,15 @@ lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity +gravity: FL_NorthWest FL_SouthEast name: callback: argument: -------------------- class: FL_COUNTER -type: SIMPLE_COUNTER -box: 295 50 120 30 +type: NORMAL_COUNTER +box: 315 50 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE alignment: FL_ALIGN_LEFT @@ -1877,7 +1877,7 @@ argument: 0 -------------------- class: FL_COUNTER -type: SIMPLE_COUNTER +type: NORMAL_COUNTER box: 320 255 115 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE @@ -1937,7 +1937,7 @@ argument: 0 -------------------- class: FL_COUNTER -type: SIMPLE_COUNTER +type: NORMAL_COUNTER box: 320 225 115 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_BLUE diff --git a/src/frontends/xforms/forms/form_print.fd b/src/frontends/xforms/forms/form_print.fd index f3387ad841..dc9169031f 100644 --- a/src/frontends/xforms/forms/form_print.fd +++ b/src/frontends/xforms/forms/form_print.fd @@ -10,7 +10,7 @@ Unit of measure: FL_COORD_PIXEL Name: form_print Width: 340 Height: 360 -Number of Objects: 31 +Number of Objects: 27 -------------------- class: FL_BOX @@ -30,42 +30,6 @@ name: callback: argument: --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 10 215 320 90 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_TEXT -type: NORMAL_TEXT -box: 20 205 70 20 -boxtype: FL_FLAT_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE -style: FL_BOLD_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Print to -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - -------------------- class: FL_INPUT type: NORMAL_INPUT @@ -105,7 +69,7 @@ argument: 0 -------------------- class: FL_BEGIN_GROUP type: 0 -box: 0 0 0 0 +box: 0 10 10 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER @@ -174,42 +138,6 @@ name: callback: argument: --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 180 20 150 70 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 10 20 160 180 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - -------------------- class: FL_BUTTON type: RETURN_BUTTON @@ -267,7 +195,7 @@ argument: 0 -------------------- class: FL_BEGIN_GROUP type: 0 -box: 0 0 0 0 +box: 0 10 10 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER @@ -357,7 +285,7 @@ argument: -------------------- class: FL_BEGIN_GROUP type: 0 -box: 0 0 0 0 +box: 0 10 10 0 boxtype: FL_NO_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_CENTER @@ -426,42 +354,6 @@ name: callback: argument: --------------------- -class: FL_TEXT -type: NORMAL_TEXT -box: 200 10 60 20 -boxtype: FL_FLAT_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE -style: FL_BOLD_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Order -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_TEXT -type: NORMAL_TEXT -box: 20 10 50 20 -boxtype: FL_FLAT_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE -style: FL_BOLD_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Print -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - -------------------- class: FL_INPUT type: INT_INPUT @@ -480,42 +372,6 @@ name: input_from_page callback: C_FormBaseInputCB argument: 0 --------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 180 110 150 90 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_TEXT -type: NORMAL_TEXT -box: 200 95 50 20 -boxtype: FL_FLAT_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE -style: FL_BOLD_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Copies -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - -------------------- class: FL_INPUT type: INT_INPUT @@ -570,5 +426,77 @@ name: input_to_page callback: C_FormBaseInputCB argument: 0 +-------------------- +class: FL_LABELFRAME +type: ENGRAVED_FRAME +box: 10 20 160 180 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_TOP_LEFT +style: FL_BOLD_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Print +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + +-------------------- +class: FL_LABELFRAME +type: ENGRAVED_FRAME +box: 180 20 150 70 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_TOP_LEFT +style: FL_BOLD_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Order +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + +-------------------- +class: FL_LABELFRAME +type: ENGRAVED_FRAME +box: 180 110 150 90 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_TOP_LEFT +style: FL_BOLD_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Copies +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + +-------------------- +class: FL_LABELFRAME +type: ENGRAVED_FRAME +box: 10 210 320 100 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_TOP_LEFT +style: FL_BOLD_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Print to +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + ============================== create_the_forms diff --git a/src/frontends/xforms/forms/makefile b/src/frontends/xforms/forms/makefile index f64419ea6f..02ef562811 100644 --- a/src/frontends/xforms/forms/makefile +++ b/src/frontends/xforms/forms/makefile @@ -17,9 +17,6 @@ SHELL = /bin/sh .SUFFIXES: .fd .c -# Various commands -FDESIGN = fdesign - SRCS := form_citation.fd \ form_copyright.fd \ form_document.fd \ diff --git a/src/lyxrc.C b/src/lyxrc.C index 985a3bea10..2fcdd26baf 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -1611,7 +1611,7 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_PRINT_ADAPTOUTPUT: - str = N_("Set to true for LyX to pass the name of the destination printer to your print command."); + str = N_("Select for LyX to pass the name of the destination printer to your print command."); break; case RC_PRINTTOFILE: @@ -1684,11 +1684,11 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_TEMPDIRPATH: - str = N_("The path that LyX will use to store temporary TeX output."); + str = N_("LyX will place it's temporary directories in this path. They will be deleted when you quit LyX."); break; case RC_USETEMPDIR: - str = N_("Specify to use a temporary directory to store temporary TeX output. This directory is deleted when you quit LyX."); + str = N_("Select if you wish to use a temporary directory structure to store temporary TeX output."); break; case RC_LASTFILES: @@ -1696,11 +1696,11 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_AUTOREGIONDELETE: - str = N_("Set to false if you don't want the current selection to be replaced automatically by what you type."); + str = N_("De-select if you don't want the current selection to be replaced automatically by what you type."); break; case RC_OVERRIDE_X_DEADKEYS: - str = N_("Set to true for LyX to take over the handling of the dead keys (a.k.a. accent keys) that may be defined for your keyboard."); + str = N_("Select if LyX is to take over the handling of the dead keys (a.k.a. accent keys) that may be defined for your keyboard."); break; @@ -1745,7 +1745,7 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_CHECKLASTFILES: - str = N_("Specify to check whether the lastfiles still exist."); + str = N_("Select to check whether the lastfiles still exist."); break; case RC_VIEWDVI_PAPEROPTION: @@ -1759,7 +1759,7 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_ACCEPT_COMPOUND: - str = N_("Consider run-together words, such as \"notthe\" for \"not the\", as legal words?"); + str = N_("Consider run-together words, such as \"diskdrive\" for \"disk drive\", as legal words?"); break; case RC_SPELL_COMMAND: @@ -1806,7 +1806,7 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_MAKE_BACKUP: - str = N_("Set to false if you don't want LyX to create backup files."); + str = N_("De-select if you don't want LyX to create backup files."); break; case RC_BACKUPDIR_PATH: @@ -1814,11 +1814,11 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_RTL_SUPPORT: - str = N_("Use to enable support of right-to-left languages (e.g. Hebrew, Arabic)."); + str = N_("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic)."); break; case RC_MARK_FOREIGN_LANGUAGE: - str = N_("Use to control the highlighting of words with a language foreign to that of the document."); + str = N_("Select to control the highlighting of words with a language foreign to that of the document."); break; case RC_LANGUAGE_PACKAGE: @@ -1826,11 +1826,11 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_LANGUAGE_AUTO_BEGIN: - str = N_("Use if a language switching command is needed at the beginning of the document."); + str = N_("Select if a language switching command is needed at the beginning of the document."); break; case RC_LANGUAGE_AUTO_END: - str = N_("Use if a language switching command is needed at the end of the document."); + str = N_("Select if a language switching command is needed at the end of the document."); break; case RC_LANGUAGE_COMMAND_BEGIN: @@ -1846,7 +1846,7 @@ string const LyXRC::getDescription(LyXRCTags tag) break; case RC_SHOW_BANNER: - str = N_("Set to false if you don't want the startup banner."); + str = N_("De-select if you don't want the startup banner."); break; case RC_WHEEL_JUMP: