Hello,<br>
<br>
The wizard does not work without gtk_widget_show_all.<br>
I quickly wrote a program for demonstrate this problem.<br>
<br>
Makefile:<br>
<br>
CC=gcc<br>
CFLAGS=`pkg-config --cflags --libs hildon-libs gtk+-2.0`<br>
wizard:<br>
$(CC) wizard.c -o wizard $(CFLAGS) $(LDFLAGS)<br>
<br>
<br>
wizard.c:<br>
<br>
#include <hildon-widgets/hildon-wizard-dialog.h><br>
#include <hildon-widgets/hildon-program.h><br>
#include <gtk/gtk.h><br>
<br>
void on_button_clicked(GtkButton *button,<br>
HildonWindow *window)<br>
{<br>
GtkWidget *notebook1;<br>
GtkWidget *label4;<br>
GtkWidget *label1;<br>
GtkWidget *label5;<br>
GtkWidget *label2;<br>
notebook1 = gtk_notebook_new ();<br>
gtk_widget_show (notebook1);<br>
<br>
label4 = gtk_label_new ("first page");<br>
gtk_widget_show (label4);<br>
gtk_container_add (GTK_CONTAINER (notebook1), label4);<br>
<br>
label1 = gtk_label_new ("label1");<br>
gtk_widget_show (label1);<br>
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1),<br>
gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1);<br>
<br>
label5 = gtk_label_new ("second page");<br>
gtk_widget_show (label5);<br>
gtk_container_add (GTK_CONTAINER (notebook1), label5);<br>
<br>
label2 = gtk_label_new ("label2");<br>
gtk_widget_show (label2);<br>
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1),<br>
gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label2);<br>
<br>
HildonWizardDialog *wizard = HILDON_WIZARD_DIALOG(<br>
hildon_wizard_dialog_new( GTK_WINDOW(window),<br>
"wizard", GTK_NOTEBOOK(notebook1) ) );<br>
<br>
// gtk_widget_show_all( GTK_WIDGET(wizard) );<br>
gtk_dialog_run( GTK_DIALOG(wizard) );<br>
gtk_widget_destroy( GTK_WIDGET(wizard) );<br>
}<br>
<br>
int main(int argc, char *argv[])<br>
{<br>
/* Create needed variables */<br>
HildonProgram *program;<br>
HildonWindow *window;<br>
GtkWidget *button;<br>
<br>
/* Initialize the GTK. */<br>
gtk_init(&argc, &argv);<br>
<br>
/* Create the hildon program and setup the title */<br>
program = HILDON_PROGRAM(hildon_program_get_instance());<br>
g_set_application_name("Hello maemo!");<br>
<br>
/* Create HildonWindow and set it to HildonProgram */<br>
window = HILDON_WINDOW(hildon_window_new());<br>
hildon_program_add_window(program, window);<br>
<br>
/* Create button and add it to main view */<br>
button = gtk_button_new_with_label("wizard");<br>
gtk_container_add(GTK_CONTAINER(window), button);<br>
gtk_widget_show(GTK_WIDGET(button));<br>
<br>
g_signal_connect(G_OBJECT(button), "clicked",<br>
G_CALLBACK(on_button_clicked), window);<br>
<br>
/* Connect signal to X in the upper corner */<br>
g_signal_connect(G_OBJECT(window), "delete_event",<br>
G_CALLBACK(gtk_main_quit), NULL);<br>
<br>
/* Begin the main application */<br>
gtk_widget_show(GTK_WIDGET(window));<br>
gtk_main();<br>
<br>
/* Exit */<br>
return 0;<br>
}<br>
<br>
<br>
"Why do you want to change it programmatically?"<br>
<br>
For example there is a problem in the second page (for example a device
is not connectable) and I want go to first page (to again inform the
user how can activate the device).<br>
<br>
Laci<br>
<br>