+2002-01-10 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * lyxrc.example: change the names of some variables in line with lyxrc.C
+
2002-01-10 Dekel Tsur <dekelts@tau.ac.il>
* reLyX/BasicLyX.pm: Add support for amsmath environments.
# the same as what LaTeX calls latin1.
#\screen_font_encoding iso8859-2
-# The norm for the menu/popups fonts. The default is an empty string, which
+# The norm for the popup fonts. The default is an empty string, which
# causes to use the screen fonts norm (defined by \screen_font_encoding).
-#\screen_font_encoding_menu iso8859-2
+#\popup_font_encoding iso8859-2
-# The font for popups. It is set to
+# The normal font for popups. It is set to
# <font_popup>-*-*-*-?-*-*-*-*-<font_encoding>.
# The default is:
-#\screen_font_popup "-*-helvetica-medium-r"
+#\popup_font_name "-*-helvetica-medium-r"
-# The font for menus (and groups titles in popups). It is set to
+# The bold font for popups. It is set to
# <font_menu>-*-*-*-?-*-*-*-*-<font_encoding>.
# The default is:
-#\screen_font_menu "-*-helvetica-bold-r"
+#\popup_bold_font "-*-helvetica-bold-r"
# The font sizes used for calculating the scaling of the screen fonts.
# You should only have to change these if the fonts on your screen look bad,
+2002-01-10 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * lyxrc.[Ch]: change names and descriptions of popup font variables to
+ reflect their actual use. Provide compatibility code for older lyxrc
+ files.
+
+ * lyx_gui.C (init): revoke change of 2002-01-07 of popup font style to
+ FL_NORMAL_STYLE.
+ change names of popup font variables in line with the changes to lyxrc.C
+
2002-01-10 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* buffer.C (asciiParagraph): avoid outputing a word twice after
+2002-01-10 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * FormPreferences.C:
+ * forms/form_preferences.fd: change names and descriptions of popup
+ font variables to reflect their actual use.
+
+ * Menubar_pimpl.C: return MENU_LABEL_STYLE to FL_NORMAL_STYLE.
+
2002-01-10 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* FormPreferences.C (input): allow empty values for document_path
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 =
{
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);
{
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)
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,
// Some constants
int const MENU_LABEL_SIZE = FL_NORMAL_SIZE;
-int const MENU_LABEL_STYLE = FL_BOLD_STYLE;
+int const MENU_LABEL_STYLE = FL_NORMAL_STYLE;
int const mheight = 30;
int const mbheight= 22;
// where to place the menubar?
fdui->form = fl_bgn_form(FL_NO_BOX, 450, 350);
fdui->form->u_vdata = this;
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 350, "");
- fdui->input_popup_font = obj = fl_add_input(FL_NORMAL_INPUT, 230, 30, 200, 30, _("Popup Font"));
+ obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 20, 425, 110, _("Popup Fonts & Encoding"));
+ fdui->input_popup_normal_font = obj = fl_add_input(FL_NORMAL_INPUT, 230, 30, 200, 30, _("Normal Font"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
- fdui->input_menu_font = obj = fl_add_input(FL_NORMAL_INPUT, 230, 60, 200, 30, _("Menu Font"));
+ fdui->input_popup_bold_font = obj = fl_add_input(FL_NORMAL_INPUT, 230, 60, 200, 30, _("Bold Font"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
- fdui->input_popup_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 230, 90, 200, 30, _("Popup Encoding"));
+ fdui->input_popup_font_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 230, 90, 200, 30, _("Popup Encoding"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+ obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 150, 425, 85, _("Layout & Bindings"));
{
char const * const dummy = N_("User Interface file|#U");
fdui->input_ui_file = obj = fl_add_input(FL_NORMAL_INPUT, 160, 160, 170, 30, idex(_(dummy)));
}
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+ obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 255, 425, 45, _("Dead Keys"));
{
char const * const dummy = N_("Override X Window dead-keys|#O");
fdui->check_override_x_dead_keys = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 95, 265, 30, 30, idex(_(dummy)));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
fl_set_button(obj, 1);
- obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 20, 425, 110, _("Fonts & Encoding"));
- obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 150, 425, 85, _("Layout & Bindings"));
- obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 255, 425, 45, _("Dead Keys"));
fl_end_form();
fdui->form->fdui = fdui;
~FD_form_interface();
FL_FORM *form;
- FL_OBJECT *input_popup_font;
- FL_OBJECT *input_menu_font;
- FL_OBJECT *input_popup_encoding;
+ FL_OBJECT *input_popup_normal_font;
+ FL_OBJECT *input_popup_bold_font;
+ FL_OBJECT *input_popup_font_encoding;
FL_OBJECT *input_ui_file;
FL_OBJECT *button_ui_file_browse;
FL_OBJECT *input_bind_file;
callback:
argument:
+--------------------
+class: FL_LABELFRAME
+type: ENGRAVED_FRAME
+box: 15 20 425 110
+boxtype: FL_NO_BOX
+colors: FL_BLACK FL_COL1
+alignment: FL_ALIGN_TOP_LEFT
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Popup Fonts & Encoding
+shortcut:
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name:
+callback:
+argument:
+
--------------------
class: FL_INPUT
type: NORMAL_INPUT
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Popup Font
+label: Normal Font
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
-name: input_popup_font
+name: input_popup_normal_font
callback: C_FormBaseDeprecatedInputCB
argument: 0
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Menu Font
+label: Bold Font
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
-name: input_menu_font
+name: input_popup_bold_font
callback: C_FormBaseDeprecatedInputCB
argument: 0
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
-name: input_popup_encoding
+name: input_popup_font_encoding
callback: C_FormBaseDeprecatedInputCB
argument: 0
+--------------------
+class: FL_LABELFRAME
+type: ENGRAVED_FRAME
+box: 15 150 425 85
+boxtype: FL_NO_BOX
+colors: FL_BLACK FL_COL1
+alignment: FL_ALIGN_TOP_LEFT
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Layout & Bindings
+shortcut:
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name:
+callback:
+argument:
+
--------------------
class: FL_INPUT
type: NORMAL_INPUT
callback: C_FormBaseDeprecatedInputCB
argument: 0
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 95 265 30 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Override X Window dead-keys|#O
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: check_override_x_dead_keys
-callback: C_FormBaseDeprecatedInputCB
-argument: 0
- value: 1
-
---------------------
-class: FL_LABELFRAME
-type: ENGRAVED_FRAME
-box: 15 20 425 110
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Fonts & Encoding
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
-
--------------------
class: FL_LABELFRAME
type: ENGRAVED_FRAME
-box: 15 150 425 85
+box: 15 255 425 45
boxtype: FL_NO_BOX
colors: FL_BLACK FL_COL1
alignment: FL_ALIGN_TOP_LEFT
style: FL_NORMAL_STYLE
size: FL_DEFAULT_SIZE
lcol: FL_BLACK
-label: Layout & Bindings
+label: Dead Keys
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
argument:
--------------------
-class: FL_LABELFRAME
-type: ENGRAVED_FRAME
-box: 15 255 425 45
+class: FL_CHECKBUTTON
+type: PUSH_BUTTON
+box: 95 265 30 30
boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_TOP_LEFT
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_CENTER
style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
+size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Dead Keys
+label: Override X Window dead-keys|#O
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
-name:
-callback:
-argument:
+name: check_override_x_dead_keys
+callback: C_FormBaseDeprecatedInputCB
+argument: 0
+ value: 1
=============== FORM ===============
Name: form_colors
create_forms();
- if (lyxrc.font_norm_menu.empty())
- lyxrc.font_norm_menu = lyxrc.font_norm;
+ if (lyxrc.popup_font_encoding.empty())
+ lyxrc.popup_font_encoding = lyxrc.font_norm;
// Set the font name for popups and menus
- string boldfontname = lyxrc.menu_font_name
+ string boldfontname = lyxrc.popup_bold_font
+ "-*-*-*-?-*-*-*-*-"
- + lyxrc.font_norm_menu;
+ + lyxrc.popup_font_encoding;
// "?" means "scale that font"
- string fontname = lyxrc.popup_font_name
+ string fontname = lyxrc.popup_normal_font
+ "-*-*-*-?-*-*-*-*-"
- + lyxrc.font_norm_menu;
+ + lyxrc.popup_font_encoding;
int bold = fl_set_font_name(FL_BOLD_STYLE, boldfontname.c_str());
int normal = fl_set_font_name(FL_NORMAL_STYLE, fontname.c_str());
// in setDefaults() (Matthias 140496)
// Moved from ::LyXGUI to ::init to allow popup font customization
// (petr 120997).
- fl_setpup_fontstyle(FL_BOLD_STYLE);
+ fl_setpup_fontstyle(FL_NORMAL_STYLE);
fl_setpup_fontsize(FL_NORMAL_SIZE);
fl_setpup_color(FL_MCOL, FL_BLACK);
fl_set_goodies_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
{ "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
{ "\\override_x_deadkeys", LyXRC::RC_OVERRIDE_X_DEADKEYS },
{ "\\personal_dictionary", LyXRC::RC_PERS_DICT },
+ { "\\popup_bold_font", LyXRC::RC_POPUP_BOLD_FONT },
+ { "\\popup_font_encoding", LyXRC::RC_POPUP_FONT_ENCODING },
+ { "\\popup_normal_font", LyXRC::RC_POPUP_NORMAL_FONT },
{ "\\print_adapt_output", LyXRC::RC_PRINT_ADAPTOUTPUT },
{ "\\print_collcopies_flag", LyXRC::RC_PRINTCOLLCOPIESFLAG },
{ "\\print_command", LyXRC::RC_PRINT_COMMAND },
{ "\\rtl", LyXRC::RC_RTL_SUPPORT },
{ "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
{ "\\screen_font_encoding", LyXRC::RC_SCREEN_FONT_ENCODING },
- { "\\screen_font_encoding_menu", LyXRC::RC_SCREEN_FONT_ENCODING_MENU },
- { "\\screen_font_menu", LyXRC::RC_SCREEN_FONT_MENU },
- { "\\screen_font_popup", LyXRC::RC_SCREEN_FONT_POPUP },
+ // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
+ { "\\screen_font_encoding_menu", LyXRC::RC_POPUP_FONT_ENCODING },
+ // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
+ { "\\screen_font_menu", LyXRC::RC_POPUP_BOLD_FONT },
+ // compatibility with versions older than 1.2.0 only Angus 10 Jan 2002
+ { "\\screen_font_popup", LyXRC::RC_POPUP_NORMAL_FONT },
{ "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
{ "\\screen_font_sans", LyXRC::RC_SCREEN_FONT_SANS },
{ "\\screen_font_scalable", LyXRC::RC_SCREEN_FONT_SCALABLE },
roman_font_name = "-*-times";
sans_font_name = "-*-helvetica";
typewriter_font_name = "-*-courier";
- menu_font_name = "-*-helvetica-bold-r";
- popup_font_name = "-*-helvetica-medium-r";
+ popup_bold_font = "-*-helvetica-bold-r";
+ popup_normal_font = "-*-helvetica-medium-r";
font_norm = "iso8859-1";
font_norm_type = ISO_8859_1;
- font_norm_menu = "";
+ popup_font_encoding = "";
override_x_deadkeys = true;
autosave = 300;
auto_region_delete = true;
typewriter_font_name = lexrc.getString();
break;
- case RC_SCREEN_FONT_MENU:
- if (lexrc.next())
- menu_font_name = lexrc.getString();
- break;
-
- case RC_SCREEN_FONT_POPUP:
- if (lexrc.next())
- popup_font_name = lexrc.getString();
- break;
-
case RC_SCREEN_FONT_ENCODING:
if (lexrc.next()) {
font_norm = lexrc.getString();
}
break;
- case RC_SCREEN_FONT_ENCODING_MENU:
+ case RC_POPUP_BOLD_FONT:
+ if (lexrc.next())
+ popup_bold_font = lexrc.getString();
+ break;
+
+ case RC_POPUP_NORMAL_FONT:
+ if (lexrc.next())
+ popup_normal_font = lexrc.getString();
+ break;
+
+ case RC_POPUP_FONT_ENCODING:
if (lexrc.next())
- font_norm_menu = lexrc.getString();
+ popup_font_encoding = lexrc.getString();
break;
case RC_SET_COLOR:
<< "# SCREEN & FONTS SECTION ############################\n"
<< "#\n\n";
+ case RC_POPUP_NORMAL_FONT:
+ if (popup_normal_font != system_lyxrc.popup_normal_font) {
+ os << "\\popup_normal_font \"" << popup_normal_font
+ << "\"\n";
+ }
+ case RC_POPUP_BOLD_FONT:
+ if (popup_bold_font != system_lyxrc.popup_bold_font) {
+ os << "\\popup_bold_font \"" << popup_bold_font
+ << "\"\n";
+ }
+ case RC_POPUP_FONT_ENCODING:
+ if (popup_font_encoding != system_lyxrc.popup_font_encoding) {
+ os << "\\popup_font_encoding \"" << popup_font_encoding
+ << "\"\n";
+ }
case RC_SCREEN_DPI:
if (dpi != system_lyxrc.dpi) {
os << "\\screen_dpi " << dpi << "\n";
os << "\\screen_font_encoding \"" << font_norm
<< "\"\n";
}
- case RC_SCREEN_FONT_POPUP:
- if (popup_font_name != system_lyxrc.popup_font_name) {
- os << "\\screen_font_popup \"" << popup_font_name
- << "\"\n";
- }
- case RC_SCREEN_FONT_MENU:
- if (menu_font_name != system_lyxrc.menu_font_name) {
- os << "\\screen_font_menu \"" << menu_font_name
- << "\"\n";
- }
case RC_SCREEN_FONT_SIZES:
if (font_sizes[LyXFont::SIZE_TINY]
!= system_lyxrc.font_sizes[LyXFont::SIZE_TINY] ||
os << "\\override_x_deadkeys "
<< tostr(override_x_deadkeys) << "\n";
}
- case RC_SCREEN_FONT_ENCODING_MENU:
- if (font_norm_menu != system_lyxrc.font_norm_menu) {
- os << "\\screen_font_encoding_menu \"" << font_norm_menu
- << "\"\n";
- }
case RC_AUTO_NUMBER:
if (auto_number != system_lyxrc.auto_number) {
os << "\\auto_number " << tostr(auto_number) << "\n";
str = N_("The screen fonts used to display the text while editing.");
break;
- case RC_SCREEN_FONT_MENU:
- str = N_("The font for menus (and groups titles in popups).");
+ case RC_POPUP_BOLD_FONT:
+ str = N_("The bold font in the dialogs.");
break;
- case RC_SCREEN_FONT_POPUP:
- str = N_("The font for popups.");
+ case RC_POPUP_NORMAL_FONT:
+ str = N_("The normal font in the dialogs.");
break;
case RC_SCREEN_FONT_ENCODING:
str = N_("The encoding for the screen fonts.");
break;
- case RC_SCREEN_FONT_ENCODING_MENU:
+ case RC_POPUP_FONT_ENCODING:
str = N_("The encoding for the menu/popups fonts.");
break;
RC_SCREEN_FONT_ROMAN,
RC_SCREEN_FONT_SANS,
RC_SCREEN_FONT_TYPEWRITER,
- RC_SCREEN_FONT_MENU,
- RC_SCREEN_FONT_POPUP,
RC_SCREEN_FONT_ENCODING,
- RC_SCREEN_FONT_ENCODING_MENU,
+ RC_POPUP_BOLD_FONT,
+ RC_POPUP_NORMAL_FONT,
+ RC_POPUP_FONT_ENCODING,
RC_SET_COLOR,
RC_AUTOSAVE,
RC_DOCUMENTPATH,
///
string typewriter_font_name;
///
- string menu_font_name;
+ string popup_bold_font;
///
- string popup_font_name;
+ string popup_normal_font;
///
string font_norm;
///
///
void set_font_norm_type();
///
- string font_norm_menu;
+ string popup_font_encoding;
///
unsigned int autosave;
///