Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PVR] : 4 fixes related to chanel icons #4227

Closed
wants to merge 5 commits into from

Conversation

alexmaloteaux
Copy link
Contributor

This pr fixes 4 issues related to pvr channels icon :

  1. When masterlockcode is set and user click on the logo button in channel manager, the password dialog box is shown twice and user need to enter the password 2 times.
    This is resolved by removing and uneeded call to g_passwordManager.IsMasterLockUnlocked in CGUIDialogPVRChannelManager::OnClickButtonChannelLogo

2)When user set a user defined logo; the iconpath is emptied upon xbmc restart. This is fixed by setting the userseticon flag to true when user choose its own icon.

  1. When the icon path related file does not exists anymore, it should be emptied. This is particulary boring when UserSetIcon is set because it will never been emptied regarding how updatefromclient works. This is fixed by veryfing if the file exists in CPVRChannelGroup::SearchAndSetChannelIcons

  2. When user set a custom name for a channel in Channel manager, SearchAndSetChannelIcons should also search for an icon file based on that name.

@t-nelson
Copy link
Contributor

@opdenkamp @xhaggi for review please

@alexmaloteaux
Copy link
Contributor Author

@t-nelson splitting ?? how ?? they are all related to the same files and wont merge/build all i think

@t-nelson
Copy link
Contributor

http://stackoverflow.com/questions/4307095/git-how-to-split-up-a-commit-buried-in-history

In general we want at least one commit for each distinct feature added/bug fixed. You can make more if it's logical. They can always be squashed later. Multiple fixes per commit are a complete PITA to review and even further pain revert later if there's a problem with only part of it.

@alexmaloteaux
Copy link
Contributor Author

@t-nelson ok will know for the feature and won't happen again :) . I have not splitted the first 3 fixes in separated commits; Maybe for this times lets first @opdenkamp and @xhaggi review it, i guess they will figure out easily this pr. If not i ll got to the boring, time consuming tasks of splitting it and realeasing 1 by 1 .. Regards

@opdenkamp
Copy link
Member

before i have a look at it: please fix up the cosmetics. we use 2 spaces, no tabs

@alexmaloteaux
Copy link
Contributor Author

@xhaggi it was like this, so by adding bForceUserSetIconUpdate i m sure to not break anything.
do we need to know if an user has set the icon path to empty? -> i guess original devs would better answer this..

@alexmaloteaux
Copy link
Contributor Author

@xhaggi , @opdenkamp you want me to split it ?

@xhaggi
Copy link
Member

xhaggi commented Feb 20, 2014

yes please split your commit in logical parts and apply the cosmetics.

@alexmaloteaux
Copy link
Contributor Author

@xhaggi i already applied the cosmetics . Will check your link concerning the commit splitting thanks

@alexmaloteaux
Copy link
Contributor Author

@xhaggi @t-nelson after splitting can i push diretly to this pr or i need to create a new one ?

@fritsch
Copy link
Member

fritsch commented Feb 20, 2014

Force push

@t-nelson
Copy link
Contributor

To elaborate. When you force push the branch to your repo, github will automatically update this PR.

@MartijnKaijser MartijnKaijser added this to the Pending for inclusion milestone Feb 21, 2014
@alexmaloteaux
Copy link
Contributor Author

@xhaggi @t-nelson @opdenkamp ok hope it is better now ..

@t-nelson
Copy link
Contributor

Thanks for splitting this up. Would you mind dropping the "Fix Nx:" prefixes from the messages and prefixing them "[PVR]" instead.

@alexmaloteaux
Copy link
Contributor Author

@t-nelson done

@xhaggi
Copy link
Member

xhaggi commented Feb 21, 2014

Sorry but could you please add fix: to the commit message and use a short one line message + separated details if needed.

[pvr] fix: password prompt appears twice in channel manager

detailed description 

@t-nelson
Copy link
Contributor

Hehe. I think maybe we need an "XBMC git guidelines" in contributing.md.

@xhaggi
Copy link
Member

xhaggi commented Feb 21, 2014

1st commit (password prompt appears twice) is fine with me

@xhaggi
Copy link
Member

xhaggi commented Feb 21, 2014

@alexmaloteaux could you please extract the first commit into a separate PR so we could merge it independently.

@t-nelson
Copy link
Contributor

1st commit (password prompt appears twice) is fine with me

Something else seems wrong though. We shouldn't be prompting the user unless bPromptUser is set though, no?

@xhaggi
Copy link
Member

xhaggi commented Feb 21, 2014

@t-nelson we don't need to call IsMasterLockUnlocked() as IsProfileLockUnlocked() do it for us
https://github.com/xbmc/xbmc/blob/4372e0d63cd05961b81c0d08d1180e77f44f8de2/xbmc/GUIPassword.cpp?source=cc#L195

@t-nelson
Copy link
Contributor

Ah I missed the master/profile difference.

Fine by me.

@opdenkamp's button

