2 * This file is a part of hildon examples
4 * Copyright (C) 2005, 2006, 2007 Nokia Corporation, all rights reserved.
6 * Author: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; version 2.1 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
32 on_page_switch (GtkNotebook *notebook,
33 GtkNotebookPage *page,
35 HildonWizardDialog *dialog);
38 on_page_switch (GtkNotebook *notebook,
39 GtkNotebookPage *page,
41 HildonWizardDialog *dialog)
43 g_debug ("Page %d", num);
46 g_debug ("Making next insensitive! %d", num);
47 gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), HILDON_WIZARD_DIALOG_NEXT, FALSE);
54 main (int argc, char **args)
56 gtk_init (&argc, &args);
58 GtkWidget *notebook = gtk_notebook_new ();
59 GtkWidget *label_1 = gtk_label_new ("Page 1");
60 GtkWidget *label_2 = gtk_label_new ("Page 2");
61 GtkWidget *label_3 = gtk_label_new ("Page 3");
63 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), label_1, NULL);
64 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), label_2, NULL);
65 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), label_3, NULL);
67 GtkWidget *dialog = hildon_wizard_dialog_new (NULL, "Wizard", GTK_NOTEBOOK (notebook));
68 g_signal_connect (G_OBJECT (notebook), "switch-page", G_CALLBACK (on_page_switch), dialog);
70 gtk_widget_show_all (dialog);
71 gtk_dialog_run (GTK_DIALOG (dialog));