[gimp-perl] Update obsolete PDB procedures.



commit f11e8e08ae3f24c313e65acee6466f9235254ba2
Author: Ed J <edj src gnome org>
Date:   Tue May 13 06:11:04 2014 +0100

    Update obsolete PDB procedures.

 TODO                       |    3 +++
 examples/ditherize         |    2 +-
 examples/glowing_steel     |    7 +++----
 examples/mirrorsplit       |    2 +-
 examples/roundsel          |    2 +-
 examples/selective_sharpen |    4 ++--
 examples/warp-sharp        |    4 ++--
 examples/xachlego          |    6 +++---
 8 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/TODO b/TODO
index b98e2a6..f4a00be 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,6 @@
 Items as of 2014-04-29 (by Ed J)
 * possible killer app: https://mail.gnome.org/archives/gimp-developer-list/2014-April/msg00017.html
+* jpegoptim and pngcrush save-handlers
 * gimp-plugins-refresh: load is
   app/plug-in/gimppluginmanager.c:gimp_plug_in_manager_query_new, closedown
   is ./app/plug-in/gimppluginmanager.c:gimp_plug_in_manager_exit
@@ -18,6 +19,8 @@ Items as of 2014-04-29 (by Ed J)
 * http://search.cpan.org/dist/Glib-Object-Introspection/
 * Add a gtk2 gimp-perl console - cf http://registry.gimp.org/node/29348
   - gimp/plug-ins/script-fu/script-fu-console.c
+  base on this:
+  http://gtk2-perl.sourceforge.net/doc/gtk2-perl-study-guide/x3661.html
 * Test Gimp::Fu menupath <Load>/<Save>/<Image>/<Toolbox>/<None>
 * "IGNORE THIS MESSAGE" - $in_top - whole quiet_die probably needs to go too
 * PS flags are obsolete - replace with verbose - set_trace may also be obsolete
