RE: [gtk-list] Re: GtkProgressBar && RE: updating a progress bar
- From: Tony Gale <gale daedalus dera gov uk>
- To: gtk-list redhat com
- Subject: RE: [gtk-list] Re: GtkProgressBar && RE: updating a progress bar
- Date: Fri, 06 Mar 1998 17:29:28 -0000 (GMT)
On 06-Mar-98 Sergei Naumov wrote:
> mysql_query() is not written by me. It is a part of the library
> that
> supports MySQL engine. As far as I understand, I can not get any
> information
> on how the query is progressing. The way it works is that you give
> it an SQL
> query, it connects to a mysql daemon running either on a local
> machine or
> on a remote host. The daemon processes this query and gives the
> result (data
> stream) back. That's why I asked the question because it seemed I
> could not
> use progress bar to show the query.
Ok, so you can't use a GTK idle/timer callback, as they only operate
whilst inside gtk_main, and won't get called while your
waiting for mysql_query to return.
If you don't want to go multi-threaded, then you will have to set a
timer which calls a signal handler which updates the progress bar, as
feed back to the user. See the setitimer and alarm functions.
General comment to the world in general:
On an HCI design front, it is always good to give the user feedback
during a long process, otherwise they tend to think things have gone
wrong and start taking it out on the reset button.
Hope this helps.
Tony
--
E-Mail: Tony Gale <gale@daedalus.dera.gov.uk>
HUGH BEAUMONT died in 1982!!
The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]