Project

General

Profile

kde-notifs-fix.patch

proposed patch - metlos, 08/23/2012 11:10 AM

View differences:

src/qtui/knotificationbackend.cpp
57 57
    }
58 58

  
59 59
    QString message = QString("<b>&lt;%1&gt;</b> %2").arg(n.sender, Qt::escape(n.message));
60
    KNotification *notification = KNotification::event(type, message, DesktopIcon("dialog-information"), QtUi::mainWindow(),
61
        KNotification::RaiseWidgetOnActivation
60
    KNotification *notification = new KNotification(type, QtUi::mainWindow(), KNotification::RaiseWidgetOnActivation
62 61
        |KNotification::CloseWhenWidgetActivated
63 62
        |KNotification::CloseOnTimeout);
63
    
64 64
    connect(notification, SIGNAL(activated(uint)), SLOT(notificationActivated()));
65
    notification->setText(message);
66
    notification->setPixmap(DesktopIcon("dialog-information"));
65 67
    notification->setActions(QStringList("View"));
66 68
    notification->setProperty("notificationId", n.notificationId);
67 69

  
68 70
    _notifications.append(qMakePair(n.notificationId, QPointer<KNotification>(notification)));
69 71

  
72
    notification->sendEvent();
73
    
70 74
    updateToolTip();
71 75
    QtUi::mainWindow()->systemTray()->setAlert(true);
72 76
}