From e02ec068629bf1ce5c534432ae40479337cedfc4 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 29 Apr 2001 12:56:41 +0000 Subject: config file handling added --- mixgtk/mixgtk_widgets.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'mixgtk/mixgtk_widgets.c') diff --git a/mixgtk/mixgtk_widgets.c b/mixgtk/mixgtk_widgets.c index a26d886..61f973f 100644 --- a/mixgtk/mixgtk_widgets.c +++ b/mixgtk/mixgtk_widgets.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_widgets.c : * Implementation of the functions declared in mixgtk_widgets.h * ------------------------------------------------------------------ - * Last change: Time-stamp: "2001-04-27 23:32:32 jao" + * Last change: Time-stamp: "2001-04-29 14:32:17 jao" * ------------------------------------------------------------------ * Copyright (C) 2001 Free Software Foundation, Inc. * @@ -25,6 +25,7 @@ #include #include +#include "mixgtk_config.h" #include "mixgtk_widgets.h" /* the glade spec */ @@ -70,14 +71,27 @@ static const gchar *names_[] = { #define VERSION_LABEL_ "version_label" #define GPL_TEXT_ "gpl_text" +#define AUTOSAVE_ITEM_ "save_on_exit" GtkWidget *about_; +static void +init_autosave_ (void) +{ + GtkCheckMenuItem *item = GTK_CHECK_MENU_ITEM + (mixgtk_widget_factory_get_by_name (AUTOSAVE_ITEM_)); + if (item) + { + gtk_check_menu_item_set_active (item, mixgtk_config_is_autosave ()); + } +} + /* create a new factory from an xml glade file */ gboolean mixgtk_widget_factory_init (const char *glade_file) { GtkWidget *label; + glade_init (); xml_ = glade_xml_new (glade_file, NULL); if (!xml_) return FALSE; @@ -89,6 +103,9 @@ mixgtk_widget_factory_init (const char *glade_file) g_return_val_if_fail (label != NULL, FALSE); gtk_label_set_text (GTK_LABEL(label), VERSION); gtk_widget_show (label); + + init_autosave_ (); + return TRUE; } -- cgit v1.2.3