Bug 26583 - [Gtk] Remove deprecated GTK+ symbols
: [Gtk] Remove deprecated GTK+ symbols
Status: RESOLVED FIXED
: WebKit
WebKit Gtk
: 528+ (Nightly build)
: PC Linux
: P2 Normal
Assigned To:
:
: Gtk
:
:
  Show dependency treegraph
 
Reported: 2009-06-21 06:53 PST by
Modified: 2009-06-27 22:55 PST (History)


Attachments
Stop using deprecated GTK+ symbols (3.25 KB, patch)
2009-06-25 15:28 PST, Emilio Pozuelo Monfort
jmalonzo: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-06-21 06:53:50 PST
According to http://www.gnome.org/~fpeters/299.html Webkit uses the following deprecated GTK+ symbols that will be removed for GTK3/GNOME3:

gtk_timeout_add, gtk_timeout_remove, gtk_toolbar_set_orientation, gtk_type_class, gtk_type_new

Also see http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B

See http://library.gnome.org for their replacements.
------- Comment #1 From 2009-06-25 15:05:24 PST -------
I'm working on this
------- Comment #2 From 2009-06-25 15:28:46 PST -------
Created an attachment (id=31880) [details]
Stop using deprecated GTK+ symbols

My first WebKit patch!
------- Comment #3 From 2009-06-25 17:31:07 PST -------
(From update of attachment 31880 [details])
> diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
> index 442178e..add2229 100644
> --- a/WebCore/ChangeLog
> +++ b/WebCore/ChangeLog
> @@ -1,3 +1,15 @@
> +2009-06-25  Emilio Pozuelo Monfort  <pochu27@gmail.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        [GTK] Don't use deprecated GTK+ symbols.
> +        https://bugs.webkit.org/show_bug.cgi?id=26583
> +
> +        * plugins/gtk/gtk2xtbin.c:
> +        (gtk_xtbin_class_init):
> +        (gtk_xtbin_new):
> +        (gtk_xtbin_destroy):
> +
>  2009-06-25  Dimitri Glazkov  <dglazkov@chromium.org>
>  
>          Unreviewed, build fix.
> diff --git a/WebCore/plugins/gtk/gtk2xtbin.c b/WebCore/plugins/gtk/gtk2xtbin.c
> index 8d52aa2..68c5373 100644
> --- a/WebCore/plugins/gtk/gtk2xtbin.c
> +++ b/WebCore/plugins/gtk/gtk2xtbin.c
> @@ -42,8 +42,6 @@
>   * inside a GTK application.  
>   */
>  
> -#undef GTK_DISABLE_DEPRECATED
> -
>  #include "xembed.h"
>  #include "gtk2xtbin.h"
>  #include <gtk/gtk.h>
> @@ -246,7 +244,7 @@ gtk_xtbin_class_init (GtkXtBinClass *klass)
>    GtkWidgetClass *widget_class;
>    GtkObjectClass *object_class;
>  
> -  parent_class = gtk_type_class (GTK_TYPE_SOCKET);
> +  parent_class = g_type_class_peek_parent (klass);

Why the change from GTK_TYPE_SOCKET to klass? Is it safe?
------- Comment #4 From 2009-06-26 18:45:36 PST -------
(In reply to comment #3)
> Why the change from GTK_TYPE_SOCKET to klass? Is it safe?

I'm not a GObject expert, but AFAICS it is. g_type_class_peek_parent (klass) will return klass' parent, which is specified in the g_type_register_static() call a few lines above. So g_type_class_peek_parent (klass) will return a pointer to the GTK_TYPE_SOCKET class, as we were doing before.

Still, I wouldn't mind confirmation from a GObject guru :)
------- Comment #5 From 2009-06-27 22:17:27 PST -------
(From update of attachment 31880 [details])
r=m3
------- Comment #6 From 2009-06-27 22:55:00 PST -------
(In reply to comment #5)
> (From update of attachment 31880 [details] [review])
> r=m3
> 

Landed in r45319