mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Move implementation details to constructors. Amend 78f457796c
This commit is contained in:
parent
2f3d0653b3
commit
ccbfd22f56
@ -156,14 +156,8 @@ Dialog * createDialog(GuiView & gv, string const & name)
|
||||
return new GuiShowFile(gv);
|
||||
if (name == "findreplace")
|
||||
return new GuiSearch(gv);
|
||||
if (name == "findreplaceadv") {
|
||||
FindAndReplace * gui = new FindAndReplace(gv, Qt::RightDockWidgetArea);
|
||||
#ifdef Q_OS_MAC
|
||||
// On Mac show and floating
|
||||
gui->setFloating(true);
|
||||
#endif
|
||||
return gui;
|
||||
}
|
||||
if (name == "findreplaceadv")
|
||||
return new FindAndReplace(gv);
|
||||
if (name == "graphics")
|
||||
return new GuiGraphics(gv);
|
||||
if (name == "include")
|
||||
@ -194,14 +188,8 @@ Dialog * createDialog(GuiView & gv, string const & name)
|
||||
return new GuiRef(gv);
|
||||
if (name == "sendto")
|
||||
return new GuiSendTo(gv);
|
||||
if (name == "spellchecker") {
|
||||
GuiSpellchecker * gui = new GuiSpellchecker(gv, Qt::RightDockWidgetArea);
|
||||
#ifdef Q_OS_MAC
|
||||
// On Mac show and floating
|
||||
gui->setFloating(true);
|
||||
#endif
|
||||
return gui;
|
||||
}
|
||||
if (name == "spellchecker")
|
||||
return new GuiSpellchecker(gv);
|
||||
if (name == "symbols")
|
||||
return new GuiSymbols(gv);
|
||||
if (name == "tabularcreate")
|
||||
@ -217,7 +205,7 @@ Dialog * createDialog(GuiView & gv, string const & name)
|
||||
if (name == "wrap")
|
||||
return new GuiWrap(gv);
|
||||
if (name == "progress")
|
||||
return new GuiProgressView(gv, Qt::BottomDockWidgetArea);
|
||||
return new GuiProgressView(gv);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -588,6 +588,10 @@ FindAndReplace::FindAndReplace(GuiView & parent,
|
||||
widget_ = new FindAndReplaceWidget(parent);
|
||||
setWidget(widget_);
|
||||
setFocusProxy(widget_);
|
||||
#ifdef Q_OS_MAC
|
||||
// On Mac show and floating
|
||||
setFloating(true);
|
||||
#endif
|
||||
|
||||
connect(this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
|
||||
widget_, SLOT(dockLocationChanged(Qt::DockWidgetArea)));
|
||||
|
@ -46,7 +46,7 @@ class GuiProgressView : public DockView
|
||||
public:
|
||||
GuiProgressView(
|
||||
GuiView & parent, ///< the main window where to dock.
|
||||
Qt::DockWidgetArea area, ///< Position of the dock (and also drawer)
|
||||
Qt::DockWidgetArea area = Qt::BottomDockWidgetArea, ///< Position of the dock (and also drawer)
|
||||
Qt::WindowFlags flags = 0);
|
||||
|
||||
~GuiProgressView();
|
||||
|
@ -598,6 +598,10 @@ GuiSpellchecker::GuiSpellchecker(GuiView & parent,
|
||||
widget_ = new SpellcheckerWidget(&parent, this);
|
||||
setWidget(widget_);
|
||||
setFocusProxy(widget_);
|
||||
#ifdef Q_OS_MAC
|
||||
// On Mac show and floating
|
||||
setFloating(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user