Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30431/src
Modified Files:
file_itunesdb.c misc.c prefs.c prefs.h prefs_window.c
Log Message:
Moved write_extended_info to new prefs.
Index: file_itunesdb.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/file_itunesdb.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- file_itunesdb.c 10 Jun 2006 16:49:19 -0000 1.92
+++ file_itunesdb.c 11 Jun 2006 00:41:56 -0000 1.93
@@ -425,7 +425,7 @@
if (g_file_test (name_db, G_FILE_TEST_EXISTS))
{
- if (prefs_get_write_extended_info ())
+ if (prefs_get_int("write_extended_info"))
{
if (!read_extended_info (name_ext, name_db))
{
@@ -488,7 +488,7 @@
}
if (name_db)
{
- if (prefs_get_write_extended_info ())
+ if (prefs_get_int("write_extended_info"))
{
if (!read_extended_info (name_ext, name_db))
{
@@ -1632,7 +1632,7 @@
}
if (success)
{
- if (prefs_get_write_extended_info ())
+ if (prefs_get_int("write_extended_info"))
{ /* write extended information */
success = write_extended_info (itdb);
}
@@ -1661,7 +1661,7 @@
g_error_free (error);
error = NULL;
}
- if (prefs_get_write_extended_info ())
+ if (prefs_get_int("write_extended_info"))
{
gchar *from, *to;
from = g_strdup_printf ("%s.ext", itdb->filename);
@@ -1695,7 +1695,7 @@
g_error_free (error);
error = NULL;
}
- if (success && prefs_get_write_extended_info ())
+ if (success && prefs_get_int("write_extended_info"))
{ /* write extended information */
success = write_extended_info (itdb);
}
Index: misc.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/misc.c,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- misc.c 24 May 2006 16:06:47 -0000 1.201
+++ misc.c 11 Jun 2006 00:41:56 -0000 1.202
@@ -326,7 +326,7 @@
if (cfgdir && !prefs_get_offline ())
{
gchar *cfe = g_build_filename (cfgdir, "iTunesDB.ext", NULL);
- if (!prefs_get_write_extended_info ())
+ if (!prefs_get_int("write_extended_info"))
/* delete extended info file from computer */
if (g_file_test (cfe, G_FILE_TEST_EXISTS))
if (remove (cfe) != 0)
Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.219
retrieving revision 1.220
diff -u -d -r1.219 -r1.220
--- prefs.c 10 Jun 2006 23:29:24 -0000 1.219
+++ prefs.c 11 Jun 2006 00:41:56 -0000 1.220
@@ -216,6 +216,7 @@
prefs_set_int("autoimport", FALSE);
prefs_set_int("readtags", TRUE);
+ prefs_set_int("write_extended_info", TRUE);
}
/* Initialize default variable-length list entries */
@@ -1774,7 +1775,6 @@
mycfg->md5tracks = TRUE;
mycfg->block_display = FALSE;
mycfg->offline = FALSE;
- mycfg->write_extended_info = TRUE;
mycfg->parsetags = FALSE;
mycfg->parsetags_overwrite = FALSE;
mycfg->parsetags_template = g_strdup ("%a - %A/%T %t.mp3;%t.wav");
@@ -2041,10 +2041,6 @@
{
/* removed with version after 0.82-CVS */
}
- else if(g_ascii_strcasecmp (line, "extended_info") == 0)
- {
- prefs_set_write_extended_info((gboolean)atoi(arg));
- }
else if(g_ascii_strcasecmp (line, "dir_browse") == 0)
{
prefs_set_string ("last_dir_browsed", arg);
@@ -2309,7 +2305,6 @@
fprintf(fp, "group_compilations=%d\n",prefs_get_group_compilations());
fprintf(fp, "last_prefs_page=%d\n",prefs_get_last_prefs_page());
fprintf(fp, "offline=%d\n",prefs_get_offline());
- fprintf(fp, "extended_info=%d\n",prefs_get_write_extended_info());
fprintf(fp, "display_toolbar=%d\n",prefs_get_display_toolbar());
fprintf(fp, "toolbar_style=%d\n",prefs_get_toolbar_style());
fprintf(fp, "tm_autostore=%d\n",prefs_get_tm_autostore());
@@ -2396,10 +2391,6 @@
cfg->offline = active;
info_update_totals_view_space ();
}
-void prefs_set_write_extended_info(gboolean active)
-{
- cfg->write_extended_info = active;
-}
/* If the status of md5 hash flag changes, free or re-init the md5
hash table */
@@ -2455,11 +2446,6 @@
return cfg->offline;
}
-gboolean prefs_get_write_extended_info(void)
-{
- return cfg->write_extended_info;
-}
-
void prefs_set_charset (gchar *charset)
{
prefs_cfg_set_charset (cfg, charset);
Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- prefs.h 10 Jun 2006 23:29:24 -0000 1.144
+++ prefs.h 11 Jun 2006 00:41:56 -0000 1.145
@@ -109,8 +109,6 @@
} sortcfg;
gboolean info_window; /* is info window open (will then open on restart */
gboolean offline; /* are we working offline, i.e. without iPod? */
- gboolean write_extended_info; /* write additional file with PC
- filenames etc? */
gboolean parsetags; /* Get tags by parsing filename? */
gchar *parsetags_template; /* template for parsing tags */
@@ -289,7 +287,6 @@
void prefs_set_st_sort (gint type);
void prefs_set_tm_sortcol (TM_item col);
void prefs_set_tm_autostore (gboolean active);
-void prefs_set_write_extended_info(gboolean active);
void prefs_set_md5tracks(gboolean active);
void prefs_set_block_display(gboolean active);
void prefs_set_parsetags (gboolean active);
@@ -314,7 +311,6 @@
gint prefs_get_tm_sort (void);
TM_item prefs_get_tm_sortcol (void);
gboolean prefs_get_tm_autostore (void);
-gboolean prefs_get_write_extended_info(void);
gboolean prefs_get_autoimport(void);
gchar * prefs_get_charset (void);
gboolean prefs_get_md5tracks(void);
Index: prefs_window.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs_window.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- prefs_window.c 10 Jun 2006 23:22:00 -0000 1.140
+++ prefs_window.c 11 Jun 2006 00:41:56 -0000 1.141
@@ -620,7 +620,7 @@
w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_write_extended");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
- tmpcfg->write_extended_info);
+ prefs_get_int("write_extended_info"));
if ((w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_automount_ipod")))
@@ -710,7 +710,6 @@
prefs_set_parsetags_template(tmpcfg->parsetags_template);
prefs_set_coverart(tmpcfg->coverart);
prefs_set_coverart_template(tmpcfg->coverart_template);
- prefs_set_write_extended_info(tmpcfg->write_extended_info);
/* this call well automatically destroy/setup the md5 hash table */
prefs_set_md5tracks(tmpcfg->md5tracks);
@@ -1024,8 +1023,8 @@
on_cfg_write_extended_info_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
- tmpcfg->write_extended_info =
- gtk_toggle_button_get_active (togglebutton);
+ temp_prefs_set_int(temp_prefs, "write_extended_info",
+ gtk_toggle_button_get_active(togglebutton));
}
void
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2