X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=49c3d3d4ba14fd9987c6a313b6d4cc7b7c28a529;hp=5dd6eb4cc3a11d2b047f77823b8d0140cbc47536;hb=68ba16b2340ed20508bb7789c51b700b562f2392;hpb=3a2bd8f7cab945bfac7d9b8faf9250d4d66e9264 diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 5dd6eb4c..49c3d3d4 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -114,6 +114,7 @@ #else /* HAVE_KDE */ # include "knotificationbackend.h" #endif /* HAVE_KDE */ +#include "systrayanimationnotificationbackend.h" #ifdef HAVE_LIBSNORE @@ -192,6 +193,8 @@ MainWin::MainWin(QWidget *parent) setWindowTitle("Quassel IRC"); setWindowIconText("Quassel IRC"); + // Set the default icon for all windows + QApplication::setWindowIcon(QIcon::fromTheme("quassel")); updateIcon(); } @@ -207,6 +210,7 @@ void MainWin::init() connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showNetworkConfig(NetworkId)), SLOT(showNetworkConfig(NetworkId))); connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString))); connect(Client::instance(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString))); + connect(Client::instance(), SIGNAL(dbUpgradeInProgress(bool)), SLOT(showMigrationWarning(bool))); connect(Client::coreConnection(), SIGNAL(startCoreSetup(QVariantList, QVariantList)), SLOT(showCoreConfigWizard(QVariantList, QVariantList))); connect(Client::coreConnection(), SIGNAL(connectionErrorPopup(QString)), SLOT(handleCoreConnectionError(QString))); @@ -256,6 +260,9 @@ void MainWin::init() #endif /* HAVE_KDE */ +#ifndef QT_NO_SYSTEMTRAYICON + QtUi::registerNotificationBackend(new SystrayAnimationNotificationBackend(this)); +#endif #ifdef HAVE_LIBSNORE QtUi::registerNotificationBackend(new SnoreNotificationBackend(this)); #elif !defined(QT_NO_SYSTEMTRAYICON) && !defined(HAVE_KDE) @@ -384,7 +391,6 @@ void MainWin::updateIcon() else icon = QIcon::fromTheme("inactive-quassel", QIcon(":/icons/inactive-quassel.png")); setWindowIcon(icon); - qApp->setWindowIcon(icon); } @@ -828,6 +834,29 @@ void MainWin::showPasswordChangeDlg() } +void MainWin::showMigrationWarning(bool show) +{ + if (show && !_migrationWarning) { + _migrationWarning = new QMessageBox(QMessageBox::Information, + tr("Upgrading..."), + "" + tr("Your database is being upgraded") + "", + QMessageBox::NoButton, this); + _migrationWarning->setInformativeText("

" + + tr("In order to support new features, we need to make changes to your backlog database. This may take a long while.") + + "

" + + tr("Do not exit Quassel until the upgrade is complete!") + + "

"); + _migrationWarning->setStandardButtons(QMessageBox::NoButton); + _migrationWarning->show(); + } + else if (!show && _migrationWarning) { + _migrationWarning->close(); + _migrationWarning->deleteLater(); + _migrationWarning = nullptr; + } +} + + void MainWin::changeActiveBufferView(bool backwards) { if (_activeBufferViewIndex >= 0 && _activeBufferViewIndex < _bufferViews.count()) {