Revision: 1697
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1697&view=rev
Author:   phantom_sf
Date:     2007-09-16 11:55:11 -0700 (Sun, 16 Sep 2007)

Log Message:
-----------
- Addition of latest fixes from trunk

Modified Paths:
--------------
    gtkpod/branches/photo_support_branch/ChangeLog_detailed
    gtkpod/branches/photo_support_branch/scripts/Makefile.am
    gtkpod/branches/photo_support_branch/src/file_convert.c
    gtkpod/branches/photo_support_branch/src/file_itunesdb.c
    gtkpod/branches/photo_support_branch/src/misc.c
    gtkpod/branches/photo_support_branch/src/prefs.c

Added Paths:
-----------
    gtkpod/branches/photo_support_branch/scripts/convert-2m4a.sh
    gtkpod/branches/photo_support_branch/scripts/convert-2mp3.sh
    gtkpod/branches/photo_support_branch/scripts/gtkpod-convert-common.sh

Removed Paths:
-------------
    gtkpod/branches/photo_support_branch/scripts/convert-flac2m4a.sh
    gtkpod/branches/photo_support_branch/scripts/convert-flac2mp3.sh
    gtkpod/branches/photo_support_branch/scripts/convert-m4a2mp3.sh
    gtkpod/branches/photo_support_branch/scripts/convert-mp32m4a.sh
    gtkpod/branches/photo_support_branch/scripts/convert-ogg2m4a.sh
    gtkpod/branches/photo_support_branch/scripts/convert-ogg2mp3.sh
    gtkpod/branches/photo_support_branch/scripts/convert-wav2m4a.sh
    gtkpod/branches/photo_support_branch/scripts/convert-wav2mp3.sh

Property Changed:
----------------
    gtkpod/branches/photo_support_branch/data/

Modified: gtkpod/branches/photo_support_branch/ChangeLog_detailed
===================================================================
--- gtkpod/branches/photo_support_branch/ChangeLog_detailed     2007-09-16 
18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/ChangeLog_detailed     2007-09-16 
18:55:11 UTC (rev 1697)
@@ -1,14 +1,37 @@
+2007-09-15 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+       * src/file_itunesdb.c (gp_load_ipod): make sure the ipod model
+         number is known and written to the iPod before loading the
+         iTunesDB. If the model number is not known at the time of
+         loading the iTunesDB, libgpod will not read the ArtworkDB,
+         thereby losing all artwork.
+
+       * scripts/ removed previous
+         convert-{flac|ogg|mp3|m4a|wav}2{mp3|m4a} scripts and
+         replaced with convert-2{mp3|m4a} drafted by Peter van der
+         Does. These scripts share gtkpod-convert-common.sh.
+
+         scripts/Makefile.am: added/removed the files mentioned above.
+
+       * src/prefs.c: automatically replace prefs settings to use the
+          new generic conversion scripts.
+
+2007-09-02  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+       * scripts/convert-m4a2mp3.sh: fixed a typo, spotted by Peter
+         van der Does.
+
 2007-08-26 P.G. Richardson <phantom_sf at users.sourceforge.net>
 
-  * src/fetchcover.c
-  * src/fetchcover.h
-  * src/display_coverart.c
-  * src/details.c
-  * src/context_menus.c
-  * gtkpod.glade
+       * src/fetchcover.c
+       * src/fetchcover.h
+       * src/display_coverart.c
+       * src/details.c
+       * src/context_menus.c
+       * gtkpod.glade
   
-  Commented out fetchcover due to licensing problems. Wiil re-enable
-  once a new approach has been fully considered.
+       Commented out fetchcover due to licensing problems. Wiil re-enable
+       once a new approach has been fully considered.
 
 2007-08-25 Jorg Schuler <jcsjcs at users.sourceforge.net>
 


Property changes on: gtkpod/branches/photo_support_branch/data
___________________________________________________________________
Name: svn:ignore
   - Makefile.in.in
Makefile.in
Makefile
POTFILES
*.gmo
*.desktop

   + Makefile.in.in
Makefile.in
Makefile
POTFILES
*.gmo
*.desktop
nocover_found.png


Modified: gtkpod/branches/photo_support_branch/scripts/Makefile.am
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/Makefile.am    2007-09-16 
18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/Makefile.am    2007-09-16 
18:55:11 UTC (rev 1697)
@@ -20,16 +20,9 @@
        sync-webcalendar.sh \
        ldif2vcf.sh \
        mab2vcard \
-       convert-ogg2mp3.sh \
-       convert-ogg2m4a.sh \
-       convert-flac2mp3.sh \
-        convert-flac2m4a.sh \
-        convert-m4a2mp3.sh \
-        convert-mp32m4a.sh \
-        convert-ogg2mp3.sh \
-        convert-ogg2m4a.sh \
-        convert-wav2mp3.sh \
-        convert-wav2m4a.sh
+       convert-2mp3.sh \
+       convert-2m4a.sh \
+       gtkpod-convert-common.sh 
 
 # these scripts will of course also go in the distribution tarball.
 EXTRA_DIST=$(script_SCRIPTS)

Copied: gtkpod/branches/photo_support_branch/scripts/convert-2m4a.sh (from rev 
1696, gtkpod/trunk/scripts/convert-2m4a.sh)
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-2m4a.sh                
                (rev 0)
