Lodahl's blog: The task panel in LibreOffice

09 April 2012

The task panel in LibreOffice

LibreOffice has a very little known feature called the task pane. You might already be familiar with the navigator and the Styles and formatting dialogues. These dialogues are dockable whitch means that you can glue the dialogues to the border of the LibreOffice window.

It is however possible to create your own dockable dialogues. The dialogue becomes dockable through the so called task panel.

The task panel is only visible when you actively choose to show it and besides that you can only show it if it has content. In the view menu you might find the menu item “Task panel”. But as mentioned its only present in the menu if the task panel has an active content. When its visible it can be docked to one of the sides of the window or it can be floating. You can move it around and put it where you find it best for you.

In my case I have transformed an existing extension – the “Lorem Ipsum Generator” to show up in the task panel. As the task panel has a very little prominent occurrence in LibreOffice I decided to keep the Lorem Ipsum icon in the tool bar but now it only toggles the task panel on and off.

The result is that the tool becomes available at all times. Not open and close the dialogue any more. Just put the cursor wherever you want some dummy text and click the button in the task panel.

Usability

In the discussion about usability and “the new GUI” I think this could be the beginning. Of course the whole concept must have an overhaul as there are still some problems. First of all I don't think it's possible to use a localizable dialogue in the task panel. Therefore I had to keep the dialoque in English only but I hope that this will be only for a short time until I find out how to localize it. Another problem is that its not a trivial task to transform a dialogue into a a task panel item. I don't even think its possible to do with basic alone. i think it should be possible to generate an extension with dockable dialogues as its possible to generate extensions with the extension packager.

Anyway. I believe that the task panel could easily become a very important step into a new GUI. Not alone but followed by other efforts. Also we need to discuss if some of the existing built in dialogues in LibreOffice could easily be transformed into dockable tools. One thing I personally would like to see is the word count dialogue made dockable. Since 3.5 this dialogue has been modal witch means that it can be open while you type. It would be an obvious decision to put that dialogue in the dock.

What do you think? Would it be a good idea to continue to work on the task panel idea?

If you want to try my extension you can find it here: http://dl.dropbox.com/u/9348527/LoremIpsum.oxt but please have in mind that its not yet completely finished.

7 comments:

thuswa said...

I think you have a good idea there with the placing of the word count dialog.
I found a bug report on a similar subject:

https://bugs.freedesktop.org/show_bug.cgi?id=46126

Why don't you add your thoughts there and see if you get any reaction?

JBF said...

Hi Leif,

Very interesting work! I would like to have the ability to add any of the toolbars to the task panel. Do you think if it is easy to do ?

Best regards. JBF

Olivier Hallot said...

Hi Leif

Interesting rabbit you took out of your hat...

I read the code and I am puzzled because I don't see how you specify the dialog to show inside the task pane... can you tem me how to do?

Thank's

Olivier Hallot

Leif Lodahl said...

@Olivier Hello my friend. I hope everything is fine in Brazil.

The physical dialog is loaded from the Python bit. Be careful to change all the ID's in the 'factory' and other places. Otherwise you will end up with conflicting panes. This took me quite some time to figure out.

Btw. I used this example as template: http://api.libreoffice.org/examples/examples.html#python_examples

Leif Lodahl said...

@thuswa Thank you very much for your comment and for pointing me to the issue in bugzilla. I have added my suggestion to the issue.

Olivier Hallot said...

Hello Leif

Yes, I digged inside the python code.

I believe there shall be a way to activate the task pane in Basic, calling the same objects. Yet to prove, but it may worth the effort, as Basic is much more popular.

Leif Lodahl said...

@Olivier Absolutely agree that a basic interface should be available too. I don't know if it actually exists.

So we need:
Documentation and examples
A Task pane packager (like the extension packager)
A way to use localized dialogs
Improved user interface (e.g., use of icons because we need more vertical space). If you have just a few "panes" installed, the headings of those panes will take up too much of the vertical space.
More native LibreOffice dialogs to use the task pane idea