Repository navigation
Fix GTK+ 3 deprecations - #11879
Fix GTK+ 3 deprecations#11879
Conversation
Icons are deprecated in GtkMessageBoxes as of GTK+ 3.12. The GNOME HIG no longer shows icons in example dialogs; see https://developer.gnome.org/hig/stable/dialogs.html.en and https://developer.gnome.org/gtk3/stable/GtkMessageDialog.html
|
|
||
| #else // GTK_CHECK_VERSION(3,0,0) | ||
|
|
||
| // GTK+ 2 impl |
There was a problem hiding this comment.
Do we still need GTK 2 implementation?
There was a problem hiding this comment.
Good question! I'll be back in the office on Thursday and will revisit this patch then and find out about GTK 2
There was a problem hiding this comment.
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
| *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]); |
There was a problem hiding this comment.
Is linter ok with this?
There was a problem hiding this comment.
Seems so; all 8 checks passed 😄
There was a problem hiding this comment.
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.
Fixes #10780