Bug 266722 - Unable to edit lyrics if lyrics currently contain no text
Summary: Unable to edit lyrics if lyrics currently contain no text
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Context View/Lyrics (show other bugs)
Version: 2.4-GIT
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 2.4.1
Assignee: Amarok Developers
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2011-02-20 13:21 UTC by Christian (Fuchs)
Modified: 2011-03-19 13:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian (Fuchs) 2011-02-20 13:21:47 UTC
Version:           2.4-GIT (using KDE 4.6.0) 
OS:                Linux

The lyrics applet contains a button to modify the lyrics. This used to work as well if no lyrics have been found, so the current lyrics are empty. 

However, in recent amarok version this is not possible anymore, there is no part which would usually contain the lyrics and change to editable state if you press the edit button, and the vertical size of the applet is reduced to the title.  

Reproducible: Always

Steps to Reproduce:
Play a song which has no lyrics text at all. Go to the lyrics applet. Click the edit lyrics button.

Actual Results:  
You are not able to edit (add) lyrics manually

Expected Results:  
You should be able to add text manually
Comment 1 Myriam Schweingruber 2011-02-20 23:23:59 UTC
Indeed, this doesn't work anymore and did work in 2.4.0
Comment 2 Christian (Fuchs) 2011-02-28 12:58:22 UTC
This is now semi-fixed in current git. 

The lyrics editor does expand and you are able to write text, however, the "save" icon is disabled and therefore you are still not able to save them. 

Thanks for the effort and thanks in advance for fixing this. 

Kind regards, 

Christian
Comment 3 Christian (Fuchs) 2011-03-13 15:51:48 UTC
Hi, 

the error is in 

LyricsAppletPrivate::determineActionIconsState()
...
127    closeIcon->action()->setEnabled( showBrowser & isEditing );
128    saveIcon->action()->setEnabled( showBrowser & isEditing );
...

of LyricsApplet.cpp. 

showBrowser is set to false if the song contains no lyrics, therefore the above logical expression will return false and the save and cancel buttons are disabled. 

So either showBrowser has to be set to true in this case, or this expression needs to be changed. Is this check really needed, even? Is it possible to be in isEditing state without showing the browser? 

Thanks in advance, kind regards

Christian
Comment 4 Valorie Zimmerman 2011-03-19 03:32:17 UTC
One small bit of information to add to the above, in a git-build from today:

If there is any text in the lyrics box, even "Lyrics not found", one can successfully edit.

If the box is blank, the edit screen appears, but the save icon is grayed out, and Amarok doesn't see an attempted click.
Comment 5 Rick W. Chen 2011-03-19 03:42:52 UTC
Git commit 0d39ac5cfb4ce5445f780a18c9193a1d05a2f286 by Rick W. Chen.
Committed on 19/03/2011 at 03:39.
Pushed by rickc into branch 'master'.

Make lyrics editable when there's no currently no text

BUG: 266722

M  +2    -2    src/context/applets/lyrics/LyricsApplet.cpp     

http://commits.kde.org/amarok/0d39ac5cfb4ce5445f780a18c9193a1d05a2f286