From nobody Wed Nov 5 10:40:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1534943844234700.2865717464086; Wed, 22 Aug 2018 06:17:24 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D625D83F3D; Wed, 22 Aug 2018 13:17:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 99F9D2010D11; Wed, 22 Aug 2018 13:17:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4CDB8181A12E; Wed, 22 Aug 2018 13:17:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7MDG5bZ030337 for ; Wed, 22 Aug 2018 09:16:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id C14A621568A1; Wed, 22 Aug 2018 13:16:05 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-178.ams2.redhat.com [10.36.117.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67F062156889; Wed, 22 Aug 2018 13:16:04 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Date: Wed, 22 Aug 2018 14:15:53 +0100 Message-Id: <20180822131554.3398-3-berrange@redhat.com> In-Reply-To: <20180822131554.3398-1-berrange@redhat.com> References: <20180822131554.3398-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Fam Zheng , Gerd Hoffmann Subject: [libvirt] [PATCH v2 2/3] ui: increase min required GTK3 version to 3.14.0 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 22 Aug 2018 13:17:21 +0000 (UTC) X-ZohoMail: RDMRC_0 RSF_0 Z_629925259 SPT_0 Per supported platforms doc[1], the various min GTK3 on relevant distros is: RHEL-7.0: 3.8.8 RHEL-7.2: 3.14.13 RHEL-7.4: 3.22.10 RHEL-7.5: 3.22.26 Debian (Stretch): 3.22.11 Debian (Jessie): 3.14.5 OpenBSD (Ports): 3.22.30 FreeBSD (Ports): 3.22.29 OpenSUSE Leap 15: 3.22.30 SLE12-SP2: Unknown Ubuntu (Xenial): 3.18.9 macOS (Homebrew): 3.22.30 This suggests that a minimum GTK3 of 3.14.0 is a reasonable target, as users are unlikely to be stuck on RHEL-7.0/7.1 still [1] https://qemu.weilnetz.de/doc/qemu-doc.html#Supported-build-platforms Signed-off-by: Daniel P. Berrang=C3=A9 --- configure | 2 +- ui/gtk.c | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/configure b/configure index f982d8bd61..eca30885d6 100755 --- a/configure +++ b/configure @@ -2646,7 +2646,7 @@ fi if test "$gtk" !=3D "no"; then gtkpackage=3D"gtk+-3.0" gtkx11package=3D"gtk+-x11-3.0" - gtkversion=3D"3.0.0" + gtkversion=3D"3.14.0" if $pkg_config --exists "$gtkpackage >=3D $gtkversion"; then gtk_cflags=3D$($pkg_config --cflags $gtkpackage) gtk_libs=3D$($pkg_config --libs $gtkpackage) diff --git a/ui/gtk.c b/ui/gtk.c index 9d09bc9e57..6d57558084 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -998,7 +998,6 @@ static gboolean gd_scroll_event(GtkWidget *widget, GdkE= ventScroll *scroll, btn =3D INPUT_BUTTON_WHEEL_UP; } else if (scroll->direction =3D=3D GDK_SCROLL_DOWN) { btn =3D INPUT_BUTTON_WHEEL_DOWN; -#if GTK_CHECK_VERSION(3, 4, 0) } else if (scroll->direction =3D=3D GDK_SCROLL_SMOOTH) { gdouble delta_x, delta_y; if (!gdk_event_get_scroll_deltas((GdkEvent *)scroll, @@ -1010,7 +1009,6 @@ static gboolean gd_scroll_event(GtkWidget *widget, Gd= kEventScroll *scroll, } else { btn =3D INPUT_BUTTON_WHEEL_UP; } -#endif } else { return TRUE; } @@ -1672,11 +1670,9 @@ static GSList *gd_vc_menu_init(GtkDisplayState *s, V= irtualConsole *vc, gtk_accel_group_connect(s->accel_group, GDK_KEY_1 + idx, HOTKEY_MODIFIERS, 0, g_cclosure_new_swap(G_CALLBACK(gd_accel_switch_vc), vc, NULL)); -#if GTK_CHECK_VERSION(3, 8, 0) gtk_accel_label_set_accel( GTK_ACCEL_LABEL(gtk_bin_get_child(GTK_BIN(vc->menu_item))), GDK_KEY_1 + idx, HOTKEY_MODIFIERS); -#endif =20 g_signal_connect(vc->menu_item, "activate", G_CALLBACK(gd_menu_switch_vc), s); @@ -2167,11 +2163,9 @@ static GtkWidget *gd_create_menu_view(GtkDisplayStat= e *s) TRUE); gtk_accel_group_connect(s->accel_group, GDK_KEY_m, HOTKEY_MODIFIERS, 0, g_cclosure_new_swap(G_CALLBACK(gd_accel_show_menubar), s, NULL= )); -#if GTK_CHECK_VERSION(3, 8, 0) gtk_accel_label_set_accel( GTK_ACCEL_LABEL(gtk_bin_get_child(GTK_BIN(s->show_menubar_item= ))), GDK_KEY_m, HOTKEY_MODIFIERS); -#endif gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), s->show_menubar_item); =20 return view_menu; @@ -2221,11 +2215,7 @@ static void gtk_display_init(DisplayState *ds, Displ= ayOptions *opts) s->opts =3D opts; =20 s->window =3D gtk_window_new(GTK_WINDOW_TOPLEVEL); -#if GTK_CHECK_VERSION(3, 2, 0) s->vbox =3D gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); -#else - s->vbox =3D gtk_vbox_new(FALSE, 0); -#endif s->notebook =3D gtk_notebook_new(); s->menu_bar =3D gtk_menu_bar_new(); =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list