GNOME Bugzilla – Bug 760444
Fix runtime GTK+ warnings
Last modified: 2016-01-22 01:12:31 UTC
We have a number of run-time warnings from latest GTK+: (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:13:33: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:14:30: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version (org.gnome.Maps:13949): Gtk-WARNING **: (gtkicontheme.c:5432):gtk_icon_theme_lookup_by_gicon_for_scale: runtime check failed: ((flags & GTK_ICON_LOOKUP_GENERIC_FALLBACK) == 0) I have a patch for the last one, but the two above that would be nice if someone looked into.
Created attachment 318709 [details] [review] Fix run-time icon warning In newer versions of gtk+, gtk_icon_theme_lookup_by_gicon_for_scale() will warn if somebody uses GTK_ICON_LOOKUP_GENERIC_FALLBACK with functions that don't support it. The warning looks like: (org.gnome.Maps:13949): Gtk-WARNING **: (gtkicontheme.c:5432): gtk_icon_theme_lookup_by_gicon_for_scale: runtime check failed: ((flags & GTK_ICON_LOOKUP_GENERIC_FALLBACK) == 0)
Created attachment 318710 [details] [review] utils: Fix run-time icon warning In newer versions of gtk+, gtk_icon_theme_lookup_by_gicon_for_scale() will warn if somebody uses GTK_ICON_LOOKUP_GENERIC_FALLBACK with functions that don't support it. The warning looks like: (org.gnome.Maps:13949): Gtk-WARNING **: (gtkicontheme.c:5432): gtk_icon_theme_lookup_by_gicon_for_scale: runtime check failed: ((flags & GTK_ICON_LOOKUP_GENERIC_FALLBACK) == 0)
Attachment 318710 [details] pushed as d1de107 - utils: Fix run-time icon warning
Is there anything else in this bug?
(In reply to Hashem Nasarat from comment #4) > Is there anything else in this bug? Yes, these I guess: (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:13:33: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:14:30: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version
*** Bug 760671 has been marked as a duplicate of this bug. ***
Created attachment 319337 [details] [review] Fixed the 2 Gtk-WARNING (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:13:33: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:14:30: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version The problem is that whenever we run gnome-maps, these two warnings pop up. I have fixed these 2 warnings, by updating the "GtkWidget:focus-line-width" and "GtkWidget:focus-padding" with the outline-width and padding CSS properties.
Review of attachment 319337 [details] [review]: Thanks for tha patch! Most appreciated! Maybe the commit message could be a bit more informative? It is what we see in a shortlog situation, like the git.gnome.org/browse page. How about: "css: Replace deprecated properties" ? ::: data/gnome-maps.css @@ +12,3 @@ border: 1px solid @insensitive_borders; + outline-width: 1px; + padding: 1px; Does this give the same behavior? And also, with this we would first set padding to 0 and the to 1px below. Maybe the padding property above should be removed?
Created attachment 319383 [details] [review] css: Replace deprecated properties The problem is that these two warning pop up everytime we try to run gnome-maps due to GtkWidget deprecation (since version 3.14). (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:13:33: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:14:30: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version To fix this, we replaced 'GtkWidget-focus-line-width' and 'GtkWidget-focus-padding' with 'outline-width' and 'padding' respectively. 'Outline-width' and 'padding' are CSS standard properties and they are suitable replacements. Also, I removed the padding property above. This does give the same behavior.
Review of attachment 319383 [details] [review]: Thanks for fixing this issue! The patch needs only 2 things fixed before it can be merged; it's very close. Please format the commit message according to standard conventions (the lines should be at most 72 characters long) https://wiki.gnome.org/Git/CommitMessages ::: data/gnome-maps.css @@ +9,2 @@ .layer-radio-button { background-image: none; We should keep padding: 0 here. Without padding: 0, the padding defaults to 1px which makes a small (but visible) border between the frame and the map layer image in the popover. I used the GtkInspector to check the precise CSS values (Ctrl + Shift + i) http://webm.land/media/Vbxy.webm
Also, if the first line of the commit changes, git bz attach doesn't automatically obsolete the older version of the patch so you need to do git bz attach -e in that case. http://git.fishsoup.net/cgit/git-bz/tree/git-bz.txt I manually obsoleted the old patch for you this time ;) http://koha.1045719.n5.nabble.com/Bugzilla-how-to-mark-a-file-as-obsolete-tp5080228.html
Created attachment 319496 [details] [review] css: Replace deprecated properties The problem is that these two warning pop up everytime we try to run gnome-maps due to GtkWidget deprecation (since version 3.14). (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:13:33: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version (org.gnome.Maps:13949): Gtk-WARNING **: Theme parsing error: application.css:14:30: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version To fix this, we remove 'GtkWidget-focus-line-width' and 'GtkWidget-focus-padding' and use 'outline-width' insted, which is a CSS standard property and a suitable replacement. This does give the same behavior.
Review of attachment 319496 [details] [review]: Looks good. Nice job!
Attachment 319496 [details] pushed as 6640692 - css: Replace deprecated properties