gimp-gap r801 - in trunk: . gap gap/iter_ALT/gen gap/iter_ALT/mod



Author: wolfgangh
Date: Sun Jan 18 18:35:26 2009
New Revision: 801
URL: http://svn.gnome.org/viewvc/gimp-gap?rev=801&view=rev

Log:
started port to gimp-2.6

Modified:
   trunk/ChangeLog
   trunk/gap/TESTPROT_iter_ALT
   trunk/gap/gap_filter_pdb.c
   trunk/gap/gap_pdb_calls.c
   trunk/gap/gap_pdb_calls.h
   trunk/gap/gap_wr_color_curve.c
   trunk/gap/iter_ALT/gen/plug_in_ripple_iter_ALT.inc
   trunk/gap/iter_ALT/mod/plug_in_flame_iter_ALT.inc

Modified: trunk/gap/TESTPROT_iter_ALT
==============================================================================
--- trunk/gap/TESTPROT_iter_ALT	(original)
+++ trunk/gap/TESTPROT_iter_ALT	Sun Jan 18 18:35:26 2009
@@ -11,13 +11,13 @@
 ---------------------------------------------------
 Testresults
 --------------------------------------------------
-2007.12.01
+2009.01.18
 
-   TODO: check for new plug ins that were added to gimp-2.4
+   TODO: check for new plug ins that were added to gimp-2.6
    (and that are not yet in this List)
 
    Test with PDB-Procedures (Plugins) that came with
-   gimp release 2.4.2 
+   gimp release 2.6.4 
    Test also includes PDB-Procedures provided by GIMP-GAP itself
 
 
@@ -35,6 +35,8 @@
 State Procedure/Iterator_ALT ame               Testnotes
 ---------------------------------------------------------------------------
 
+
+
 ++     plug-in-alienmap2-iter-ALT
  :     plug-in-align-layers
  :     plug-in-animationoptimize
@@ -49,7 +51,7 @@
 ++     plug-in-blinds-iter-ALT
 ++     plug-in-bluebox
 ##     plug-in-blur                              has no dialog but works fine with defaults.
-++     plug-in-borderaverage-iter-ALT            (?) runs, but produces no effect on the processed layers
+o+     plug-in-borderaverage-iter-ALT            (?) runs, but produces no effect on the processed layers
 ++     plug-in-bump-map-iter-ALT
  :     plug-in-bump-map-tiled
 ##     plug-in-c-astretch
@@ -59,17 +61,17 @@
 ++     plug-in-cml-explorer-iter-ALT
 ##     plug-in-color-adjust
 ##     plug-in-color-enhance
-++     plug-in-color-map-iter-ALT
+oo     plug-in-color-map-iter-ALT
 ++     plug-in-colorify-iter-ALT
 ++     plug-in-colors-channel-mixer
 ++     plug-in-colortoalpha-iter-ALT
  :     plug-in-compose
 ++     plug-in-convmatrix-iter-ALT
 ++     plug-in-cubism-iter-ALT
-++     plug-in-curve-bend
+++     plug-in-curve-bend                       (curve-bend:8380): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  :     plug-in-decompose
 ##     plug-in-deinterlace                       disabled the Iter_ALT proc (only const apply makes sense)
-++     plug-in-depth-merge-iter-ALT
+++     plug-in-depth-merge-iter-ALT              (gimp-2.6:8143): GLib-GObject-CRITICAL **: g_value_get_enum: assertion `G_VALUE_HOLDS_ENUM (value)' failed
 ++     plug-in-despeckle-iter-ALT
 ++     plug-in-destripe-iter-ALT
 ++     plug-in-diffraction-iter-ALT
@@ -123,7 +125,7 @@
 ++     plug-in-nlfilt-iter-ALT	               (?) runs, but did not see any effect
 --     plug-in-noisify-iter-ALT                 noisify has 2 names and uses the 2.nd name "plug-in-rgb-noise"  "plug_in_scatter_rgb" to store is values.
                                                 (runs but does not open 2nd dialog even when varying requested ?)
--+     plug-in-hsv-noise                         register 2 names (old name plug-in-scatter-hsv)
+-o     plug-in-hsv-noise                         register 2 names (old name plug-in-scatter-hsv)
                                                 (runs but does not open 2nd dialog even when varying requested ?)
 
 ##     plug-in-normalize                        has no dialog, constant apply makes sense
@@ -133,7 +135,7 @@
  :     plug-in-onionskin-del
  :     plug-in-onionskin-toggle-visibility
  (1)   plug-in-pagecurl-iter-ALT	               ERROR: creates a new layer
--+     plug-in-papertile-iter-ALT               FAILED with floating point exception
+-o     plug-in-papertile-iter-ALT               FAILED with floating point exception
 ++     plug-in-photocopy
 ++     plug-in-pixelize-iter-ALT
 ##     plug-in-pixelize2                        
@@ -172,11 +174,13 @@
 ++     plug-in-whirl-pinch-iter-ALT
 ++     plug-in-wind-iter-ALT
 ++     plug-in-wr-color-levels
-++     plug-in-wr-curves
+o+(2)  plug-in-wr-curves                     - curves files are not compatible with gimp2.4 curves file
 ++     plug-in-wr-huesat
 ++     plug-in-wr-set-opacity
  :     plug-in-zealouscrop
 
+
+
 Additional notes:
 
 (1)   the pagecurl plugin fails when called via
@@ -191,6 +195,12 @@
       in animations,
       because this plugin works with fixed curling amount.
 
+(2)   This plugin works with curves files of the old fileformat (written by GIMP-2.4)
+      but fails when GIMP curves tool settings of the GIMP-2.6 release are used
+      (the format has changed.
+      The curves tool supports both formats, but the GIMP-GAP specific wrapper
+      can oly read the old format so far...
+
 
 
 plug_in_map_object old Testreport: (did not verfy that at the latest test)
@@ -211,44 +221,7 @@
       to the bg layer)
 
   - If you call MapObject a 2nd time in the same gimp session
-    gimp will crash if one of the drawables (that were used
+    gimp reports errors if one of the drawables (that were used
     in the 1.st call) has become invalid.
     
-    The BUG is in the GIMP-core Procedure(s)
-       gimp_layer_get_image_id
-       gimp_drawable_image_id
-       
-    (in older GIMP releases these Procedures did return -1
-     on invalid Ids, in Gimp 1.1.3 it comes to a crash
-     I hope that this Bug will be fixed in gimp 1.2)
-
-
-
-
-Old: (iterator procedures for Plug-Ins that once was part of gimp-releases
-      some of them are still available but got a new name)
-
-old (gimp-2.0)
-.     plug_in_alienmap_iter_ALT.inc
-
-
-older (gimp-1.2 and before)
-	   
-.     plug_in_CentralReflection_iter_ALT.inc
-.     plug_in_anamorphose_iter_ALT.inc
-.     plug_in_blur2_iter_ALT.inc
-.     plug_in_encript_iter_ALT.inc
-.     plug_in_figures_iter_ALT.inc
-.     plug_in_holes_iter_ALT.inc
-.     plug_in_julia_iter_ALT.inc
-.     plug_in_magic_eye_iter_ALT.inc
-.     plug_in_mandelbrot_iter_ALT.inc
-.     plug_in_randomize_iter_ALT.inc
-.     plug_in_refract_iter_ALT.inc
-.     plug_in_struc_iter_ALT.inc
-.     plug_in_tileit_iter_ALT.inc
-.     plug_in_universal_filter_iter_ALT.inc
-
-
-
 

Modified: trunk/gap/gap_filter_pdb.c
==============================================================================
--- trunk/gap/gap_filter_pdb.c	(original)
+++ trunk/gap/gap_filter_pdb.c	Sun Jan 18 18:35:26 2009
@@ -59,6 +59,7 @@
 #include "gap_arr_dialog.h"
 #include "gap_filter.h"
 #include "gap_filter_pdb.h"
+#include "gap_pdb_calls.h"
 #include "gap_dbbrowser_utils.h"
 #include "gap_lib.h"
 
@@ -275,6 +276,14 @@
 }  /* end gap_filt_pdb_set_data */
 
 
+
+
+
+
+
+
+
+
 /* --------------------------------
  * gap_filt_pdb_procedure_available
  * --------------------------------
@@ -302,6 +311,15 @@
   gint             l_rc;
 
   l_rc = 0;
+
+  if(gap_pdb_procedure_name_available (proc_name) != TRUE)
+  {
+     if(gap_debug)
+     {
+       printf("DEBUG: NOT found in PDB %s\n", proc_name);
+     }
+     return -1;
+  }
   
   /* Query the gimp application's procedural database
    *  regarding a particular procedure.

Modified: trunk/gap/gap_pdb_calls.c
==============================================================================
--- trunk/gap/gap_pdb_calls.c	(original)
+++ trunk/gap/gap_pdb_calls.c	Sun Jan 18 18:35:26 2009
@@ -76,6 +76,68 @@
 }  /* end p_status_to_string */
 
 
+/* check if procedure name is available in the PDB.
+ * this procedure reads all available pdb procedure names into static memory
+ * when called 1st time. and checks the specified name against the memory.
+ * Introduced with GIMP-2.6 that produces annoying Error messages on the GUI
+ * when a plug attempt to query information for an unknown name.
+ * This workaround help to avoid those error messages,
+ * but makes GAP filter all layer feature slower.
+ */
+gboolean
+gap_pdb_procedure_name_available (const gchar *search_name)
+{
+  static gboolean initialized = FALSE;
+
+  static gchar       **proc_list = NULL;
+  static gint          num_procs = 0;
+  int loop;
+  gboolean found;
+
+  found = FALSE;
+ 
+  if (!initialized)
+  {
+      /* query for all elements (only at 1.st call in this process)
+       *  if we apply the search string to gimp_plugins_query
+       *  we get no result, because the search will query MenuPath
+       *  and not for the realname of the plug-in)
+       */
+       // gimp_procedural_db_query
+      gimp_procedural_db_query (".*", ".*", ".*", ".*", ".*", ".*", ".*", 
+			        &num_procs, &proc_list);
+
+      initialized = TRUE;
+
+      if(gap_debug)
+      {
+        for (loop = 0; loop < num_procs; loop++)
+        {
+          printf("PDBname:%s\t\search_name:%s\n", proc_list[loop], search_name);
+        }
+      }
+
+  }
+
+  if (initialized)
+  {
+      for (loop = 0; loop < num_procs; loop++)
+      {
+        if(strcmp(search_name, proc_list[loop]) == 0)
+	{
+          found = TRUE;
+	  break;  /* stop at 1st match */
+        }
+     }
+  }
+
+  /* Dont Destroy, but Keep the Returned Parameters for the lifetime of this process */
+  /* gimp_destroy_params (return_vals, nreturn_vals); */
+
+  return (found);
+}  /* end gap_pdb_procedure_name_available */
+
+
 /* ============================================================================
  * gap_pdb_procedure_available
  *   if requested procedure is available in the PDB return the number of args

Modified: trunk/gap/gap_pdb_calls.h
==============================================================================
--- trunk/gap/gap_pdb_calls.h	(original)
+++ trunk/gap/gap_pdb_calls.h	Sun Jan 18 18:35:26 2009
@@ -52,4 +52,6 @@
 gboolean   gap_pdb_gimp_image_thumbnail(gint32 image_id, gint32 width, gint32 height,
                               gint32 *th_width, gint32 *th_height, gint32 *th_bpp,
 			      gint32 *th_data_count, unsigned char **th_data);
+gboolean   gap_pdb_procedure_name_available (const gchar *search_name);
+
 #endif

Modified: trunk/gap/gap_wr_color_curve.c
==============================================================================
--- trunk/gap/gap_wr_color_curve.c	(original)
+++ trunk/gap/gap_wr_color_curve.c	Sun Jan 18 18:35:26 2009
@@ -326,6 +326,20 @@
 
 }
 
+static gboolean
+read_curves_from_file_gimp2_6_format (FILE *fp, wr_curves_val_t *cuvals, gchar *buf)
+{
+  if (strcmp (buf, "# GIMP curves tool settings\n") != 0)
+  {
+    return FALSE;
+  }
+  
+  // TODO parse new format 
+ 
+  g_message("GIMP-2.6 specific curves tool settings detected (BUT NOT YET SUPPORTED)");
+  return FALSE;
+  
+}
 
 static gboolean
 read_curves_from_file (FILE *fp, wr_curves_val_t *cuvals)
@@ -339,11 +353,17 @@
   CurvesDialog   *curves_dialog = &curves_dialog_struct;
 
   if (!fgets (buf, 50, fp))
+  {
     return FALSE;
-
+  }
+  
+  /* check old format used in GIMP-2.4.x and older GIMP releases */
   if (strcmp (buf, "# GIMP Curves File\n") != 0)
-    return FALSE;
-
+  {
+    /* check new format introduced with GIMP-2.6.x release */
+    return (read_curves_from_file_gimp2_6_format (fp, cuvals, buf));
+  }
+  
   for (i = 0; i < 5; i++)
   {
     for (j = 0; j < 17; j++)

Modified: trunk/gap/iter_ALT/gen/plug_in_ripple_iter_ALT.inc
==============================================================================
--- trunk/gap/iter_ALT/gen/plug_in_ripple_iter_ALT.inc	(original)
+++ trunk/gap/iter_ALT/gen/plug_in_ripple_iter_ALT.inc	Sun Jan 18 18:35:26 2009
@@ -13,6 +13,7 @@
       gint          waveform;
       gboolean      antialias;
       gboolean      tile;
+      gint          phase_shift;
     } t_plug_in_ripple_Vals; 
 
     t_plug_in_ripple_Vals  buf, *buf_from, *buf_to; 
@@ -36,7 +37,7 @@
     p_delta_gint(&buf.orientation, buf_from->orientation, buf_to->orientation, total_steps, current_step);
     p_delta_gint(&buf.edges, buf_from->edges, buf_to->edges, total_steps, current_step);
     p_delta_gint(&buf.waveform, buf_from->waveform, buf_to->waveform, total_steps, current_step);
-
+    p_delta_gint(&buf.phase_shift, buf_from->phase_shift, buf_to->phase_shift, total_steps, current_step);
 
     gimp_set_data("plug-in-ripple", &buf, sizeof(buf)); 
 

Modified: trunk/gap/iter_ALT/mod/plug_in_flame_iter_ALT.inc
==============================================================================
--- trunk/gap/iter_ALT/mod/plug_in_flame_iter_ALT.inc	(original)
+++ trunk/gap/iter_ALT/mod/plug_in_flame_iter_ALT.inc	Sun Jan 18 18:35:26 2009
@@ -1,5 +1,5 @@
 #define FLAME_NXFORMS 6
-#define FLAME_NVARS   7
+#define FLAME_NVARS   29
 
 typedef struct {
    double var[FLAME_NVARS];   /* normalized interp coefs between variations */



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