5 #include "hildon-widgets/hildon-window.h"
6 #include "hildon-widgets/hildon-program.h"
7 #include "hildon-widgets/hildon-note.h"
10 on_information_clicked (GtkWidget *widget)
12 HildonNote* note = HILDON_NOTE (hildon_note_new_information (NULL,
13 "This is a really really really long text that should "
14 "get wrapped but never truncated because truncating stuff "
15 "automatically is really really bad! Blah blah blah!"));
17 gtk_dialog_run (GTK_DIALOG (note));
18 gtk_object_destroy (GTK_OBJECT (note));
24 on_confirmation_clicked (GtkWidget *widget)
26 HildonNote* note = HILDON_NOTE (hildon_note_new_confirmation (NULL,
27 "Do you want to confirm?!"));
29 gtk_dialog_run (GTK_DIALOG (note));
30 gtk_object_destroy (GTK_OBJECT (note));
36 on_progress_clicked (GtkWidget *widget)
38 GtkProgressBar *bar = GTK_PROGRESS_BAR (gtk_progress_bar_new ());
39 HildonNote *note = HILDON_NOTE (hildon_note_new_cancel_with_progress_bar (NULL,
40 "Do you want to foo bar?", bar));
42 gtk_dialog_run (GTK_DIALOG (note));
43 gtk_object_destroy (GTK_OBJECT (note));
49 main (int argc, char **args)
51 gtk_init (&argc, &args);
53 HildonProgram *program = hildon_program_get_instance ();
55 GtkWidget *window = hildon_window_new ();
56 hildon_program_add_window (program, HILDON_WINDOW (window));
58 gtk_container_set_border_width (GTK_CONTAINER (window), 6);
60 GtkVBox *vbox = GTK_VBOX (gtk_vbox_new (6, FALSE));
61 GtkButton *button1 = GTK_BUTTON (gtk_button_new_with_label ("Information note"));
62 g_signal_connect (G_OBJECT (button1), "clicked", G_CALLBACK (on_information_clicked), NULL);
64 GtkButton *button2 = GTK_BUTTON (gtk_button_new_with_label ("Confirmation note"));
65 g_signal_connect (G_OBJECT (button2), "clicked", G_CALLBACK (on_confirmation_clicked), NULL);
67 GtkButton *button3 = GTK_BUTTON (gtk_button_new_with_label ("Progress note"));
68 g_signal_connect (G_OBJECT (button3), "clicked", G_CALLBACK (on_progress_clicked), NULL);
70 g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL);
72 gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (button1), TRUE, TRUE, 0);
73 gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (button2), TRUE, TRUE, 0);
74 gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (button3), TRUE, TRUE, 0);
76 gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (vbox));
78 gtk_widget_show_all (GTK_WIDGET (window));