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

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

Moved update_charset to new prefs.


Index: file.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/file.c,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -d -r1.174 -r1.175
--- file.c      12 Jun 2006 03:19:27 -0000      1.174
+++ file.c      13 Jun 2006 03:12:40 -0000      1.175
@@ -1508,7 +1508,7 @@
     if (etr->charset)  charset_set = TRUE;
     else               charset_set = FALSE;
 
-    if (!prefs_get_update_charset () && charset_set)
+    if (!prefs_get_int("update_charset") && charset_set)
     {   /* we should use the initial charset for the update */
        if (prefs_get_charset ())
        {   /* remember the charset originally set */
@@ -1612,7 +1612,7 @@
        display_non_updated (track, _("update failed (format no supported?)"));
     }
 
-    if (!prefs_get_update_charset () && charset_set)
+    if (!prefs_get_int("update_charset") && charset_set)
     {   /* reset charset */
        prefs_set_charset (prefs_charset);
     }

Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -d -r1.237 -r1.238
--- prefs.c     13 Jun 2006 02:57:38 -0000      1.237
+++ prefs.c     13 Jun 2006 03:12:40 -0000      1.238
@@ -234,6 +234,7 @@
     prefs_set_int("multi_edit", FALSE);
     prefs_set_int("not_played_track", TRUE);
     prefs_set_int("misc_track_nr", 25);
+    prefs_set_int("update_charset", FALSE);
 
     /* Set sorting prefs */
     prefs_set_int("case_sensitive", FALSE);
@@ -1822,8 +1823,6 @@
     mycfg->toolbar_style = GTK_TOOLBAR_BOTH;
     mycfg->display_tooltips_main = TRUE;
     mycfg->display_tooltips_prefs = TRUE;
-    mycfg->update_charset = FALSE;
-    mycfg->write_charset = FALSE;
 
     mycfg->sortcfg.pm_sort = SORT_NONE;
     mycfg->sortcfg.st_sort = SORT_NONE;
@@ -2061,10 +2060,6 @@
          {
              prefs_set_display_tooltips_prefs((gboolean)atoi(arg));
          }
-         else if(g_ascii_strcasecmp (line, "update_charset") == 0)
-         {
-             prefs_set_update_charset((gboolean)atoi(arg));
-         }
          else if(g_ascii_strcasecmp (line, "write_charset") == 0)
          {
              prefs_set_write_charset((gboolean)atoi(arg));
@@ -2257,7 +2252,6 @@
            prefs_get_display_tooltips_main());
     fprintf(fp, "display_tooltips_prefs=%d\n",
            prefs_get_display_tooltips_prefs());
-    fprintf(fp, "update_charset=%d\n",prefs_get_update_charset());
     fprintf(fp, "write_charset=%d\n",prefs_get_write_charset());
 }
 
@@ -2470,16 +2464,6 @@
     display_show_hide_toolbar ();
 }
 
-gboolean prefs_get_update_charset (void)
-{
-    return cfg->update_charset;
-}
-
-void prefs_set_update_charset (gboolean val)
-{
-    cfg->update_charset = val;
-}
-
 gboolean prefs_get_write_charset (void)
 {
     return cfg->write_charset;

Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- prefs.h     13 Jun 2006 02:57:38 -0000      1.164
+++ prefs.h     13 Jun 2006 03:12:40 -0000      1.165
@@ -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 update_charset;      /* Update charset when updating track? */
   gboolean write_charset;       /* Use selected charset when writing track? */
   gboolean group_compilations;  /* group compilations when browsing */
   guint32 statusbar_timeout;    /* timeout for statusbar messages */
@@ -289,8 +288,6 @@
 
 gboolean prefs_get_display_toolbar (void);
 void prefs_set_display_toolbar (gboolean val);
-gboolean prefs_get_update_charset (void);
-void prefs_set_update_charset (gboolean val);
 gboolean prefs_get_write_charset (void);
 void prefs_set_write_charset (gboolean val);
 gboolean prefs_get_group_compilations (void);

Index: prefs_window.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs_window.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- prefs_window.c      13 Jun 2006 02:57:38 -0000      1.158
+++ prefs_window.c      13 Jun 2006 03:12:40 -0000      1.159
@@ -439,7 +439,7 @@
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_update_charset");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
-                                tmpcfg->update_charset);
+                                prefs_get_int("update_charset"));
 
     w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_block_display");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
@@ -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_update_charset(tmpcfg->update_charset);
        prefs_set_write_charset(tmpcfg->write_charset);
        tm_show_preferred_columns();
     }
@@ -1248,7 +1247,8 @@
 on_cfg_update_charset_toggled          (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
 {
-    tmpcfg->update_charset = gtk_toggle_button_get_active (togglebutton);
+    temp_prefs_set_int(temp_prefs, "update_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