Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6550/src

Modified Files:
        file.c prefs.c prefs.h prefs_window.c 
Log Message:

Moved parsetags to new prefs.


Index: file.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/file.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -d -r1.167 -r1.168
--- file.c      10 Jun 2006 16:49:19 -0000      1.167
+++ file.c      11 Jun 2006 01:04:10 -0000      1.168
@@ -694,7 +694,7 @@
 static void set_unset_entries_from_filename (Track *track)
 {
     /* try to fill tags from filename */
-    if (prefs_get_parsetags ())
+    if (prefs_get_int("parsetags"))
                        parse_filename (track);
     /* fill up what is left unset */
     if (!track->album && prefs_get_int_index("tag_autoset", TM_COLUMN_ALBUM))

Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -d -r1.220 -r1.221
--- prefs.c     11 Jun 2006 00:41:56 -0000      1.220
+++ prefs.c     11 Jun 2006 01:04:10 -0000      1.221
@@ -217,6 +217,7 @@
     prefs_set_int("autoimport", FALSE);
     prefs_set_int("readtags", TRUE);
     prefs_set_int("write_extended_info", TRUE);
+    prefs_set_int("parsetags", FALSE);
 }
 
 /* Initialize default variable-length list entries */
@@ -1775,7 +1776,6 @@
     mycfg->md5tracks = TRUE;
     mycfg->block_display = FALSE;
     mycfg->offline = FALSE;
-    mycfg->parsetags = FALSE;
     mycfg->parsetags_overwrite = FALSE;
     mycfg->parsetags_template = g_strdup ("%a - %A/%T %t.mp3;%t.wav");
     mycfg->coverart = TRUE;
@@ -1971,10 +1971,6 @@
          {
              prefs_set_block_display((gboolean)atoi(arg));
          }
-         else if(g_ascii_strcasecmp (line, "parsetags") == 0)
-         {
-             prefs_set_parsetags((gboolean)atoi(arg));
-         }
          else if(g_ascii_strcasecmp (line, "parsetags_overwrite") == 0)
          {
              prefs_set_parsetags_overwrite((gboolean)atoi(arg));
@@ -2297,7 +2293,6 @@
     }
     fprintf(fp, "md5=%d\n",prefs_get_md5tracks ());
     fprintf(fp, "block_display=%d\n",prefs_get_block_display());
-    fprintf(fp, "parsetags=%d\n", prefs_get_parsetags());
     fprintf(fp, "parsetags_overwrite=%d\n", prefs_get_parsetags_overwrite());
     fprintf(fp, "parsetags_template=%s\n",cfg->parsetags_template);
     fprintf(fp, "coverart=%d\n", prefs_get_coverart());
@@ -2520,16 +2515,6 @@
   return cfgdir;
 }
 
-void prefs_set_parsetags(gboolean active)
-{
-  cfg->parsetags = active;
-}
-
-gboolean prefs_get_parsetags(void)
-{
-  return cfg->parsetags;
-}
-
 void prefs_set_parsetags_overwrite(gboolean active)
 {
   cfg->parsetags_overwrite = active;

Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- prefs.h     11 Jun 2006 00:41:56 -0000      1.145
+++ prefs.h     11 Jun 2006 01:04:10 -0000      1.146
@@ -110,7 +110,6 @@
   gboolean info_window;   /* is info window open (will then open on restart */
   gboolean offline;       /* are we working offline, i.e. without iPod? */
 
-  gboolean parsetags;           /* Get tags by parsing filename? */
   gchar   *parsetags_template;  /* template for parsing tags */
   gboolean parsetags_overwrite; /* Overwrite tags already set? */
   gboolean coverart;            /* Read coverart when adding files? */
@@ -289,8 +288,6 @@
 void prefs_set_tm_autostore (gboolean active);
 void prefs_set_md5tracks(gboolean active);
 void prefs_set_block_display(gboolean active);
-void prefs_set_parsetags (gboolean active);
-gboolean prefs_get_parsetags(void);
 void prefs_set_parsetags_overwrite (gboolean active);
 gboolean prefs_get_parsetags_overwrite(void);
 void prefs_set_parsetags_template (const gchar *tpl);

Index: prefs_window.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs_window.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- prefs_window.c      11 Jun 2006 00:41:56 -0000      1.141
+++ prefs_window.c      11 Jun 2006 01:04:10 -0000      1.142
@@ -557,12 +557,12 @@
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "parsetags");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
-                                tmpcfg->parsetags);
+                                prefs_get_int("parsetags"));
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "parsetags_overwrite");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
                                 tmpcfg->parsetags_overwrite);
-    gtk_widget_set_sensitive (w, tmpcfg->parsetags);
+    gtk_widget_set_sensitive (w, prefs_get_int("parsetags"));
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "parsetags_template");
     if (tmpcfg->parsetags_template)
@@ -573,7 +573,7 @@
        gtk_entry_set_text(GTK_ENTRY(w), buf);
        g_free (buf);
     }
-    gtk_widget_set_sensitive (w, tmpcfg->parsetags);
+    gtk_widget_set_sensitive (w, prefs_get_int("parsetags"));
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "coverart");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
@@ -705,7 +705,6 @@
        tm_store_col_order ();
        prefs_set_charset(tmpcfg->charset);
 
-       prefs_set_parsetags(tmpcfg->parsetags);
        prefs_set_parsetags_overwrite(tmpcfg->parsetags_overwrite);
        prefs_set_parsetags_template(tmpcfg->parsetags_template);
        prefs_set_coverart(tmpcfg->coverart);
@@ -1152,7 +1151,7 @@
     gboolean val = gtk_toggle_button_get_active(togglebutton);
     GtkWidget *w;
 
-    tmpcfg->parsetags = val;
+    temp_prefs_set_int(temp_prefs, "parsetags", val);
     w = gtkpod_xml_get_widget (prefs_window_xml, "parsetags_overwrite");
     gtk_widget_set_sensitive (w, val);
     w = gtkpod_xml_get_widget (prefs_window_xml, "parsetags_template");



_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to