Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16285/src
Modified Files:
prefs.c
Log Message:
read_prefs_from_file_desc shouldn't read in new prefs keys. Also set
last_dir_browsed default in set_default_preferences.
Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.257
retrieving revision 1.258
diff -u -d -r1.257 -r1.258
--- prefs.c 21 Jun 2006 06:31:53 -0000 1.257
+++ prefs.c 21 Jun 2006 08:38:39 -0000 1.258
@@ -150,6 +150,8 @@
static void set_default_preferences()
{
int i;
+ gchar curdir[PATH_MAX]; /* These are for the current directory */
+ gchar *dir;
prefs_set_int("update_existing", FALSE);
prefs_set_int("id3_write", FALSE);
@@ -264,6 +266,16 @@
prefs_set_int("statusbar_timeout", STATUSBAR_TIMEOUT);
prefs_set_int("md5", TRUE);
+ /* Set last directory browsed */
+ if (getcwd(curdir, PATH_MAX))
+ prefs_set_string("last_dir_browsed", curdir);
+ else
+ {
+ dir = convert_filename("~/");
+ prefs_set_string("last_dir_browsed", dir);
+ g_free(dir);
+ }
+
/* Set sorting prefs */
prefs_set_int("case_sensitive", FALSE);
prefs_set_int("tm_autostore", FALSE);
@@ -1855,27 +1867,11 @@
struct cfg *cfg_new(void)
{
struct cfg *mycfg = NULL;
- gchar curdir[PATH_MAX];
- gchar *cfgdir;
-
- cfgdir = prefs_get_cfgdir ();
mycfg = g_malloc0 (sizeof (struct cfg));
- if(getcwd(curdir, PATH_MAX))
- {
- prefs_set_string ("last_dir_browsed", curdir);
- }
- else
- {
- gchar *dir = convert_filename ("~/");
- prefs_set_string ("last_dir_browsed", dir);
- g_free (dir);
- }
mycfg->offline = FALSE;
- g_free (cfgdir);
-
return(mycfg);
}
@@ -1995,23 +1991,10 @@
{
/* removed with version after 0.82-CVS */
}
- else if(g_ascii_strcasecmp (line, "dir_browse") == 0)
- {
- prefs_set_string ("last_dir_browsed", arg);
- }
- else if(g_ascii_strcasecmp (line, "dir_export") == 0)
- {
- prefs_set_string (EXPORT_FILES_PATH, arg);
- }
else if(g_ascii_strcasecmp (line, "save_sorted_order") == 0)
{
/* ignore option -- has been deleted with 0.53 */
}
- else if(g_ascii_strcasecmp (line, "export_check_existing") == 0)
- {
- prefs_set_int (EXPORT_FILES_CHECK_EXISTING,
- atoi (arg));
- }
else if(g_ascii_strcasecmp (line, "fix_path") == 0)
{
/* ignore -- wie always fix the export path (replace
@@ -2021,15 +2004,6 @@
{
/* ignore -- not used any more */
}
- else if(g_ascii_strcasecmp (line, "concal_autosync") == 0)
- {
- prefs_set_int ("itdb_0_concal_autosync", atoi(arg));
- }
- else if(g_ascii_strcasecmp (line, "special_export_charset") == 0)
- {
- prefs_set_int (EXPORT_FILES_SPECIAL_CHARSET,
- atoi (arg));
- }
else
{ /* All leftover options will be stored into the prefs
setting hash (generic options -- should have had this
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2