(I think)

Someone better apply the kbsequence one before Andre goes mad ...

regards
john

-- 
"Take the ideas you find useful. Try not to get hung up on the labels."
        - Jonathan S. Shapiro
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.429
diff -u -r1.429 ChangeLog
--- src/ChangeLog       2001/12/03 13:17:01     1.429
+++ src/ChangeLog       2001/12/03 16:23:23
@@ -1,3 +1,8 @@
+2001-12-03  John Levon  <[EMAIL PROTECTED]>
+
+       * kbsequence.h:
+       * kbsequence.C: re-instate nmodifier mask
+ 
 2001-12-03  Juergen Vigna  <[EMAIL PROTECTED]>
 
        * text.C (rowLast): simplified code
Index: src/kbsequence.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/kbsequence.h,v
retrieving revision 1.7
diff -u -r1.7 kbsequence.h
--- src/kbsequence.h    2001/11/30 13:25:35     1.7
+++ src/kbsequence.h    2001/12/03 16:23:23
@@ -34,9 +34,10 @@
         * Add a key to the key sequence and look it up in the curmap
         * if the latter is defined.
         * @param mod modifier mask
+        * @param nmod which modifiers to mask out for equality test
         * @return the action matching this key sequence or LFUN_UNKNOWN_ACTION
         */
-       kb_action addkey(unsigned int key, unsigned int mod);
+       kb_action addkey(unsigned int key, unsigned int mod, unsigned int nmod = 0);
 
        /**
         * Add a sequence of keys from a string to the sequence
Index: src/kbsequence.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/kbsequence.C,v
retrieving revision 1.18
diff -u -r1.18 kbsequence.C
--- src/kbsequence.C    2001/11/30 13:25:35     1.18
+++ src/kbsequence.C    2001/12/03 16:23:23
@@ -29,7 +29,7 @@
 enum { ModsMask = ShiftMask | ControlMask | Mod1Mask };
 
 
-kb_action kb_sequence::addkey(unsigned int key, unsigned int mod)
+kb_action kb_sequence::addkey(unsigned int key, unsigned int mod, unsigned int nmod)
 {
        // adding a key to a deleted sequence
        // starts a new sequence
@@ -40,7 +40,7 @@
                modifiers.clear();
        }
 
-       modifiers.push_back(mod);
+       modifiers.push_back(mod + (nmod << 16));
        sequence.push_back(key);
        ++length_;
 
@@ -58,6 +58,7 @@
 
        string::size_type i = 0;
        unsigned int mod = 0;
+       unsigned int nmod = 0;
        while (i < s.length()) {
                if (s[i] == ' ')
                        ++i;
@@ -85,12 +86,15 @@
                           && s[i + 2] == '-') {
                        switch (s[i + 1]) {
                        case 's': case 'S':
+                               nmod |= ShiftMask;
                                i += 3;
                                continue;
                        case 'c': case 'C':
+                               nmod |= ControlMask;
                                i += 3;
                                continue;
                        case 'm': case 'M':
+                               nmod |= Mod1Mask;
                                i += 3;
                                continue;
                        default:
@@ -111,7 +115,7 @@
                        }
                        i = j;
                        
-                       addkey(key, mod);
+                       addkey(key, mod, nmod);
                        mod = 0;
                }
        }
@@ -149,7 +153,7 @@
        string buf;
 
        buf += print();
-       
+
        if (!curmap)
                return buf;
 
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.443
diff -u -r1.443 ChangeLog
--- src/ChangeLog       2001/12/05 23:21:26     1.443
+++ src/ChangeLog       2001/12/06 01:01:02
@@ -1,3 +1,7 @@
+2001-12-06  John Levon  <[EMAIL PROTECTED]>
+
+       * lyx_cb.C: another bv->text misuse, from insert label
+ 
 2001-12-05  John Levon  <[EMAIL PROTECTED]>
 
        * lyxtext.h:
Index: src/lyx_cb.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_cb.C,v
retrieving revision 1.162
diff -u -r1.162 lyx_cb.C
--- src/lyx_cb.C        2001/11/26 10:19:49     1.162
+++ src/lyx_cb.C        2001/12/06 01:01:03
@@ -476,7 +477,7 @@
        string label(arg);
        bv->owner()->prohibitInput();
        if (label.empty()) {
-               Paragraph * par = bv->text->cursor.par();
+               Paragraph * par = bv->getLyXText()->cursor.par();
                LyXLayout const * layout =
                        &textclasslist.Style(bv->buffer()->params.textclass,
                                             par->getLayout());
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.427
diff -u -r1.427 ChangeLog
--- src/ChangeLog       2001/12/02 16:39:56     1.427
+++ src/ChangeLog       2001/12/02 18:24:47
@@ -1,3 +1,7 @@
+2001-12-02  John Levon  <[EMAIL PROTECTED]>
+
+       * lyxfunc.C: disable FONT_EMPH etc. in mathed
+ 
 2001-12-02  Lars Gullik Bj�nnes  <[EMAIL PROTECTED]>
 
        * vspace.[Ch] (operator!=): add operator. 
@@ -102,7 +106,7 @@
        * paragraph_pimpl.h:
        * paragraph_pimpl.C: tidy, and fix font-change in "LaTeX"
          bug a bit
- 
+
 2001-11-26  John Levon  <[EMAIL PROTECTED]>
 
        * text.C: 
Index: src/lyxfunc.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.268
diff -u -r1.268 lyxfunc.C
--- src/lyxfunc.C       2001/11/30 13:25:35     1.268
+++ src/lyxfunc.C       2001/12/02 18:24:50
@@ -704,14 +704,20 @@
        case LFUN_EMPH:
                if (font.emph() == LyXFont::ON)
                        box = func_status::ToggleOn;
+               if (mathcursor)
+                       box = func_status::Disabled;
                break;
        case LFUN_NOUN:
                if (font.noun() == LyXFont::ON)
                        box = func_status::ToggleOn;
+               if (mathcursor)
+                       box = func_status::Disabled;
                break;
        case LFUN_BOLD:
                if (font.series() == LyXFont::BOLD_SERIES)
                        box = func_status::ToggleOn;
+               if (mathcursor)
+                       box = func_status::Disabled;
                break;
        case LFUN_READ_ONLY_TOGGLE:
                if (buf->isReadonly())

Reply via email to