How can deal with the warning?
- From: "hzeng" <hzeng hf tvia com>
- To: <gtk-list gnome org>
- Subject: How can deal with the warning?
- Date: Sun, 27 Jan 2002 15:18:40 +0800
Hi,
I have just begun to study gtk.
I have the following warning when I use the progressbar to do some test.
GLib-WARNING ** : g_main_interate(): main loop already active in another thread
I search the FAQ,but don't find the answer.If I should not use the thread of c, but
of glibc? Help, thank you very much!
Regards!
Hzeng
--------------------------------------------------------------------------------------------
my programe is builded by glade, this is the callbacks.c:
void *pbar_update(void * user_data)
{
static int i;
while(i<=100)
{
gtk_progress_set_value(GTK_PROGRESS(user_data),i++);
while(gtk_events_pending())
gtk_main_iteration();
}
}
void
on_window1_destroy (GtkObject *object,
gpointer user_data)
{
gtk_main_quit();
}
void
on_window1_show (GtkObject *object,
gpointer user_data)
{
pthread_t thread;
pthread_create(&thread,NULL,pbar_update,(void *)user_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]