summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/dbustray
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-2/+16
|\ | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| * dbustray: Implement better detection of indicator-applicationDmitry Shachnev2016-04-111-2/+16
| | | | | | | | | | | | | | | | | | | | | | We need to do the icon cache trick all desktops using indicator-application, these are not limited to Unity. For example, the default Xubuntu and Lubuntu desktops use indicator-application too. Without this, tray icons will be improperly shown on these desktops. Change-Id: Id397bbe9b594152d7c3a29c36c853e928af7dde4 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-5/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * dbustray: Support late registering of tray icon menuDmitry Shachnev2016-02-091-0/+3
| | | | | | | | | | | | | | | | | | If a menu is added to the tray icon after the icon itself has been registered, we need to register the menu properly. Change-Id: I19a6d78848142d66c2cd882746d8d55c0b9a2818 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * dbustray: Do not change m_menu in QDBusTrayIcon::createMenu()Dmitry Shachnev2016-02-091-5/+1
| | | | | | | | | | | | | | | | | | This method can be called for a submenu after it's called for the top-level menu, and we should not replace it with a submenu. Change-Id: I8e180ee074287cfcdc76dfe77c6c7aa7d5891741 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * Fix pixmap types in org.kde.StatusNotifierItem.xmlDmitry Shachnev2016-01-211-4/+4
| | | | | | | | | | | | | | | | | | | | According to the spec, pixmap type is ARRAY(INT, INT, ARRAY BYTE). This also matches our QXdgDBusImageVector typedef. Also fix the D-Bus Introspection class info. Change-Id: Ic13e8a078299b9c76d2742055d64cfdc54460d58 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-158-112/+160
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-051-0/+11
| | | | | Change-Id: If81a5e1db0fe93377e7cc54a78b01c50b44abe57 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Fix missing "We mean it" in qtbase private headersThiago Macieira2015-10-012-0/+22
| | | | | Change-Id: I42e7ef1a481840699a8dffff1408dfd4fd9c8e32 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* platformsupport/dbustray: mark some types as movableMarc Mutz2015-07-191-0/+2
| | | | | | | At least on is already held in QVector. Change-Id: Ifa29d924315a9d397bd591ae548f199dcefa03a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QVector::reserve() all over the place.Sérgio Martins2015-06-291-0/+2
| | | | | | | | | | | | Reduces internal memory fragmentation. The search criteria was: QVector::append(), QVector::push_back(), QVector::operator<<() and QVector::operator+=() calls inside for, do and while loops. Statements inside ifs and out of loops weren't considered. Change-Id: Ie5aaf3cdfac938994e6e5dfa5f51de501ed79a0c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* D-Bus system tray: emit activated on middle and right clickShawn Rutledge2015-03-313-20/+10
| | | | | | | | | | | | | | | The ActivationReason provides the type of click. If the icon has a D-Bus menu, then QStatusNotifierItemAdaptor::ContextMenu will not be called: the tray is responsible for opening the context menu. But an application can alternatively do something different with a right-click by not providing a menu, and instead handling the QSystemTrayIcon::activated signal with the Context reason. Simplified the code by emitting the signal directly in QStatusNotifierItemAdaptor. Task-number: QTBUG-44929 Change-Id: Ia062a9a2fd99554418d58a1ff6ecd4e862035198 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* D-Bus system tray: emit QPlatformSystemTrayIcon::activated on clickShawn Rutledge2015-03-311-1/+1
| | | | | | | | | | | This was incomplete functionality in 38abd653774aa0b3c5cdfd9a8b78619605230726 Task-number: QTBUG-44929 Change-Id: I7120a3de011c5df57ef5a9fbdfe056eee42d572b Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* D-Bus tray icon menus: support submenusShawn Rutledge2015-03-301-2/+3
| | | | | | | | | In this case GetLayout will be called with the D-Bus menu ID of the menu item which contains the submenu. Task-number: QTBUG-45191 Change-Id: Ia8108272910eac10f040db5865ec4e070da80edb Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Do not attempt to unregister an unregistered dbus serviceAllan Sandfeld Jensen2015-02-202-2/+6
| | | | | | | | | | | If a QSystemTrayIcon is created but never shown, it will trigger a warning on exit when it fails to unregister. This patch ensures we only try to unregister if the service was registered in the first place. Change-Id: I0e245d19be55c58aea180dbcbe5215e738d05280 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* D-Bus system tray: properly check whether StatusNotifierHost availableShawn Rutledge2015-02-201-5/+2
| | | | | | | | | | | | | | | | "org.kde.StatusNotifierWatcher" is just a watcher/helper, whereas the actual systray object is "org.kde.StatusNotifierHost-$PID". The org.kde.StatusNotifierWatcher.IsStatusNotifierHostRegistered property can tell us whether there is an actual system tray. Also renamed the accessor to isStatusNotifierHostRegistered since we are checking for the host, and also because it can be confusing that it's a member of QDBusMenuConnection if the name isn't clear. See also KDE bug 339707 Change-Id: I218c5357b9cc5a62e5cc07abe980893b826f98f4 Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* Update copyright headersJani Heikkinen2015-02-118-56/+56
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* D-Bus tray icons: save temp file with size 22pxShawn Rutledge2015-02-081-5/+1
| | | | | | | | Gnome Classic on Ubuntu shows this icon but fails to scale it down. So if we do not pre-scale the icon, it will be too wide, and cropped. Change-Id: If8cf98de3672deff77b99b17da5491bd6c45cfdb Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* D-Bus tray icons: get devicePixelRatio at runtimeShawn Rutledge2015-02-041-8/+9
| | | | | | | | | | | In static builds of Qt, static initialization may not work because we need an initialized list of screens before devicePixelRatio() can use them to find the value. Anyway, it's better to know the dpr at the time the tray icon will be shown rather than when the application is started, just in case it changes. Change-Id: Iedffb674d8e8818c2a4e64d7c7a3c89a2dca77f3 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* D-Bus tray icons: make endian conversion work againShawn Rutledge2015-01-232-8/+10
| | | | | | | | | Endian conversion needs to be done on aligned data, but the data is stored unaligned in the QByteArray. So the new qFromUnaligned() function is needed. Change-Id: I12f9e52cea81d06129b306709bb9d2cd004f04e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* D-Bus tray icon: when eliminating large icons, scale to medium sizeShawn Rutledge2015-01-231-5/+12
| | | | | | | | | 22px is not always large enough: KDE5 seems to like to make icons up to 28px, and they could be even larger on high-DPI screens. Change-Id: Ifa8e0d49b310e4b4304207596f0f32c36a5db6a7 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* D-Bus tray icon: ensure that the image is square before sendingShawn Rutledge2015-01-231-6/+17
| | | | | | | | | Sometimes KDE doesn't render non-square icons properly when they have been received over the D-Bus protocol. Change-Id: Icc6fa3d64a1598ea8f719192ae18d32f287d6a79 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* QSystemTrayIcon uses D-Bus org.freedesktop.Notifications on LinuxShawn Rutledge2015-01-235-1/+226
| | | | | | | | | | | | If StatusNotifier is working, then QSystemTrayIcon::showMessage() will send notifications using the org.freedesktop.Notifications protocol. https://developer.gnome.org/notification-spec/ Task-number: QTBUG-4011 Task-number: QTBUG-31762 Change-Id: Ia1925ec3dd81b1b7b8f3b490b6364aaf8f93f395 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possibleShawn Rutledge2015-01-227-11/+831
| | | | | | | | | | | | | | | | | | | | | Implementing org.kde.StatusNotifier DBus interface http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ as well as org.canonical.dbusmenu for the limited purpose of showing the tray icon's context menu. If a desktop environment (such as KDE or Unity) has a StatusNotifierWatcher listening, then tray icon information is sent to be displayed by the tray implementation instead of being rendered directly in an XEmbed window. This is necessary because some modern tray implementations no longer provide XEmbed "hosting". [ChangeLog][QPA][Xcb] QSystemTrayIcon uses StatusNotifier D-Bus protocol when the desktop environment supports it Task-number: QTBUG-31762 Done-with: Marco Martin <mart@kde.org> Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* Add D-Bus types marshalling for Linux tray icon supportMarco Martin2015-01-122-0/+244
Add marshalling for icon pixmaps to be used in DBus tray icon support according to the specification http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/Icons/ Task-number: QTBUG-31762 Change-Id: I16e66c272eef413a7c94345c273e5fd3a8c0f771 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>