]> git.lyx.org Git - features.git/commitdiff
now fix the KP_ stuff, simplify keysym handling in Workarea, this might break other...
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 19 Dec 2000 00:22:04 +0000 (00:22 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 19 Dec 2000 00:22:04 +0000 (00:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1285 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
lib/layouts/stdlayouts.inc
src/LaTeX.C
src/WorkArea.C
src/lyxfunc.C
src/mathed/math_iter.C
src/text2.C

index 25f0f8482353fcae826ccd24a17d7180a6863f0a..c54d9d5b0d0862e7c2c5500559cf059cf82316b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 70f096eceb31e73ac1e05c05d5a1a2dbc1d137b6..14a146d95370c1ee0893e8d9bc80dc57a2983fdf 100644 (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
 
index deaffae9ce38a8d3797dc60db20e55966f1d7e65..2485f03371fc263a38fe8bbc372d006009952a70 100644 (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);
index 57e8e01f1842ee08eddb1cd8c7d6da38df377295..033c35eddd0a5016ecb8840bd62d8f401eb36273 100644 (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 
index 2510ea6b43bade9f38ff43fdbcb2d95d1115c57c..551fb8e4f7a6766b31765c1f27c176aec60412de 100644 (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 {
index 86146edc7f920f20e7bf66d8002657f8987be635..2b3212585f7ffd82541bee4c8e3da447ebdeea4e 100644 (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);
     
index 3acc851c45d04bb64c9231a82a330a17e32244fa..b5a276a31525e24454e4e9a6bad1449cd459b0e8 100644 (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