Skip to contentSkip to conversation

ui: deprecate use of GTK 2.x in favour of 3.x series

PATCH In review Daniel P. Berrange 2 participants 4 messages Dec 12, 2017 – Jan 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ui: deprecate use of GTK 2.x in favour of 3.x series

The GTK 3.0 release was made in Feb, 2011:

https://blog.gtk.org/2011/02/10/gtk-3-0-released/

That will soon be 7 years ago, which is enough time to consider the 3.x series widely supported.

Thus we deprecate the GTK 2.x support, which will allow us to delete it in the last release of 2018. By this time, GTK 3.x will be almost 8 years old.

---
 configure     | 6 ++++++
 qemu-doc.texi | 9 +++++++++
 ui/gtk.c      | 5 +++++
 3 files changed, 20 insertions(+)
configure +6 -0
index 0c6e7572db..1c5110dc5e 100755
@@ -5560,6 +5560,12 @@ if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
 fi
 
+if test "$gtkabi" = "2.0"; then
+    echo
+    echo "WARNING: Use of GTK 2.0 is deprecated and will be removed in"
+    echo "WARNING: future releases. Please switch to using GTK 3.0"
+fi
+
 if test "$supported_cpu" = "no"; then
     echo
     echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
qemu-doc.texi +9 -0
index db2351c746..ab03031da3 100644
@@ -2371,6 +2371,15 @@ they were first deprecated in the 2.10.0 release.
 What follows is a list of all features currently marked as
 deprecated.
 
+@section Build options
+
+@subsection GTK 2.x
+
+Previously QEMU has supported building against both GTK 2.x
+and 3.x series APIs. Support for the GTK 2.x builds will be
+discontinued, so maintainers should switch to using GTK 3.x,
+which is the default.
+
 @section System emulator command line arguments
 
 @subsection -drive boot=on|off (since 1.3.0)
ui/gtk.c +5 -0
index 342e96fbe9..f3b7567984 100644
@@ -2248,6 +2248,11 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
         exit(1);
     }
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
+    g_printerr("Running QEMU with GTK 2.x is deprecated, and will be removed\n"
+               "in a future release. Please switch to GTK 3.x instead\n");
+#endif
+
     s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 #if GTK_CHECK_VERSION(3, 2, 0)
     s->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
Signature · 1 line
2.14.3
#1 lore raw
Quoted 10 lines · Daniel P. Berrange

The GTK 3.0 release was made in Feb, 2011:

https://blog.gtk.org/2011/02/10/gtk-3-0-released/

That will soon be 7 years ago, which is enough time to consider the 3.x series widely supported.

Thus we deprecate the GTK 2.x support, which will allow us to delete it in the last release of 2018. By this time, GTK 3.x will be almost 8 years old.

FYI, SDL 2.0 came out on 2013/08/17. So if we also deprecated SDL 1.0, the 2.x release series would have 5 years of availability before we actually delete 1.0 support. That's less than GTK 3.0, but still quite a long time. If people think that is acceptable i'll send another patch to deprecate SDL 1.0 too.

Quoted 64 lines
---
 configure     | 6 ++++++
 qemu-doc.texi | 9 +++++++++
 ui/gtk.c      | 5 +++++
 3 files changed, 20 insertions(+)
configure +6 -0
index 0c6e7572db..1c5110dc5e 100755
@@ -5560,6 +5560,12 @@ if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
 fi
 
+if test "$gtkabi" = "2.0"; then
+    echo
+    echo "WARNING: Use of GTK 2.0 is deprecated and will be removed in"
+    echo "WARNING: future releases. Please switch to using GTK 3.0"
+fi
+
 if test "$supported_cpu" = "no"; then
     echo
     echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
qemu-doc.texi +9 -0
index db2351c746..ab03031da3 100644
@@ -2371,6 +2371,15 @@ they were first deprecated in the 2.10.0 release.
 What follows is a list of all features currently marked as
 deprecated.
 
+@section Build options
+
+@subsection GTK 2.x
+
+Previously QEMU has supported building against both GTK 2.x
+and 3.x series APIs. Support for the GTK 2.x builds will be
+discontinued, so maintainers should switch to using GTK 3.x,
+which is the default.
+
 @section System emulator command line arguments
 
 @subsection -drive boot=on|off (since 1.3.0)
ui/gtk.c +5 -0
index 342e96fbe9..f3b7567984 100644
@@ -2248,6 +2248,11 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
         exit(1);
     }
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
+    g_printerr("Running QEMU with GTK 2.x is deprecated, and will be removed\n"
+               "in a future release. Please switch to GTK 3.x instead\n");
+#endif
+
     s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 #if GTK_CHECK_VERSION(3, 2, 0)
     s->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
Signature · 1 line
2.14.3

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
In reply to Daniel P. Berrange

ping.

Gerd, do you have any opinions on this, and also deprecating SDL-1 ?

Quoted 74 lines · Daniel P. Berrange

The GTK 3.0 release was made in Feb, 2011:

https://blog.gtk.org/2011/02/10/gtk-3-0-released/

That will soon be 7 years ago, which is enough time to consider the 3.x series widely supported.

Thus we deprecate the GTK 2.x support, which will allow us to delete it in the last release of 2018. By this time, GTK 3.x will be almost 8 years old.

---
 configure     | 6 ++++++
 qemu-doc.texi | 9 +++++++++
 ui/gtk.c      | 5 +++++
 3 files changed, 20 insertions(+)
configure +6 -0
index 0c6e7572db..1c5110dc5e 100755
@@ -5560,6 +5560,12 @@ if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
 fi
 
+if test "$gtkabi" = "2.0"; then
+    echo
+    echo "WARNING: Use of GTK 2.0 is deprecated and will be removed in"
+    echo "WARNING: future releases. Please switch to using GTK 3.0"
+fi
+
 if test "$supported_cpu" = "no"; then
     echo
     echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
qemu-doc.texi +9 -0
index db2351c746..ab03031da3 100644
@@ -2371,6 +2371,15 @@ they were first deprecated in the 2.10.0 release.
 What follows is a list of all features currently marked as
 deprecated.
 
+@section Build options
+
+@subsection GTK 2.x
+
+Previously QEMU has supported building against both GTK 2.x
+and 3.x series APIs. Support for the GTK 2.x builds will be
+discontinued, so maintainers should switch to using GTK 3.x,
+which is the default.
+
 @section System emulator command line arguments
 
 @subsection -drive boot=on|off (since 1.3.0)
ui/gtk.c +5 -0
index 342e96fbe9..f3b7567984 100644
@@ -2248,6 +2248,11 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
         exit(1);
     }
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
+    g_printerr("Running QEMU with GTK 2.x is deprecated, and will be removed\n"
+               "in a future release. Please switch to GTK 3.x instead\n");
+#endif
+
     s->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 #if GTK_CHECK_VERSION(3, 2, 0)
     s->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
Signature · 1 line
2.14.3

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#3 lore raw
Quoted 3 lines · Daniel P. Berrange

ping.

Gerd, do you have any opinions on this, and also deprecating SDL-1 ?

Patch added to queue.

Yes, I'll take a SDL-1 deprecation patch too.

cheers,
Gerd