Re: Lower priority for status callbacks (patch)
- From: Philip Van Hoof <spam pvanhoof be>
- To: Felipe Erias Morandeira <femorandeira igalia com>
- Cc: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Re: Lower priority for status callbacks (patch)
- Date: Thu, 13 Dec 2007 17:02:07 +0100
Approved, please commit
On Thu, 2007-12-13 at 09:59 +0100, Felipe Erias Morandeira wrote:
> Hello,
>
> in Tinymail, status callbacks are installed when tny_folder_*_async(..)
> functions are invoked. They enter an idle loop with priority
> G_PRIORITY_HIGH, which is higher than that of GTK redrawings. If we are
> using a GtkWidget (i.e. a progress bar) to notify the user, it could
> happen that it doesn't get redrawn often enough, providing the user with
> little visual feedback.
>
> The attached patch defines a priority TNY_PRIORITY_LOWER_THAN_REDRAWS,
> in tny_shared.h as follows:
>
> /* GTK+ uses G_PRIORITY_HIGH_IDLE + 10 for resizing operations,
> * and G_PRIORITY_HIGH_IDLE + 20 for redrawing operations;
> * this makes sure that status cb happen after redraws, so we don't
> * get a lot of notifications with very little visual feedback */
> #define TNY_PRIORITY_LOWER_THAN_GTK_REDRAWS G_PRIORITY_HIGH_IDLE + 30
>
> The priority of idle calls is set to TNY_PRIORITY_LOWER_THAN_GTK_REDRAWS
> (instead of G_PRIORITY_HIGH_IDLE) in:
> * tny_camel_folder_add_msg_async_status(..)
> * tny_camel_folder_sync_async_status(..)
> * tny_camel_folder_refresh_async_status(..)
> * tny_camel_folder_get_msg_async_status(..)
> * tny_camel_folder_copy_async_status(..)
> * tny_camel_folder_transfer_msgs_async_status(..)
>
> The patch was made against Tinymail's revision 3104.
>
> Cheers,
>
> Felipe Erias Morandeira
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]