On Fri, Feb 21, 2014 at 1:52 PM, Sascha Woo notifications@github.comwrote:

@t-nelson https://github.com/t-nelson we don't need to call
IsMasterLockUnlocked() as IsProfileLockUnlocked() do it for us

https://github.com/xbmc/xbmc/blob/4372e0d63cd05961b81c0d08d1180e77f44f8de2/xbmc/GUIPassword.cpp?source=cc#L195

Reply to this email directly or view it on GitHubhttps://github.com//pull/4227#issuecomment-35772302
.

continue;
{
//check if the file exist or empty it
if(VerifyChannelIconPath(groupMember.channel))

This comment was marked as spam.

This comment was marked as spam.

@alexmaloteaux
Copy link
Contributor Author

@xhaggi @opdenkamp regarding how the userseticon flag was used in SetIconPath before the PR. i think it is safe to remove the force flag and just make one little change as in the 5b452bd commit

@opdenkamp
Copy link
Member

I'll review over the week end.

@@ -753,6 +750,11 @@ bool CPVRChannel::IsUserSetIcon(void) const
return m_bIsUserSetIcon;
}

bool CPVRChannel::IsIconExists() const
{
return (CFile::Exists(IconPath()));

This comment was marked as spam.

@xhaggi xhaggi closed this Mar 4, 2014
@alexmaloteaux
Copy link
Contributor Author

@Jalle19 renamed that, @xhaggi applied the cosmetics

@xhaggi
Copy link
Member

xhaggi commented Mar 15, 2014

could you please squash the commits

@t-nelson
Copy link
Contributor

@alexmaloteaux please squash the history down to one commit per fix and we'll get this in.

@alexmaloteaux
Copy link
Contributor Author

@t-nelson ok like this ?

@t-nelson
Copy link
Contributor

Fine by my eye.

@opdenkamp, @xhaggi, A last pass by one of you, please.

jenkins build this please

@xhaggi
Copy link
Member

xhaggi commented Mar 23, 2014

@alexmaloteaux finally please squash commit 19e3053 into 165578b

@opdenkamp
Copy link
Member

ok for gotham when squashed

@xhaggi
Copy link
Member

xhaggi commented Mar 25, 2014

@alexmaloteaux if you don't have time let me know. i will cherry pick your stuff and finish things so we can merge it.

@alexmaloteaux
Copy link
Contributor Author

@xhaggi i don't get it is it merged ?

@alexmaloteaux
Copy link
Contributor Author

@xhaggi ok done ; read the comments i think it is better to keep updatechannel like this

@xhaggi
Copy link
Member

xhaggi commented Mar 25, 2014

sorry but you squashed different commits into one. (the last one in the one before)

@alexmaloteaux
Copy link
Contributor Author

@xhaggi one per fix with all the cosmetics and so on included in the last one

@xhaggi
Copy link
Member

xhaggi commented Mar 25, 2014

i told you that the last commit should be squashed into commit 165578b. you squashed the last one in the previous one. It would be nice if you could separate all the stuff related to commit 165578b into this commit. if you need help let me know.

@alexmaloteaux
Copy link
Contributor Author

@xhaggi the older commits history is deleted due to -force i think; only way is the boring part of git rebase ; git -p add ; manual stuff ; ... i guess; do you have an easier solution ? sorry fir misunderstood ..

@xhaggi
Copy link
Member

xhaggi commented Mar 26, 2014

@alexmaloteaux now you have to do a manual part. you could do a git rebase and edit the corresponing commits then c/p your changes and continue rebasing or you could start from scratch, rename your local branch, create a new one with the same name, c/p your changes then commit and so on and later do a force push.

@xhaggi
Copy link
Member

xhaggi commented Mar 26, 2014

@alexmaloteaux BTW the commit history is not deleted, but you have to use a gui client for git which supports to show commits without branch assignments. or you know the commit id ;)

@alexmaloteaux
Copy link
Contributor Author

@xhaggi theres is 3 commit (after final squash) and 3 fix; maybe just editing final commit messgae will do ; otherwise too boring .. :)

@Jalle19
Copy link
Member

Jalle19 commented Mar 26, 2014

Just merge it, no point in testing the guy's gitfu.

@xhaggi
Copy link
Member

xhaggi commented Mar 26, 2014

i did the magic git rebase/split stuff in PR #4477

@xhaggi xhaggi closed this Mar 26, 2014
@t-nelson
Copy link
Contributor

Just merge it, no point in testing the guy's gitfu.

We aren't testing his git fu. We're keeping our history clean. It makes
future bisecting and reverting much easier.

You never need a GUI to do something with git. Use git reflog to find the
time the tip was moved before the offending rebase. Do a hard reset to that
point (eg. git reset --hard HEAD@{4}). Then try again.

@t-nelson t-nelson removed the Gotham label Mar 27, 2014
@MartijnKaijser MartijnKaijser modified the milestones: Abandoned, obsolete or superseeded, Pending for inclusion Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants