summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/dbusmenu
Commit message (Collapse)AuthorAgeFilesLines
* D-Bus system tray icon: submenus can be created after context menuShawn Rutledge2015-05-212-2/+11
| | | | | | | | | | | | | | | | | | | | QMenuPrivate::init() calls QPlatformTheme::createPlatformMenu() to create a platform menu, but on Linux, that returns null for now. QSystemTrayIcon::setContextMenu() results in recursive calls to QSystemTrayIconPrivate::addPlatformMenu() which then calls QDBusTrayIcon::createMenu() for the context menu and each submenu. However if a submenu is added afterwards, a corresponding platform menu is not immediately created. Now copyActionToPlatformItem() will detect and create the missing platform submenu, by calling a new method: DBusPlatformMenu::createSubMenu(). This is because there is no way of knowing that it's a tray-specific context menu (which is so far the only case in which we use DBusPlatformMenu). So, QPlatformMenu::createSubMenu() needs to exist as a new QPA interface for this use case. Task-number: QTBUG-45803 Change-Id: Ib319e873082196515ea0580d70d069099cf2c175 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* D-Bus tray icon menus: support submenusShawn Rutledge2015-03-304-24/+33
| | | | | | | | | 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>
* D-Bus system tray: properly check whether StatusNotifierHost availableShawn Rutledge2015-02-202-7/+7
| | | | | | | | | | | | | | | | "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>
* Get rid of Q_GUI_EXPORT occurrences in QPlatformSupportKonstantin Ritt2015-01-231-2/+2
| | | | | | | | | This fixes GCC warning on MinGW, when built with -Wattribute (the default) Change-Id: I8e2b56a4a8fe9db0ec821f346a523b670df80f85 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possibleShawn Rutledge2015-01-229-0/+1338
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>