Correct to cast to CappletWidgetClass
2001-03-18 Ravi Pratap <ravi@che.iitm.ac.in> * 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.
This commit is contained in:
parent
e2b921ebf0
commit
8541eab4ff
2 changed files with 38 additions and 1 deletions
|
@ -15,6 +15,10 @@
|
|||
#include "capplet-widget.h"
|
||||
#include "gnome.h"
|
||||
|
||||
#include <ximian-archiver/archive.h>
|
||||
#include <ximian-archiver/location.h>
|
||||
|
||||
|
||||
/* 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue