After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760444 - Fix runtime GTK+ warnings
Fix runtime GTK+ warnings
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
: 760671 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-01-11 09:15 UTC by Jonas Danielsson
Modified: 2016-01-22 01:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix run-time icon warning (1.18 KB, patch)
2016-01-11 09:15 UTC, Jonas Danielsson
none Details | Review
utils: Fix run-time icon warning (1.18 KB, patch)
2016-01-11 09:19 UTC, Jonas Danielsson
committed Details | Review
Fixed the 2 Gtk-WARNING (1.41 KB, patch)
2016-01-19 13:10 UTC, Codreanu Andrei-Marian
needs-work Details | Review
css: Replace deprecated properties (1.64 KB, patch)
2016-01-19 21:13 UTC, Codreanu Andrei-Marian
none Details | Review
css: Replace deprecated properties (1.50 KB, patch)
2016-01-21 13:54 UTC, Codreanu Andrei-Marian
committed Details | Review

Description Jonas Danielsson 2016-01-11 09:15:27 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.
Comment 1 Jonas Danielsson 2016-01-11 09:15:43 UTC
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)
Comment 2 Jonas Danielsson 2016-01-11 09:19:52 UTC
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)
Comment 3 Jonas Danielsson 2016-01-12 18:36:12 UTC
Attachment 318710 [details] pushed as d1de107 - utils: Fix run-time icon warning
Comment 4 Hashem Nasarat 2016-01-15 04:39:28 UTC
Is there anything else in this bug?
Comment 5 Jonas Danielsson 2016-01-15 06:08:18 UTC
(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
Comment 6 Jonas Danielsson 2016-01-15 14:05:19 UTC
*** Bug 760671 has been marked as a duplicate of this bug. ***
Comment 7 Codreanu Andrei-Marian 2016-01-19 13:10:35 UTC
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.
Comment 8 Jonas Danielsson 2016-01-19 13:14:42 UTC
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?
Comment 9 Codreanu Andrei-Marian 2016-01-19 21:13:21 UTC
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.
Comment 10 Hashem Nasarat 2016-01-20 18:58:55 UTC
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
Comment 11 Hashem Nasarat 2016-01-20 19:02:01 UTC
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
Comment 12 Codreanu Andrei-Marian 2016-01-21 13:54:16 UTC
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.
Comment 13 Hashem Nasarat 2016-01-22 00:27:28 UTC
Review of attachment 319496 [details] [review]:

Looks good. Nice job!
Comment 14 Hashem Nasarat 2016-01-22 01:12:26 UTC
Attachment 319496 [details] pushed as 6640692 - css: Replace deprecated properties