diff --git a/ChangeLog b/ChangeLog index 0531ff807..a58de168c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-03-15 Bradford Hovinen + + * capplets/new-*/main.c: Added code to store archive data with the + ximian archiver + 2001-03-13 Chema Celorio * capplets/gnome-edit-properties/gnome-edit-properties.c: diff --git a/capplets/keyboard/main.c b/capplets/keyboard/main.c index b81da9846..200a21c6d 100644 --- a/capplets/keyboard/main.c +++ b/capplets/keyboard/main.c @@ -35,6 +35,9 @@ #include +#include +#include + #include "preferences.h" #include "prefs-widget.h" @@ -42,11 +45,28 @@ static Preferences *prefs; static Preferences *old_prefs; static PrefsWidget *prefs_widget; +static void +store_archive_data (void) +{ + Archive *archive; + Location *location; + xmlDocPtr xml_doc; + + archive = ARCHIVE (archive_load (FALSE)); + location = archive_get_current_location (archive); + xml_doc = preferences_write_xml (prefs); + location_store_xml (location, "keyboard-properties-capplet", + xml_doc, STORE_MASK_PREVIOUS); + xmlFreeDoc (xml_doc); + archive_close (archive); +} + static void ok_cb (GtkWidget *widget) { preferences_save (prefs); preferences_apply_now (prefs); + store_archive_data (); } static void diff --git a/capplets/mouse/main.c b/capplets/mouse/main.c index 025762475..2c5d3ec28 100644 --- a/capplets/mouse/main.c +++ b/capplets/mouse/main.c @@ -35,6 +35,9 @@ #include +#include +#include + #include "preferences.h" #include "prefs-widget.h" @@ -42,11 +45,28 @@ static Preferences *prefs; static Preferences *old_prefs; static PrefsWidget *prefs_widget; +static void +store_archive_data (void) +{ + Archive *archive; + Location *location; + xmlDocPtr xml_doc; + + archive = ARCHIVE (archive_load (FALSE)); + location = archive_get_current_location (archive); + xml_doc = preferences_write_xml (prefs); + location_store_xml (location, "mouse-properties-capplet", + xml_doc, STORE_MASK_PREVIOUS); + xmlFreeDoc (xml_doc); + archive_close (archive); +} + static void ok_cb (GtkWidget *widget) { preferences_save (prefs); preferences_apply_now (prefs); + store_archive_data (); } static void diff --git a/capplets/sound/main.c b/capplets/sound/main.c index 205bf40a1..6d5af9481 100644 --- a/capplets/sound/main.c +++ b/capplets/sound/main.c @@ -35,6 +35,9 @@ #include +#include +#include + #include "preferences.h" #include "prefs-widget.h" @@ -42,11 +45,28 @@ static Preferences *prefs; static Preferences *old_prefs; static PrefsWidget *prefs_widget; +static void +store_archive_data (void) +{ + Archive *archive; + Location *location; + xmlDocPtr xml_doc; + + archive = ARCHIVE (archive_load (FALSE)); + location = archive_get_current_location (archive); + xml_doc = preferences_write_xml (prefs); + location_store_xml (location, "sound-properties-capplet", + xml_doc, STORE_MASK_PREVIOUS); + xmlFreeDoc (xml_doc); + archive_close (archive); +} + static void ok_cb (GtkWidget *widget) { preferences_save (prefs); preferences_apply_now (prefs); + store_archive_data (); } static void diff --git a/capplets/ui-properties/main.c b/capplets/ui-properties/main.c index af4769cbc..043525d9e 100644 --- a/capplets/ui-properties/main.c +++ b/capplets/ui-properties/main.c @@ -35,6 +35,9 @@ #include +#include +#include + #include "preferences.h" #include "prefs-widget.h" #include "prefs-widget-app.h" @@ -45,10 +48,27 @@ static Preferences *prefs; static Preferences *old_prefs; static PrefsWidget *prefs_widget; +static void +store_archive_data (void) +{ + Archive *archive; + Location *location; + xmlDocPtr xml_doc; + + archive = ARCHIVE (archive_load (FALSE)); + location = archive_get_current_location (archive); + xml_doc = preferences_write_xml (prefs); + location_store_xml (location, "ui-properties-capplet", + xml_doc, STORE_MASK_PREVIOUS); + xmlFreeDoc (xml_doc); + archive_close (archive); +} + static void ok_cb (GtkWidget *widget) { preferences_save (prefs); + store_archive_data (); } static void