Split the desktop code to new files.
[tweakr] / maemo-tweaks-desktop.c
1 /*
2  * vim:ts=4:sw=4:et:cindent:cino=(0
3  */ 
4
5 #include <gtk/gtk.h>
6 #include <hildon/hildon-picker-button.h>
7
8 GtkWidget * maemo_tweaks_desktop_create_snap_to_grid (void)
9 {
10     const gchar *options[] = {"Default", "Small grid", "Large grid", NULL};
11     gint i = 0;
12     GtkWidget *button, *selector;
13
14     selector = hildon_touch_selector_new_text ();
15     while (options[i] && options[i] != '\0')
16     {
17         hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector),
18                                            options [i++]);
19     }
20
21     button = hildon_picker_button_new (HILDON_SIZE_AUTO,
22                                        HILDON_BUTTON_ARRANGEMENT_VERTICAL);
23
24     hildon_button_set_title (HILDON_BUTTON (button),
25                              "Snap desktop icons to grid");
26
27     hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button),
28                                        HILDON_TOUCH_SELECTOR (selector));
29
30     gtk_widget_show (button);
31     return button;
32 }
33