Review Request 120450: Implement KDEPlatformSystemTrayIcon::isSystemTrayAvailable()
David Edmundson
david at davidedmundson.co.uk
Thu Oct 2 14:26:42 UTC 2014
> On Oct. 1, 2014, 4:57 p.m., Aleix Pol Gonzalez wrote:
> > Isn't that blocking? Do we know when it's called?
>
> David Edmundson wrote:
> yes it is.
> but it's a static method and there is no change signal. There isn't really any other option (without changing Qt).
>
> Martin Klapetek wrote:
> What if we make it the other way around? Have the platform theme a static dbus interface and have our systray implementation signal that interface when it has loaded. This method would then return false until it has been signalled otherwise.
>
> Given the other change in KSNI, having a blocking call here (and in turn in all kdeds creating a KSNI after login) is not ideal :S
>
> David Edmundson wrote:
> I'm not sure I understand what you mean.
>
> Martin Klapetek wrote:
> Platform theme gets a dbus interface (org.kde.platformtheme eg) and a static bool s_systrayAvailable, initialized to false. isSystemTrayAvailable() would return this s_systrayAvailable.
>
> When the systray loads up, it sends a message to org.kde.platformtheme, platform theme sets s_systrayAvailable to true, job done.
>
> David Edmundson wrote:
> that's not the problem. We can monitor the registered names already (we do in KStatusNotifierItem)
> There's no way to signal to the application using only Qt that system tray available has changed.
>
> Martin Klapetek wrote:
> Right, but it avoids a blocking dbus call in this patch, which would get called from the kded modules starting before plasma.
>
> David Edmundson wrote:
> But I need to know the dbus call has finished before anyone calls QSystemTray::isSystemTrayAvailable();
> which most apps would probably do in their startup before making a system tray.
Discussed on IRC. There is no better option.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120450/#review67772
-----------------------------------------------------------
On Oct. 1, 2014, 4:41 p.m., David Edmundson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120450/
> -----------------------------------------------------------
>
> (Updated Oct. 1, 2014, 4:41 p.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Repository: frameworkintegration
>
>
> Description
> -------
>
> Implement KDEPlatformSystemTrayIcon::isSystemTrayAvailable()
>
>
> Diffs
> -----
>
> src/platformtheme/kdeplatformsystemtrayicon.cpp 3ada7d2
>
> Diff: https://git.reviewboard.kde.org/r/120450/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> David Edmundson
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20141002/d8e91ae8/attachment.html>
More information about the Kde-frameworks-devel
mailing list