[gtk+] gtkaboutdialog: don't break ABI in GtkLicense enum
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkaboutdialog: don't break ABI in GtkLicense enum
- Date: Fri, 25 Mar 2016 17:39:02 +0000 (UTC)
commit d47c7f7ba01d12a529bf25ccee099046754f5538
Author: Mohammed Sadik <sadiq sadiqpk org>
Date: Fri Mar 25 18:08:07 2016 +0530
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
gtk/gtkaboutdialog.c | 4 ++--
gtk/gtkaboutdialog.h | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 246b7ab..5863910 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -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
diff --git a/gtk/gtkaboutdialog.h b/gtk/gtkaboutdialog.h
index e2c1d73..d00ea09 100644
--- a/gtk/gtkaboutdialog.h
+++ b/gtk/gtkaboutdialog.h
@@ -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;
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]