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

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

Moved write_charset to new prefs.


Index: file.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/file.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- file.c      13 Jun 2006 03:12:40 -0000      1.175
+++ file.c      13 Jun 2006 03:27:57 -0000      1.176
@@ -1897,7 +1897,7 @@
        the track, change the prefs settings temporarily */
     if (etr->charset)  track_charset_set = TRUE;
     else               track_charset_set = FALSE;
-    if (!prefs_get_write_charset () && track_charset_set)
+    if (!prefs_get_int("write_charset") && track_charset_set)
     {   /* we should use the initial charset for the update */
        if (prefs_get_charset ())
        {   /* remember the charset originally set */
@@ -1945,7 +1945,7 @@
        md5_track_exists_insert (itdb, track);
     }
 
-    if (!prefs_get_write_charset () && track_charset_set)
+    if (!prefs_get_int("write_charset") && track_charset_set)
     {   /* reset charset */
        prefs_set_charset (prefs_charset);
     }

Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.238
retrieving revision 1.239
diff -u -d -r1.238 -r1.239
--- prefs.c     13 Jun 2006 03:12:40 -0000      1.238
+++ prefs.c     13 Jun 2006 03:27:57 -0000      1.239
@@ -2060,10 +2060,6 @@
          {
              prefs_set_display_tooltips_prefs((gboolean)atoi(arg));
          }
-         else if(g_ascii_strcasecmp (line, "write_charset") == 0)
-         {
-             prefs_set_write_charset((gboolean)atoi(arg));
-         }
          else if(g_ascii_strcasecmp (line, "save_sorted_order") == 0)
          {
              /* ignore option -- has been deleted with 0.53 */
@@ -2252,7 +2248,6 @@
            prefs_get_display_tooltips_main());
     fprintf(fp, "display_tooltips_prefs=%d\n",
            prefs_get_display_tooltips_prefs());
-    fprintf(fp, "write_charset=%d\n",prefs_get_write_charset());
 }
 
 
@@ -2464,16 +2459,6 @@
     display_show_hide_toolbar ();
 }
 
-gboolean prefs_get_write_charset (void)
-{
-    return cfg->write_charset;
-}
-
-void prefs_set_write_charset (gboolean val)
-{
-    cfg->write_charset = val;
-}
-
 gboolean prefs_get_group_compilations (void)
 {
     return cfg->group_compilations;

Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- prefs.h     13 Jun 2006 03:12:40 -0000      1.165
+++ prefs.h     13 Jun 2006 03:27:57 -0000      1.166
@@ -111,7 +111,6 @@
   GtkToolbarStyle toolbar_style;/* style of toolbar */
   gboolean display_tooltips_main; /* should tooltips be displayed (main) */
   gboolean display_tooltips_prefs;/* should toolbar be displayed (prefs) */
-  gboolean write_charset;       /* Use selected charset when writing track? */
   gboolean group_compilations;  /* group compilations when browsing */
   guint32 statusbar_timeout;    /* timeout for statusbar messages */
   gboolean not_played_track;    /* not played track in Highest rated 
playlist?*/
@@ -288,8 +287,6 @@
 
 gboolean prefs_get_display_toolbar (void);
 void prefs_set_display_toolbar (gboolean val);
-gboolean prefs_get_write_charset (void);
-void prefs_set_write_charset (gboolean val);
 gboolean prefs_get_group_compilations (void);
 void prefs_set_group_compilations (gboolean val, gboolean update_display);
 GtkToolbarStyle prefs_get_toolbar_style (void);

Index: prefs_window.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs_window.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -d -r1.159 -r1.160
--- prefs_window.c      13 Jun 2006 03:12:40 -0000      1.159
+++ prefs_window.c      13 Jun 2006 03:27:57 -0000      1.160
@@ -456,7 +456,7 @@
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_write_charset");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
-                                tmpcfg->write_charset);
+                                prefs_get_int("write_charset"));
     if (!prefs_get_int("id3_write")) gtk_widget_set_sensitive (w, FALSE);
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_add_recursively");
@@ -699,7 +699,6 @@
        prefs_set_display_toolbar(tmpcfg->display_toolbar);
        prefs_set_display_tooltips_main (tmpcfg->display_tooltips_main);
        prefs_set_display_tooltips_prefs (tmpcfg->display_tooltips_prefs);
-       prefs_set_write_charset(tmpcfg->write_charset);
        tm_show_preferred_columns();
     }
 }
@@ -1255,7 +1254,8 @@
 on_cfg_write_charset_toggled           (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
 {
-    tmpcfg->write_charset = gtk_toggle_button_get_active (togglebutton);
+    temp_prefs_set_int(temp_prefs, "write_charset",
+                      gtk_toggle_button_get_active(togglebutton));
 }
 
 void



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

Reply via email to