/// 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(
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_;
}
-bool GuiView::hasFocus() const
-{
- return qApp->activeWindow() == this;
-}
-
-
bool GuiView::event(QEvent * e)
{
switch (e->type())
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,