gtkroomlist responsiveness
Evan Schoenberg
evan.s at dreskin.net
Sun Jan 6 14:28:50 EST 2008
On Jan 6, 2008, at 8:46 AM, Gabriel Schulhof wrote:
> Since pidgin_roomlist_add_room() is a UI op called fairly one-to-one
> from the core (i.e., the core passes it straight through from the
> prpl),
> one idea might be to place the second "while(g_main_..." line into the
> core after the call to the UI op, rather than at the end of the UI op.
> This would nicen the behaviour for other UIs as well - for what little
> that's necessary ... *shrug*:
>
> ============================================================
> --- libpurple/roomlist.c
> ce8e8e7a5ba9402fc1f05e420f28463420fa077a
> +++ libpurple/roomlist.c
> 5afac89719c713de9a0330cc9406688925ee9e5f
> @@ -165,6 +165,8 @@ void purple_roomlist_room_add(PurpleRoom
>
> if (ops && ops->add_room)
> ops->add_room(list, room);
> +
> + while(g_main_context_iteration(NULL, FALSE));
> }
>
> PurpleRoomlist *purple_roomlist_get_list(PurpleConnection *gc)
> ============================================================
I can't speak to the gtkroomlist part of your patch except to wonder
if it's actually desired for those calls to block until all event
sources have been completed, but this change to roomlist.c would be
wrong. libpurple doesn't know anything about the glib run loop and
should not make use of its calls.
-Evan
More information about the Devel
mailing list