Bug 205182 - extra XML tag created by playlist layout editor
Summary: extra XML tag created by playlist layout editor
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.3-GIT
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-26 10:43 UTC by mjjohnson.geo
Modified: 2009-12-09 11:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mjjohnson.geo 2009-08-26 10:43:53 UTC
Version:           development snapshot from 25/08/2009 (using KDE 4.3.0)
Compiler:          gcc 4.4.1 
OS:                Linux
Installed from:    Unlisted Binary Package

I'm using a version of Amarok checked out 2009-08-25, compiled in Arch Linux using the PKGBUILD file located here: http://aur.archlinux.org/packages.php?ID=28622 .  (I had to use "makepkg -g >> PKGBUILD && makepkg" to get it to build, since otherwise it wasn't getting the info to do the integrity checks.)  I also noticed this bug in Amarok 2.1.1 (the version currently in the Arch repositories).

I have a playlist layout with the following XML:

<!DOCTYPE layouts>
<playlist_layouts>
<layout name="Custom" >
  <single_track active_indicator_row="0" show_cover="true" >
   <row>
    <element size="0.8" bold="false" alignment="left" value="Title" italic="false" />
    <element size="0" bold="false" alignment="center" value="Rating" italic="false" />
    <element size="0.2" bold="false" alignment="right" value="Length" italic="false" />
   </row>
   <row>
    <element size="0.5" bold="false" alignment="left" value="Artist" italic="false" />
    <element size="0.5" bold="false" alignment="right" value="Album" italic="false" />
   </row>
  </single_track>
  <group_head active_indicator_row="0" show_cover="true" >
   <row>
    <element size="1" bold="true" alignment="center" value="Album" italic="false" />
   </row>
   <row>
    <element size="0" bold="false" alignment="center" value="Artist" italic="false" />
   </row>
  </group_head>
  <group_body active_indicator_row="0" show_cover="false" >
   <row>
    <element size="0.8" bold="false" alignment="left" value="Title (with track number)" italic="false" />
    <element size="0" bold="false" alignment="center" value="Play count" italic="false" />
    <element size="0" bold="false" alignment="center" value="Rating" italic="false" />
    <element size="0.2" bold="false" alignment="right" value="Length" italic="false" />
   </row>
  </group_body>
</layout>
</playlist_layouts>

I go into the playlist layout editor, body tag, and drag anything down onto a second row (beneath the title and length).  Hit Apply.  Then remove that item, so that there's only one row in the layout editor again.  Hit apply again.  The entries in the playlist still have two rows, even though one is empty.

Thanks to m0nk's (in http://forum.kde.org/viewtopic.php?f=116&t=77235&p=121916#p121916 ) discovered that there was an extra tag in the layout XML file.  Namely, the end of the file after doing the above procedure looked like this:

    <element size="0.2" bold="false" alignment="right" value="Length" italic="false" />
   </row>
   <row/>
  </group_body>
</layout>
</playlist_layouts>

Note the <row/> tag that has been inserted.  It appears that this tag is not properly removed when items are removed from the second row.  Manually removing this line and restarting Amarok makes the playlist appear without the extra spaces.  However, editing the layout as above will re-insert the tag very reproducibly.
Comment 1 Mikko C. 2009-09-03 08:56:19 UTC
fixed in c946c966a38988227de2a8fdd842db32b319c60f