Skip to content

Commit

Permalink
added prefs version, adapted to new libniftyprefs API
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylight committed Apr 20, 2014
1 parent 0f69033 commit 68fbbde
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/prefs/prefs.c
Expand Up @@ -45,6 +45,7 @@
#include <gtk/gtk.h>
#include <niftyprefs.h>
#include "prefs.h"
#include "version.h"


#define PREFS_FILENAME ".niftyconfrc"
Expand Down Expand Up @@ -73,7 +74,7 @@ NftPrefs *prefs()
gboolean prefs_load()
{
NftPrefsNode *setup;
if(!(setup = nft_prefs_node_from_file(_filename)))
if(!(setup = nft_prefs_node_from_file(_prefs, _filename)))
return false;

NftPrefsNode *n;
Expand Down Expand Up @@ -105,14 +106,14 @@ gboolean prefs_save()
}


return nft_prefs_node_to_file(setup, _filename, true);
return nft_prefs_node_to_file(_prefs, setup, _filename, true);
}


/** initialize preferences */
gboolean prefs_init()
{
if(!(_prefs = nft_prefs_init()))
if(!(_prefs = nft_prefs_init(NIFTYCONF_PREFS_VERSION)))
return false;

if(snprintf
Expand Down

0 comments on commit 68fbbde

Please sign in to comment.