without removing this, you can make lyx core with it. So let's get
rid of it (what was it supposed to do anyway ?)

john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.
Index: src/BufferView_pimpl.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v
retrieving revision 1.207
diff -u -r1.207 BufferView_pimpl.C
--- src/BufferView_pimpl.C      2002/03/05 16:18:02     1.207
+++ src/BufferView_pimpl.C      2002/03/06 20:46:17
@@ -2744,10 +2744,6 @@
        }
        break;
        
-       case LFUN_INSET_TEXT:
-               insertAndEditInset(new InsetText(buffer_->params));
-               break;
-       
        case LFUN_INSET_ERT:
                insertAndEditInset(new InsetERT(buffer_->params));
                break;
@@ -3319,10 +3315,19 @@
 
 void BufferView::Pimpl::insertAndEditInset(Inset * inset)
 {
-       if (insertInset(inset))
+       bool gotsel = false;
+ 
+       if (bv_->getLyXText()->selection.set()) {
+               bv_->getLyXText()->cutSelection(bv_, true, false);
+               gotsel = true;
+       }
+ 
+       if (insertInset(inset)) {
                inset->edit(bv_);
-       else
+               owner_->getLyXFunc()->dispatch(LFUN_PASTESELECTION);
+       } else {
                delete inset;
+       }
 }
 
  
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.600
diff -u -r1.600 ChangeLog
--- src/ChangeLog       2002/03/06 16:02:50     1.600
+++ src/ChangeLog       2002/03/06 20:46:32
@@ -1,3 +1,11 @@
+2002-03-06  John Levon  <[EMAIL PROTECTED]>
+
+       * commandtags.h:
+       * LyXAction.C:
+       * lyxfunc.C:
+       * BufferView_pimpl.C: remove unused LFUN_CORE,
+       LFUN_TEXT_INSET
+
 2002-03-06  Juergen Vigna  <[EMAIL PROTECTED]>
 
        * buffer.C (parseSingleLyXformat2Token): changed "%" to "p%" as
Index: src/LyXAction.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LyXAction.C,v
retrieving revision 1.110
diff -u -r1.110 LyXAction.C
--- src/LyXAction.C     2002/02/28 14:06:17     1.110
+++ src/LyXAction.C     2002/03/06 20:46:36
@@ -379,8 +379,6 @@
                  N_("Tabular Features"), Noop },
                { LFUN_INSET_TABULAR, "tabular-insert",
                  N_("Insert a new Tabular Inset"), Noop },
-               { LFUN_INSET_TEXT, "text-insert",
-                 N_("Insert a new Text Inset"), Noop },
 #if 0
                { LFUN_INSET_THEOREM, "theorem-insert", "", Noop },
 #endif
diff -u -r1.2 box.C
--- src/box.C   2002/01/08 13:34:39     1.2
+++ src/box.C   2002/03/06 20:46:37
@@ -30,4 +30,3 @@
        return o << "x1,y1: " << b.x1 << "," << b.y1
                << " x2,y2: " << b.x2 << "," << b.y2 << std::endl;
 }
- 
Index: src/commandtags.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/commandtags.h,v
retrieving revision 1.83
diff -u -r1.83 commandtags.h
--- src/commandtags.h   2002/02/18 19:13:42     1.83
+++ src/commandtags.h   2002/03/06 20:46:49
@@ -253,7 +253,6 @@
        LFUN_HELP_OPEN, // 220          // Jug 990627
        LFUN_DATE_INSERT,                     // jdblair 20000131
        LFUN_LANGUAGE,                  // Dekel 20000203
-       LFUN_INSET_TEXT,                      // Jug 20000214
        LFUN_INSET_ERT,                 // Jug 20000218
        LFUN_INSET_GRAPHICS,            // Lgb 20000226
        LFUN_INSET_FOOTNOTE,            // Jug 20000307
Index: src/lyxfunc.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.298
diff -u -r1.298 lyxfunc.C
--- src/lyxfunc.C       2002/03/01 14:13:01     1.298
+++ src/lyxfunc.C       2002/03/06 20:46:56
@@ -570,9 +570,6 @@
        // the functions which insert insets
        Inset::Code code = Inset::NO_CODE;
        switch (action) {
-       case LFUN_INSET_TEXT:
-               code = Inset::TEXT_CODE;
-               break;
        case LFUN_INSET_ERT:
                code = Inset::ERT_CODE;         
                break;

Reply via email to