now fix the KP_ stuff, simplify keysym handling in Workarea, this might break other things please test.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1285 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2000-12-19 00:22:04 +00:00
parent f510d0f995
commit d0c9adeb06
7 changed files with 68 additions and 19 deletions

View File

@ -1,5 +1,22 @@
2000-12-19 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/WorkArea.C (work_area_handler): simplify the key/keysym
handling for XForms 0.89, this might have rendered some cases
unusable. I have at least deadkeys, accent-xxx and KP_x working.
Please report proplems.
* src/lyxfunc.C (processKeySym): make the self-insert handling
work as it should
2000-12-18 Baruch Even <baruch.even@writeme.com>
* src/LaTeX.C (deplog): fix spelling errors
* src/text2.C (CutSelection): ditto
* src/lyxfunc.C (Dispatch): ditto
2000-12-18 Lars Gullik Bjønnes <larsbj@lyx.org>
* lib/layouts/stdlayouts.inc: only allow align Center for Caption
* src/mathed/math_inset.C (MathMatrixInset): initialize v_align
and h_align in default init.

View File

@ -89,8 +89,8 @@ Style Caption
LabelSep xx
ParSkip 0.4
TopSep 0.5
Align Block
AlignPossible Block, Left
Align Center
AlignPossible Center
LabelType Sensitive
LabelString Caption

View File

@ -637,7 +637,7 @@ void LaTeX::deplog(DepTable & head)
// Ok now we found a file.
// Now we should make sure that this is a file that we can
// access through the normal paths.
// We will not try any fance search methods to
// We will not try any fancy search methods to
// find the file.
// (1) foundfile is an
@ -646,7 +646,7 @@ void LaTeX::deplog(DepTable & head)
if (AbsolutePath(foundfile)) {
lyxerr[Debug::DEPEND] << "AbsolutePath file: "
<< foundfile << endl;
// On inital insert we want to do the update at once
// On initial insert we want to do the update at once
// since this file can not be a file generated by
// the latex run.
head.insert(foundfile, true);

View File

@ -372,18 +372,27 @@ int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
if (!key) {
// We migth have to add more keysyms here also,
// we will do that as the issues arise. (Lgb)
if (keysym == XK_space)
if (keysym == XK_space) {
ret_key = keysym;
else
lyxerr[Debug::KEY] << "Using keysym [A]"
<< endl;
} else
break;
} else {
// It seems that this was a bit optimistic...
// With this hacking things seems to be better (Lgb)
if (static_cast<unsigned char>(key) == key
&& !iscntrl(key))
ret_key = key;
else
//if (!iscntrl(key)) {
// ret_key = key;
// lyxerr[Debug::KEY]
// << "Using key [B]\n"
// << "Uchar["
// << static_cast<unsigned char>(key)
// << endl;
//} else {
ret_key = (keysym ? keysym : key);
lyxerr[Debug::KEY] << "Using keysym [B]"
<< endl;
//}
}
#endif

View File

@ -273,10 +273,31 @@ int LyXFunc::processKeySym(KeySym keysym, unsigned int state)
} else if (action == LFUN_SELFINSERT) {
// We must set the argument to the char looked up by
// XKeysymToString
char const * tmp = XKeysymToString(keysym);
// if (!argument.empty()) {
argument = tmp ? tmp : "";
// }
XKeyEvent xke;
xke.type = KeyPress;
xke.serial = 0;
xke.send_event = False;
xke.display = fl_get_display();
xke.window = 0;
xke.root = 0;
xke.subwindow = 0;
xke.time = 0;
xke.x = 0;
xke.y = 0;
xke.x_root = 0;
xke.y_root = 0;
xke.state = state;
xke.keycode = XKeysymToKeycode(fl_get_display(), keysym);
xke.same_screen = True;
char ret[10];
KeySym tmpkeysym;
int res = XLookupString(&xke, ret, 10, &tmpkeysym, 0);
//Assert(keysym == tmpkeysym);
lyxerr[Debug::KEY] << "TmpKeysym ["
<< tmpkeysym << "]" << endl;
if (res > 0)
argument = string(ret, res);
lyxerr[Debug::KEY] << "SelfInsert arg["
<< argument << "]" << endl;
}
@ -1823,7 +1844,7 @@ string const LyXFunc::Dispatch(int ac,
owner->view()->text->cursor;
owner->view()->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
// It is possible to make it a lot faster still
// just comment out the lone below...
// just comment out the line below...
owner->view()->showCursor();
} else {
owner->view()->cut();
@ -1939,7 +1960,7 @@ string const LyXFunc::Dispatch(int ac,
owner->view()->text->cursor;
owner->view()->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
// It is possible to make it a lot faster still
// just comment out the lone below...
// just comment out the line below...
owner->view()->showCursor();
}
} else {

View File

@ -506,11 +506,13 @@ void MathedXIter::Merge(LyxArrayBase * a0)
MathedIter it(a0);
LyxArrayBase * a = it.Copy();
// make rom for the data
// make room for the data
split(a->Last());
array->MergeF(a, pos, a->Last());
int pos1= pos, pos2 = pos + a->Last(); // pos3= 0;
int pos1 = pos;
int pos2 = pos + a->Last();
// int pos3 = 0;
goPosAbs(pos1);

View File

@ -2189,7 +2189,7 @@ void LyXText::CutSelection(BufferView * bview, bool doclear)
return;
// OK, we have a selection. This is always between sel_start_cursor
// and sel_end cursor
// and sel_end_cursor
#ifndef NEW_INSETS
// Check whether there are half footnotes in the selection
if (sel_start_cursor.par()->footnoteflag != LyXParagraph::NO_FOOTNOTE