Stop using memory I don't own. Thanks Alberto Mardegan.
[tweakr] / maemo-tweaks-desktop.c
index a896a63..981e8d6 100644 (file)
@@ -7,41 +7,22 @@
 
 #include <hildon/hildon-picker-button.h>
 
-GtkWidget * _build_snap_to_grid (void)
+static void _build (MaemoTweaksModule *self)
 {
-    const gchar *options[] = {"Default", "Small grid", "Large grid", NULL};
-    gint i = 0;
-    GtkWidget *button, *selector;
-
-    selector = hildon_touch_selector_new_text ();
-    while (options[i] && options[i] != '\0')
-    {
-        hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector),
-                                           options [i++]);
-    }
-
-    button = hildon_picker_button_new (HILDON_SIZE_AUTO,
-                                       HILDON_BUTTON_ARRANGEMENT_VERTICAL);
-
-    hildon_button_set_title (HILDON_BUTTON (button),
-                             "Snap desktop icons to grid");
-
-    hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button),
-                                       HILDON_TOUCH_SELECTOR (selector));
-
-    gtk_widget_show (button);
-    return button;
 }
 
-static void _build (MaemoTweaksModule *self)
+static GtkWidget * _get_widget (MaemoTweaksModule *self)
 {
+    return NULL;
 }
 
 static void module_interface_init (gpointer g_iface, gpointer iface_data)
 {
     MaemoTweaksModuleInterface *iface =
         (MaemoTweaksModuleInterface *) g_iface;
+
     iface->build = _build;
+    iface->get_widget = _get_widget;
 }
 
 GType maemo_tweaks_desktop_get_type (void)