Ignore:
Timestamp:
Jan 25, 2006, 4:35:17 PM (16 years ago)
Author:
joshe
Message:

Many small usability improvements.
Remove an ugly wart in the conf api.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/oneport/gtk/conf.c

    r24 r49  
    11/*
    2   Copyright (c) 2005 Joshua Elsasser. All rights reserved.
     2  Copyright (c) 2005-2006 Joshua Elsasser. All rights reserved.
    33   
    44  Redistribution and use in source and binary forms, with or without
     
    5454lockfile(const char *file, char **errstr);
    5555static gboolean
    56 writeprefs(char **errstr);
    57 static gboolean
    5856writefile_traverse(gpointer key, gpointer value, gpointer data);
    5957static char *
     
    204202}
    205203
    206 gboolean
    207 cf_setpref(const char *name, const char *value, char **errstr) {
     204void
     205cf_setpref(const char *name, const char *value) {
    208206  assert(NULL != prefs);
    209207
    210208  g_tree_insert(prefs, g_strdup(name), g_strdup(value));
    211 
    212   if(NULL != errstr)
    213     return writeprefs(errstr);
    214   else
    215     return TRUE;
    216209}
    217210
     
    221214};
    222215
    223 static gboolean
    224 writeprefs(char **errstr) {
     216gboolean
     217cf_saveprefs(char **errstr) {
    225218  char *file = g_build_filename(confdir, FILE_PREFS, NULL);
    226219  char *tmpfile = g_build_filename(confdir, FILE_PREFS_TMP, NULL);
     
    230223
    231224  assert(NULL != prefs);
     225  assert(NULL != errstr);
    232226
    233227  *errstr = NULL;
Note: See TracChangeset for help on using the changeset viewer.