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

Statusbar: fixed a bug when you can't open the encoding menu for files #2468

Merged
merged 3 commits into from Apr 11, 2017

Conversation

Projects
None yet
2 participants
@Defman21
Contributor

Defman21 commented Apr 8, 2017

Signed-off-by: Defman21 i@defman.me

fixed #1747

@Naatan Naatan self-requested a review Apr 8, 2017

@Naatan

I'd prefer this be written to the view itself, eg. view._encodingWidget = true. Otherwise this object will just keep on growing. Granted it's gonna be small, but still not best practice.

let uid = view.uid.number;
if (_encodingMenuInitializedInViews[uid] === undefined) {

This comment has been minimized.

@Naatan

Naatan Apr 8, 2017

Member

It's better to just check if uid in _encodingMenuInitializedInViews

This comment has been minimized.

@Defman21

Defman21 Apr 8, 2017

Contributor

Gonna fix, thanks :)

Nathan's review satisfied
Signed-off-by: Defman21 <i@defman.me>
var xv = getXulView(view);
if (!_encodingMenuInitializedInViews[uid]) {
if (!view._encodingWidget) {

This comment has been minimized.

@Naatan

Naatan Apr 8, 2017

Member

Should be if( ! ("_encodingWidget" in view)), otherwise it throws a warning on strict.

Nathan's review satisfied[1]
Signed-off-by: Defman21 <i@defman.me>
@Naatan

Naatan approved these changes Apr 8, 2017

Thanks @Defman21 !

@Naatan Naatan self-assigned this Apr 8, 2017

@Naatan Naatan added this to the 10.2.2 milestone Apr 8, 2017

@Naatan Naatan merged commit b518d28 into Komodo:master Apr 11, 2017

Naatan added a commit that referenced this pull request Apr 11, 2017

Statusbar: fixed a bug when you can't open the encoding menu for file…
…s - fixes #1747 (#2468)

* Statusbar: fixed a bug when you can't open the encoding menu for files

Signed-off-by: Defman21 <i@defman.me>

* Nathan's review satisfied

Signed-off-by: Defman21 <i@defman.me>

* Nathan's review satisfied[1]

Signed-off-by: Defman21 <i@defman.me>
rn=

@Defman21 Defman21 deleted the Defman21:pr/fix-1747 branch Apr 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment