Skip to content

fix glib module, introduced pointers in order to allow gjs object mapping#11

Merged
danigm merged 2 commits intoendlessm:masterfrom
hermes83:bugfix/glib
Sep 14, 2020
Merged

fix glib module, introduced pointers in order to allow gjs object mapping#11
danigm merged 2 commits intoendlessm:masterfrom
hermes83:bugfix/glib

Conversation

@hermes83
Copy link
Copy Markdown
Contributor

@hermes83 hermes83 commented Jun 7, 2020

In order to use the library within gnome shell extensions, the parameters must be pointers

https://phabricator.endlessm.com/T30439

@eos-shell-build
Copy link
Copy Markdown

I don't recognize the submitter as a member of @endlessm. Can somebody in @endlessm verify the patch? See https://phabricator.endlessm.com/w/software/build/ci-integration/#pull-requests for more details.

@wjt wjt closed this Jun 24, 2020
@wjt wjt reopened this Jun 24, 2020
@wjt
Copy link
Copy Markdown
Member

wjt commented Jun 24, 2020

ok to test

@stuaxo
Copy link
Copy Markdown

stuaxo commented Aug 10, 2020

I've been using the patches from @hermes83 for the last month or so and everything seems OK.

Copy link
Copy Markdown
Contributor

@danigm danigm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see here some mix of tabs and spaces for the indentation. Please, fix that and use only spaces, it's better because it'll be shown the same result no matter what tab space configuration do you have on your code editor.

There are also some trailing white-spaces. Please, try to remove them to avoid introduce not needed characters.

And about the commit message, try to be more descriptive about the changes done and the motivations, this is a good read: https://chris.beams.io/posts/git-commit/

Comment thread animation-glib/wobbly/model.cpp Outdated
reinterpret_cast <AnimationWobblyModelPrivate *> (animation_wobbly_model_get_instance_private (model));

priv->prop_size = size;
priv->prop_size = {size->x, size->y};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this trailing whitespaces

Comment thread tests/wobbly/glib_api_test.cpp Outdated
Comment on lines +156 to +160
AnimationVector pos = { 0.0, 0.0 };
AnimationVector size = { 100.0, 100.0 };

g_autoptr(AnimationWobblyModel) model = animation_wobbly_model_new (&pos,
&size,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here there's a mix of spaces and tabs for indent. Use only spaces to avoid wrong presentation. For example in the PR review of gitlab you can see that the indentation is not the same for these lines.

AnimationVector pos = { 0.0, 0.0 };
AnimationVector size = { 100.0, 100.0 };
g_autoptr(AnimationWobblyModel) model = animation_wobbly_model_new (&pos,
&size,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Comment thread tests/wobbly/glib_api_test.cpp Outdated
Comment on lines +179 to +180
AnimationVector pos_to = { 1.0, 1.0 };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces vs tabs again.

Comment thread tests/wobbly/glib_api_test.cpp Outdated
Comment on lines +208 to +209
AnimationVector pos = { 0.0, 0.0 };
AnimationVector size = { 100.0, 100.0 };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces vs tabs again.

Comment thread tests/wobbly/glib_api_test.cpp Outdated
std::array <AnimationVector, 4> extremes;

animation_wobbly_model_resize (model, { 200.0, 200.0 });
AnimationVector resize_dimensions = { 200.0, 200.0 };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces vs tabs again.

Comment thread tests/wobbly/glib_api_test.cpp Outdated
Comment on lines +246 to +247
AnimationVector pos = { 0.0, 0.0 };
AnimationVector size = { 100.0, 100.0 };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces vs tabs again.

Comment thread tests/wobbly/glib_api_test.cpp Outdated
Comment on lines +253 to +257

AnimationVector grab_pos = { 100.0, 0.0 };
g_autoptr(AnimationWobblyAnchor) anchor = animation_wobbly_model_grab_anchor (model, &grab_pos);

animation_wobbly_anchor_move_by (anchor, { 10.0, 10.0 });
AnimationVector delta_pos = { 10.0, 10.0 };
animation_wobbly_anchor_move_by (anchor, &delta_pos);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces vs tabs again, and trailing whitespaces.

Comment thread tests/wobbly/glib_api_test.cpp Outdated
Comment on lines +274 to +286
AnimationVector pos = { 0.0, 0.0 };
AnimationVector size = { 100.0, 100.0 };
g_autoptr(AnimationWobblyModel) model = animation_wobbly_model_new (&pos,
&size,
8.0,
5.0,
500.0);
g_autoptr(AnimationWobblyAnchor) anchor = animation_wobbly_model_grab_anchor (model, { 100.0, 0.0 });

AnimationVector grab_pos = { 100.0, 0.0 };
g_autoptr(AnimationWobblyAnchor) anchor = animation_wobbly_model_grab_anchor (model, &grab_pos);

/* Move anchor and settle */
animation_wobbly_anchor_move_by (anchor, { 10.0, 10.0 });
// Move anchor and settle
AnimationVector delta_pos = { 10.0, 10.0 };
animation_wobbly_anchor_move_by (anchor, &delta_pos);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces vs tabs again, and trailing whitespaces.

@hermes83 hermes83 changed the title glib fixes fix glib module, introduced pointers in order to allow gjs object mapping Sep 13, 2020
Copy link
Copy Markdown
Contributor

@danigm danigm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Let's merge this.

@danigm danigm merged commit b5b8b67 into endlessm:master Sep 14, 2020
danigm added a commit that referenced this pull request Sep 14, 2020
This patch updates the version number and api version for the project
and all debian packages.

The commits added in this PR #11
break the ABI so we need to bump the soname.

https://phabricator.endlessm.com/T30737
@danigm danigm mentioned this pull request Sep 14, 2020
@hermes83 hermes83 deleted the bugfix/glib branch September 16, 2020 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants