LFUN_FONT_FREE_* -> LFUN_TEXSTYLE_*

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg141274.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25225 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2008-06-11 08:35:15 +00:00
parent d708dfe1fd
commit 07113cf424
9 changed files with 25 additions and 23 deletions

View File

@ -254,7 +254,7 @@ Menuset
OptItem "Move Section down|d" "outline-down"
OptItem "Move Section up|u" "outline-up"
Separator
Item "Apply Last Text Style|A" "font-free-apply"
Item "Apply Last Text Style|A" "textstyle-apply"
Submenu "Text Style|S" "edit_textstyles"
Item "Paragraph Settings...|P" "layout-paragraph"
Separator

View File

@ -70,7 +70,7 @@ ToolbarSet
Separator
Item "Toggle emphasis" "font-emph"
Item "Toggle noun" "font-noun"
Item "Apply last" "font-free-apply"
Item "Apply last" "textstyle-apply"
Separator
Item "Insert math" "math-mode"
Item "Insert graphics" "dialog-show-new-inset graphics"

View File

@ -55,8 +55,8 @@ enum FuncCode
LFUN_INSET_TOGGLE,
// 20
LFUN_HFILL_INSERT,
LFUN_FONT_FREE_APPLY,
LFUN_FONT_FREE_UPDATE,
LFUN_TEXTSTYLE_APPLY,
LFUN_TEXTSTYLE_UPDATE,
LFUN_FONT_EMPH,
LFUN_FONT_BOLD,
// 25

View File

@ -1145,17 +1145,19 @@ void LyXAction::init()
*/
{ LFUN_FONT_SIZE, "font-size", Noop, Layout },
/*!
* \var lyx::FuncCode lyx::LFUN_FONT_FREE_APPLY
* \li Action: Toggle user-defined text style.
* \li Syntax: font-free-apply
* \var lyx::FuncCode lyx::LFUN_TEXTSTYLE_APPLY
* \li Action: Toggle user-defined (=last-time used) text style.
* \li Notion: This style is set via #LFUN_TEXTSTYLE_UPDATE, which is
automatically trigerred when using Text Style dialog.
* \li Syntax: textstyle-apply
* \li Origin: leeming, 12 Mar 2003
* \endvar
*/
{ LFUN_FONT_FREE_APPLY, "font-free-apply", Noop, Layout },
{ LFUN_TEXTSTYLE_APPLY, "textstyle-apply", Noop, Layout },
/*!
* \var lyx::FuncCode lyx::LFUN_FONT_FREE_UPDATE
* \li Action: Update and apply user-defined text style.
* \li Syntax: font-free-update <FONT_INFO>
* \var lyx::FuncCode lyx::LFUN_TEXTSTYLE_UPDATE
* \li Action: Apply text style and update the settings to be used by #LFUN_TEXTSTYLE_APPLY.
* \li Syntax: textstyle-update <FONT_INFO>
* \li Params: <FONT_INFO>: specifies font atributes, e.g. family, series, shape,
size, emph, noun, underbar, number, color, language,
toggleall.\n
@ -1164,7 +1166,7 @@ void LyXAction::init()
* \li Origin: leeming, 12 Mar 2003
* \endvar
*/
{ LFUN_FONT_FREE_UPDATE, "font-free-update", Noop, Layout },
{ LFUN_TEXTSTYLE_UPDATE, "textstyle-update", Noop, Layout },
/*!
* \var lyx::FuncCode lyx::LFUN_SCREEN_FONT_UPDATE
* \li Action: Update fonts and its metrics.

View File

@ -1583,14 +1583,14 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
break;
}
case LFUN_FONT_FREE_APPLY:
case LFUN_TEXTSTYLE_APPLY:
toggleAndShow(cur, this, freefont, toggleall);
cur.message(_("Character set"));
break;
// Set the freefont using the contents of \param data dispatched from
// the frontends and apply it at the current cursor location.
case LFUN_FONT_FREE_UPDATE: {
case LFUN_TEXTSTYLE_UPDATE: {
Font font;
bool toggle;
if (font.fromString(to_utf8(cmd.argument()), toggle)) {
@ -2207,8 +2207,8 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_FONT_UNDERLINE:
case LFUN_FONT_SIZE:
case LFUN_LANGUAGE:
case LFUN_FONT_FREE_APPLY:
case LFUN_FONT_FREE_UPDATE:
case LFUN_TEXTSTYLE_APPLY:
case LFUN_TEXTSTYLE_UPDATE:
case LFUN_LAYOUT_PARAGRAPH:
case LFUN_PARAGRAPH_UPDATE:
case LFUN_ACCENT_UMLAUT:

View File

@ -68,7 +68,7 @@ private:
void clearParams() {}
void dispatchParams();
bool isBufferDependent() const { return true; }
FuncCode getLfun() const { return LFUN_FONT_FREE_UPDATE; }
FuncCode getLfun() const { return LFUN_TEXTSTYLE_UPDATE; }
void saveSession() const;
void restoreSession();
//@}

View File

@ -665,8 +665,8 @@ bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_FONT_TYPEWRITER:
case LFUN_FONT_DEFAULT:
case LFUN_FONT_EMPH:
case LFUN_FONT_FREE_APPLY:
case LFUN_FONT_FREE_UPDATE:
case LFUN_TEXTSTYLE_APPLY:
case LFUN_TEXTSTYLE_UPDATE:
case LFUN_FONT_NOUN:
case LFUN_FONT_ROMAN:
case LFUN_FONT_SANS:

View File

@ -3456,8 +3456,8 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
case LFUN_FONT_FRAK:
case LFUN_FONT_TYPEWRITER:
case LFUN_FONT_SANS:
case LFUN_FONT_FREE_APPLY:
case LFUN_FONT_FREE_UPDATE:
case LFUN_TEXTSTYLE_APPLY:
case LFUN_TEXTSTYLE_UPDATE:
case LFUN_FONT_SIZE:
case LFUN_FONT_UNDERLINE:
case LFUN_LANGUAGE:

View File

@ -880,8 +880,8 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
break;
// Math fonts
case LFUN_FONT_FREE_APPLY:
case LFUN_FONT_FREE_UPDATE:
case LFUN_TEXTSTYLE_APPLY:
case LFUN_TEXTSTYLE_UPDATE:
handleFont2(cur, cmd.argument());
break;