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 670184 - [PATCH] Fix deprecated GTK API usage
[PATCH] Fix deprecated GTK API usage
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-16 05:45 UTC by Robert Ancell
Modified: 2012-02-19 14:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix deprecated GTK API usage (2.70 KB, patch)
2012-02-16 05:45 UTC, Robert Ancell
none Details | Review

Description Robert Ancell 2012-02-16 05:45:35 UTC
Created attachment 207728 [details] [review]
Fix deprecated GTK API usage

Fix deprecated GTK API usage
Comment 1 Felix Riemann 2012-02-16 11:48:46 UTC
Review of attachment 207728 [details] [review]:

::: src/eog-scroll-view.c
@@ +436,2 @@
 	/* this should work fairly well in this special case for scrollbars */
+	gtk_widget_get_preferred_size (priv->hbar, NULL, &req);

Is it really correct to use the natural size from get_preferred_size()?
I thought the replacement for size_request() is the mininum size.
Comment 2 Robert Ancell 2012-02-16 23:38:03 UTC
I've been using natural sizes in my code (from the name I'd guess it's better to have the widgets "natural" rather than crammed into the minimum!?).  Looking at the GTK+ code you're right that that's what gtk_widget_size_request does.

I'm happy to change the patch but I don't know what the correct solution is.
Comment 3 Felix Riemann 2012-02-19 14:11:44 UTC
I looked a bit around and everybode else seems to be doing it the "gtk+-way".
Also the API docs tell me that the "natural size" might actually be smaller than the minimum. So I changed the used requisition (better be too large than too small) and pushed your changes (this time I made sure that git keeps your credit ;)).

commit 9bd1a0720cb42486b87f0802a41346326af7bed6
Author: Robert Ancell <>
Date:   Thu Feb 16 16:36:34 2012 +1100

    Fix deprecated GTK API usage
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670184
---
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.