-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107160/#review21280
-----------------------------------------------------------


Manager does not need to know about Applet (see comment below about why it 
should be this way).

The only reason why TasksPool had an Applet* was so that UiTasks could use it 
in UiTask::widget(). instead, the plasmoid / Applet pointer need to be made 
available to the Task via WidgetItem. as i noted in my email:

"the applet pointer could be made available to the QML and then WidgetItem 
could have an applet (or host?) property which it would use to derive its 
widget()."

so in the C++ bit of the system tray, a pointer to the SystemTray::Applet can 
be imported into the QML runtime, like this:

QScriptValue applet = m_widget->scriptEngine()->newQObject(this); // where 
'this' is the SystemTray::Applet
m_widget->scriptEngine()->globalObject().setProperty("host", applet);



plasma/generic/applets/systemtray/core/manager.h
<http://git.reviewboard.kde.org/r/107160/#comment16588>

    the manager is shared across all instances of the system tray plasmoid. 
(look for s_manager) this keeps memory usage and dbus activity down. so this 
approach can not work.


- Aaron J. Seigo


On Oct. 31, 2012, 7 p.m., Dmitry Ashkadov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107160/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2012, 7 p.m.)
> 
> 
> Review request for Plasma, Aaron J. Seigo and Marco Martin.
> 
> 
> Description
> -------
> 
> Aaron has noticed in his mail to plasma-devel that the system tray requires 
> some refactoring. This is a first step of refactoring. If it is approved I'll 
> continue work on system tray.
> 
> 
> Diffs
> -----
> 
>   plasma/generic/applets/systemtray/CMakeLists.txt d3478a8 
>   plasma/generic/applets/systemtray/core/manager.h 3b6b6f8 
>   plasma/generic/applets/systemtray/core/manager.cpp c23225e 
>   plasma/generic/applets/systemtray/core/task.h 66bf6e1 
>   plasma/generic/applets/systemtray/core/task.cpp 8754785 
>   plasma/generic/applets/systemtray/package/contents/code/main.js 10518cd 
>   plasma/generic/applets/systemtray/package/contents/ui/IconsList.qml f251cc5 
>   
> plasma/generic/applets/systemtray/package/contents/ui/StatusNotifierItem.qml 
> 27d476a 
>   plasma/generic/applets/systemtray/package/contents/ui/main.qml f80abc7 
>   
> plasma/generic/applets/systemtray/protocols/dbussystemtray/dbussystemtraytask.h
>  34aae74 
>   
> plasma/generic/applets/systemtray/protocols/dbussystemtray/dbussystemtraytask.cpp
>  6364272 
>   plasma/generic/applets/systemtray/protocols/fdo/fdoprotocol.h b006967 
>   plasma/generic/applets/systemtray/protocols/fdo/fdoprotocol.cpp c1bb8b1 
>   plasma/generic/applets/systemtray/protocols/fdo/fdoselectionmanager.h 
> c86a2d5 
>   plasma/generic/applets/systemtray/protocols/fdo/fdoselectionmanager.cpp 
> 4257202 
>   plasma/generic/applets/systemtray/protocols/fdo/fdotask.h 85a9ec5 
>   plasma/generic/applets/systemtray/protocols/fdo/fdotask.cpp d1a18df 
>   plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtask.h 1913986 
>   plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtask.cpp 
> 761a62f 
>   
> plasma/generic/applets/systemtray/protocols/plasmoid/plasmoidtaskprotocol.cpp 
> 505e0c4 
>   plasma/generic/applets/systemtray/ui/applet.h bab8d9c 
>   plasma/generic/applets/systemtray/ui/applet.cpp 41efb10 
>   plasma/generic/applets/systemtray/ui/plasmoid.h 01a7c5b 
>   plasma/generic/applets/systemtray/ui/plasmoid.cpp d3e1937 
>   plasma/generic/applets/systemtray/ui/taskspool.h 4b5bcd4 
>   plasma/generic/applets/systemtray/ui/taskspool.cpp df39e3d 
>   plasma/generic/applets/systemtray/ui/uitask.h 7b20bde 
>   plasma/generic/applets/systemtray/ui/uitask.cpp 2a15800 
>   plasma/generic/applets/systemtray/ui/widgetitem.h 40aa92d 
>   plasma/generic/applets/systemtray/ui/widgetitem.cpp 9d2c622 
> 
> Diff: http://git.reviewboard.kde.org/r/107160/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dmitry Ashkadov
> 
>

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to