+++ gtkpod/branches/photo_support_branch/scripts/convert-2m4a.sh        
2007-09-16 18:55:11 UTC (rev 1697)
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Script that converts a file into an m4a file
+#
+# USAGE:
+#
+# convert-2m4a.sh [options] inputfile
+#
+# For a list of allowed options please consult gtkpod-convert-common.sh
+#
+# STDOUT's last line is the converted filename.
+# Return Codes:
+#   0 ok
+#   1 input file not found
+#   2 output file cannot be created
+#   3 cannot get info
+#   4 cannot exec decoding
+#   5 cannot exec encoding
+#   6 conversion failed
+#   7 unknown option
+#
+
+# Constants
+extension="m4a"
+ENCODER_OPTS="-q 150 -c 22000"
+ENCODER="faac"
+
+. ${0%/*}/gtkpod-convert-common.sh
+
+if [ $filetype = "wav" ]; then
+    "$encoder" -o "$outfile" $ENCODER_OPTS -w --artist "$artist" --title 
"$title" --year "$year" --album "$album" --track "$track" --genre "$genre" 
--comment "$comment" "$infile"
+else
+    "$decoder" $options "$infile" | "$encoder" -o "$outfile" $ENCODER_OPTS -w 
--artist "$artist" --title "$title" --year "$year" --album "$album" --track 
"$track" --genre "$genre" --comment "$comment" -
+fi
+# Check result
+if [ "x$?" != "x0" ]; then
+    exit 6
+fi
+
+# Seems to be ok: display filename for gtkpod
+echo $outfile
+exit 0

Copied: gtkpod/branches/photo_support_branch/scripts/convert-2mp3.sh (from rev 
1696, gtkpod/trunk/scripts/convert-2mp3.sh)
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-2mp3.sh                
                (rev 0)
+++ gtkpod/branches/photo_support_branch/scripts/convert-2mp3.sh        
2007-09-16 18:55:11 UTC (rev 1697)
@@ -0,0 +1,58 @@
+#!/bin/sh
+# Script that converts a file into an mp3 file
+#
+# USAGE:
+#
+# convert-2mp3.sh [options] inputfile
+#
+# For a list of allowed options please consult gtkpod-convert-common.sh
+#
+# STDOUT's last line is the converted filename.
+# Return Codes:
+#   0 ok
+#   1 input file not found
+#   2 output file cannot be created
+#   3 cannot get info
+#   4 cannot exec decoding
+#   5 cannot exec encoding
+#   6 conversion failed
+#   7 unknown option
+#
+
+# Constants
+extension="mp3"
+ENCODER_OPTS="--preset standard"
+ENCODER="lame"
+
+. ${0%/*}/gtkpod-convert-common.sh
+
+# Check if the genre is one which lame supports
+if [ -n "$genre" ] && `"$encoder" --genre-list | grep -qi "\b$genre\b"`; then
+    genreopt="--tg \"$genre\""
+else
+    # check for id3v2
+    id3v2=`which id3v2`
+    if [ -n "$id3v2" ]; then
+        useid3v2=1
+    fi
+fi
+
+if [ $filetype = "wav" ]; then
+    "$encoder" $ENCODER_OPTS --add-id3v2 --tt "$title" --ta "$artist" --tl 
"$album" --ty "$year" --tc "$comment" --tn "$track" "$genreopt" "$infile" 
"$outfile"
+else
+    "$decoder" $options "$infile" | "$encoder" $ENCODER_OPTS --add-id3v2 --tt 
"$title" --ta "$artist" --tl "$album" --ty "$year" --tc "$comment" --tn 
"$track" "$genreopt" - "$outfile"
+fi
+# Check result
+if [ "x$?" != "x0" ]; then
+    exit 6
+fi
+
+# Try to set the genre with id3v2 if needed.  This may fail as older versions 
of
+# id3v2 did not support genre strings in place of numeric genre id's
+if [ -n "$useid3v2" ]; then
+    $id3v2 -g "$genre" "$mp3file" || :
+fi
+
+# Seems to be ok: display filename for gtkpod
+echo $outfile
+exit 0

Deleted: gtkpod/branches/photo_support_branch/scripts/convert-flac2m4a.sh
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-flac2m4a.sh    
2007-09-16 18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/convert-flac2m4a.sh    
2007-09-16 18:55:11 UTC (rev 1697)
@@ -1,98 +0,0 @@
-#!/bin/sh
-# Simple script that converts a flac file into an m4a file
-#
-# USAGE:
-#
-# convert-flac2m4a.sh [options] flacfile
-#
-#       -x      Print converted filename extension and exit
-#       -f      Set converted filename
-#      -a      Artist tag
-#      -A      Album tag
-#      -T      Track tag
-#      -t      Title tag
-#      -g      Genre tag
-#      -y      Year tag
-#      -c      Comment tag
-#
-# STDOUT's last line is the converted filename.
-# Return Codes:
-#   0 ok
-#   1 input file not found
-#   2 output file cannot be created
-#   3 cannot get info
-#   4 cannot exec decoding
-#   5 cannot exec encoding
-#   6 conversion failed
-#   7 unknown option
-
-# Constants
-extension="m4a"
-
-# Get parameters
-while getopts a:A:T:t:g:c:y:f:x opt ; do
-       case "$opt" in
-               x)      echo "$extension"; exit 0 ;;
-               f)      outfile="$OPTARG" ;;
-               a)      artist="$OPTARG" ;;
-               A)      album="$OPTARG" ;;
-               T)      track="$OPTARG" ;;
-               t)      title="$OPTARG" ;;
-               g)      genre="$OPTARG" ;;
-               y)      year="$OPTARG" ;;
-               c)      comment="$OPTARG" ;;
-               ?)      exit 7 ;;
-       esac
-done
-shift $(($OPTIND - 1))
-infile="$1"
-
-if [ "$outfile" = "" ]; then
-    # Build output file
-    outfile=`basename "$infile"`
-    outfile=${outfile%%.flac}
-    outfile="/tmp/$outfile.$extension"
-fi
-
-# Default values
-[ -z "$comment" ] && comment="Encoded for gtkpod with faac"
-
-#echo "Converting \"$infile\" into \"$outfile\""
-
-# Checking input file
-if [ "$infile" = "" ]; then
-    exit 1
-fi
-if [ ! -f "$infile" ]; then
-    exit 1
-fi
-
-# Checking output file
-touch "$outfile"
-if [ "x$?" != "x0" ]; then
-    exit 2
-fi
-
-# Check for the existence of flac
-flac=`which flac`
-if [ -z "$flac" ]; then
-    exit 4
-fi
-
-# Check for the existence of faac
-faac=`which faac`
-if [ -z "$faac" ]; then
-    exit 5
-fi
-
-# Launch command
-exec "$flac" -d -c -- "$infile" | "$faac" -o "$outfile" -q 150 -c 22000 -w 
--artist "$artist" --title "$title" --year "$year" --album "$album" --track 
"$track" --genre "$genre" --comment "$comment" -
-
-# Check result
-if [ "x$?" != "x0" ]; then
-    exit 6
-fi
-
-# Seems to be ok: display filename for gtkpod
-echo $outfile
-exit 0

Deleted: gtkpod/branches/photo_support_branch/scripts/convert-flac2mp3.sh
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-flac2mp3.sh    
2007-09-16 18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/convert-flac2mp3.sh    
2007-09-16 18:55:11 UTC (rev 1697)
@@ -1,115 +0,0 @@
-#!/bin/sh
-# Simple script that converts a flac file into an mp3 file
-#
-# USAGE:
-#
-# convert-flac2mp3.sh [options] flacfile
-#
-#       -x      Print converted filename extension and exit
-#       -f      Set converted filename
-#      -a      Artist tag
-#      -A      Album tag
-#      -T      Track tag
-#      -t      Title tag
-#      -g      Genre tag
-#      -y      Year tag
-#      -c      Comment tag
-#
-# STDOUT's last line is the converted filename.
-# Return Codes:
-#   0 ok
-#   1 input file not found
-#   2 output file cannot be created
-#   3 cannot get info
-#   4 cannot exec decoding
-#   5 cannot exec encoding
-#   6 conversion failed
-#   7 unknown option
-
-# Constants
-extension="mp3"
-
-# Get parameters
-while getopts a:A:T:t:g:c:y:f:x opt ; do
-       case "$opt" in
-               x)      echo "$extension"; exit 0 ;;
-               f)      outfile="$OPTARG" ;;
-               a)      artist="$OPTARG" ;;
-               A)      album="$OPTARG" ;;
-               T)      track="$OPTARG" ;;
-               t)      title="$OPTARG" ;;
-               g)      genre="$OPTARG" ;;
-               y)      year="$OPTARG" ;;
-               c)      comment="$OPTARG" ;;
-               ?)      exit 7 ;;
-       esac
-done
-shift $(($OPTIND - 1))
-infile="$1"
-
-if [ "$outfile" = "" ]; then
-    # Build output file
-    outfile=`basename "$infile"`
-    outfile=${outfile%%.flac}
-    outfile="/tmp/$outfile.$extension"
-fi
-
-# Default values
-[ -z "$comment" ] && comment="Encoded for gtkpod with lame"
-
-#echo "Converting \"$infile\" into \"$outfile\""
-
-# Checking input file
-if [ "$infile" = "" ]; then
-    exit 1
-fi
-if [ ! -f "$infile" ]; then
-    exit 1
-fi
-
-# Checking output file
-touch "$outfile"
-if [ "x$?" != "x0" ]; then
-    exit 2
-fi
-
-# Check for the existence of flac
-flac=`which flac`
-if [ -z "$flac" ]; then
-    exit 4
-fi
-
-# Check for the existence of lame
-lame=`which lame`
-if [ -z "$lame" ]; then
-    exit 5
-fi
-
-# Check if the genre is one which lame supports
-if [ -n "$genre" ] && `$lame --genre-list | grep -qi "\b$genre\b"`; then
-    genreopt="--tg \"$genre\""
-else
-    # check for id3v2
-    id3v2=`which id3v2`
-    if [ -n "$id3v2" ]; then
-        useid3v2=1
-    fi
-fi
-
-# Launch command
-exec "$flac" -d -c -- "$infile" | "$lame" --preset standard --add-id3v2 --tt 
"$title" --ta "$artist" --tl "$album" --ty "$year" --tc "$comment" --tn 
"$track" "$genreopt" - "$outfile"
-
-# Check result
-if [ "x$?" != "x0" ]; then
-    exit 6
-fi
-
-# Try to set the genre with id3v2 if needed.  This may fail as older versions 
of
-# id3v2 did not support genre strings in place of numeric genre id's
-if [ -n "$useid3v2" ]; then
-    $id3v2 -g "$genre" "$mp3file" || :
-fi
-
-# Seems to be ok: display filename for gtkpod
-echo $outfile
-exit 0

Deleted: gtkpod/branches/photo_support_branch/scripts/convert-m4a2mp3.sh
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-m4a2mp3.sh     
2007-09-16 18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/convert-m4a2mp3.sh     
2007-09-16 18:55:11 UTC (rev 1697)
@@ -1,97 +0,0 @@
-#!/bin/sh
-# Simple script that converts an m4a file into an mp3 file
-#
-# USAGE:
-#
-# convert-m4a2mp3.sh [options] m4afile
-#
-#       -x      Print converted filename extension and exit
-#       -f      Set converted filename
-#      -a      Artist tag
-#      -A      Album tag
-#      -T      Track tag
-#      -t      Title tag
-#      -g      Genre tag
-#      -y      Year tag
-#      -c      Comment tag
-#
-# STDOUT's last line is the converted filename.
-# Return Codes:
-#   0 ok
-#   1 input file not found
-#   2 output file cannot be created
-#   3 cannot get info
-#   4 cannot exec decoding
-#   5 cannot exec encoding
-#   6 conversion failed
-#   7 unknown option
-
-# Constants
-extension="mp3"
-
-# Get parameters
-while getopts a:A:T:t:g:c:y:f:x opt ; do
-       case "$opt" in
-               x)      echo "$extension"; exit 0 ;;
-               f)      outfile="$OPTARG" ;;
-               a)      artist="$OPTARG" ;;
-               A)      album="$OPTARG" ;;
-               T)      track="$OPTARG" ;;
-               t)      title="$OPTARG" ;;
-               g)      genre="$OPTARG" ;;
-               y)      year="$OPTARG" ;;
-               c)      comment="$OPTARG" ;;
-               ?)      exit 7 ;;
-       esac
-done
-shift $(($OPTIND - 1))
-infile="$1"
-
-if [ "$outfile" = "" ]; then
-    # Build output file
-    outfile=`basename "$infile"`
-    outfile=${outfile%%.flac}
-    outfile="/tmp/$outfile.$extension"
-fi
-
-# Default values
-[ -z "$comment" ] && comment="Encoded for gtkpod with lame"
-
-#echo "Converting \"$infile\" into \"$outfile\""
-
-# Checking input file
-if [ "$infile" = "" ]; then
-    exit 1
-fi
-if [ ! -f "$infile" ]; then
-    exit 1
-fi
-
-# Checking output file
-touch "$outfile"
-if [ "x$?" != "x0" ]; then
-    exit 2
-fi
-
-# Check for the existence of faad
-faac=`which faad`
-if [ -z "$faad" ]; then
-    exit 4
-fi
-
-# Check for the existence of lame
-lame=`which lame`
-if [ -z "$lame" ]; then
-    exit 5
-fi
-
-# Launch command
-exec "$faad" -o - "$infile" | "$lame" --preset standard --add-id3v2 --tt 
"$title" --ta "$artist" --tl "$album" --ty "$year" --tc "$comment" --tn 
"$track" --tg "$genre" - "$outfile"
-
-# Check result
-if [ "x$?" != "x0" ]; then
-    exit 6
-fi
-# Seems to be ok: display filename for gtkpod
-echo $outfile
-exit 0

Deleted: gtkpod/branches/photo_support_branch/scripts/convert-mp32m4a.sh
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-mp32m4a.sh     
2007-09-16 18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/convert-mp32m4a.sh     
2007-09-16 18:55:11 UTC (rev 1697)
@@ -1,97 +0,0 @@
-#!/bin/sh
-# Simple script that converts an mp3 file into an m4a file
-#
-# USAGE:
-#
-# convert-mp32m4a.sh [options] mp3file
-#
-#       -x      Print converted filename extension and exit
-#       -f      Set converted filename
-#      -a      Artist tag
-#      -A      Album tag
-#      -T      Track tag
-#      -t      Title tag
-#      -g      Genre tag
-#      -y      Year tag
-#      -c      Comment tag
-#
-# STDOUT's last line is the converted filename.
-# Return Codes:
-#   0 ok
-#   1 input file not found
-#   2 output file cannot be created
-#   3 cannot get info
-#   4 cannot exec decoding
-#   5 cannot exec encoding
-#   6 conversion failed
-#   7 unknown option
-
-# Constants
-extension="m4a"
-
-# Get parameters
-while getopts a:A:T:t:g:c:y:f:x opt ; do
-       case "$opt" in
-               x)      echo "$extension"; exit 0 ;;
-               f)      outfile="$OPTARG" ;;
-               a)      artist="$OPTARG" ;;
-               A)      album="$OPTARG" ;;
-               T)      track="$OPTARG" ;;
-               t)      title="$OPTARG" ;;
-               g)      genre="$OPTARG" ;;
-               y)      year="$OPTARG" ;;
-               c)      comment="$OPTARG" ;;
-               ?)      exit 7 ;;
-       esac
-done
-shift $(($OPTIND - 1))
-infile="$1"
-
-if [ "$outfile" = "" ]; then
-    # Build output file
-    outfile=`basename "$infile"`
-    outfile=${outfile%%.flac}
-    outfile="/tmp/$outfile.$extension"
-fi
-
-# Default values
-[ -z "$comment" ] && comment="Encoded for gtkpod with faac"
-
-#echo "Converting \"$infile\" into \"$outfile\""
-
-# Checking input file
-if [ "$infile" = "" ]; then
-    exit 1
-fi
-if [ ! -f "$infile" ]; then
-    exit 1
-fi
-
-# Checking output file
-touch "$outfile"
-if [ "x$?" != "x0" ]; then
-    exit 2
-fi
-
-# Check for the existence of lame
-lame=`which lame`
-if [ -z "$lame" ]; then
-    exit 4
-fi
-
-# Check for the existence of faac
-faac=`which faac`
-if [ -z "$faac" ]; then
-    exit 5
-fi
-
-# Launch command
-exec "$lame" --decode "$infile" - | "$faac" -o "$outfile" -q 150 -c 22000 -w 
--artist "$artist" --title "$title" --year "$year" --album "$album" --track 
"$track" --genre "$genre" --comment "$comment" -
-
-# Check result
-if [ "x$?" != "x0" ]; then
-    exit 6
-fi
-# Seems to be ok: display filename for gtkpod
-echo $outfile
-exit 0

Deleted: gtkpod/branches/photo_support_branch/scripts/convert-ogg2m4a.sh
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-ogg2m4a.sh     
2007-09-16 18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/convert-ogg2m4a.sh     
2007-09-16 18:55:11 UTC (rev 1697)
@@ -1,97 +0,0 @@
-#!/bin/sh
-# Simple script that converts a ogg file into an m4a file
-#
-# USAGE:
-#
-# convert-ogg2m4a.sh [options] oggfile
-#
-#       -x      Print converted filename extension and exit
-#       -f      Set converted filename
-#      -a      Artist tag
-#      -A      Album tag
-#      -T      Track tag
-#      -t      Title tag
-#      -g      Genre tag
-#      -y      Year tag
-#      -c      Comment tag
-#
-# STDOUT's last line is the converted filename.
-# Return Codes:
-#   0 ok
-#   1 input file not found
-#   2 output file cannot be created
-#   3 cannot get info
-#   4 cannot exec decoding
-#   5 cannot exec encoding
-#   6 conversion failed
-#   7 unknown option
-
-# Constants
-extension="m4a"
-
-# Get parameters
-while getopts a:A:T:t:g:c:y:f:x opt ; do
-       case "$opt" in
-               x)      echo "$extension"; exit 0 ;;
-               f)      outfile="$OPTARG" ;;
-               a)      artist="$OPTARG" ;;
-               A)      album="$OPTARG" ;;
-               T)      track="$OPTARG" ;;
-               t)      title="$OPTARG" ;;
-               g)      genre="$OPTARG" ;;
-               y)      year="$OPTARG" ;;
-               c)      comment="$OPTARG" ;;
-               ?)      exit 7 ;;
-       esac
-done
-shift $(($OPTIND - 1))
-infile="$1"
-
-if [ "$outfile" = "" ]; then
-    # Build output file
-    outfile=`basename "$infile"`
-    outfile=${outfile%%.flac}
-    outfile="/tmp/$outfile.$extension"
-fi
-
-# Default values
-[ -z "$comment" ] && comment="Encoded for gtkpod with faac"
-
-#echo "Converting \"$infile\" into \"$outfile\""
-
-# Checking input file
-if [ "$infile" = "" ]; then
-    exit 1
-fi
-if [ ! -f "$infile" ]; then
-    exit 1
-fi
-
-# Checking output file
-touch "$outfile"
-if [ "x$?" != "x0" ]; then
-    exit 2
-fi
-
-# Check for the existence of oggdec
-oggdec=`which oggdec`
-if [ -z "$oggdec" ]; then
-    exit 4
-fi
-
-# Check for the existence of faac
-faac=`which faac`
-if [ -z "$faac" ]; then
-    exit 5
-fi
-
-# Launch command
-exec "$oggdec" --output - -- "$infile" | "$faac" -o "$outfile" -q 150 -c 22000 
-w --artist "$artist" --title "$title" --year "$year" --album "$album" --track 
"$track" --genre "$genre" --comment "$comment" -
-
-# Check result
-if [ "x$?" != "x0" ]; then
-    exit 6
-fi
-# Seems to be ok: display filename for gtkpod
-echo $outfile
-exit 0

Deleted: gtkpod/branches/photo_support_branch/scripts/convert-ogg2mp3.sh
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-ogg2mp3.sh     
2007-09-16 18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/convert-ogg2mp3.sh     
2007-09-16 18:55:11 UTC (rev 1697)
@@ -1,115 +0,0 @@
-#!/bin/sh
-# Simple script that converts a ogg file into an mp3 file
-#
-# USAGE:
-#
-# convert-ogg2mp3.sh [options] oggfile
-#
-#       -x      Print converted filename extension and exit
-#       -f      Set converted filename
-#      -a      Artist tag
-#      -A      Album tag
-#      -T      Track tag
-#      -t      Title tag
-#      -g      Genre tag
-#      -y      Year tag
-#      -c      Comment tag
-#
-# STDOUT's last line is the converted filename.
-# Return Codes:
-#   0 ok
-#   1 input file not found
-#   2 output file cannot be created
-#   3 cannot get info
-#   4 cannot exec decoding
-#   5 cannot exec encoding
-#   6 conversion failed
-#   7 unknown option
-
-# Constants
-extension="mp3"
-
-# Get parameters
-while getopts a:A:T:t:g:c:y:f:x opt ; do
-       case "$opt" in
-               x)      echo "$extension"; exit 0 ;;
-               f)      outfile="$OPTARG" ;;
-               a)      artist="$OPTARG" ;;
-               A)      album="$OPTARG" ;;
-               T)      track="$OPTARG" ;;
-               t)      title="$OPTARG" ;;
-               g)      genre="$OPTARG" ;;
-               y)      year="$OPTARG" ;;
-               c)      comment="$OPTARG" ;;
-               ?)      exit 7 ;;
-       esac
-done
-shift $(($OPTIND - 1))
-infile="$1"
-
-if [ "$outfile" = "" ]; then
-    # Build output file
-    outfile=`basename "$infile"`
-    outfile=${outfile%%.flac}
-    outfile="/tmp/$outfile.$extension"
-fi
-
-# Default values
-[ -z "$comment" ] && comment="Encoded for gtkpod with lame"
-
-#echo "Converting \"$infile\" into \"$outfile\""
-
-# Checking input file
-if [ "$infile" = "" ]; then
-    exit 1
-fi
-if [ ! -f "$infile" ]; then
-    exit 1
-fi
-
-# Checking output file
-touch "$outfile"
-if [ "x$?" != "x0" ]; then
-    exit 2
-fi
-
-# Check for the existence of oggdec
-oggdec=`which oggdec`
-if [ -z "$oggdec" ]; then
-    exit 4
-fi
-
-# Check for the existence of lame
-lame=`which lame`
-if [ -z "$lame" ]; then
-    exit 5
-fi
-
-# Check if the genre is one which lame supports
-if [ -n "$genre" ] && `$lame --genre-list | grep -qi "\b$genre\b"`; then
-    genreopt="--tg \"$genre\""
-else
-    # check for id3v2
-    id3v2=`which id3v2`
-    if [ -n "$id3v2" ]; then
-        useid3v2=1
-    fi
-fi
-
-# Launch command
-exec "$oggdec" --output - -- "$infile" | "$lame" --preset standard --add-id3v2 
--tt "$title" --ta "$artist" --tl "$album" --ty "$year" --tc "$comment" --tn 
"$track" "$genreopt" - "$outfile"
-
-# Check result
-if [ "x$?" != "x0" ]; then
-    exit 6
-fi
-
-# Try to set the genre with id3v2 if needed.  This may fail as older versions 
of
-# id3v2 did not support genre strings in place of numeric genre id's
-if [ -n "$useid3v2" ]; then
-    $id3v2 -g "$genre" "$outfile" || :
-fi
-
-# Seems to be ok: display filename for gtkpod
-echo $outfile
-exit 0

Deleted: gtkpod/branches/photo_support_branch/scripts/convert-wav2m4a.sh
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-wav2m4a.sh     
2007-09-16 18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/convert-wav2m4a.sh     
2007-09-16 18:55:11 UTC (rev 1697)
@@ -1,91 +0,0 @@
-#!/bin/sh
-# Simple script that converts a wav file into an m4a file
-#
-# USAGE:
-#
-# convert-wav2m4a.sh [options] wavfile
-#
-#       -x      Print converted filename extension and exit
-#       -f      Set converted filename
-#      -a      Artist tag
-#      -A      Album tag
-#      -T      Track tag
-#      -t      Title tag
-#      -g      Genre tag
-#      -y      Year tag
-#      -c      Comment tag
-#
-# STDOUT's last line is the converted filename.
-# Return Codes:
-#   0 ok
-#   1 input file not found
-#   2 output file cannot be created
-#   3 cannot get info
-#   4 cannot exec decoding
-#   5 cannot exec encoding
-#   6 conversion failed
-#   7 unknown option
-
-# Constants
-extension="m4a"
-
-# Get parameters
-while getopts a:A:T:t:g:c:y:f:x opt ; do
-       case "$opt" in
-               x)      echo "$extension"; exit 0 ;;
-               f)      outfile="$OPTARG" ;;
-               a)      artist="$OPTARG" ;;
-               A)      album="$OPTARG" ;;
-               T)      track="$OPTARG" ;;
-               t)      title="$OPTARG" ;;
-               g)      genre="$OPTARG" ;;
-               y)      year="$OPTARG" ;;
-               c)      comment="$OPTARG" ;;
-               ?)      exit 7 ;;
-       esac
-done
-shift $(($OPTIND - 1))
-infile="$1"
-
-if [ "$outfile" = "" ]; then
-    # Build output file
-    outfile=`basename "$infile"`
-    outfile=${outfile%%.flac}
-    outfile="/tmp/$outfile.$extension"
-fi
-
-# Default values
-[ -z "$comment" ] && comment="Encoded for gtkpod with faac"
-
-#echo "Converting \"$infile\" into \"$outfile\""
-
-# Checking input file
-if [ "$infile" = "" ]; then
-    exit 1
-fi
-if [ ! -f "$infile" ]; then
-    exit 1
-fi
-
-# Checking output file
-touch "$outfile"
-if [ "x$?" != "x0" ]; then
-    exit 2
-fi
-
-# Check for the existence of faac
-faac=`which faac`
-if [ -z "$faac" ]; then
-    exit 5
-fi
-
-# Launch command
-"$faac" -o "$outfile" -q 150 -c 22000 -w --artist "$artist" --title "$title" 
--year "$year" --album "$album" --track "$track" --genre "$genre" --comment 
"$comment" "$infile"
-
-# Check result
-if [ "x$?" != "x0" ]; then
-    exit 6
-fi
-# Seems to be ok: display filename for gtkpod
-echo $outfile
-exit 0

Deleted: gtkpod/branches/photo_support_branch/scripts/convert-wav2mp3.sh
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/convert-wav2mp3.sh     
2007-09-16 18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/scripts/convert-wav2mp3.sh     
2007-09-16 18:55:11 UTC (rev 1697)
@@ -1,109 +0,0 @@
-#!/bin/sh
-# Simple script that converts a wav file into an mp3 file
-#
-# USAGE:
-#
-# convert-wav2mp3.sh [options] wavfile
-#
-#       -x      Print converted filename extension and exit
-#       -f      Set converted filename
-#      -a      Artist tag
-#      -A      Album tag
-#      -T      Track tag
-#      -t      Title tag
-#      -g      Genre tag
-#      -y      Year tag
-#      -c      Comment tag
-#
-# STDOUT's last line is the converted filename.
-# Return Codes:
-#   0 ok
-#   1 input file not found
-#   2 output file cannot be created
-#   3 cannot get info
-#   4 cannot exec decoding
-#   5 cannot exec encoding
-#   6 conversion failed
-#   7 unknown option
-
-# Constants
-extension="mp3"
-
-# Get parameters
-while getopts a:A:T:t:g:c:y:f:x opt ; do
-       case "$opt" in
-               x)      echo "$extension"; exit 0 ;;
-               f)      outfile="$OPTARG" ;;
-               a)      artist="$OPTARG" ;;
-               A)      album="$OPTARG" ;;
-               T)      track="$OPTARG" ;;
-               t)      title="$OPTARG" ;;
-               g)      genre="$OPTARG" ;;
-               y)      year="$OPTARG" ;;
-               c)      comment="$OPTARG" ;;
-               ?)      exit 7 ;;
-       esac
-done
-shift $(($OPTIND - 1))
-infile="$1"
-
-if [ "$outfile" = "" ]; then
-    # Build output file
-    outfile=`basename "$infile"`
-    outfile=${outfile%%.flac}
-    outfile="/tmp/$outfile.$extension"
-fi
-
-# Default values
-[ -z "$comment" ] && comment="Encoded for gtkpod with lame"
-
-#echo "Converting \"$infile\" into \"$outfile\""
-
-# Checking input file
-if [ "$infile" = "" ]; then
-    exit 1
-fi
-if [ ! -f "$infile" ]; then
-    exit 1
-fi
-
-# Checking output file
-touch "$outfile"
-if [ "x$?" != "x0" ]; then
-    exit 2
-fi
-
-# Check for the existence of lame
-lame=`which lame`
-if [ -z "$lame" ]; then
-    exit 5
-fi
-
-# Check if the genre is one which lame supports
-if [ -n "$genre" ] && `$lame --genre-list | grep -qi "\b$genre\b"`; then
-    genreopt="--tg \"$genre\""
-else
-    # check for id3v2
-    id3v2=`which id3v2`
-    if [ -n "$id3v2" ]; then
-        useid3v2=1
-    fi
-fi
-
-# Launch command
-"$lame" --preset standard --add-id3v2 --tt "$title" --ta "$artist" --tl 
"$album" --ty "$year" --tc "$comment" --tn "$track" "$genreopt" "$infile" 
"$outfile"
-
-# Check result
-if [ "x$?" != "x0" ]; then
-    exit 6
-fi
-
-# Try to set the genre with id3v2 if needed.  This may fail as older versions 
of
-# id3v2 did not support genre strings in place of numeric genre id's
-if [ -n "$useid3v2" ]; then
-    $id3v2 -g "$genre" "$outfile" || :
-fi
-
-# Seems to be ok: display filename for gtkpod
-echo $outfile
-exit 0

Copied: gtkpod/branches/photo_support_branch/scripts/gtkpod-convert-common.sh 
(from rev 1696, gtkpod/trunk/scripts/gtkpod-convert-common.sh)
===================================================================
--- gtkpod/branches/photo_support_branch/scripts/gtkpod-convert-common.sh       
                        (rev 0)
+++ gtkpod/branches/photo_support_branch/scripts/gtkpod-convert-common.sh       
2007-09-16 18:55:11 UTC (rev 1697)
@@ -0,0 +1,106 @@
+#!/bin/sh
+# Script that converts a file into an mp3 or an m4a file
+#
+# USAGE:
+#
+# Called by convert-2mp3.sh and convert-2m4a.sh.
+#
+# The following command line arguments are being used
+#
+#       -x      Print converted filename extension and exit
+#       -f      Set converted filename
+#      -a      Artist tag
+#      -A      Album tag
+#      -T      Track tag
+#      -t      Title tag
+#      -g      Genre tag
+#      -y      Year tag
+#      -c      Comment tag
+#      -q      Quality (overwrites standard encoder options)
+#               For mp3 files this could be "--vbr-new -V<number>".
+#
+# Return Codes:
+#   0 ok
+#   1 input file not found
+#   2 output file cannot be created
+#   3 cannot get info
+#   4 cannot exec decoding
+#   5 cannot exec encoding
+#   6 conversion failed
+#   7 unknown option
+
+# Get parameters
+while getopts q:a:A:T:t:g:c:y:f:x opt ; do
+       case "$opt" in
+               x)      echo "$extension"; exit 0 ;;
+               f)      outfile="$OPTARG" ;;
+               a)      artist="$OPTARG" ;;
+               A)      album="$OPTARG" ;;
+               T)      track="$OPTARG" ;;
+               t)      title="$OPTARG" ;;
+               g)      genre="$OPTARG" ;;
+               y)      year="$OPTARG" ;;
+               c)      comment="$OPTARG" ;;
+               q)      ENCODER_OPTS="$OPTARG" ;;
+               ?)      exit 7 ;;
+       esac
+done
+shift $(($OPTIND - 1))
+
+infile="$1"
+infile_extension=${infile##*.}
+
+# Convert the source parameters to lowercase.
+filetype=`echo ${infile_extension}| tr [:upper:] [:lower:]`
+if [ $filetype != flac ] && [ $filetype != ogg ] && [ $filetype != wav ] && [ 
$filetype != m4a ]; then
+    exit 4
+fi
+
+if [ "$outfile" = "" ]; then
+    # Build output file
+    outfile=`basename "$infile"`
+    outfile=${outfile%.$infile_extension}
+    tmp=${TMPDIR-/tmp}
+    outfile="$tmp/$outfile.$extension"
+fi
+
+# Default values
+[ -z "$comment" ] && comment="Encoded for gtkpod with $ENCODER"
+
+# echo "Converting \"$infile\" into \"$outfile\""
+
+# Checking input file
+if [ "$infile" = "" ]; then
+    exit 1
+fi
+if [ ! -f "$infile" ]; then
+    exit 1
+fi
+
+# Checking output file
+touch "$outfile"
+if [ "x$?" != "x0" ]; then
+    exit 2
+fi
+
+# Check for the existence of encoder
+encoder=`which $ENCODER`
+if [ -z "$encoder" ]; then
+    exit 5
+fi
+
+# Determine decoder
+case $filetype in
+       flac)   decoder="flac" ; options="-d -c --"  ;;
+       ogg)    decoder="oggdec" ; options="--output - --" ;;
+       m4a)    decoder="faad" ; options="-o -" ;;
+       wav)    decoder="" ;;
+esac
+
+# Check for the existence of decoder
+if [ $decoder ]; then
+    decoder=`which "$decoder"`
+    if [ -z "$decoder" ]; then
+        exit 4
+    fi
+fi

Modified: gtkpod/branches/photo_support_branch/src/file_convert.c
===================================================================
--- gtkpod/branches/photo_support_branch/src/file_convert.c     2007-09-16 
18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/src/file_convert.c     2007-09-16 
18:55:11 UTC (rev 1697)
@@ -2076,7 +2076,7 @@
        {
            gchar *buf = conversion_get_track_info (NULL, ctr);
            ctr->errormessage =
-               g_strdup_printf (_("Conversion of '%s' failed: '%s %s' did not 
return filename extension as expected.\n\n"),
+               g_strdup_printf (_("Conversion of '%s' failed: '\"%s\" %s' did 
not return filename extension as expected.\n\n"),
                                 buf,
                                 argv[0], argv[1]);
            g_free (buf);

Modified: gtkpod/branches/photo_support_branch/src/file_itunesdb.c
===================================================================
--- gtkpod/branches/photo_support_branch/src/file_itunesdb.c    2007-09-16 
18:19:50 UTC (rev 1696)
+++ gtkpod/branches/photo_support_branch/src/file_itunesdb.c    2007-09-16 
18:55:11 UTC (rev 1697)
@@ -30,6 +30,7 @@
 #  include <config.h>
 #endif
 
+#include <ctype.h>
 #include <string.h>
 #include <glib/gstdio.h>
 #include "charset.h"
@@ -775,7 +776,7 @@
  *
  * Return value: pointer to the new repository
  */
-iTunesDB *gp_merge_itdb (iTunesDB *old_itdb)
+static iTunesDB *gp_merge_itdb (iTunesDB *old_itdb)
 {
     ExtraiTunesDBData *old_eitdb;
     iTunesDB *new_itdb;
@@ -886,41 +887,72 @@
 
     if (ok_to_load)
     {
+       gchar *prefs_model = get_itdb_prefs_string (itdb, KEY_IPOD_MODEL);
+       gchar *ipod_model = itdb_device_get_sysinfo (itdb->device, 
"ModelNumStr");
+       if (!prefs_model && ipod_model)
+       {   /* let's believe what the iPod says */
+           set_itdb_prefs_string (itdb, KEY_IPOD_MODEL, ipod_model);
+       }
+       else if (prefs_model && !ipod_model)
+       {   /* verify with the user if the model is correct --
+            * incorrect mdoel information can result in loss of
+            * Artwork */
+           gp_ipod_init_set_model (itdb, prefs_model);
+           /* write out new SysInfo file -- otherwise libpod won't
+              use it. Ignore error for now. */
+           itdb_device_write_sysinfo (itdb->device, NULL);
+       }
+       else if (!prefs_model && !ipod_model)
+       {
+           /* ask the user to set the model information */
+           gp_ipod_init_set_model (itdb, NULL);
+           /* write out new SysInfo file -- otherwise libpod won't
+              use it. Ignore error for now. */
+           itdb_device_write_sysinfo (itdb->device, NULL);
+       }
+       else
+       {   /* prefs_model && ipod_model are set */
+           const gchar *prefs_ptr = prefs_model;
+           const gchar *ipod_ptr = ipod_model;
+           /* Normalize model number */
+           if (isalpha (prefs_model[0]))  ++prefs_ptr;
+           if (isalpha (ipod_model[0]))   ++ipod_ptr;
+           if (strcmp (prefs_ptr, ipod_ptr) != 0)
+           {   /* Model number is different -- confirm */
+               gp_ipod_init_set_model (itdb, ipod_model);
+               /* write out new SysInfo file -- otherwise libpod won't
+                  use it. Ignore error for now. */
+               itdb_device_write_sysinfo (itdb->device, NULL);
+           }
+       }
+       g_free (prefs_model);
+       g_free (ipod_model);
+
        new_itdb = gp_merge_itdb (itdb);
+
        if (new_itdb)
        {
            GList *gl;
-           gchar *old_model = get_itdb_prefs_string (new_itdb,
-                                                     KEY_IPOD_MODEL);
            gchar *new_model = itdb_device_get_sysinfo (new_itdb->device,
                                                        "ModelNumStr");
 
-           if (!old_model && new_model)
-           {
-               set_itdb_prefs_string (new_itdb, KEY_IPOD_MODEL, new_model);
+           if (!new_model)
+           {   /* Something went wrong with setting the ipod model
+                * above */
+               prefs_model = get_itdb_prefs_string (new_itdb, KEY_IPOD_MODEL);
+               if (prefs_model)
+               {
+                   itdb_device_set_sysinfo (new_itdb->device, "ModelNumStr",
+                                            prefs_model);
+               }
+               else
+               {   /* ask again... */
+                   gp_ipod_init_set_model (new_itdb, NULL);
+               }
+               g_free (prefs_model);
            }
-           else if (old_model && !new_model)
-           {
-               gp_ipod_init_set_model (new_itdb, old_model);
-           }
-           else if (!old_model && !new_model)
-           {
-               gp_ipod_init_set_model (new_itdb, NULL);
-           }
-           else
-           {   /* old_model && new_model are set */
-#if 0
-               const gchar *old_ptr = old_model;
-               const gchar *new_ptr = new_model;
-               /* Normalize model number */
-               if (isalpha (old_model[0]))   ++old_ptr;
-               if (isalpha (new_model[0]))   ++new_ptr;
-               if (strcmp (old_ptr, new_ptr) != 0)
-               {   /* Model number has changed -- confirm */
-                }
-#endif         
-               set_itdb_prefs_string (new_itdb, KEY_IPOD_MODEL, new_model);
-           }
+           g_free (new_model);
+
            /* adjust rating and playcount in local databases */
            for (gl=new_itdb->tracks; gl; gl=gl->next)
            {

Modified: gtkpod/branches/photo_support_branch/src/misc.c
===================================================================
--- gtkpod/branches/photo_support_branch/src/misc.c     2007-09-16 18:19:50 UTC 
(rev 1696)
+++ gtkpod/branches/photo_support_branch/src/misc.c     2007-09-16 18:55:11 UTC 
(rev 1697)
@@ -455,6 +455,11 @@
 
 /* Create a NULL-terminated array of strings given in the command
    line. The last argument must be NULL.
+
+   As a special feature, the first argument is split up into
+   individual strings to allow the use of "convert-2mp3 -q <special
+   settings>". Set the first argument to NULL if you don't want this.
+
    You must free the returned array with g_strfreev() after use. */
 gchar **build_argv_from_strings (const gchar *first_arg, ...)
 {
@@ -463,19 +468,31 @@
     const gchar *str;
     GPtrArray *ptra = g_ptr_array_sized_new (20);
 
-    g_ptr_array_add (ptra, g_strdup (first_arg));
-    /* add the rest of the strings */
     if (first_arg)
     {
-       va_start (args, first_arg);
-       do
+       gchar **strings = g_strsplit (first_arg, " ", 0);
+       gchar **strp = strings;
+       while (*strp)
        {
-           str = va_arg (args, const gchar *);
-           g_ptr_array_add (ptra, g_strdup (str));
+           if (**strp)
+           {   /* ignore empty strings */
+               g_ptr_array_add (ptra, g_strdup(*strp));
+           }
+           ++strp;
        }
-       while (str);
-       va_end (args);
+       g_strfreev (strings);
     }
+
+    va_start (args, first_arg);
+    do
+    {
+       str = va_arg (args, const gchar *);
+       g_ptr_array_add (ptra, g_strdup (str));
+    }
+    while (str);
+
+    va_end (args);
+
     argv = (gchar **)g_ptr_array_free (ptra, FALSE);
 
     return argv;

Modified: gtkpod/branches/photo_support_branch/src/prefs.c
===================================================================
--- gtkpod/branches/photo_support_branch/src/prefs.c    2007-09-16 18:19:50 UTC 
(rev 1696)
+++ gtkpod/branches/photo_support_branch/src/prefs.c    2007-09-16 18:55:11 UTC 
(rev 1697)
@@ -1192,7 +1192,49 @@
     /* For versions < 0.91, remove all itdb keys */
     if (version < 0.91)
        prefs_flush_subkey("itdb_");
-   
+
+    /* rename convert scripts */
+    if (version <= 0.99001)
+    {
+
+       const gchar **keyp;
+       const gchar *keys[] =
+           {"path_conv_m4a", "path_conv_wav", "path_conv_mp3",
+            "path_conv_ogg", "path_conv_flac", NULL};
+
+       for (keyp=keys; *keyp; ++keyp)
+       {
+           buf = prefs_get_string (*keyp);
+           if (buf)
+           {
+               const gchar *needles[] =
+                   { "convert-flac2mp3.sh", "convert-m4a2mp3.sh",
+                     "convert-ogg2mp3.sh", "convert-wav2mp3.sh",
+                     "convert-flac2m4a.sh", "convert-m4a2m4a.sh",
+                     "convert-ogg2m4a.sh", "convert-wav2m4a.sh", NULL };
+               const gchar *replacements[] =
+                   { "convert-2mp3.sh    ", "convert-2mp3.sh   ",
+                     "convert-2mp3.sh   ", "convert-2mp3.sh   " ,
+                     "convert-2m4a.sh    ", "convert-2m4a.sh   ",
+                     "convert-2m4a.sh   ", "convert-2m4a.sh   " };
+               const gchar **needlep;
+               const gchar **replp;
+               replp = replacements;
+               for (needlep=needles; *needlep; ++needlep, ++replp)
+               {
+                   gchar *bufp = strstr (buf, *needlep);
+                   if (bufp)
+                   {
+                       g_memmove (bufp, *replp, strlen (*replp));
+                       prefs_set_string (*keyp, buf);
+                       break;
+                   }
+               }
+               g_free (buf);
+           }
+       }
+    }
+
     prefs_set_string ("version", VERSION);
 }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to