]> git.lyx.org Git - features.git/commitdiff
insertlabel.diff, kbnmod.diff, lyx_main.patch, and part of compile.patch
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 10 Dec 2001 15:59:20 +0000 (15:59 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 10 Dec 2001 15:59:20 +0000 (15:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3181 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/Alert.h
src/frontends/ChangeLog
src/kbsequence.C
src/kbsequence.h
src/lyx_cb.C
src/lyx_main.h

index 9570d71a440ce1eae2d27a513a137a382ce37f88..723f071d5d83a7f25bf84d2be65b3c91824d2e56 100644 (file)
@@ -1,3 +1,16 @@
+2001-12-06  John Levon  <moz@compsoc.man.ac.uk>
+
+       * lyx_cb.C: another bv->text misuse, from insert label
+2001-12-03  John Levon  <moz@compsoc.man.ac.uk>
+
+       * kbsequence.h:
+       * kbsequence.C: re-instate nmodifier mask
+2001-12-12  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * lyx_main.h: make lyxGUI private.
+
 2001-12-06  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyxfind.C: place the cursor correctly on failed search
index ead6f8a60634e8d0e7289ebc599e259c27f39c77..0fe2a71417ef9bb3726a0ecc57257c86429d0783 100644 (file)
@@ -28,4 +28,4 @@ namespace Alert {
        /// Asks for a text
        std::pair<bool, string> const askForText(string const & msg, 
                string const & dflt = string());
-};
+}
index 62b95805ae355c9b8c9fc21c137d104fac9377bc..55b51f50d320fb734684083219e5123a69650673 100644 (file)
@@ -1,3 +1,7 @@
+2001-12-12  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * Alert.h: remove spurious semi-colon at the end of the namespace scope.
+
 2001-11-22  John Levon  <moz@compsoc.man.ac.uk>
 
        * Makefile.am: 
index 0933d0b1bf1011ae52aab6adde43f47af831a422..afb091ee46d62c0593a3983a7e57b80c1acd6752 100644 (file)
@@ -29,7 +29,7 @@ using std::endl;
 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 @@ kb_action kb_sequence::addkey(unsigned int key, unsigned int mod)
                modifiers.clear();
        }
 
-       modifiers.push_back(mod);
+       modifiers.push_back(mod + (nmod << 16));
        sequence.push_back(key);
        ++length_;
 
@@ -58,6 +58,7 @@ string::size_type kb_sequence::parse(string const & s)
 
        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 @@ string::size_type kb_sequence::parse(string const & s)
                           && 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 @@ string::size_type kb_sequence::parse(string const & s)
                        }
                        i = j;
                        
-                       addkey(key, mod);
+                       addkey(key, mod, nmod);
                        mod = 0;
                }
        }
@@ -149,7 +153,7 @@ string const kb_sequence::printOptions() const
        string buf;
 
        buf += print();
-       
+
        if (!curmap)
                return buf;
 
index f277ba83eecb9bf45f18f8f8137ac2d890e669ef..255adb2d298f7d86f81f70084391fbc4df09b72c 100644 (file)
@@ -34,9 +34,10 @@ public:
         * 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 d94564d492d4ee8be92ff59615f46c3142f2aeab..75920bd012eb9313b554d2d592cc47f98d434634 100644 (file)
@@ -476,7 +476,7 @@ void MenuInsertLabel(BufferView * bv, string const & arg)
        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 fa48772a789357ed63daff3e82bb8db3c76e9993..fddfd674e0af28d420049952e036631a6aedd3f1 100644 (file)
@@ -53,10 +53,10 @@ public:
 
        /// in the case of failure
        static void emergencyCleanup();
-       ///
-       LyXGUI * lyxGUI;  // should be only one of this
+
 private:
+       /// Should be a maximum of 1 LyXGUI.
+       LyXGUI * lyxGUI;
        /// does this user start lyx for the first time?
        bool first_start;
        ///