emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Increase minimum required GTK versions?


From: Alex
Subject: Re: Increase minimum required GTK versions?
Date: Tue, 09 Apr 2019 21:14:02 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Alex <address@hidden>
>> Date: Tue, 09 Apr 2019 11:28:41 -0600
>> Cc: Stefan Monnier <address@hidden>, address@hidden
>> 
>> If there are no objections I'll push the revised patch in a few days.
>
> To allow proper review, please make the log message more detailed.  In
> particular, stuff you remove that is not under an explicit GTK version
> condition should have a minimal explanation for why it is TRT to
> remove it.  (The rationale doesn't have to be in the log message,
> although it would be nice to have it there; it could be just in the
> email that accompanies the patch.)

Here's a brief overview of the changes outside of explicit checks:

* HAVE_GTK_* function checks in configure.ac
These check for functions available in later GTK 2 versions. These
checks and the blocks that use them can safely be removed with the
exception of gtk_window_set_has_resize_grip, which according to a
comment in gtkutil.c causes an issue in Ubuntu's GTK 2.

* USE_GTK_TOOLTIP
This is defined when CHECK_GTK_VERSION (2, 14, 0), so all instances can
be removed.

* Old file selection dialog
This is only optionally used in GTK 2, but the old dialog is long
deprecated in GTK 2 (removed in GTK 3), so I figured that this is a good
time to remove it and simplify the existing code.

The first 2 of the above are covered by "now unused conditional blocks",
so I didn't think I should include them in the commit message. I added
in a reason for removing the file selection dialog.

> Please also tell with which GTK versions did you try building with to
> verify the correctness of the changes.

I tested with GTK 2.24.32 and GTK 3.24.7. I didn't see a need to test
with an older GTK 3 version since the GTK 3 part of the change involves
simplifying version checks 3 <= version <= 3.10 (and
USE_NEW_GTK_FONT_CHOOSER) to HAVE_GTK3 checks.

>> Subject: [PATCH] Bump minimum GTK versions to 2.24 and 3.10
>
> Not sure we discussed 3.10 as the minimum GTK3 version, we only talked
> about 2.x AFAIR.  What is the situation with GTK3 versions in the
> current distributions of GNU/Linux?

My messages briefly discussed the minimum of 3.10 and how Debian Jessie
(oldstable -- soon to be oldoldstable), and Ubuntu 14.04LTS have GTK 3.10.

RHEL doesn't even support GTK 3 until RHEL 7, which has 3.22.

So I think bumping to 3.10 doesn't hurt, especially since there's still
GTK 2 support. Though I admit that bumping the GTK 3 version doesn't
help a whole lot, and it doesn't look like it will until 3.22 (2016)
becomes the minimum.

>> -/* True iff GTK's version is at least I.J.K.  */
>> -#ifndef GTK_CHECK_VERSION
>> -# ifdef USE_GTK
>> -#  define GTK_CHECK_VERSION(i, j, k) \
>> -     ((i) \
>> -      < GTK_MAJOR_VERSION + ((j) \
>> -                         < GTK_MINOR_VERSION + ((k) \
>> -                                                <= GTK_MICRO_VERSION)))
>
> Is it really a good idea to remove this macro?  We'll probably have to
> reintroduce it right away.

The #ifdef USE_GTK block was dead code, since GTK always defines this
macro[1] (at least as far back as I checked -- much before even the
current minimum of 2.10). Now only a stub is defined in the case of not
using GTK.

I've attached the patch with a slightly revised commit message.

[1]
https://developer.gnome.org/gtk3/stable/gtk3-Feature-Test-Macros.html#GTK-CHECK-VERSION:CAPS

Attachment: 0001-Bump-minimum-GTK-versions-to-2.24-and-3.10.patch
Description: Bump GTK versions


reply via email to

[Prev in Thread] Current Thread [Next in Thread]