installEventFilter(new JumpKeyHandler(this));
-#ifndef HAVE_KDE
- QtUi::registerNotificationBackend(new TaskbarNotificationBackend(this));
- QtUi::registerNotificationBackend(new SystrayNotificationBackend(this));
-# ifdef HAVE_PHONON
- QtUi::registerNotificationBackend(new PhononNotificationBackend(this));
-# endif
-# ifdef HAVE_DBUS
- QtUi::registerNotificationBackend(new DesktopNotificationBackend(this));
-# endif
-
-#else /* HAVE_KDE */
- QtUi::registerNotificationBackend(new KNotificationBackend(this));
-#endif /* HAVE_KDE */
-
QtUiApplication* app = qobject_cast<QtUiApplication*> qApp;
connect(app, SIGNAL(saveStateToSession(const QString&)), SLOT(saveStateToSession(const QString&)));
connect(app, SIGNAL(saveStateToSessionSettings(SessionSettings&)), SLOT(saveStateToSessionSettings(SessionSettings&)));
setupSystray();
setupTitleSetter();
+#ifndef HAVE_KDE
+ QtUi::registerNotificationBackend(new TaskbarNotificationBackend(this));
+ QtUi::registerNotificationBackend(new SystrayNotificationBackend(this));
+# ifdef HAVE_PHONON
+ QtUi::registerNotificationBackend(new PhononNotificationBackend(this));
+# endif
+# ifdef HAVE_DBUS
+ QtUi::registerNotificationBackend(new DesktopNotificationBackend(this));
+# endif
+
+#else /* HAVE_KDE */
+ QtUi::registerNotificationBackend(new KNotificationBackend(this));
+#endif /* HAVE_KDE */
+
// restore mainwin state
restoreState(s.value("MainWinState").toByteArray());
//create the view and initialize it's filter
BufferView *view = new BufferView(dock);
view->setFilteredModel(Client::bufferModel(), config);
+ view->installEventFilter(_inputWidget->inputLine()); // for key presses
view->show();
Client::bufferModel()->synchronizeView(view);
VerticalDock *dock = new VerticalDock(tr("Inputline"), this);
dock->setObjectName("InputDock");
- InputWidget *inputWidget = new InputWidget(dock);
- dock->setWidget(inputWidget);
+ _inputWidget = new InputWidget(dock);
+ dock->setWidget(_inputWidget);
addDockWidget(Qt::BottomDockWidgetArea, dock);
_viewMenu->addAction(dock->toggleViewAction());
dock->toggleViewAction()->setText(tr("Show Input Line"));
- inputWidget->setModel(Client::bufferModel());
- inputWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
+ _inputWidget->setModel(Client::bufferModel());
+ _inputWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
- _bufferWidget->setFocusProxy(inputWidget);
+ _bufferWidget->setFocusProxy(_inputWidget);
- inputWidget->inputLine()->installEventFilter(_bufferWidget);
+ _inputWidget->inputLine()->installEventFilter(_bufferWidget);
}
void MainWin::setupTopicWidget() {
connect(Client::messageProcessor(), SIGNAL(progressUpdated(int, int)), msgProcessorStatusWidget, SLOT(setProgress(int, int)));
// Core Lag:
- updateLagIndicator(0);
+ updateLagIndicator();
statusBar()->addPermanentWidget(coreLagLabel);
coreLagLabel->hide();
connect(Client::signalProxy(), SIGNAL(lagUpdated(int)), this, SLOT(updateLagIndicator(int)));
}
void MainWin::updateLagIndicator(int lag) {
- coreLagLabel->setText(QString(tr("Core Lag: %1 msec")).arg(lag));
+ QString text = tr("Core Lag: %1");
+ if(lag == -1)
+ text = text.arg('-');
+ else
+ text = text.arg("%1 msec").arg(lag);
+ coreLagLabel->setText(text);
}
statusBar()->showMessage(tr("Not connected to core."));
sslLabel->setPixmap(QPixmap());
sslLabel->hide();
+ updateLagIndicator();
coreLagLabel->hide();
updateIcon();
}