[gimp-gap/gap-2-8] replaced deprecated procedure calls



commit 549496022e1d257c74ee55f735153b7607a5af85
Author: Wolfgang Hofer <wolfgangh svn gnome org>
Date:   Sat May 28 16:37:46 2016 +0200

    replaced deprecated procedure calls

 ChangeLog                        |   11 +++++++++++
 gap/gap_image.c                  |    8 +++++++-
 gap/gap_story_att_trans_dlg.c    |   18 ++++++++++--------
 gap/gap_story_render_processor.c |   11 +++++++----
 4 files changed, 35 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b0e6fa2..5c7a127 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-05-28 Wolfgang Hofer <hof gimp org>
+
+- replaced deprecated procedure calls: 
+    gimp_image_scale_full
+    gimp_rect_select       (calling gimp_image_select_rectangle  instead)
+
+
+ * gap/gap_image.c
+ * gap/gap_story_att_trans_dlg.c
+ * gap/gap_story_render_processor.c
+ 
 2016-03-28 Wolfgang Hofer <hof gimp org>
 
 - Merged DetailTracking fixes from master
diff --git a/gap/gap_image.c b/gap/gap_image.c
index 5a0b448..a9b355e 100644
--- a/gap/gap_image.c
+++ b/gap/gap_image.c
@@ -65,8 +65,14 @@ gap_image_delete_immediate (gint32 image_id)
     }
 
     gimp_image_undo_disable(image_id);
+    
+    //gimp_image_scale_full(image_id, 2, 2, 0 /*INTERPOLATION_NONE*/);
+
+    gimp_context_push();
+    gimp_context_set_interpolation(0);
+    gimp_image_scale(image_id, 2, 2);
+    gimp_context_pop();
 
-    gimp_image_scale_full(image_id, 2, 2, 0 /*INTERPOLATION_NONE*/);
 
     gimp_image_undo_enable(image_id); /* clear undo stack */
   }
diff --git a/gap/gap_story_att_trans_dlg.c b/gap/gap_story_att_trans_dlg.c
index d30c8d4..4bbfe10 100644
--- a/gap/gap_story_att_trans_dlg.c
+++ b/gap/gap_story_att_trans_dlg.c
@@ -1346,6 +1346,10 @@ p_create_color_layer(GapStbAttrWidget *attw, gint32 image_id
   ofs_x = ((gdouble)gimp_image_width(image_id) - pv_master_width) / 2.0;
   ofs_y = ((gdouble)gimp_image_height(image_id) - pv_master_height) / 2.0;
 
+  gimp_context_push();
+  gimp_context_set_feather(FALSE);
+  gimp_context_set_feather_radius(0.0, 0.0);
+
   /* green border */
   {
     GimpRGB  color;
@@ -1356,15 +1360,14 @@ p_create_color_layer(GapStbAttrWidget *attw, gint32 image_id
     color.b = 0.17;
     color.a = 1.0;
 
+
     /* selection for green rectangle (2 pixels border around master size) */
-    gimp_rect_select(image_id
+    gimp_image_select_rectangle(image_id
+                  , GIMP_CHANNEL_OP_REPLACE
                   , ofs_x -2
                   , ofs_y -2
                   , pv_master_width +4
                   , pv_master_height +4
-                  , GIMP_CHANNEL_OP_REPLACE
-                  , 0       /* gint32 feather */
-                  , 0.0     /* gdouble feather radius */
                   );
 
     gimp_context_get_background(&bck_color);
@@ -1377,19 +1380,18 @@ p_create_color_layer(GapStbAttrWidget *attw, gint32 image_id
     gimp_context_set_background(&bck_color);
   }
 
-  gimp_rect_select(image_id
+  gimp_image_select_rectangle(image_id
+                  , GIMP_CHANNEL_OP_REPLACE
                   , ofs_x
                   , ofs_y
                   , pv_master_width
                   , pv_master_height
-                  , GIMP_CHANNEL_OP_REPLACE
-                  , 0       /* gint32 feather */
-                  , 0.0     /* gdouble feather radius */
                   );
 
   gimp_edit_clear(layer_id);
   gimp_selection_none(image_id);
 
+  gimp_context_pop();
 
   return (layer_id);
 }  /* end p_create_color_layer */
diff --git a/gap/gap_story_render_processor.c b/gap/gap_story_render_processor.c
index 858977f..d420ca4 100644
--- a/gap/gap_story_render_processor.c
+++ b/gap/gap_story_render_processor.c
@@ -5625,13 +5625,16 @@ p_transform_and_add_layer( gint32 comp_image_id
              );
         }
 
-        gimp_rect_select(l_tmp_image_id
+        gimp_context_push();
+        gimp_context_set_feather(FALSE);
+        gimp_context_set_feather_radius(0.0, 0.0);
+
+        gimp_image_select_rectangle(l_tmp_image_id
+                      , GIMP_CHANNEL_OP_REPLACE
                       , sx, sy
                       , swidth, sheight
-                      , GIMP_CHANNEL_OP_REPLACE
-                      , FALSE  /* feather flag */
-                      , 0.0    /* feather_radius */
                       );
+        gimp_context_pop();
       }
 
       gimp_edit_copy(layer_id);


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