[PATCH] Rearange tasks with drag and drop, Task Grouping

christian mollekopf chrigi_1 at hotmail.com
Tue Jun 17 00:52:03 CEST 2008



> cool; can upload this patch to http://reviewboard.vidsolbach.de/dashboard/ so
> that i can review it there (the tool makes it soooo much easier)


hmm...
if i try to upload the patch and click on view diff before publishing i get this:

Traceback (most recent call last):
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/diffviewer/views.py", line 82, in view_diff
    files = get_diff_files(diffset, None, interdiffset, highlighting)
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/diffviewer/diffutils.py", line 594, in get_diff_files
    enable_syntax_highlighting)
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/diffviewer/diffutils.py", line 513, in generate_files
    lambda: get_chunks(filediff.diffset,
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/djblets/util/misc.py", line 47, in cache_memoize
    data = lookup_callable()
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/diffviewer/diffutils.py", line 516, in 
    enable_syntax_highlighting))
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/diffviewer/diffutils.py", line 316, in get_chunks
    old = get_original_file(filediff)
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/diffviewer/diffutils.py", line 223, in get_original_file
    data = cache_memoize(key, lambda: [tool.get_file(file, revision)])[0]
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/djblets/util/misc.py", line 47, in cache_memoize
    data = lookup_callable()
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/diffviewer/diffutils.py", line 223, in 
    data = cache_memoize(key, lambda: [tool.get_file(file, revision)])[0]
  File "/var/www/sites/reviewboard.vidsolbach.de/reviewboard/scmtools/svn.py", line 106, in get_file
    raise FileNotFoundError(path, revision, str(e))
FileNotFoundError: The file '/kdebase/workspace/plasma/applets/pager/CMakeLists.txt' (r819861) could not be found in the repository: File not found: revision 819861, path '/kdebase/workspace/plasma/applets/pager/CMakeLists.txt


>
>> Wouldn't it be possible to assign a shortcut for grouping so we could still
>> use the sorting with drag and drop.
>
> it's not grouping that becomes an issue so much as it is sorting; one could
> sort by alphabetical order, by desktop, both ... grouping is orthogonal to
> sorting, however. it is used to group windows with a commonality (e.g. the
> belong to the same application) together into one entity; that entity then
> gets sorted with the rest of them.
>
>> I guess Groups arent replaced by a single taskbaritem, they're just
>> grouped in position and color.
>
> well, we'll end up making them collapse down to a single item. one of the
> benefits of grouping is space savings.
If all groups are collapsed i dont think theyre much of use anymore.
I think it should work like this

Top Level Groups (group which isn't in a group) should basically be expanded.
The groups ar colored and in the menu there are these entries plus some i forgot, but you get an idea:
-All To Desktop
-All To Desktop
-Minimize All
-Maximize All
-Leave Group(just this task leaves group)
-Group Menu-> delete Group (group gets completely removed)
                      all single tasks with their normal entries
-Collapse to Groupitem

If you click on a task just this one is affected and not the whole group.
Those tasks can be dragged around freely if GroupSorting is enabled. 
The tasks can be sorted among the group members and if you drop a task outside of the group
the rest of the group follows.


All groups that aren't toplevel are collapsed by default but can be expanded.
They have the same menu like the ones above but the whole group is affected by clicks on them.
If GroupSorting is activated they can be dragged around as well.
If the cursor stays on a GroupTaskItem for some time (0.2s-0.5s) there could  show up a little tooltip
which is a QLinearGraphicsLayout itself and contains the group members. This way everything could be done by dragging.

If the groupModifierKey is pressed one can group or ungroup tasks with drag and drop by simply dragging them on each other or out of the group.



>
>> I think we should also add a taskmanager mode where it just displays tasks
>> which were explicitly dropt on it.
>
> i think this would be better as a separate applet tbh. it can share code with
> tasks, but it would be nice not to make tasks even *more* complex that it
> already is.

I agree with that :)


>> There are two ways i can think of. We could create a taskGroupItem class
>> which has its own qgraphicslinearlayout and looks like one normal task to
>> Tasks class, or we could handle the whole stuff in the Tasks class...
>> I would prefer the taskGroupItem..
>
> isn't there already a group item in there?
>
Maybe you mean the AbstractGroupingStrategy in plasma/applet/tasks/future
but i think this one is for automatic group suggestions.
I created a new class that can hold other groups or tasks. 
The groups are stored by the Taskmanager base class, because its the only one that is always there.

For the TaskGroupItem I will probably just subclass the WindowTaskItem.

Unfortunatly the whole group stuff starts to make all Taskmanager classes quite heavy, especially
the Tasks class which handles all the sorting. Would it make sense to make a different class with
the Drag an drop stuff and the layouting in it and derive the Tasks class from it?
I'm not sure if it is the right approach.

A problem I came across is the colorizing of the WindowTaskItems. The whole thing there with 
svg and so on seems quite weird.
If someone has an idea how to colorize them... any help is appreciated :)

BTW:
I couldn't find out yet how to properly answer on a message so it gets listed underneath the other in the
list archive...


Thanks for helping

Regards Chris
_________________________________________________________________
Sie haben nie Platz in Ihrer Inbox? Mit Windows Live Hotmail haben Sie jetzt 5GB Speicherplatz - gratis! Holen Sie sich hier Ihren neuen  Windows Live Hotmail Account!
http://get.live.com/mail/overview


More information about the Panel-devel mailing list