[maemo-developers] Switching window after giving delay with g_usleep
From: Pallavi Kandhare pallavi.kandhare at yahoo.comDate: Wed May 26 15:28:16 EEST 2010
- Previous message: qhildon-notifications in QT-Extra
- Next message: Switching window after giving delay with g_usleep
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
- Previous message: qhildon-notifications in QT-Extra
- Next message: Switching window after giving delay with g_usleep
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
