Dolphin got the ability to send the events when the user opens a directory to
the activity manager. It is quite a small patch that I decided to share in
order to demonstrate how easy it is to use KActivities API.
Find the widget that displays your document (in this case, a folder). Declare
one KActivities::ResourceInstance object inside it
When you create the container, just create a new ResourceInstance and pass the
window id (of the top-level window that your container resides in) and the url
you just opened:
This is it if you have a SDI (single-document interface) - interface where one
main window can contain only one document (okular, kwrite etc.)
I’ve just committed a helper script to KDE Activities that gets into all
different build directories for the project you’re compiling, and runs the
compilation. If all compiles successfully, it calls git commit.
I have decided to compile kactivities on a regular basis with GCC 4.7 (my
default compiler), GCC 4.5 and Clang 3.1 to ensure no compiler specific
things are being used, and no C++11 features that GCC 4.5 doesn’t support.
The session (ksmserver) code in the activity manager (KAMD) has lingered since
its inception. Everybody ignored it and kept far away like it is an ugly
duckling, even its original authoress. It never worked properly, and had quite
a dirty implementation.
The code in KAMD was refactored, polished, dusted for many times since then, it
even learnt a new language (C++11). But the ugly duckling remained locked in
the dark. Even spiders left since there was no free space to left for a new
I’ve just rewritten it and moved all ksmserver/kwin things in a separate class.
The new version is pushed into master an hour ago.
That code was essentially left for dead. Mainly due to some missing features
and changes in the activity manager’s API. It was the time to play Dr
Frankenstein and to pick up the pieces to revive this beast.
The Share·Like·Connect problem
While the normal part (statistics collector) of KAMD can work well with an
application only reporting which document was opened (like the previous version
of the vim plugin did), SLC needs one more info - the window id.
At the time, there was no way to get a window id out of GUI Vim if you’re under
X11. It was introduced in later versions, but might not be present on your
system. So, in those cases, there needed to be a different approach of getting
the valuable data.