diff options
| author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-04-29 12:56:41 +0000 | 
|---|---|---|
| committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-04-29 12:56:41 +0000 | 
| commit | e02ec068629bf1ce5c534432ae40479337cedfc4 (patch) | |
| tree | 7b0290e28ba95591ee588044b34322d42d527abb /mixgtk/mixgtk_widgets.c | |
| parent | fef0865fae3728ed89b3403fbcc24cdd26ae1e46 (diff) | |
| download | mdk-e02ec068629bf1ce5c534432ae40479337cedfc4.tar.gz mdk-e02ec068629bf1ce5c534432ae40479337cedfc4.tar.bz2  | |
config file handling added
Diffstat (limited to 'mixgtk/mixgtk_widgets.c')
| -rw-r--r-- | mixgtk/mixgtk_widgets.c | 19 | 
1 files changed, 18 insertions, 1 deletions
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 <glade/glade.h>  #include <mixlib/mix.h> +#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;  }  | 
