Hi Pallavi! What you should do to achieve your goal: 1. Connect callback to delete-event of the first window http://library.gnome.org/devel/gtk/2...t-delete-event 2. In this callback add timeout callback with g_timeout_add http://library.gnome.org/devel/glib/...#g-timeout-add 3. Do in this callback what you currently do in main_quit_handler except of using g_usleep.
Thanks, Daniil On Wed, May 26, 2010 at 3:28 PM, Pallavi Kandhare <pallavi.kandh...@yahoo.com> wrote: > Hello, > I am using g_usleep in my 1st window. And after specified time interval I > want to display 2nd window. > > My code is as follows: > > HildonWindow *window; > > static gboolean main_quit_handler(GtkWidget *image) > { > GtkWidget *win; > GtkWidget *vbox; > > GtkWidget *label; > > /* Create the main window */ > win = hildon_stackable_window_new(); > gtk_window_set_title(GTK_WINDOW (win), "Display image "); > > /* Setting a label in the new window */ > label = gtk_label_new("Hello"); > gtk_container_add(GTK_CONTAINER (win), label); > > g_usleep(500); > gtk_container_remove(GTK_CONTAINER (window), image); > > gtk_widget_show_all(win); > gtk_container_add(GTK_CONTAINER (window), label); > gtk_widget_show_all ( GTK_WIDGET ( window ) ); > } > > int main > { > -------- > GtkWidget *image; > gboolean value; > > image = gtk_image_new_from_file("my_file_path"); > gtk_container_add(GTK_CONTAINER (window), image); > gtk_widget_show_all ( GTK_WIDGET ( window ) ); > > gtk_quit_add(0, main_quit_handler, image); > > gtk_main(); > > return 0; > } > > When i run the code I am able to see only 1st window. 2nd window isnt visible. > > Any help please? > > > > > _______________________________________________ > maemo-developers mailing list > maemo-developers@maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > _______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers