Merge lp://qastaging/~uriboni/compiz/unminimize-configurable-independently into lp://qastaging/compiz/0.9.8

Proposed by Ugo Riboni
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3311
Merged at revision: 3311
Proposed branch: lp://qastaging/~uriboni/compiz/unminimize-configurable-independently
Merge into: lp://qastaging/compiz/0.9.8
Diff against target: 497 lines (+196/-61)
5 files modified
plugins/animation/animation.xml.in (+63/-0)
plugins/animation/include/animation/animation.h (+2/-1)
plugins/animation/include/animation/animeffect.h (+18/-2)
plugins/animation/src/animation.cpp (+99/-32)
plugins/animationaddon/src/animationaddon.cpp (+14/-26)
To merge this branch: bzr merge lp://qastaging/~uriboni/compiz/unminimize-configurable-independently
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
MC Return Approve
Review via email: mp+120188@code.qastaging.launchpad.net

Commit message

Separate the configuration for the minimize and unminimize animations

Description of the change

Separate the configuration for the minimize and unminimize animations

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Looks fine.

A side note that we really have to get rid of this in the animation plugin:

225 bool usedO, bool usedC, bool usedM,
226 - bool usedS, bool usedF,
227 + bool usedS, bool usedU, bool usedF,

256 - false, false, false, false, true,
257 + false, false, false, false, false, true,

UGH!

I have no idea what we'll replace it with though. I would say flags but my books on style guide say "don't do that". Then again, I guess function names here does not make sense either.

Any thoughts ?

review: Approve
Revision history for this message
MC Return (mc-return) wrote :

uriboni, great idea to enhance the animation plug-in with configurable unminimize as well.

+1

review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Hmm, the abstraction in this case looks okay. I think since we are only disabling animations for shading / focusing you can probably have AnimationUsedFor::allExecptShade AnimationUsedFor::allExeceptShadeAndFocus

I won't block on that though.

I am not requiring tests here since :
 a) This is a relatively broad area to test
 b) Tests that cover just this code would not really check that the feature works (there is no "logic")
 c) Requiring tests here would hold up development of an otherwise needed feature.

review: Approve
Revision history for this message
Ugo Riboni (uriboni) wrote :

> Hmm, the abstraction in this case looks okay. I think since we are only
> disabling animations for shading / focusing you can probably have
> AnimationUsedFor::allExecptShade AnimationUsedFor::allExeceptShadeAndFocus
>
> I won't block on that though.

There are a few cases where it's only focus or only shade that is not enabled, and in general I think it's better to leave the flexibility.
Perhaps one possible improvement may be to have something like:

AnimationEffectUsedFor::all().exclude(FocusAnimation).exclude(ShadeAnimation)
or
AnimationEffectUsedFor::none().include(ShadeAnimation)

Or something like this where exclude() and include() return a reference to the AnimationEffectUsedFor object so you can chain them and pass them directly to the parameter.

But I think it's good this way too.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> > Hmm, the abstraction in this case looks okay. I think since we are only
> > disabling animations for shading / focusing you can probably have
> > AnimationUsedFor::allExecptShade AnimationUsedFor::allExeceptShadeAndFocus
> >
> > I won't block on that though.
>
> There are a few cases where it's only focus or only shade that is not enabled,
> and in general I think it's better to leave the flexibility.
> Perhaps one possible improvement may be to have something like:
>
> AnimationEffectUsedFor::all().exclude(FocusAnimation).exclude(ShadeAnimation)
> or
> AnimationEffectUsedFor::none().include(ShadeAnimation)
>
> Or something like this where exclude() and include() return a reference to the
> AnimationEffectUsedFor object so you can chain them and pass them directly to
> the parameter.

In fact, I was thinking of something exactly like this, however I didn't know how hard it would be. If you think it would be easy, feel free to do it, otherwise I'm happy with this as it is :)

>
> But I think it's good this way too.

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Revision history for this message
Omer Akram (om26er) wrote :

added commit message and approved again.

Revision history for this message
Unity Merger (unity-merger) wrote :
Revision history for this message
Unity Merger (unity-merger) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches