Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv2730/src
Modified Files:
display_playlists.c prefs.c prefs.h prefs_window.c
Log Message:
Moved pm_sort to new prefs.
Index: display_playlists.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/display_playlists.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- display_playlists.c 11 Jun 2006 16:04:46 -0000 1.87
+++ display_playlists.c 13 Jun 2006 06:25:21 -0000 1.88
@@ -846,7 +846,7 @@
gtk_drag_finish (dc, TRUE, FALSE, time);
break;
case GDK_ACTION_MOVE:
- if (prefs_get_pm_sort () != SORT_NONE)
+ if (prefs_get_int("pm_sort") != SORT_NONE)
{
gtkpod_statusbar_message (_("Can't reorder sorted
treeview."));
gtk_drag_finish (dc, FALSE, FALSE, time);
@@ -1583,12 +1583,12 @@
gint cnt = pm_sort_counter (1);
if (cnt >= 3)
{
- prefs_set_pm_sort (SORT_NONE);
+ prefs_set_int("pm_sort", SORT_NONE);
pm_unsort (); /* also resets the sort_counter */
}
else
{
- prefs_set_pm_sort (gtk_tree_view_column_get_sort_order (tvc));
+ prefs_set_int("pm_sort", gtk_tree_view_column_get_sort_order (tvc));
pm_rows_reordered ();
}
}
Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -d -r1.241 -r1.242
--- prefs.c 13 Jun 2006 05:48:55 -0000 1.241
+++ prefs.c 13 Jun 2006 06:25:21 -0000 1.242
@@ -240,6 +240,7 @@
prefs_set_int("case_sensitive", FALSE);
prefs_set_int("tm_autostore", FALSE);
prefs_set_int("st_sort", SORT_NONE);
+ prefs_set_int("pm_sort", SORT_NONE);
}
/* Initialize default variable-length list entries */
@@ -978,6 +979,7 @@
sort = prefs_get_int("st_sort");
sort = correct_sort(sort);
prefs_set_int("st_sort", sort);
+ prefs_set_int("pm_sort", sort);
prefs_set_string ("version", VERSION);
@@ -1855,7 +1857,6 @@
mycfg->display_tooltips_main = TRUE;
mycfg->display_tooltips_prefs = TRUE;
- mycfg->sortcfg.pm_sort = SORT_NONE;
mycfg->sortcfg.tm_sort = SORT_NONE;
mycfg->sortcfg.tm_sortcol = TM_COLUMN_TITLE;
@@ -2021,11 +2022,6 @@
{
/* ignore */
}
- else if(g_ascii_strcasecmp (line, "pm_sort") == 0)
- {
- gint sort = correct_sort (atoi(arg));
- prefs_set_pm_sort(sort);
- }
else if((g_ascii_strcasecmp (line, "tm_sort_") == 0) ||
(g_ascii_strcasecmp (line, "sm_sort_") == 0))
{
@@ -2240,7 +2236,6 @@
fprintf(fp, "offline=%d\n",prefs_get_offline());
fprintf(fp, "display_toolbar=%d\n",prefs_get_display_toolbar());
fprintf(fp, "toolbar_style=%d\n",prefs_get_toolbar_style());
- fprintf(fp, "pm_sort=%d\n",prefs_get_pm_sort());
fprintf(fp, "tm_sort_=%d\n",prefs_get_tm_sort());
fprintf(fp, "tm_sortcol=%d\n",prefs_get_tm_sortcol());
fprintf(fp, "display_tooltips_main=%d\n",
@@ -2494,27 +2489,6 @@
display_show_hide_toolbar ();
}
-gint prefs_get_pm_sort (void)
-{
- return cfg->sortcfg.pm_sort;
-}
-
-void prefs_set_pm_sort (gint i)
-{
- switch (i)
- {
- case SORT_ASCENDING:
- case SORT_DESCENDING:
- case SORT_NONE:
- break;
- default: /* illegal -- ignore */
- gtkpod_warning (_("prefs_set_pm_sort: illegal type '%d' ignored\n"), i);
- return;
- }
-
- cfg->sortcfg.pm_sort = i;
-}
-
gint prefs_get_tm_sort (void)
{
return cfg->sortcfg.tm_sort;
Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- prefs.h 13 Jun 2006 05:48:55 -0000 1.168
+++ prefs.h 13 Jun 2006 06:25:22 -0000 1.169
@@ -261,7 +261,6 @@
gboolean read_prefs_old (GtkWidget *gtkpod, int argc, char *argv[]);
void prefs_set_offline(gboolean active);
-void prefs_set_pm_sort (gint type);
void prefs_set_tm_sort (gint type);
void prefs_set_tm_sortcol (TM_item col);
void prefs_set_md5tracks(gboolean active);
@@ -271,7 +270,6 @@
void prefs_set_statusbar_timeout (guint32 val);
gboolean prefs_get_offline(void);
-gint prefs_get_pm_sort (void);
gint prefs_get_tm_sort (void);
TM_item prefs_get_tm_sortcol (void);
gboolean prefs_get_autoimport(void);
Index: prefs_window.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs_window.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- prefs_window.c 13 Jun 2006 05:48:55 -0000 1.162
+++ prefs_window.c 13 Jun 2006 06:25:22 -0000 1.163
@@ -1615,7 +1615,7 @@
sortcfg_free (tmpsortcfg);
tmpsortcfg = clone_sortprefs();
- switch (tmpsortcfg->pm_sort)
+ switch (temp_prefs_get_int(sort_temp_prefs, "pm_sort"))
{
case SORT_ASCENDING:
w = gtkpod_xml_get_widget (sort_window_xml, "pm_ascend");
@@ -1754,7 +1754,6 @@
tsc = clone_sortprefs ();
- prefs_set_pm_sort (scfg->pm_sort);
prefs_set_tm_sort (scfg->tm_sort);
scfg->tm_sortcol = sort_window_get_sort_col ();
prefs_set_tm_sortcol (scfg->tm_sortcol);
@@ -1816,8 +1815,8 @@
compare_string_fuzzy_generate_keys ();
/* if sort type has changed, initialize display */
- if (tsc->pm_sort != scfg->pm_sort)
- pm_sort (scfg->pm_sort);
+ if (temp_prefs_get_int_value(sort_temp_prefs, "pm_sort", &val))
+ pm_sort (val);
if (temp_prefs_get_int_value(sort_temp_prefs, "st_sort", &val))
st_sort (val);
if ((tsc->tm_sort != scfg->tm_sort) ||
@@ -2071,7 +2070,7 @@
void sort_window_set_pm_sort (gint val)
{
- tmpsortcfg->pm_sort = val;
+ temp_prefs_set_int(sort_temp_prefs, "pm_sort", val);
}
void sort_window_set_st_sort (gint val)
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2