Re: [webkit-dev] Odd Build Issue on Gtk Port

2010-10-16 Thread Alex Milowski
On Sat, Oct 16, 2010 at 12:35 AM, Holger Freyther  wrote:
> On 10/16/2010 12:13 AM, Alex Milowski wrote:
>> I kept getting GDK_DISPLAY related errors on my Ubuntu-based development
>> machine.  It turns on in Gtk 2.22.0 that GDK_DISPLAY just isn't defined
>> (at least via Ubuntu 10.10).
>
> In debug build we build with the various *_DISABLE_DEPRECATED flags. Due the
> GNOME 3.0/GTK 3.0 thing, there is a lot more deprecation going on.

Ah.  I was building the debug build.


-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Odd Build Issue on Gtk Port

2010-10-16 Thread Holger Freyther
On 10/16/2010 12:13 AM, Alex Milowski wrote:
> I kept getting GDK_DISPLAY related errors on my Ubuntu-based development
> machine.  It turns on in Gtk 2.22.0 that GDK_DISPLAY just isn't defined
> (at least via Ubuntu 10.10).

In debug build we build with the various *_DISABLE_DEPRECATED flags. Due the
GNOME 3.0/GTK 3.0 thing, there is a lot more deprecation going on.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Odd Build Issue on Gtk Port

2010-10-15 Thread Alex Milowski
On Fri, Oct 15, 2010 at 3:34 PM, Martin Robinson
 wrote:
> On Fri, Oct 15, 2010 at 3:32 PM, Evan Martin  wrote:
>> gdk_display_get_default() has been available since 2.2, which is older
>> than anything still around.  You should probably fix the call site
>> rather than doing this header tweak.
>
> I concur. Ideally GtkVersioning.h should be used for API that exists
> in newer versions of GTK and not older ones.

OK.

This is not my area of expertise.  I just hacked my way through it to get
a working version.

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Odd Build Issue on Gtk Port

2010-10-15 Thread Evan Martin
http://library.gnome.org/devel/gdk/2.22/gdk-X-Window-System-Interaction.html#GDK-DISPLAY:CAPS

"GDK_DISPLAY has been deprecated since version 2.22 and should not be
used in newly-written code. Use gdk_display_get_default()"

gdk_display_get_default() has been available since 2.2, which is older
than anything still around.  You should probably fix the call site
rather than doing this header tweak.

On Fri, Oct 15, 2010 at 3:13 PM, Alex Milowski  wrote:
> I kept getting GDK_DISPLAY related errors on my Ubuntu-based development
> machine.  It turns on in Gtk 2.22.0 that GDK_DISPLAY just isn't defined
> (at least via Ubuntu 10.10).
>
> I fixed that by a header tweak:
>
> Index: GtkVersioning.h
> ===
> --- GtkVersioning.h     (revision 69861)
> +++ GtkVersioning.h     (working copy)
> @@ -30,6 +30,10 @@
>  G_BEGIN_DECLS
>
>  // Macros to avoid deprecation checking churn
> +#if GTK_CHECK_VERSION(2, 22, 0)
> +#define GDK_DISPLAY() (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()))
> +#endif
> +
>  #ifndef GTK_API_VERSION_2
>  #define GDK_DISPLAY() (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()))
>  #else
>
>
> I'm not an expert on this so I really don't know why this is
> necessary.  With the
> above change, everything compiles and works fine.
>
> --
> --Alex Milowski
> "The excellence of grammar as a guide is proportional to the paucity of the
> inflexions, i.e. to the degree of analysis effected by the language
> considered."
>
> Bertrand Russell in a footnote of Principles of Mathematics
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] Odd Build Issue on Gtk Port

2010-10-15 Thread Alex Milowski
I kept getting GDK_DISPLAY related errors on my Ubuntu-based development
machine.  It turns on in Gtk 2.22.0 that GDK_DISPLAY just isn't defined
(at least via Ubuntu 10.10).

I fixed that by a header tweak:

Index: GtkVersioning.h
===
--- GtkVersioning.h (revision 69861)
+++ GtkVersioning.h (working copy)
@@ -30,6 +30,10 @@
 G_BEGIN_DECLS

 // Macros to avoid deprecation checking churn
+#if GTK_CHECK_VERSION(2, 22, 0)
+#define GDK_DISPLAY() (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()))
+#endif
+
 #ifndef GTK_API_VERSION_2
 #define GDK_DISPLAY() (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()))
 #else


I'm not an expert on this so I really don't know why this is
necessary.  With the
above change, everything compiles and works fine.

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev