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 **args)
64 HildonProgram *program = NULL;
65 GtkWidget *window = NULL;
70 gtk_init (&argc, &args);
72 gtk_rc_parse_string ("style \"fremantle-widget\" {\n"
73 " GtkWidget::hildon-mode = 1\n"
74 "} widget \"*.fremantle-widget\" style \"fremantle-widget\""
75 "widget_class \"*<HildonPannableArea>.GtkTreeView\" style \"fremantle-widget\"");
77 program = hildon_program_get_instance ();
78 g_set_application_name
79 ("hildon-touch-picker cell renderer example program");
81 window = hildon_stackable_window_new ();
82 hildon_program_add_window (program, HILDON_WINDOW (window));
84 gtk_container_set_border_width (GTK_CONTAINER (window), 6);
86 button = hildon_picker_button_new (HILDON_SIZE_AUTO, HILDON_BUTTON_ARRANGEMENT_VERTICAL);
87 hildon_button_set_title (HILDON_BUTTON (button), "Pick a band!");
88 selector = hildon_touch_selector_entry_new_text ();
89 for (i = 0; artists [i] != NULL; i++) {
90 hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector),
93 hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button),
94 HILDON_TOUCH_SELECTOR (selector));
96 gtk_container_add (GTK_CONTAINER (window), button);
97 g_signal_connect (G_OBJECT (window), "destroy",
98 G_CALLBACK (gtk_main_quit), NULL);
99 gtk_widget_show_all (GTK_WIDGET (window));