Re: logo and wait...



Hi,

thanks Sven,

> You don't need to wait for a signal. Just show your splash
> window, realize and process all updates on the GDK window
> (gdk_window_process_updates). Then continue startup.

Now I have my splah window:

        splash_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_window_set_position (GTK_WINDOW (splash_window), GTK_WIN_POS_CENTER);

	gtk_widget_realize(splash_window);
	gdk_window_set_decorations(splash_window->window, 0);
	{
		GdkPixbuf* pixbuf;
		GtkWidget *image;

		pixbuf = gdk_pixbuf_new_from_file(image_file,NULL);
		image = gtk_image_new_from_pixbuf(pixbuf);

		gtk_container_add(GTK_CONTAINER(splash_window), image);
		gtk_widget_realize(image);
		g_object_unref(pixbuf);

		gtk_widget_show(image);
	}
	gtk_widget_show(splash_window);
	gdk_window_process_updates(splash_window->window, TRUE);

**********************

But now, I have 2 little questions:

main prog does:

splashwindow (above code);

do anything();

close_splashwindow();

Now how can I close splash window ? I have tried classical widget_destroy
functions but I got a SEGFAULT.
And how can I avoid too quick splash window visualizations (I would delay
1 or 2 seconds)? Only with gtk_timeout_add??

Thanks
Francesco

__________________________________________________________________
Tiscali ADSL SENZA CANONE:
Attivazione GRATIS, contributo adesione GRATIS, modem GRATIS,
50 ore di navigazione GRATIS.  ABBONARTI TI COSTA SOLO UN CLICK!
http://point.tiscali.it/adsl/index.shtml






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]