Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11671/src
Modified Files:
prefs.c prefs.h
Log Message:
Got rid of prefs_validate_path.
Index: prefs.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.c,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- prefs.c 11 Jun 2006 05:10:20 -0000 1.223
+++ prefs.c 11 Jun 2006 05:18:55 -0000 1.224
@@ -2783,63 +2783,13 @@
cfg->last_prefs_page = i;
}
-/* validate the the play_path @path and return a valid copy that has
- * to be freed with g_free when it's not needed any more. */
-/* Rules: - must be '%(member of allowed)'
- - removes all invalid '%' */
-gchar *prefs_validate_path (const gchar *path, const gchar *allowed)
-{
- const gchar *pp;
- gchar *npp, *npath=NULL;
-
- if ((!path) || (strlen (path) == 0)) return g_strdup ("");
- if (!allowed) allowed = "";
-
- npath = g_malloc0 (strlen (path)+1); /* new path can only be shorter
- than old path */
- pp = path;
- npp = npath;
- while (*pp)
- {
- if (*pp == '%')
- {
- if (*(pp+1) && strchr (allowed, *(pp+1)) == NULL)
- {
- if (strlen (allowed) == 0)
- {
- gtkpod_warning (_("'%s': no arguments (%%...) allowed.\n"),
- path);
- }
- else
- {
- gtkpod_warning (_("'%s': only '%%[%s]' allowed.\n"),
- path, allowed);
- }
- ++pp; /* skip '%...' */
- }
- else
- { /* copy '%s' */
- *npp++ = *pp++;
- *npp++ = *pp;
- }
- }
- else
- {
- *npp++ = *pp;
- }
- if (*pp) ++pp; /* increment if we are not at the end */
- }
- return npath;
-}
-
-
gboolean
prefs_get_automount (void)
{
return cfg->automount;
}
-void
+void
prefs_set_automount(gboolean val)
{
cfg->automount = val;
Index: prefs.h
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/prefs.h,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- prefs.h 11 Jun 2006 05:10:20 -0000 1.149
+++ prefs.h 11 Jun 2006 05:18:55 -0000 1.150
@@ -277,7 +277,6 @@
struct cfg* clone_prefs(void);
struct sortcfg* clone_sortprefs(void);
gboolean read_prefs_old (GtkWidget *gtkpod, int argc, char *argv[]);
-gchar *prefs_validate_path (const gchar *path, const gchar *allowed);
void prefs_set_offline(gboolean active);
void prefs_set_pm_sort (gint type);
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2