gtkaboutdialog: don't break ABI in GtkLicense enum

As the elements in the enum are not explicitly numbered, inserting an
element between some other elements shall change the values of elements
after the insertion. So append the new element at the end.

Anyway, no code should rely on the position of an element in an enum.

https://bugzilla.gnome.org/show_bug.cgi?id=763850
This commit is contained in:
Mohammed Sadik 2016-03-25 18:08:07 +05:30 committed by Rico Tzschichholz
parent 4c8557fa35
commit d47c7f7ba0
2 changed files with 6 additions and 6 deletions

View File

@ -119,7 +119,6 @@ static const LicenseInfo gtk_license_info [] = {
{ N_("Custom License") , NULL },
{ N_("GNU General Public License, version 2 or later"), "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html" },
{ N_("GNU General Public License, version 3 or later"), "http://www.gnu.org/licenses/gpl-3.0.html" },
{ N_("GNU Affero General Public License, version 3 or later"), "http://www.gnu.org/licenses/agpl-3.0.html" },
{ N_("GNU Lesser General Public License, version 2.1 or later"), "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" },
{ N_("GNU Lesser General Public License, version 3 or later"), "http://www.gnu.org/licenses/lgpl-3.0.html" },
{ N_("BSD 2-Clause License"), "http://opensource.org/licenses/bsd-license.php" },
@ -128,7 +127,8 @@ static const LicenseInfo gtk_license_info [] = {
{ N_("GNU General Public License, version 2 only"), "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html" },
{ N_("GNU General Public License, version 3 only"), "http://www.gnu.org/licenses/gpl-3.0.html" },
{ N_("GNU Lesser General Public License, version 2.1 only"), "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" },
{ N_("GNU Lesser General Public License, version 3 only"), "http://www.gnu.org/licenses/lgpl-3.0.html" }
{ N_("GNU Lesser General Public License, version 3 only"), "http://www.gnu.org/licenses/lgpl-3.0.html" },
{ N_("GNU Affero General Public License, version 3 or later"), "http://www.gnu.org/licenses/agpl-3.0.html" }
};
typedef struct

View File

@ -49,7 +49,6 @@ typedef struct _GtkAboutDialogPrivate GtkAboutDialogPrivate;
* developer
* @GTK_LICENSE_GPL_2_0: The GNU General Public License, version 2.0 or later
* @GTK_LICENSE_GPL_3_0: The GNU General Public License, version 3.0 or later
* @GTK_LICENSE_AGPL_3_0: The GNU Affero General Public License, version 3.0 or later. Since: 3.22
* @GTK_LICENSE_LGPL_2_1: The GNU Lesser General Public License, version 2.1 or later
* @GTK_LICENSE_LGPL_3_0: The GNU Lesser General Public License, version 3.0 or later
* @GTK_LICENSE_BSD: The BSD standard license
@ -59,6 +58,7 @@ typedef struct _GtkAboutDialogPrivate GtkAboutDialogPrivate;
* @GTK_LICENSE_GPL_3_0_ONLY: The GNU General Public License, version 3.0 only. Since 3.12.
* @GTK_LICENSE_LGPL_2_1_ONLY: The GNU Lesser General Public License, version 2.1 only. Since 3.12.
* @GTK_LICENSE_LGPL_3_0_ONLY: The GNU Lesser General Public License, version 3.0 only. Since 3.12.
* @GTK_LICENSE_AGPL_3_0: The GNU Affero General Public License, version 3.0 or later. Since: 3.22.
*
* The type of license for an application.
*
@ -73,8 +73,6 @@ typedef enum {
GTK_LICENSE_GPL_2_0,
GTK_LICENSE_GPL_3_0,
GTK_LICENSE_AGPL_3_0,
GTK_LICENSE_LGPL_2_1,
GTK_LICENSE_LGPL_3_0,
@ -86,7 +84,9 @@ typedef enum {
GTK_LICENSE_GPL_2_0_ONLY,
GTK_LICENSE_GPL_3_0_ONLY,
GTK_LICENSE_LGPL_2_1_ONLY,
GTK_LICENSE_LGPL_3_0_ONLY
GTK_LICENSE_LGPL_3_0_ONLY,
GTK_LICENSE_AGPL_3_0
} GtkLicense;
/**