[gimp] Issue #3852: Error compilation gimpimagecombobox MSYS2.



commit e1e048a8231ef4451f916942624fba0c7cf4f8af
Author: Jehan <jehan girinstud io>
Date:   Tue Aug 27 15:19:48 2019 +0200

    Issue #3852: Error compilation gimpimagecombobox MSYS2.
    
    Seems underscored APIs are not visible on Win32. Anyway even if we fixed
    this, this would only be temporary as all these deprecated APIs are only
    meant to stay around temporarily, then be actually unavailable.
    
    I hesitated to actually undeprecate the `_gimp_*_is_valid()` (like
    making a `gimp_image_is_valid_id()` API for instance) but this is
    actually quite similar to just create the GimpImage: if
    gimp_image_get_by_id() returns NULL, then the ID was not valid.

 libgimp/gimpimagecombobox.c | 2 +-
 libgimp/gimpitemcombobox.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgimp/gimpimagecombobox.c b/libgimp/gimpimagecombobox.c
index e0ac53495b..fce1698ae1 100644
--- a/libgimp/gimpimagecombobox.c
+++ b/libgimp/gimpimagecombobox.c
@@ -288,7 +288,7 @@ gimp_image_combo_box_changed (GimpImageComboBox *combo_box)
   if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (combo_box),
                                      &image_ID))
     {
-      if (! _gimp_image_is_valid (image_ID))
+      if (! gimp_image_get_by_id (image_ID))
         {
           GtkTreeModel *model;
 
diff --git a/libgimp/gimpitemcombobox.c b/libgimp/gimpitemcombobox.c
index 1df35313b0..7cca43cad4 100644
--- a/libgimp/gimpitemcombobox.c
+++ b/libgimp/gimpitemcombobox.c
@@ -576,7 +576,7 @@ gimp_item_combo_box_changed (GimpIntComboBox *combo_box)
 
   if (gimp_int_combo_box_get_active (combo_box, &item_ID))
     {
-      if (item_ID > 0 && ! _gimp_item_is_valid (item_ID))
+      if (! gimp_item_get_by_id (item_ID))
         {
           GtkTreeModel *model;
           GList        *remove = NULL;


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