[dia/dia-0-97] Bug #599587 - Shape export icon creation fails without libart renderer



commit ab7f7ad04b7dc32dde32025e14ce5beb3417d086
Author: Hans Breuer <hans breuer org>
Date:   Sun Oct 25 21:45:20 2009 +0100

    Bug #599587 - Shape export icon creation fails without libart renderer
    
    1) it still required the libart PNG exporter, although the "size-hack"
      was already converted to the generic export interface
    2) the exporter got the shape-exporters user_data, not it's own

 plug-ins/shape/shape-export.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/shape/shape-export.c b/plug-ins/shape/shape-export.c
index 68afc4c..bbd507b 100644
--- a/plug-ins/shape/shape-export.c
+++ b/plug-ins/shape/shape-export.c
@@ -480,17 +480,19 @@ export_shape(DiagramData *data, const gchar *filename,
     g_free(point);
     /* we are especially requesting the libart/png cause it is the only one with the size-hack */
     exportfilter = filter_get_by_name ("png-libart");
+    /* ... but the code below does not use the size-hack anymore ... */
+    if (!exportfilter)
+      exportfilter = filter_guess_export_filter(png_filename);
 
     if (!exportfilter) {
-      message_warning(_("Can't export png without libart!"));
-    }
-    else {
+      message_warning(_("Can't export png icon without export plug-in!"));
+    } else {
       /* get the scaling right */
       old_scaling = data->paper.scaling;
       scaling_x = 22/((ext->right - ext->left) * 20);
       scaling_y = 22/((ext->bottom - ext->top) * 20);
       data->paper.scaling = MIN(scaling_x, scaling_y);
-      exportfilter->export_func(data, png_filename, diafilename, user_data);
+      exportfilter->export_func(data, png_filename, diafilename, exportfilter->user_data);
       data->paper.scaling = old_scaling;
     }
     /* create the shape */



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