the patch...
Abdelrazak Younes wrote:
Hello,
I am sure I implement that in the right way. Please someone who knows
about LFUNs, review the patch.
Abdel.
Index: frontends/Application.h
===================================================================
--- frontends/Application.h (revision 15426)
+++ frontends/Application.h (working copy)
@@ -111,8 +111,8 @@
virtual void unregisterSocketCallback(int fd) = 0;
/// Create the main window with given geometry settings.
- LyXView & createView(unsigned int width, unsigned int height,
- int posx, int posy, bool maximize);
+ LyXView & createView(unsigned int width = 0, unsigned int height = 0,
+ int posx = -1, int posy = -1, bool maximize = false);
///
void setBufferView(BufferView * buffer_view);
Index: lfuns.h
===================================================================
--- lfuns.h (revision 15426)
+++ lfuns.h (working copy)
@@ -369,6 +369,7 @@
// 280
LFUN_INSET_DISSOLVE, // jspitzm 20060807
LFUN_CHANGE_NEXT,
+ LFUN_WINDOW_NEW, // Abdel 20062110
LFUN_LASTACTION // end of the table
};
Index: LyXAction.C
===================================================================
--- LyXAction.C (revision 15426)
+++ LyXAction.C (working copy)
@@ -362,6 +362,7 @@
{ LFUN_MOUSE_TRIPLE, "", ReadOnly },
{ LFUN_PARAGRAPH_MOVE_DOWN, "paragraph-move-down", Noop },
{ LFUN_PARAGRAPH_MOVE_UP, "paragraph-move-up", Noop },
+ { LFUN_WINDOW_NEW, "window-new", NoBuffer },
{ LFUN_NOACTION, "", Noop }
};
Index: lyxfunc.C
===================================================================
--- lyxfunc.C (revision 15426)
+++ lyxfunc.C (working copy)
@@ -229,14 +229,17 @@
c = 0;
}
- lyx_view_->view()->getIntl().getTransManager()
- .deadkey(c, get_accent(action).accent, view()->getLyXText());
+ BufferView * bv = lyx_view_->view();
+ BOOST_ASSERT(bv);
+
+ bv->getIntl().getTransManager()
+ .deadkey(c, get_accent(action).accent, bv->getLyXText());
// Need to clear, in case the minibuffer calls these
// actions
keyseq->clear();
// copied verbatim from do_accent_char
- view()->cursor().resetAnchor();
- view()->update();
+ bv->cursor().resetAnchor();
+ bv->update();
}
@@ -619,6 +622,7 @@
case LFUN_LYXRC_APPLY:
case LFUN_BUFFER_NEXT:
case LFUN_BUFFER_PREVIOUS:
+ case LFUN_WINDOW_NEW:
// these are handled in our dispatch()
break;
@@ -1583,6 +1587,10 @@
break;
}
+ case LFUN_WINDOW_NEW:
+ BOOST_ASSERT(theApp);
+ theApp->createView();
+
default: {
view()->cursor().dispatch(cmd);
updateforce |= view()->cursor().result().update();