Changeset 14580
- Timestamp:
- Oct 18, 2015, 11:48:10 AM (6 years ago)
- Location:
- trunk/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt/Application.cc
r14563 r14580 20 20 #include <QProcess> 21 21 #include <QRect> 22 #include <QSystemTrayIcon> 22 23 23 24 #include <libtransmission/transmission.h> … … 546 547 Application::notifyApp (const QString& title, const QString& body) const 547 548 { 549 QDBusConnection bus = QDBusConnection::sessionBus (); 550 if (!bus.isConnected ()) 551 { 552 myWindow->trayIcon ().showMessage (title, body); 553 return true; 554 } 555 548 556 const QString dbusServiceName = QString::fromUtf8 ("org.freedesktop.Notifications"); 549 557 const QString dbusInterfaceName = QString::fromUtf8 ("org.freedesktop.Notifications"); … … 561 569 args.append (static_cast<int32_t> (-1)); // use the default timeout period 562 570 m.setArguments (args); 563 QDBusMessage replyMsg = QDBusConnection::sessionBus ().call (m);571 QDBusMessage replyMsg = bus.call (m); 564 572 //std::cerr << qPrintable (replyMsg.errorName ()) << std::endl; 565 573 //std::cerr << qPrintable (replyMsg.errorMessage ()) << std::endl; -
trunk/qt/MainWindow.h
r14566 r14580 53 53 MainWindow (Session&, Prefs&, TorrentModel&, bool minized); 54 54 virtual ~MainWindow (); 55 56 QSystemTrayIcon& trayIcon () { return myTrayIcon; } 55 57 56 58 public slots:
Note: See TracChangeset
for help on using the changeset viewer.