Implement (ok_cb): Call store_archive_data
2001-01-25 Bradford Hovinen <hovinen@ximian.com> * capplets/new-background-properties/main.c (store_archive_data): Implement (ok_cb): Call store_archive_data
This commit is contained in:
parent
990862633d
commit
fab55a60fc
2 changed files with 28 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2001-01-25 Bradford Hovinen <hovinen@ximian.com>
|
||||
|
||||
* configure.in ([BG_]CAPPLET_{CFLAGS|LIBS}): Add ximian_archiver
|
||||
|
||||
* capplets/new-background-properties/main.c (store_archive_data):
|
||||
Implement
|
||||
(ok_cb): Call store_archive_data
|
||||
|
||||
2001-01-25 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* root-manager/root-manager.c (main): add a \n to the usage
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
@ -45,6 +48,22 @@ static PrefsWidget *prefs_widget;
|
|||
static guint ok_handler_id;
|
||||
static guint cancel_handler_id;
|
||||
|
||||
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, "background-properties-capplet",
|
||||
xml_doc);
|
||||
xmlFreeDoc (xml_doc);
|
||||
archive_close (archive);
|
||||
}
|
||||
|
||||
static void
|
||||
ok_cb (GtkWidget *widget)
|
||||
{
|
||||
|
@ -53,6 +72,7 @@ ok_cb (GtkWidget *widget)
|
|||
gtk_signal_disconnect (GTK_OBJECT (prefs_widget), ok_handler_id);
|
||||
gtk_signal_disconnect (GTK_OBJECT (prefs_widget), cancel_handler_id);
|
||||
gtk_object_destroy (GTK_OBJECT (prefs_widget));
|
||||
store_archive_data ();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Reference in a new issue