Added code to store archive data with the ximian archiver
2001-03-15 Bradford Hovinen <hovinen@ximian.com> * capplets/new-*/main.c: Added code to store archive data with the ximian archiver
This commit is contained in:
parent
1af60708fb
commit
ed0d760991
5 changed files with 85 additions and 0 deletions
|
@ -35,6 +35,9 @@
|
|||
|
||||
#include <capplet-widget.h>
|
||||
|
||||
#include <ximian-archiver/archive.h>
|
||||
#include <ximian-archiver/location.h>
|
||||
|
||||
#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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue