[Panel-devel] Task management in plasma

Richard Moore richmoore44 at gmail.com
Sat May 26 23:21:12 CEST 2007


As I promised Aaron, here are some thoughts on the current task management
library and ways we can improve it.

Issues with the current facilities of libtaskmanager:

- No separation of properties of the document from the properties of the
  task. In fact there is little or no support for storing the properties of
  the document at all. Things like parsing '[modified]' from the window title
  are hardly good enough!

- No real support for MDI

- Support for task grouping is only skin deep - a function that says 'should
  these tasks be grouped together'. This function only supports a single
  policy and has no mechanism for extending it. The user should be able to
  define their own groups (though grouping similar windows should remain one
  of the available policies).

- The interface provided by NET specification is the only means of
  communicating with a task manager. There is no DCOP or DBUS interface that
  users or tools could use to control higher level facilities.

- No way to associate addional information with tasks. For example we should
  be able to associate KIO::Jobs with tasks to provide overlays of download
  progress etc.

- Window state information is incomplete (we can see if a window is maximised,
  but can't tell if it is only maxed for width for example).

- Support for transients is weak. I don't know if this really matters though.

- Support for multiple screens is weak.

- Integration of the LMB and RMB menus is weak, these should be obtained from
  the task. This can't be done right now however as the task manager API has
  no understanding of which tasks are grouped.

So what should change:

Firstly what concepts do we need?

- Taskmanager
- Task Group
- Task
- Startup
- Document


These are associated like this (BNF style):

Taskmanager ::= Task Group* Task* Startup*
Task Group  ::= (Task|Startup)+		// This means no empty groups, we
                                        // might want to support them however

Task        ::= Document*

If we have these 5 concepts then we address several of the issues above, and
gain the ability to unify things like task grouping across different task
manager visualisations. We also gain the ability to put the information in the
right places eg. the isModified() flag can now be a property of a document. We
also gain the ability to store richer information and the ability to model
concepts like MDI applications correctly.

If we define DBUS interfaces to these concepts then we gain the ability to
provide facilities for richer integration. For example UIServer could tell the
task manager to overlay progress data, applications could request particular
groupings (eg. group the kwallet dialog with the application that caused it to
be launched).

For convenience I've generated the api docs for the 3.5 branch of the task
manager library and uploaded them to:
  http://xmelegance.org/devel/taskmanager

So, any comments?


More information about the Panel-devel mailing list