Busy dialog
- From: Lucas Hermann Negri <kkndrox gmail com>
- To: GTK <gtk-list gnome org>
- Subject: Busy dialog
- Date: Fri, 12 Sep 2008 20:31:21 -0300
Hi,
I have an application that needs to do a blocking operation (like
accessing a remote file) that can't be executed in a different thread
(I'm using it from Lua a script), and is atomic in the sense that I
can't separate it in smaller pieces.
To at least give the user some feedback, I'm trying to show a GtkWindow
with a GtkLabel that informs the user that the application is working.
I have it like this:
window:showAll()
while eventsPending() do
mainIteration()
end
-- start the blocking stuff
But the problem is that the label inside the GtkWindow isn't instantly
drawed and aren't in the pending events queue, so sometimes the Label is
show, sometimes it isn't.
Unfortunately I can't start other process or thread, but I can use
g_idle_add and g_timeout_add.
How can I guarantee that the GtkLabel is visible before starting the
blocking operation?
Thanks for the attention.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]