//TODO: try to get an instance of the tray icon to be able to show popups
m_snore = new Snore::SnoreCore();
m_snore->loadPlugins(Snore::SnorePlugin::BACKEND);
//TODO: try to get an instance of the tray icon to be able to show popups
m_snore = new Snore::SnoreCore();
m_snore->loadPlugins(Snore::SnorePlugin::BACKEND);
- m_application = Snore::Application("Quassel", Snore::Icon(DesktopIcon("quassel").toImage()));
+ m_icon = Snore::Icon(QIcon::fromTheme("quassel", QIcon(":/icons/quassel.png")).pixmap(48).toImage());
+ m_application = Snore::Application("Quassel", m_icon);
m_application.hints().setValue("WINDOWS_APP_ID","QuasselProject.QuasselIRC");
connect(m_snore, SIGNAL(actionInvoked(Snore::Notification)), this, SLOT(actionInvoked(Snore::Notification)));
m_application.hints().setValue("WINDOWS_APP_ID","QuasselProject.QuasselIRC");
connect(m_snore, SIGNAL(actionInvoked(Snore::Notification)), this, SLOT(actionInvoked(Snore::Notification)));
m_alert = Snore::Alert(tr("Private Message"), m_icon);
m_application.addAlert(m_alert);
m_alert = Snore::Alert(tr("Private Message"), m_icon);
m_application.addAlert(m_alert);
- ui.backends->insertItem(0, "Default");
- ui.backends->insertItems(1, m_snore->notificationBackends());
+ QStringList backends = m_snore->notificationBackends();
+ backends.append("Default");
+ qSort(backends);
+ ui.backends->insertItems(0, backends);
connect(ui.backends, SIGNAL(currentIndexChanged(QString)), SLOT(backendChanged(QString)));
connect(ui.timeout, SIGNAL(valueChanged(int)), this, SLOT(timeoutChanged(int)));
connect(ui.backends, SIGNAL(currentIndexChanged(QString)), SLOT(backendChanged(QString)));
connect(ui.timeout, SIGNAL(valueChanged(int)), this, SLOT(timeoutChanged(int)));
- QString backend = m_snore->primaryNotificationBackend();
- if (backend.isEmpty()) {
- backend = "SystemTray";
- }
+ QString backend = s.value("Snore/Backend", "Default").toString();
int timeout = s.value("Snore/Timeout", 10).toInt();
ui.backends->setCurrentIndex(ui.backends->findText(backend));
ui.timeout->setValue(timeout);
int timeout = s.value("Snore/Timeout", 10).toInt();
ui.backends->setCurrentIndex(ui.backends->findText(backend));
ui.timeout->setValue(timeout);