]> git.lyx.org Git - features.git/commitdiff
Get rid of LyXView::hasFocus().
authorAbdelrazak Younes <younes@lyx.org>
Wed, 23 Sep 2009 09:17:11 +0000 (09:17 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 23 Sep 2009 09:17:11 +0000 (09:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31452 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/LyXView.h
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h

index 3c69aef12957a99e69c1df97d044887478c92dd9..2b1d3d8e92b441a73d0526c9b52338a2b16ffe0f 100644 (file)
@@ -65,8 +65,6 @@ public:
 
        /// set a buffer to the current workarea.
        virtual void setBuffer(Buffer * b) = 0; ///< \c Buffer to set.
-       ///
-       virtual bool hasFocus() const = 0;
 
        /// load a document into the current workarea.
        virtual Buffer * loadDocument(
index 458ab789a3e14ee06e1c1167a31ce16849a19109..982d16a7b5a0dbf726c179f1ee9335da37f9e82a 100644 (file)
@@ -808,7 +808,7 @@ LyXView * GuiApplication::currentWindow()
           the main window. In this case, we want to disable the menu
           entries that are buffer or view-related.
        */
-       if (current_view_ && !current_view_->hasFocus())
+       if (current_view_ && current_view_->activeWindow() != this)
                return 0;
 #endif
        return current_view_;
index 9dcc95429d925850f15012ae86cad2dd696ec684..b1bfd73d423c3479d49d644b429f6d72e470eae0 100644 (file)
@@ -734,12 +734,6 @@ void GuiView::updateStatusBar()
 }
 
 
-bool GuiView::hasFocus() const
-{
-       return qApp->activeWindow() == this;
-}
-
-
 bool GuiView::event(QEvent * e)
 {
        switch (e->type())
index 65059c63b2174efc8d1443304ab3b8aef4406670..06449a9174aa33b9d04227d3de8b684088732fad 100644 (file)
@@ -71,7 +71,6 @@ public:
        BufferView * documentBufferView();
        BufferView const * documentBufferView() const;
        void setBuffer(Buffer * b);
-       bool hasFocus() const;
        Buffer * loadDocument(support::FileName const &  name,
                bool tolastfiles = true);
        void newDocument(std::string const & filename,