2 * Copyright (c) 2008 Jiri Benc <jbenc@upir.cz>
3 * Copyright (c) 2009 Roman Moravcik <roman.moravcik@gmail.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include <hildon/hildon-caption.h>
24 #include <hildon/hildon-controlbar.h>
25 #include <hildon/hildon.h>
26 #include <device_symbols.h>
28 #include <gconf/gconf.h>
29 #include <gconf/gconf-client.h>
33 #define GETTEXT_PACKAGE "osso-applet-textinput"
34 #include <glib/gi18n-lib.h>
37 HildonCheckButton *use_finger;
40 static GtkWidget *start(GConfClient *client, GtkWidget *win, void **data)
46 d = g_new0(struct data, 1);
48 vbox = gtk_vbox_new(FALSE, 0);
50 d->use_finger = HILDON_CHECK_BUTTON(hildon_check_button_new(HILDON_SIZE_FINGER_HEIGHT));
51 hildon_check_button_set_active(d->use_finger, get_bool(client, "use_finger_kb"));
52 gtk_button_set_label (GTK_BUTTON (d->use_finger), _("tein_fi_use_virtual_keyboard"));
53 gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(d->use_finger), TRUE, TRUE, 0);
57 gtk_widget_show_all(vbox);
62 static void action(GConfClient *client, void *data)
64 struct data *d = data;
66 set_bool(client, "use_finger_kb", hildon_check_button_get_active(d->use_finger));
69 void prefs_onscreen_init(struct prefs *prefs)
72 prefs->action = action;
74 prefs->name = internal_kbd ? "On-screen" : "General";