mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-27 02:19:10 +00:00
Language patch from Dekel and fixed formula[macro] as I forgot yesterday.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@827 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ccfdb2a78a
commit
87207b1939
13
ChangeLog
13
ChangeLog
@ -1,3 +1,8 @@
|
||||
2000-06-22 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/mathed/formulamacro.[Ch]:
|
||||
* src/mathed/formula.[Ch]: changed prototype of draw() and GetCursorPos
|
||||
|
||||
2000-06-21 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/text.C (GetVisibleRow): look if I should clear the area or not
|
||||
@ -8,6 +13,14 @@
|
||||
|
||||
* src/text2.C (UpdateInset): return bool insted of int
|
||||
|
||||
2000-06-20 Dekel Tsur <dekel@math.tau.ac.il>
|
||||
|
||||
* src/lyx_gui.C (create_forms): Add "Reset" option to the language
|
||||
combox in the character popup
|
||||
|
||||
* src/lyx_cb.C (UserFreeFont): Add argument to the method:
|
||||
BufferParams const & params
|
||||
|
||||
2000-06-20 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/insets/insettext.C (SetParagraphData): set insetowner on
|
||||
|
@ -122,7 +122,7 @@ void changeDepth(BufferView * bv, int decInc)
|
||||
|
||||
void Free(BufferView * bv)
|
||||
{
|
||||
ToggleAndShow(bv, UserFreeFont());
|
||||
ToggleAndShow(bv, UserFreeFont(bv->buffer()->params));
|
||||
}
|
||||
|
||||
|
||||
|
20
src/lyx_cb.C
20
src/lyx_cb.C
@ -1910,7 +1910,7 @@ void MenuLayoutSave()
|
||||
|
||||
// This is both GUI and LyXFont dependent. Don't know where to put it. (Asger)
|
||||
// Well, it's mostly GUI dependent, so I guess it will stay here. (Asger)
|
||||
LyXFont UserFreeFont()
|
||||
LyXFont UserFreeFont(BufferParams const & params)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
|
||||
@ -1992,20 +1992,18 @@ LyXFont UserFreeFont()
|
||||
case 11: font.setColor(LColor::inherit); break;
|
||||
}
|
||||
|
||||
string language = combo_language2->getline();
|
||||
Languages::iterator lit = languages.find(language);
|
||||
if (lit != languages.end())
|
||||
font.setLanguage(&(*lit).second);
|
||||
else
|
||||
font.setLanguage(ignore_language);
|
||||
|
||||
int choice = combo_language2->get();
|
||||
if (choice == 1)
|
||||
font.setLanguage(ignore_language);
|
||||
else if (choice == 2)
|
||||
font.setLanguage(params.language_info);
|
||||
else
|
||||
font.setLanguage(&languages[combo_language2->getline()]);
|
||||
|
||||
return font;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* callbacks for form form_title */
|
||||
extern "C" void TimerCB(FL_OBJECT *, long)
|
||||
{
|
||||
@ -2168,7 +2166,7 @@ extern "C" void CharacterApplyCB(FL_OBJECT *, long)
|
||||
// we set toggleall locally here, since it should be true for
|
||||
// all other uses of ToggleAndShow() (JMarc)
|
||||
toggleall = fl_get_button(fd_form_character->check_toggle_all);
|
||||
ToggleAndShow(current_view, UserFreeFont());
|
||||
ToggleAndShow(current_view, UserFreeFont(current_view->buffer()->params));
|
||||
current_view->setState();
|
||||
toggleall = true;
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
#ifndef LYX_CB_H
|
||||
#define LYX_CB_H
|
||||
|
||||
class BufferParams;
|
||||
|
||||
///
|
||||
extern bool quitting;
|
||||
extern bool toggleall;
|
||||
@ -9,7 +11,7 @@ extern bool toggleall;
|
||||
// When still false after reading lyxrc, warn user
|
||||
//about failing \bind_file command. RVDK_PATCH_5
|
||||
extern bool BindFileSet;
|
||||
extern LyXFont UserFreeFont();
|
||||
extern LyXFont UserFreeFont(BufferParams const & params);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -399,7 +399,8 @@ void LyXGUI::create_forms()
|
||||
|
||||
// "default" is not part of the languages array any more.
|
||||
combo_language->addto("default");
|
||||
combo_language2->addto("No change");
|
||||
combo_language2->addto(_("No change"));
|
||||
combo_language2->addto(_("Reset"));
|
||||
for(Languages::const_iterator cit = languages.begin();
|
||||
cit != languages.end(); ++cit) {
|
||||
combo_language->addto((*cit).second.lang().c_str());
|
||||
|
@ -403,9 +403,10 @@ int InsetFormula::width(Painter &, LyXFont const & f) const
|
||||
}
|
||||
|
||||
|
||||
void InsetFormula::draw(Painter & pain, LyXFont const & f,
|
||||
void InsetFormula::draw(BufferView * bv, LyXFont const & f,
|
||||
int baseline, float & x) const
|
||||
{
|
||||
Painter & pain = bv->painter();
|
||||
// Seems commenting out solves a problem.
|
||||
LyXFont font = mathed_get_font(LM_TC_TEXTRM, LM_ST_TEXT);
|
||||
font.setSize(f.size());
|
||||
@ -507,7 +508,7 @@ void InsetFormula::InsertSymbol(BufferView * bv, char const * s)
|
||||
}
|
||||
|
||||
|
||||
void InsetFormula::GetCursorPos(int& x, int& y) const
|
||||
void InsetFormula::GetCursorPos(BufferView *, int& x, int& y) const
|
||||
{
|
||||
mathcursor->GetPos(x, y);
|
||||
x -= par->xo;
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
///
|
||||
int width(Painter &, LyXFont const &) const;
|
||||
///
|
||||
void draw(Painter &, LyXFont const &, int baseline, float & x) const;
|
||||
void draw(BufferView *,LyXFont const &, int baseline, float & x) const;
|
||||
///
|
||||
void Write(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
@ -88,7 +88,7 @@ public:
|
||||
///
|
||||
void HideInsetCursor(BufferView *);
|
||||
///
|
||||
void GetCursorPos(int &, int &) const;
|
||||
void GetCursorPos(BufferView *, int &, int &) const;
|
||||
///
|
||||
void ToggleInsetSelection(BufferView * bv);
|
||||
///
|
||||
|
@ -146,14 +146,15 @@ int InsetFormulaMacro::width(Painter & pain, LyXFont const & f) const
|
||||
}
|
||||
|
||||
|
||||
void InsetFormulaMacro::draw(Painter & pain, LyXFont const & f,
|
||||
void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f,
|
||||
int baseline, float & x) const
|
||||
{
|
||||
Painter & pain = bv->painter();
|
||||
LyXFont font(f);
|
||||
tmacro->update();
|
||||
if (opened) {
|
||||
tmacro->setEditMode(true);
|
||||
InsetFormula::draw(pain, font, baseline, x);
|
||||
InsetFormula::draw(bv, font, baseline, x);
|
||||
tmacro->setEditMode(false);
|
||||
} else {
|
||||
font.setColor(LColor::math);
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
///
|
||||
int width(Painter &, LyXFont const &) const;
|
||||
///
|
||||
void draw(Painter &, LyXFont const &, int baseline, float & x) const;
|
||||
void draw(BufferView *,LyXFont const &, int baseline, float & x) const;
|
||||
///
|
||||
void Read(Buffer const *, LyXLex & lex);
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user