Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/shell/mainwindow_p.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
42 | #include "core.h" | 42 | #include "core.h" | ||
43 | #include "partdocument.h" | 43 | #include "partdocument.h" | ||
44 | #include "partcontroller.h" | 44 | #include "partcontroller.h" | ||
45 | #include "uicontroller.h" | 45 | #include "uicontroller.h" | ||
46 | #include "statusbar.h" | 46 | #include "statusbar.h" | ||
47 | #include "mainwindow.h" | 47 | #include "mainwindow.h" | ||
48 | #include "textdocument.h" | 48 | #include "textdocument.h" | ||
49 | #include "sessioncontroller.h" | 49 | #include "sessioncontroller.h" | ||
50 | #include "sourceformattercontroller.h" | ||||
50 | #include "debug.h" | 51 | #include "debug.h" | ||
51 | #include "ktexteditorpluginintegration.h" | 52 | #include "ktexteditorpluginintegration.h" | ||
52 | #include "colorschemechooser.h" | 53 | #include "colorschemechooser.h" | ||
53 | 54 | | |||
54 | #include <language/duchain/duchainlock.h> | 55 | #include <language/duchain/duchainlock.h> | ||
55 | #include <language/duchain/duchainutils.h> | 56 | #include <language/duchain/duchainutils.h> | ||
56 | #include <language/duchain/topducontext.h> | 57 | #include <language/duchain/topducontext.h> | ||
57 | #include <sublime/container.h> | 58 | #include <sublime/container.h> | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 120 | { | |||
120 | Q_ASSERT( plugin ); | 121 | Q_ASSERT( plugin ); | ||
121 | 122 | | |||
122 | pluginDestroyed(plugin); | 123 | pluginDestroyed(plugin); | ||
123 | disconnect(plugin, &IPlugin::destroyed, this, &MainWindowPrivate::pluginDestroyed); | 124 | disconnect(plugin, &IPlugin::destroyed, this, &MainWindowPrivate::pluginDestroyed); | ||
124 | 125 | | |||
125 | m_mainWindow->guiFactory()->removeClient( plugin ); | 126 | m_mainWindow->guiFactory()->removeClient( plugin ); | ||
126 | } | 127 | } | ||
127 | 128 | | |||
129 | void MainWindowPrivate::updateSourceFormatterGuiClient(bool hasFormatters) | ||||
130 | { | ||||
131 | auto sourceFormatterController = Core::self()->sourceFormatterControllerInternal(); | ||||
132 | auto guiFactory = m_mainWindow->guiFactory(); | ||||
133 | if (hasFormatters) { | ||||
134 | guiFactory->addClient(sourceFormatterController); | ||||
135 | } else { | ||||
136 | guiFactory->removeClient(sourceFormatterController); | ||||
137 | } | ||||
138 | } | ||||
139 | | ||||
128 | void MainWindowPrivate::activePartChanged(KParts::Part *part) | 140 | void MainWindowPrivate::activePartChanged(KParts::Part *part) | ||
129 | { | 141 | { | ||
130 | if ( Core::self()->uiController()->activeMainWindow() == m_mainWindow) | 142 | if ( Core::self()->uiController()->activeMainWindow() == m_mainWindow) | ||
131 | m_mainWindow->createGUI(part); | 143 | m_mainWindow->createGUI(part); | ||
132 | } | 144 | } | ||
133 | 145 | | |||
134 | void MainWindowPrivate::changeActiveView(Sublime::View *view) | 146 | void MainWindowPrivate::changeActiveView(Sublime::View *view) | ||
135 | { | 147 | { | ||
▲ Show 20 Lines • Show All 335 Lines • Show Last 20 Lines |