263 { |
263 { |
264 mWindows.append(window); |
264 mWindows.append(window); |
265 #ifdef HB_SETTINGS_WINDOW |
265 #ifdef HB_SETTINGS_WINDOW |
266 QShortcut *shortcut = new QShortcut(QKeySequence("Ctrl+Alt+Shift+S"), window); |
266 QShortcut *shortcut = new QShortcut(QKeySequence("Ctrl+Alt+Shift+S"), window); |
267 connect(shortcut, SIGNAL(activated()), this, SLOT(showHideSettingsWindow())); |
267 connect(shortcut, SIGNAL(activated()), this, SLOT(showHideSettingsWindow())); |
268 HbSettingsWindow::instance()->refresh(); |
268 if (HbSettingsWindow::exists()) { |
|
269 HbSettingsWindow::instance()->refresh(); |
|
270 } |
269 #ifdef HB_CSS_INSPECTOR |
271 #ifdef HB_CSS_INSPECTOR |
270 QShortcut *cssShortcut = new QShortcut(QKeySequence("Ctrl+Alt+Shift+C"), window); |
272 QShortcut *cssShortcut = new QShortcut(QKeySequence("Ctrl+Alt+Shift+C"), window); |
271 connect(cssShortcut, SIGNAL(activated()), this, SLOT(showHideCssWindow())); |
273 connect(cssShortcut, SIGNAL(activated()), this, SLOT(showHideCssWindow())); |
272 HbCssInspectorWindow::instance()->refresh(); |
274 if (HbCssInspectorWindow::exists()) { |
|
275 HbCssInspectorWindow::instance()->refresh(); |
|
276 } |
273 #endif |
277 #endif |
274 #endif |
278 #endif |
275 emit windowAdded(window); |
279 emit windowAdded(window); |
276 } |
280 } |
277 |
281 |
300 bool HbInstancePrivate::removeWindow(HbMainWindow *window) |
304 bool HbInstancePrivate::removeWindow(HbMainWindow *window) |
301 { |
305 { |
302 bool result = mWindows.removeOne(window); |
306 bool result = mWindows.removeOne(window); |
303 #ifdef HB_SETTINGS_WINDOW |
307 #ifdef HB_SETTINGS_WINDOW |
304 if (result && mWindows.isEmpty()) { |
308 if (result && mWindows.isEmpty()) { |
305 HbSettingsWindow::instance()->close(); |
309 if (HbSettingsWindow::exists()) { |
|
310 HbSettingsWindow::instance()->close(); |
|
311 } |
306 #ifdef HB_CSS_INSPECTOR |
312 #ifdef HB_CSS_INSPECTOR |
307 HbCssInspectorWindow::instance()->close(); |
313 if (HbCssInspectorWindow::exists()) { |
308 #endif |
314 HbCssInspectorWindow::instance()->close(); |
309 } else { |
315 } |
|
316 #endif |
|
317 } else if (HbSettingsWindow::exists()) { |
310 HbSettingsWindow::instance()->refresh(); |
318 HbSettingsWindow::instance()->refresh(); |
311 } |
319 } |
312 #endif |
320 #endif |
313 if (result) { |
321 if (result) { |
314 emit windowRemoved(window); |
322 emit windowRemoved(window); |