Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26537/src
Modified Files:
display_playlists.c prefs.c prefs.h prefs_window.c
Log Message:
Move mpl_autoselect to new prefs
Index: display_playlists.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/display_playlists.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- display_playlists.c 28 May 2006 04:03:10 -0000 1.83
+++ display_playlists.c 8 Jun 2006 06:10:46 -0000 1.84
@@ -1123,7 +1123,7 @@
/* If it's the first playlist (no playlist selected AND playlist is
the MPL, we select it, unless prefs_get_mpl_autoselect() says
otherwise */
- if (itdb_playlist_is_mpl(playlist) && prefs_get_mpl_autoselect())
+ if (itdb_playlist_is_mpl(playlist) && prefs_get_int("mpl_autoselect"))
{
selection = gtk_tree_view_get_selection (playlist_treeview);
gtk_tree_selection_select_iter (selection, &iter);
@@ -2244,5 +2244,3 @@
{
current_playlist = pl;
}
-
-
Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -d -r1.205 -r1.206
--- prefs.c 8 Jun 2006 05:53:49 -0000 1.205
+++ prefs.c 8 Jun 2006 06:10:46 -0000 1.206
@@ -192,9 +192,11 @@
prefs_set_int_index("col_visible", TM_COLUMN_PLAYCOUNT, TRUE);
prefs_set_int_index("col_visible", TM_COLUMN_RATING, TRUE);
- /* Set pane positions--Let gtk worry about position */
- for (i = 0; i < PANED_NUM; i++)
- prefs_set_int_index("paned_pos_", i, -1);
+ /* Set pane positions--Let gtk worry about position */
+ for (i = 0; i < PANED_NUM; i++)
+ prefs_set_int_index("paned_pos_", i, -1);
+
+ prefs_set_int("mpl_autoselect", TRUE);
}
/* Initialize default variable-length list entries */
@@ -1736,7 +1738,6 @@
mycfg->md5tracks = TRUE;
mycfg->block_display = FALSE;
mycfg->autoimport = FALSE;
- mycfg->mpl_autoselect = TRUE;
mycfg->offline = FALSE;
mycfg->write_extended_info = TRUE;
mycfg->size_gtkpod.x = 600;
@@ -1957,10 +1958,6 @@
{
prefs_set_autoimport((gboolean)atoi(arg));
}
- else if(g_ascii_strcasecmp (line, "mpl_autoselect") == 0)
- {
- prefs_set_mpl_autoselect((gboolean)atoi(arg));
- }
else if(g_ascii_strcasecmp (line, "readtags") == 0)
{
prefs_set_readtags((gboolean)atoi(arg));
@@ -2359,12 +2356,7 @@
}
fprintf(fp, "md5=%d\n",prefs_get_md5tracks ());
fprintf(fp, "block_display=%d\n",prefs_get_block_display());
- fprintf(fp, _("# delete confirmation\n"));
fprintf(fp, "autoimport=%d\n",prefs_get_autoimport());
- fprintf(fp, _("# sort tab: select 'All', last selected page
(=category)\n"));
-
- fprintf(fp, _("# autoselect master playlist?\n"));
- fprintf(fp, "mpl_autoselect=%d\n", prefs_get_mpl_autoselect ());
fprintf(fp, "readtags=%d\n", prefs_get_readtags());
fprintf(fp, "parsetags=%d\n", prefs_get_parsetags());
@@ -2611,16 +2603,6 @@
cfg->autoimport_commandline = val;
}
-gboolean prefs_get_mpl_autoselect (void)
-{
- return cfg->mpl_autoselect;
-}
-
-/* Should the MPL be selected automatically? */
-void prefs_set_mpl_autoselect (gboolean autoselect)
-{
- cfg->mpl_autoselect = autoselect;
-}
/* Returns "$HOME/.gtkpod" and tries to create it if it does not
exist. */
Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- prefs.h 8 Jun 2006 05:53:49 -0000 1.132
+++ prefs.h 8 Jun 2006 06:10:46 -0000 1.133
@@ -117,7 +117,6 @@
gchar *tmp_sort_ign_strings;/* used in prefs_window.c only */
} sortcfg;
gboolean info_window; /* is info window open (will then open on restart */
- gboolean mpl_autoselect;/* select mpl automatically? */
gboolean offline; /* are we working offline, i.e. without iPod? */
gboolean write_extended_info; /* write additional file with PC
filenames etc? */
@@ -314,7 +313,6 @@
void prefs_set_pm_autostore (gboolean active);
void prefs_set_write_extended_info(gboolean active);
void prefs_set_autoimport(gboolean val);
-void prefs_set_mpl_autoselect (gboolean autoselect);
void prefs_set_md5tracks(gboolean active);
void prefs_set_block_display(gboolean active);
void prefs_set_readtags (gboolean active);
@@ -351,7 +349,6 @@
gboolean prefs_get_pm_autostore (void);
gboolean prefs_get_write_extended_info(void);
gboolean prefs_get_autoimport(void);
-gboolean prefs_get_mpl_autoselect (void);
gchar * prefs_get_charset (void);
void prefs_get_size_gtkpod (gint *x, gint *y);
void prefs_get_size_cal (gint *x, gint *y);
Index: prefs_window.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs_window.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- prefs_window.c 8 Jun 2006 05:53:49 -0000 1.134
+++ prefs_window.c 8 Jun 2006 06:10:46 -0000 1.135
@@ -529,7 +529,7 @@
w = gtkpod_xml_get_widget (prefs_window_xml, "cfg_mpl_autoselect");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
- tmpcfg->mpl_autoselect);
+ prefs_get_int("mpl_autoselect"));
for (i=0; i<TM_NUM_TAGS_PREFS; ++i)
{
@@ -718,7 +718,6 @@
prefs_set_parsetags_template(tmpcfg->parsetags_template);
prefs_set_coverart(tmpcfg->coverart);
prefs_set_coverart_template(tmpcfg->coverart_template);
- prefs_set_mpl_autoselect (tmpcfg->mpl_autoselect);
prefs_set_write_extended_info(tmpcfg->write_extended_info);
/* this call well automatically destroy/setup the md5 hash table */
@@ -1134,8 +1133,8 @@
on_cfg_mpl_autoselect_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
- tmpcfg->mpl_autoselect =
- gtk_toggle_button_get_active(togglebutton);
+ temp_prefs_set_int(temp_prefs, "mpl_autoselect",
+
gtk_toggle_button_get_active(togglebutton));
}
void prefs_window_set_autosettags (gint category, gboolean autoset)
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2