qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ui/gtk: Fix build with older versions of gtk
@ 2016-11-02 10:08 Thomas Huth
  2016-11-02 10:18 ` Daniel P. Berrange
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2016-11-02 10:08 UTC (permalink / raw)
  To: qemu-devel, Gerd Hoffmann; +Cc: qemu-trivial

GDK_KEY_Delete is only defined with gtk version 2.22 and newer,
on older versions this key was called GDK_Delete instead.
Since this is the case for all GDK_KEY_* defines, change the
already existing preprocessor check there to test for version 2.22,
so we know that we can remove this code block in case we require
that version as a minimum one day.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 ui/gtk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index ca737c4..e816428 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -94,7 +94,7 @@
 #define GDK_IS_WIN32_DISPLAY(dpy) (dpy == dpy)
 #endif
 
-#ifndef GDK_KEY_0
+#if !GTK_CHECK_VERSION(2, 22, 0)
 #define GDK_KEY_0 GDK_0
 #define GDK_KEY_1 GDK_1
 #define GDK_KEY_2 GDK_2
@@ -104,6 +104,7 @@
 #define GDK_KEY_plus GDK_plus
 #define GDK_KEY_minus GDK_minus
 #define GDK_KEY_Pause GDK_Pause
+#define GDK_KEY_Delete GDK_Delete
 #endif
 
 /* Some older mingw versions lack this constant or have
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] ui/gtk: Fix build with older versions of gtk
  2016-11-02 10:08 [Qemu-devel] [PATCH] ui/gtk: Fix build with older versions of gtk Thomas Huth
@ 2016-11-02 10:18 ` Daniel P. Berrange
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrange @ 2016-11-02 10:18 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, Gerd Hoffmann, qemu-trivial

On Wed, Nov 02, 2016 at 11:08:48AM +0100, Thomas Huth wrote:
> GDK_KEY_Delete is only defined with gtk version 2.22 and newer,
> on older versions this key was called GDK_Delete instead.
> Since this is the case for all GDK_KEY_* defines, change the
> already existing preprocessor check there to test for version 2.22,
> so we know that we can remove this code block in case we require
> that version as a minimum one day.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  ui/gtk.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-02 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 10:08 [Qemu-devel] [PATCH] ui/gtk: Fix build with older versions of gtk Thomas Huth
2016-11-02 10:18 ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).