X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=modules%2Fmaemo-tweaks-desktop.c;h=4aa15748bf8789449df68f6cf9341a2dd058cf53;hb=37e8ad83f24a142409596c600c825e6b2d7841e6;hp=39754c5b0e356e865abfbca2c6891a2b86307a09;hpb=5a6ed68fd936eef0471e4b34c68fbce94a73c099;p=tweakr diff --git a/modules/maemo-tweaks-desktop.c b/modules/maemo-tweaks-desktop.c index 39754c5..4aa1574 100644 --- a/modules/maemo-tweaks-desktop.c +++ b/modules/maemo-tweaks-desktop.c @@ -221,13 +221,21 @@ maemo_tweaks_desktop_section_dispose (GObject *obj) static void _save (MaemoTweaksSection *section) { - gint active = - hildon_picker_button_get_active - (HILDON_PICKER_BUTTON - (MAEMO_TWEAKS_DESKTOP_SECTION (section)->snap_button)); - - g_key_file_set_integer (MAEMO_TWEAKS_DESKTOP_SECTION (section)->ini, - "edit_mode", "snap_grid_size", - snap_values [active]); + gchar *argv[2]; + gint active; + + active = hildon_picker_button_get_active + (HILDON_PICKER_BUTTON (MAEMO_TWEAKS_DESKTOP_SECTION + (section)->snap_button)); + + argv[0] = g_strdup ("/usr/bin/maemo-tweaks-desktop-save"); + argv[1] = g_strdup_printf ("%d", snap_values[active]); + + g_spawn_sync ("/home/user", argv, NULL, + G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, + NULL, NULL, NULL, NULL, NULL, NULL); + + g_free (argv[0]); + g_free (argv[1]); }