Create desktop snap button.
authorSalvatore Iovene <salvatore@iovene.com>
Sun, 6 Dec 2009 11:33:38 +0000 (13:33 +0200)
committerSalvatore Iovene <salvatore@iovene.com>
Sun, 6 Dec 2009 11:33:38 +0000 (13:33 +0200)
modules/maemo-tweaks-desktop.c

index 24ba0d5..5422017 100644 (file)
@@ -107,11 +107,6 @@ maemo_tweaks_desktop_section_class_init
     section_class->save = _save;
 }
 
-static void
-maemo_tweaks_desktop_section_init (MaemoTweaksDesktopSection *section)
-{
-}
-
 GtkWidget * _build_snap_to_grid (void)
 {
     const gchar *options[] = {"Default", "Small grid", "Large grid", NULL};
@@ -138,6 +133,20 @@ GtkWidget * _build_snap_to_grid (void)
     return button;
 }
 
+static void
+maemo_tweaks_desktop_section_init (MaemoTweaksDesktopSection *section)
+{
+    GtkWidget * snap_button;
+    MaemoTweaksSection *iface;
+
+    snap_button = _build_snap_to_grid ();
+    iface = MAEMO_TWEAKS_SECTION (section);
+
+    iface->widget = gtk_vbox_new (FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (iface->widget), snap_button,
+                        FALSE, FALSE, 0);
+}
+
 static void _save (MaemoTweaksSection *section)
 {
 }