![](images/icon.png)
gTask is an implementation of the progress bar simplification system that was proposed in an osnews article by Athanassios Floros. The intent of the project is to create an easy to use framework for application developers to communication the progress to certain long running events. Right now the system is capable of automatically displaying a per program window that tracks the status of the tasks the program is performing. Eventually task information will also be reported to a central daemon that would allow for tasks to be summarized and for users to search for older tasks (ie. find the file I downloaded 3 days ago).
Many programs have the need to display progress information to their users and each of them have decided upon a specific method for doing so. Another driving force behind the development of gTask is to create some standardization among the various ways in which this information is presented to users. This brings a large benefit to users as many of the actions for manipulating the tasks that their computer is performing can be carried out in a way that does not change from program to program.
At the moment gTask is under fairly heavily development, but we have released a version of our core libraries for feedback. Currently the system supports the creation of tasks that can create multiple files and will automatically handle the display of various user interface elements for programs that use gTask. The task window that is displayed stores it own settings so that the program that gTask is embedded in need not have to worry about such things.
The following show cases some of the conceptual layouts for various components of gtask's user interface. The most recent working screenshot is the last one in the actual screenshots section which shows the per program task window that is automatically displayed by the library.
Conceptual Shots:
Actual Screenshots
If you want to play around with the latest version of gTask you can check the code out of our cvs repository. To access the repository you do the following:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gtask login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gtask co libgtask libgtask-ui
All of our code is fully documented using doxygen. API documentation is available for the following modules:
We are working on writing up some tutorial for the system, but until then the best overview of a basic use case can be found in the demos directory in libgtask-ui. Below is a quick overview of what needs to be done to use the library.
#include <gtask/gtask.h> #include <gtask-ui/gtask-ui.h> int main( int argc, char **argv ) { GTaskGenericTask *task; GTaskFile *file; gnome_vfs_init( ); /* Tell the system what role we have and whether or not * we intend to display our own task window */ gtask_ui_init( &argc, &argv, GTASK_ROLE_PROVIDER, FALSE ); /* Create a new task object using the default factory * gtask_ui_init has set this factory up for us */ task = gtask_factory_create_task( NULL, "GTaskDownloadTask" ); /* Set some basic properties on the task */ gtask_generic_task_set_title( task, "Test Title" ); gtask_generic_task_set_percent_done( task, 0.3 ); gtask_generic_task_set_time_left( task, 400 ); /* Since this is a download task, we should probably be creating * a file of some sort */ file = gtask_file_new_with_properties( "file:///home/joe/vase.jpg", /* the uri of the file */ "image/jpeg", /* the mime type of the file */ "", /* a thumbnail to display */ "Picture of a Vase" ); /* a description of the file */ /* Associate the file with our task */ gtask_generic_task_add_file( task, file ); /* All looks good, so let's tell the world about our task */ gtask_generic_task_serialize( task ); }The main idea of gtask is that all the application developer has to do is specify what is going on and update the status of tasks as new information comes in. The library will largely handle the rest. Right now the library can send task information to multiple targets and will automatically display a task window (see the screenshot of GTaskWindow) if it is appropriate to do so. Once the task daemon is completed task windows can search for old tasks (like searching for files you'ver download a week ago).