2 * This file is a part of hildon
4 * Copyright (C) 2008 Nokia Corporation.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 static const gchar* artists [] = {
62 main (int argc, char **argv)
64 HildonProgram *program = NULL;
65 GtkWidget *window = NULL;
70 hildon_gtk_init (&argc, &argv);
72 program = hildon_program_get_instance ();
73 g_set_application_name
74 ("hildon-touch-picker cell renderer example program");
76 window = hildon_stackable_window_new ();
77 hildon_program_add_window (program, HILDON_WINDOW (window));
79 gtk_container_set_border_width (GTK_CONTAINER (window), 6);
81 button = hildon_picker_button_new (HILDON_SIZE_AUTO, HILDON_BUTTON_ARRANGEMENT_VERTICAL);
82 hildon_button_set_title (HILDON_BUTTON (button), "Pick a band!");
83 selector = hildon_touch_selector_entry_new_text ();
84 for (i = 0; artists [i] != NULL; i++) {
85 hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector),
88 hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button),
89 HILDON_TOUCH_SELECTOR (selector));
91 gtk_container_add (GTK_CONTAINER (window), button);
92 g_signal_connect (G_OBJECT (window), "destroy",
93 G_CALLBACK (gtk_main_quit), NULL);
94 gtk_widget_show_all (GTK_WIDGET (window));