]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Application.C
GUI API Cleanup step 2: merge of the "younes" branch. What's missing
[lyx.git] / src / frontends / qt4 / Application.C
index d8b4fdcea8046a8489151e52a04ad6f97e833bb4..51e2380a5d89e67d04b4a189b034668e66bec7a8 100644 (file)
@@ -42,7 +42,7 @@ namespace lyx {
 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.
@@ -59,9 +59,10 @@ Application::Application(int & argc, char ** argv)
 #endif
 }
 
-void Application::connect(GuiWorkArea * work_area)
+
+void Application::setBufferView(BufferView * buffer_view)
 {
-       work_area_ = work_area;
+       buffer_view_ = buffer_view;
 }
 
 
@@ -73,13 +74,13 @@ bool Application::x11EventFilter(XEvent * xev)
        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;
@@ -111,7 +112,7 @@ OSErr checkAppleEventForMissingParams(const AppleEvent& theAppleEvent)
 } // namespace
 
 OSErr Application::handleOpenDocuments(const AppleEvent* inEvent,
-                                       AppleEvent* /*reply*/, long /*refCon*/)
+                                      AppleEvent* /*reply*/, long /*refCon*/)
 {
        QString s_arg;
        AEDescList documentList;
@@ -143,9 +144,9 @@ OSErr Application::handleOpenDocuments(const AppleEvent* inEvent,
                                        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;
                                }
                        }