Changeset View
Changeset View
Standalone View
Standalone View
src/MainWindow.cpp
Show All 17 Lines | |||||
18 | * You should have received a copy of the GNU General Public License along with * | 18 | * You should have received a copy of the GNU General Public License along with * | ||
19 | * this program. If not, see <http://www.gnu.org/licenses/>. * | 19 | * this program. If not, see <http://www.gnu.org/licenses/>. * | ||
20 | ****************************************************************************************/ | 20 | ****************************************************************************************/ | ||
21 | 21 | | |||
22 | #define DEBUG_PREFIX "MainWindow" | 22 | #define DEBUG_PREFIX "MainWindow" | ||
23 | 23 | | |||
24 | #include "MainWindow.h" | 24 | #include "MainWindow.h" | ||
25 | 25 | | |||
26 | #include "App.h" | ||||
26 | #include "ActionClasses.h" | 27 | #include "ActionClasses.h" | ||
27 | #include "EngineController.h" //for actions in ctor | 28 | #include "EngineController.h" //for actions in ctor | ||
28 | #include "KNotificationBackend.h" | 29 | #include "KNotificationBackend.h" | ||
29 | #include "PaletteHandler.h" | 30 | #include "PaletteHandler.h" | ||
30 | #include "PluginManager.h" | 31 | #include "PluginManager.h" | ||
31 | #include "SvgHandler.h" | 32 | #include "SvgHandler.h" | ||
32 | #include "amarokconfig.h" | 33 | #include "amarokconfig.h" | ||
33 | #include "aboutdialog/ExtendedAboutDialog.h" | 34 | #include "aboutdialog/ExtendedAboutDialog.h" | ||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||
107 | #include "mac/MacSystemNotify.h" | 108 | #include "mac/MacSystemNotify.h" | ||
108 | #endif | 109 | #endif | ||
109 | #endif | 110 | #endif | ||
110 | 111 | | |||
111 | #define AMAROK_CAPTION I18N_NOOP( "Amarok" ) | 112 | #define AMAROK_CAPTION I18N_NOOP( "Amarok" ) | ||
112 | 113 | | |||
113 | extern OcsData ocsData; | 114 | extern OcsData ocsData; | ||
114 | 115 | | |||
115 | QPointer<MainWindow> MainWindow::s_instance; | | |||
116 | | ||||
117 | namespace The { | 116 | namespace The { | ||
118 | MainWindow* mainWindow() { return MainWindow::s_instance.data(); } | 117 | MainWindow* mainWindow() { return pApp->mainWindow(); } | ||
119 | } | 118 | } | ||
120 | 119 | | |||
121 | MainWindow::MainWindow() | 120 | MainWindow::MainWindow() | ||
122 | : KMainWindow( 0 ) | 121 | : KMainWindow( 0 ) | ||
123 | , m_showMenuBar( 0 ) | 122 | , m_showMenuBar( 0 ) | ||
124 | , m_lastBrowser( 0 ) | 123 | , m_lastBrowser( 0 ) | ||
125 | , m_waitingForCd( false ) | 124 | , m_waitingForCd( false ) | ||
126 | { | 125 | { | ||
127 | DEBUG_BLOCK | 126 | DEBUG_BLOCK | ||
128 | 127 | | |||
129 | setObjectName( "MainWindow" ); | 128 | setObjectName( "MainWindow" ); | ||
130 | s_instance = this; | | |||
131 | 129 | | |||
132 | #ifdef Q_WS_MAC | 130 | #ifdef Q_WS_MAC | ||
133 | (void)new GrowlInterface( qApp->applicationName() ); | 131 | (void)new GrowlInterface( qApp->applicationName() ); | ||
134 | #ifdef HAVE_NOTIFICATION_CENTER | 132 | #ifdef HAVE_NOTIFICATION_CENTER | ||
135 | (void)new OSXNotify( qApp->applicationName() ); | 133 | (void)new OSXNotify( qApp->applicationName() ); | ||
136 | #endif | 134 | #endif | ||
137 | #endif | 135 | #endif | ||
138 | 136 | | |||
▲ Show 20 Lines • Show All 1251 Lines • Show Last 20 Lines |