Bug 35727

Summary: [GTK] GTK_WIDGET_NO_WINDOW deprecated in GTK+ 2.20
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
proposed patch
eric: review-
proposed patch gustavo: review-

Description Philippe Normand 2010-03-04 01:32:06 PST
We should use gtk_widget_set_has_window() instead if GTK version is >= 2.18.
Comment 1 Philippe Normand 2010-03-04 01:33:31 PST
I meant gtk_widget_get_has_window of course :)
Comment 2 Philippe Normand 2010-03-04 02:08:24 PST
Created attachment 49999 [details]
proposed patch
Comment 3 Eric Seidel (no email) 2010-03-05 13:17:39 PST
Comment on attachment 49999 [details]
proposed patch

Can we wrap this in some helper function?  Copy/paste 4 times seems silly.  Even if we just used a helper function in GtkWidget.cpp that would be better than this.
Comment 4 Philippe Normand 2010-03-08 00:46:19 PST
Created attachment 50195 [details]
proposed patch
Comment 5 Gustavo Noronha (kov) 2010-03-08 13:56:02 PST
Comment on attachment 50195 [details]
proposed patch

 24 #if GTK_CHECK_VERSION(2, 18, 0)
 25 #define WIDGET_HAS_WINDOW(widget) gtk_widget_get_has_window(widget)
 26 #else
 27 #define WIDGET_HAS_WINDOW(widget) !GTK_WIDGET_NO_WINDOW(widget)

I think creating a utils file just for this is not worth it. Why not add a function to the WidgetGtk class (or file), as Eric suggested?

 691 #if GTK_CHECK_VERSION(2, 18, 0)
 692     if (gtk_widget_is_sensitive(widget)) {
 693 #else
691694     if (GTK_WIDGET_IS_SENSITIVE(widget)) {
 695 #endif

This is unrelated. Please put it into another patch.
Comment 6 Philippe Normand 2010-03-09 00:21:05 PST
(In reply to comment #5)
> (From update of attachment 50195 [details])
>  24 #if GTK_CHECK_VERSION(2, 18, 0)
>  25 #define WIDGET_HAS_WINDOW(widget) gtk_widget_get_has_window(widget)
>  26 #else
>  27 #define WIDGET_HAS_WINDOW(widget) !GTK_WIDGET_NO_WINDOW(widget)
> 
> I think creating a utils file just for this is not worth it. Why not add a
> function to the WidgetGtk class (or file), as Eric suggested?
> 

Ok can you tell me what you want exactly? a method of the class or a static function?

>  691 #if GTK_CHECK_VERSION(2, 18, 0)
>  692     if (gtk_widget_is_sensitive(widget)) {
>  693 #else
> 691694     if (GTK_WIDGET_IS_SENSITIVE(widget)) {
>  695 #endif
> 
> This is unrelated. Please put it into another patch.

I just put it in this patch because it was fixing my build for the same reasons (gtk deprecating apis)... but yeah fine, it just adds one patch in the queue :P