diff --git a/ChangeLog b/ChangeLog index a58de168c..1d495c0bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-03-18 Ravi Pratap + + * control-center/capplet-widget.h (CAPPLET_WIDGET_CLASS): Correct + to cast to CappletWidgetClass + + * capplets/wm-properties.c (store_archive_data): add + (ok_callback): Modify to store settings using wm_list_save + + * capplets/gnome-edit-properties.c (edit_apply): Modify to call + store_archive_data before exiting. + (current_info): Add new global variable to hold current state. + 2001-03-15 Bradford Hovinen * capplets/new-*/main.c: Added code to store archive data with the diff --git a/capplets/wm-properties/wm-properties-capplet.c b/capplets/wm-properties/wm-properties-capplet.c index 2ae58fc9d..0a3658fc5 100644 --- a/capplets/wm-properties/wm-properties-capplet.c +++ b/capplets/wm-properties/wm-properties-capplet.c @@ -15,6 +15,10 @@ #include "capplet-widget.h" #include "gnome.h" +#include +#include + + /* prototypes */ static void restart (gboolean force); static void try_callback (void); @@ -123,6 +127,24 @@ gboolean restart_pending = FALSE; */ gboolean in_fill = FALSE; + +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 = wm_list_write_to_xml (); + location_store_xml (location, "wm-properties-capplet", + xml_doc, STORE_MASK_PREVIOUS); + xmlFreeDoc (xml_doc); + archive_close (archive); +} + + static GtkWidget * left_aligned_button (gchar *label) { @@ -656,7 +678,7 @@ ok_callback (void) case STATE_IDLE: state = STATE_OK; restart(FALSE); - return; + break; case STATE_TRY: state = STATE_OK; @@ -674,6 +696,9 @@ ok_callback (void) g_warning ("ok callback in state %d!!!\n", state); return; } + + wm_list_save (); + store_archive_data (); } static void