namespace frontend {
Application::Application(int & argc, char ** argv)
- : QApplication(argc, argv), work_area_(NULL)
+ : QApplication(argc, argv), buffer_view_(0)
{
#ifdef Q_WS_X11
// doubleClickInterval() is 400 ms on X11 witch is just too long.
#endif
}
-void Application::connect(GuiWorkArea * work_area)
+
+void Application::setBufferView(BufferView * buffer_view)
{
- work_area_ = work_area;
+ buffer_view_ = buffer_view;
}
switch (xev->type) {
case SelectionRequest:
lyxerr[Debug::GUI] << "X requested selection." << endl;
- if (work_area_)
- work_area_->view().view()->selectionRequested();
+ if (buffer_view_)
+ buffer_view_->selectionRequested();
break;
case SelectionClear:
lyxerr[Debug::GUI] << "Lost selection." << endl;
- if (work_area_)
- work_area_->view().view()->selectionLost();
+ if (buffer_view_)
+ buffer_view_->selectionLost();
break;
}
return false;
} // namespace
OSErr Application::handleOpenDocuments(const AppleEvent* inEvent,
- AppleEvent* /*reply*/, long /*refCon*/)
+ AppleEvent* /*reply*/, long /*refCon*/)
{
QString s_arg;
AEDescList documentList;
FSRefMakePath(&ref, (UInt8*)qstr_buf,
1024);
s_arg=QString::fromUtf8(qstr_buf);
- work_area_->view().view()->workAreaDispatch(
- FuncRequest(LFUN_FILE_OPEN,
- fromqstr(s_arg)));
+// buffer_view_->workAreaDispatch(
+// FuncRequest(LFUN_FILE_OPEN,
+// fromqstr(s_arg)));
break;
}
}