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

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

Moved case_sensitive to new prefs.


Index: misc.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/misc.c,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -d -r1.203 -r1.204
--- misc.c      11 Jun 2006 16:04:48 -0000      1.203
+++ misc.c      13 Jun 2006 02:57:38 -0000      1.204
@@ -439,7 +439,7 @@
  * depending on prefs settings */
 gint compare_string (const gchar *str1, const gchar *str2)
 {
-    if (prefs_get_case_sensitive ())
+    if (prefs_get_int("case_sensitive"))
        return strcmp (str1, str2);
     else
        return compare_string_case_insensitive (str1, str2);
@@ -565,7 +565,7 @@
        g_free (tempStr);
     }
 
-    if (prefs_get_case_sensitive ())
+    if (prefs_get_int("case_sensitive"))
        result = strcmp(pstr1, pstr2);
     else
        result = g_utf8_collate(pcleanStr1, pcleanStr2);

Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -d -r1.236 -r1.237
--- prefs.c     12 Jun 2006 22:04:26 -0000      1.236
+++ prefs.c     13 Jun 2006 02:57:38 -0000      1.237
@@ -234,6 +234,9 @@
     prefs_set_int("multi_edit", FALSE);
     prefs_set_int("not_played_track", TRUE);
     prefs_set_int("misc_track_nr", 25);
+
+    /* Set sorting prefs */
+    prefs_set_int("case_sensitive", FALSE);
 }
 
 /* Initialize default variable-length list entries */
@@ -1827,7 +1830,6 @@
     mycfg->sortcfg.tm_sort = SORT_NONE;
     mycfg->sortcfg.tm_sortcol = TM_COLUMN_TITLE;
     mycfg->sortcfg.tm_autostore = FALSE;
-    mycfg->sortcfg.case_sensitive = FALSE;
 
     g_free (cfgdir);
 
@@ -2067,10 +2069,6 @@
          {
              prefs_set_write_charset((gboolean)atoi(arg));
          }
-         else if(g_ascii_strcasecmp (line, "case_sensitive") == 0)
-         {
-             prefs_set_case_sensitive((gboolean)atoi(arg));
-         }
          else if(g_ascii_strcasecmp (line, "save_sorted_order") == 0)
          {
              /* ignore option -- has been deleted with 0.53 */
@@ -2261,7 +2259,6 @@
            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());
-    fprintf(fp, "case_sensitive=%d\n",prefs_get_case_sensitive());
 }
 
 
@@ -2493,16 +2490,6 @@
     cfg->write_charset = val;
 }
 
-gboolean prefs_get_case_sensitive (void)
-{
-    return cfg->sortcfg.case_sensitive;
-}
-
-void prefs_set_case_sensitive (gboolean val)
-{
-    cfg->sortcfg.case_sensitive = 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.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- prefs.h     12 Jun 2006 22:04:26 -0000      1.163
+++ prefs.h     13 Jun 2006 02:57:38 -0000      1.164
@@ -102,7 +102,6 @@
     gint tm_sort;            /* sort type for tracks              */
     TM_item tm_sortcol;      /* sort column for tracks            */
     gboolean tm_autostore;   /* save sort order automatically?    */
-    gboolean case_sensitive; /* Should sorting be case-sensitive? */
     GList *tmp_sort_ign_fields; /* used in prefs_window.c only     */
     gchar *tmp_sort_ign_strings;/* used in prefs_window.c only     */
   } sortcfg;
@@ -294,8 +293,6 @@
 void prefs_set_update_charset (gboolean val);
 gboolean prefs_get_write_charset (void);
 void prefs_set_write_charset (gboolean val);
-gboolean prefs_get_case_sensitive (void);
-void prefs_set_case_sensitive (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.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- prefs_window.c      12 Jun 2006 22:04:26 -0000      1.157
+++ prefs_window.c      13 Jun 2006 02:57:38 -0000      1.158
@@ -1669,7 +1669,7 @@
        if((w = gtkpod_xml_get_widget (sort_window_xml, "cfg_case_sensitive")))
        {
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
-                                        tmpsortcfg->case_sensitive);
+                                        prefs_get_int("case_sensitive"));
        }
        /* set standard entry in combo */
        str = gettext (get_tm_string (prefs_get_tm_sortcol ()));
@@ -1757,7 +1757,6 @@
     prefs_set_st_sort (scfg->st_sort);
     prefs_set_tm_sort (scfg->tm_sort);
     prefs_set_tm_autostore (scfg->tm_autostore);
-    prefs_set_case_sensitive (scfg->case_sensitive);
     scfg->tm_sortcol = sort_window_get_sort_col ();
     prefs_set_tm_sortcol (scfg->tm_sortcol);
 
@@ -2088,5 +2087,6 @@
 
 void sort_window_set_case_sensitive (gboolean val)
 {
-    tmpsortcfg->case_sensitive = val;
+    temp_prefs_set_int(sort_temp_prefs, "case_sensitive",
+                      val);
 }



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

Reply via email to