diff --git a/examples/ditherize b/examples/ditherize
index 1d3f60c..5c60c03 100755
--- a/examples/ditherize
+++ b/examples/ditherize
@@ -22,7 +22,7 @@ podregister {
   my $sel = $image->selection_save;
   $image->select_rectangle(CHANNEL_OP_REPLACE,$x1,$y1,$w,$h);
   $drawable->edit_copy;
-  $sel->selection_load;
+  $image->select_item(CHANNEL_OP_REPLACE, $sel);
   $sel->remove_channel;
   my $copy = new Gimp::Image($w, $h, $image->base_type);
   $copy->undo_disable;
diff --git a/examples/glowing_steel b/examples/glowing_steel
index 8dd75c2..ead8f82 100755
--- a/examples/glowing_steel
+++ b/examples/glowing_steel
@@ -112,7 +112,7 @@ sub perl_fu_add_glow {
   gimp_image_select_item($image, CHANNEL_OP_REPLACE, $drawable);
   gimp_edit_clear($glow);
 
-  gimp_selection_load($old_sel);
+  $image->select_item(CHANNEL_OP_REPLACE, $old_sel);
   gimp_floating_sel_anchor($drawable) if $is_float;
   gimp_image_set_active_layer($image,$old_draw);
   gimp_image_undo_group_end($image);
@@ -166,9 +166,8 @@ sub perl_fu_brushed_metal {
   plug_in_noisify($image, $templ, 0, 0.3, 0.3, 0.3, 0);
   plug_in_mblur($image, $templ, 0, $length, $angle, 0.0, 0.0);
 
-
   # Now put it into the target layer
-  gimp_selection_load($target_select);
+  $image->select_item(CHANNEL_OP_REPLACE, $target_select);
   gimp_edit_copy($templ);
   my $float = gimp_edit_paste($drawable, 0);
   gimp_layer_set_offsets($float, $x1+$length, $y1+$length);
@@ -231,7 +230,7 @@ sub perl_fu_highlight_edges {
   gimp_image_select_item($image, CHANNEL_OP_REPLACE, $drawable);
   gimp_edit_clear($white);
 
-  gimp_selection_load($old_sel);
+  $image->select_item(CHANNEL_OP_REPLACE, $old_sel);
   gimp_floating_sel_anchor($drawable) if $is_float;
   # gimp_image_set_active_layer($image,$old_draw);
   gimp_image_undo_group_end($image);
diff --git a/examples/mirrorsplit b/examples/mirrorsplit
index c7919cf..21765f8 100755
--- a/examples/mirrorsplit
+++ b/examples/mirrorsplit
@@ -19,7 +19,7 @@ podregister {
   my $orientation = ($mirror < 2)
     ? &Gimp::ORIENTATION_VERTICAL
     : &Gimp::ORIENTATION_HORIZONTAL;
-  $temp1 = $temp1->transform_flip_simple($orientation, 1, 0.0, 1);
+  $temp1 = $temp1->transform_flip_simple($orientation, 1, 0.0);
   my @xywh;
   if ($mirror == 0) {
     # upper half
diff --git a/examples/roundsel b/examples/roundsel
index b52e29f..c9cb059 100755
--- a/examples/roundsel
+++ b/examples/roundsel
@@ -15,7 +15,7 @@ podregister {
   gimp_selection_none($image);
   plug_in_gauss_iir($image, $channel, $round, 1, 1);
   gimp_levels($channel, 0, 123, 133, 1.0, 0, 255);
-  gimp_selection_load($channel);
+  $image->select_item(CHANNEL_OP_REPLACE, $channel);
   gimp_image_remove_channel($image, $channel);
   # gimp_item_delete($channel);
   $image->undo_group_end;
diff --git a/examples/selective_sharpen b/examples/selective_sharpen
index d393169..f6075b7 100755
--- a/examples/selective_sharpen
+++ b/examples/selective_sharpen
@@ -49,13 +49,13 @@ podregister {
   $selchan->edit_paste(1);
   $image->get_floating_sel->anchor;
   $selchan->combine_masks($saved_selection, CHANNEL_OP_INTERSECT, 0, 0);
-  $selchan->selection_load;
+  $image->select_item(CHANNEL_OP_REPLACE, $selchan);
 
   # 7) then use unsharp mask to that selection (scratch the gray layer)
   $drawable->unsharp_mask($sharpen_radius, $sharpen_amt, $threshold);
 
   # cleanup
-  $saved_selection->selection_load;
+  $image->select_item(CHANNEL_OP_REPLACE, $saved_selection);
   $image->remove_channel($saved_selection);
   $image->remove_channel($selchan);
   $image->remove_layer($edge_layer);
diff --git a/examples/warp-sharp b/examples/warp-sharp
index 1a3b832..fc7f13f 100755
--- a/examples/warp-sharp
+++ b/examples/warp-sharp
@@ -24,7 +24,7 @@ podregister {
 #    Gimp::set_trace(TRACE_ALL);
   $image->undo_group_start;
   if ($has_selection) {
-      $old_selection=$image->gimp_selection_save;
+      $old_selection=$image->selection_save;
       $image->selection_grow($blur_strength + $bump_depth + $displace_amount);
       $bump_xoff=$selection_info[1];
       $bump_yoff=$selection_info[2];
@@ -47,7 +47,7 @@ podregister {
                   $bump_depth, $bump_xoff, $bump_yoff, 0,0,0,0,0);
 
   if ($has_selection) {
-    $old_selection->gimp_selection_load;
+    $image->select_item(CHANNEL_OP_REPLACE, $old_selection);
     $old_selection->remove_channel;
     # will cause a crash:
     # $old_selection->delete;
diff --git a/examples/xachlego b/examples/xachlego
index 15029e1..aadc0bc 100755
--- a/examples/xachlego
+++ b/examples/xachlego
@@ -37,7 +37,7 @@ podregister {
 
 # <Xach> sjburges: meanwhile, back at the pixelized image, bumpmap it with
 #           itself and a depth of about 5. do this twice.
-  gimp_selection_load($selection);
+  $image->select_item(CHANNEL_OP_REPLACE, $selection);
   $drawable->bump_map($drawable, 135, 45, 5, 0, 0, 0, 0, 1, 0, 0);
   $drawable->bump_map($drawable, 135, 45, 5, 0, 0, 0, 0, 1, 0, 0);
   $drawable->bump_map($gridlayer, 135, 45, 5, 0, 0, 0, 0, 1, 0, 0);
@@ -49,7 +49,7 @@ podregister {
   $image->insert_layer($cleangrid,0,0);
   gimp_edit_fill($cleangrid, BACKGROUND_FILL);
   $cleangrid->grid(1, $blocksize, 0, [0,0,0], 255, 1, $blocksize, 0, [0,0,0], 255, 0, 0, 0, [0,0,0], 0);
-  gimp_selection_load($selection);
+  $image->select_item(CHANNEL_OP_REPLACE, $selection);
   $drawable->bump_map($cleangrid, 135, 45, 3, 0, 0, 0, 0, 1, 0, 0);
   $image->selection_all;
 
@@ -57,7 +57,7 @@ podregister {
 
   $image->remove_layer($cleangrid);
   $image->remove_layer($gridlayer);
-  gimp_selection_load($selection);
+  $image->select_item(CHANNEL_OP_REPLACE, $selection);
   if ($selection_flag ==1) {
     $image->selection_none;
   }


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