Στις 22/06/2012 06:32 μμ, ο/η Marco Martin έγραψε:
On Friday 22 June 2012, Michail V. wrote:
Hello everyone,
I am developing a plasmoid called Workflow, the project's webpage can be
found here:
http://opentoolsandspace.org/en/projects/development/plasmoid-workflow
I'd love to have your feedback, as I have a deadline in my head for the
first version
mid-of September. The pieces are starting to get into place, it's almost
usable right now
but until now I have faced the following issues, I am developing it in
KDE 4.8.4 at opensuse
Hi,
first of all, this is a very cool project, (there may be even some concepts of
it that may make sense to be implemented in the default workspace)
how is written? c++? qml? a combination of the two?
Hi Marco,
the UI is completely written in qml and the interaction with plasma in
c++. You can test it if you want
from the project's gitorious page, branch plasmoid. Some things do not
work e.g. moving a task
from activitiy to activity but one piece at a time... :)
1) I am using the following code to remove an activity:
void ActivityManager::remove(QString id) {
ActivityManager::stop(id);
Plasma::Service *service = plasmaActEngine->serviceForSource(id);
KConfigGroup op = service->operationDescription("remove");
op.writeEntry("Id", id);
Plasma::ServiceJob *job = service->startOperationCall(op);
connect(job, SIGNAL(finished(KJob*)), service, SLOT(deleteLater()));
}
plasmaActEngine is org.kde.activities,
the behavior is that the activity is not removed from the dataengine,
there is a ghost activity
in the dataengine that doesnt have some fields, name, icon etc...
In order for someone to delete it completely the user must use the
ActivityManager or make
a logout/login
i seen this problem in the past.
seems that to be correctly deleted the deletion should happen at least an
event loop after the stop. (like being done by a slot connected with a timer
with 0 timeout).
if this is still the case in master is worth investigating why this happens.
I will try it. I am starting to think that I will drop the
org.kde.activities dataengine and use
only the libkactivities as Ivan Cukic proposed me.
2) The plasmoid is developed as a PopupApplet in order to be able to be
placed in a panel,
I have tried many things but I can not restore the plasmoid in its
previous used size after a logout/login,
the popupapplet changes the DialogWidth,DialogHeight properties
correctly in the plasmoids settings
but after a logout/login the plasmoid remains in its default size.
is the size correctly saved in plasma-desktop-appletsrc?
in theory shouldn't be necessary to do anything
(may be a problem in the qml binding of popupapplet itself?)
size is correctly saved in plasma-desktop-appletsrc, When you log out by
examining the
file the size is also correctly saved but when you log in it changes
again...
I have started to think that maybe it's a distro bug because no
popupapplet remembers
its size. (I use opensuse 12.1 with kde 4.8.4)
3) I have tried to find a way to clone an activity through the plasmoid
but I did not have any success.
I have seen that the ActivitiesEngine, in plasma/desktop/shell, is using
class PlasmaApp for most of the
operations and not the dataengine, Is there a way to use PlasmaApp also?
or in the future cloning an activity
is going to be supported through the dataengine?
there aren't any exposed way, i don't think.
this because the implementation of activities/containment correspondence is in
the shell executable, so not reachable by the plasma library.
i see several ways in which the containments cloning may be reached from a
library tough.
what is needed is:
* a client asks the activity manager to duplicate an activity
* the activity manager signals this, the plasma shell duplicates the
containments
* the activity manager duplicates the associations nepomuk resource/activity
as well
* kwin duplicates the window association
i think the last two points are not done in any way for now.
this may also sparkle a discussion on what is the optimal workflow to create
an activity:
* an empty one can be created
* or a duplicate of the current
* or one with all the files and windows currently open, regardless if they are
associated or not
* or the union of last two points: all open stuff plus all currently
associated to the current one
Cheers,
Marco Martin
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
For the cloning many questions arise. I think that I will try to
implement a hack as I have done
for reading the wallpaper (I am reading the plasma-desktop-appletsrc
file directly to access the
wallpapers for activities with single image wallpaper). I dont know if
it will be a success but by examining
the activitiesmanager in plasma I found that there is a folder
'share/apps/plasma-desktop/activities/' which
has I think the containments for every stopped activity.
So I was thinking to try implement something like:
e.g.Activity A ->(clone to)->Activity B
1.Stop Activity A (temporary)
2.Stop Activity B (temporary) (learn the main containment id of Activity B)
3.Copy in folder share/apps/plasma-desktop/activities/ (Activity A
settings to Activity B)
4.Fix in Activity B settings the containment id
5.Start ActivityA
6.Start ActivityB
Cheers,
Michail Vourlakos
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel