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 742910 - Remove Deprecated method gtk_style_context_get_border_color
Remove Deprecated method gtk_style_context_get_border_color
Status: RESOLVED FIXED
Product: libgd
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: libgd maintainer(s)
libgd maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-01-14 12:08 UTC by Sagar Ghuge
Modified: 2018-10-06 17:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove deprecated methods (931 bytes, patch)
2015-01-14 12:17 UTC, Sagar Ghuge
none Details | Review
Remove deprecated methods (927 bytes, patch)
2015-01-14 12:20 UTC, Sagar Ghuge
needs-work Details | Review
main-icon-view: Ignore deprecation warnings (1.12 KB, patch)
2018-10-06 17:10 UTC, Debarshi Ray
committed Details | Review

Description Sagar Ghuge 2015-01-14 12:08:12 UTC
gd-main-icon-view.c contains deprecated method gtk_style_context_get_border_color.
Comment 1 Sagar Ghuge 2015-01-14 12:17:47 UTC
Created attachment 294515 [details] [review]
Remove deprecated methods
Comment 2 Sagar Ghuge 2015-01-14 12:20:01 UTC
Created attachment 294517 [details] [review]
Remove deprecated methods
Comment 3 Debarshi Ray 2018-10-06 17:08:49 UTC
Review of attachment 294517 [details] [review]:

Thanks for the patch! I am sorry that it went unreviewed for so long.

::: libgd/gd-main-icon-view.c
@@ +300,3 @@
+	  gtk_render_frame (context,
+			    cr, 0, 0, allocation.width
+			    allocation.height);

Does this actually work with rubberband selection?

The code in this function is trying to draw the border around a rubberband selection, which is not necessarily a rectangle. Think of multiple rectangles of different sizes stuck to each other on different edges. It's a polygon with right-angled corners, but not necessarily a rectangle.

Therefore, it doesn't look like we can replace it with gtk_render_frame.
Comment 4 Debarshi Ray 2018-10-06 17:10:19 UTC
Created attachment 373861 [details] [review]
main-icon-view: Ignore deprecation warnings

I think that we might have to resort to locally disabling the deprecation instead.
Comment 5 Debarshi Ray 2018-10-06 17:25:46 UTC
Review of attachment 294517 [details] [review]:

I tested this with gnome-documents. Instead of drawing a solid border around a translucent polygon, it draws a completely solid polygon that hides the thumbnails of the selected items.

::: libgd/gd-main-icon-view.c
@@ +299,3 @@
 	  state = gtk_widget_get_state_flags (widget);
+	  gtk_render_frame (context,
+			    cr, 0, 0, allocation.width

Nitpick: missing comma.
Comment 6 Debarshi Ray 2018-10-06 17:40:36 UTC
Comment on attachment 373861 [details] [review]
main-icon-view: Ignore deprecation warnings

I have pushed this to master to reduce backlog on bugzilla. If there's a better way to do this, or any other feedback, it would be better to continue on GitLab instead.