Skip to content

Fix GTK+ 3 deprecations - #11879

Merged
jkleinsc merged 12 commits into
masterfrom
fix-gtk-deprecations
Feb 16, 2018
Merged

jkleinsc merged 12 commits into
masterfrom
fix-gtk-deprecations

Conversation

@ckerr

@ckerr ckerr commented Feb 10, 2018 •

Copy link
Copy Markdown
Member

Fixes #10780

@ckerr
ckerr requested a review from a team February 10, 2018 01:07
Comment thread atom/browser/ui/views/menu_bar.cc Outdated

#else // GTK_CHECK_VERSION(3,0,0)

// GTK+ 2 impl

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.

Do we still need GTK 2 implementation?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good question! I'll be back in the office on Thursday and will revisit this patch then and find out about GTK 2

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As one would expect, electron is linked against gtk3:

$ ldd ./electron | grep gtk
libgtk3ui.so => /home/charles/src/electron/electron/out/D/./libgtk3ui.so (0x00007ff3cd4d5000)
libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007ff3c9986000)

and I don't see any conditionals in electron/electron or electron/libchromiumcontent that would let a build choose between 2 and 3... so I suspect it's safe & desirable to remove the references to 2 and I'll do that in a followup push today

Comment thread atom/browser/ui/views/menu_bar.cc Outdated
*enabled = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]);
*disabled = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]);
*highlight = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]);
*hover = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]);

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.

Is linter ok with this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Seems so; all 8 checks passed 😄

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.

That's weird =/ Ok.

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.

Do you use clang-format? git-clang-format efb44050dbaab32128777cf70c0095d43f13083e changes a few things in this branch. It would be nice if everyone used clang-format, I'm not sure what the policy is right now.

@ckerr
ckerr requested a review from a team February 15, 2018 21:16
@ckerr ckerr changed the title [WIP] Fix GTK+ 3 deprecations Fix GTK+ 3 deprecations Feb 15, 2018

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@jkleinsc
jkleinsc merged commit 78ccfa0 into master Feb 16, 2018
@jkleinsc
jkleinsc deleted the fix-gtk-deprecations branch February 16, 2018 15:01
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.

4 participants