Code

Require a pageBox in the constructor for GfxState so that we do not always need to...
[inkscape.git] / src / extension / internal / win32.cpp
index 7f1774d21e65f3182a5927abb2036c206e988319..74635b2a609b4e25e71f3818f3bef7c615505cda 100644 (file)
@@ -13,6 +13,7 @@
 # include "config.h"
 #endif
 
+#include <glib/gmem.h>
 #include <libnr/nr-macros.h>
 #include <libnr/nr-matrix.h>
 
@@ -312,7 +313,7 @@ PrintWin32::finish (Inkscape::Extension::Print *mod)
        width = x1 - x0;
        height = y1 - y0;
 
-       px = nr_new (unsigned char, 4 * 64 * width);
+       px = g_new (unsigned char, 4 * 64 * width);
        sheight = 64;
 
        /* Printing goes here */
@@ -343,7 +344,7 @@ PrintWin32::finish (Inkscape::Extension::Print *mod)
 
                memset (px, 0xff, 4 * num_rows * width);
                /* Render */
-               nr_arena_item_invoke_render (mod->root, &bbox, &pb, 0);
+               nr_arena_item_invoke_render (NULL, mod->root, &bbox, &pb, 0);
 
                /* Swap red and blue channels; we use RGBA, whereas
                 * the Win32 GDI uses BGRx.
@@ -368,7 +369,7 @@ PrintWin32::finish (Inkscape::Extension::Print *mod)
                nr_pixblock_release (&pb);
        }
 
-       nr_free (px);
+       g_free (px);
 
        res = EndPage (_hDC);
        res = EndDoc (_hDC);
@@ -477,6 +478,8 @@ PrintWin32::get_save_filename (unsigned char *dir, unsigned int *spns)
        return g_strdup (fnbuf);
 }
 
+#include "clear-n_.h"
+
 void
 PrintWin32::init (void)
 {
@@ -485,7 +488,7 @@ PrintWin32::init (void)
        /* SVG in */
     ext = Inkscape::Extension::build_from_mem(
                "<inkscape-extension>\n"
-                       "<name>Windows 32-bit Print</name>\n"
+                       "<name>" N_("Windows 32-bit Print") "</name>\n"
                        "<id>" SP_MODULE_KEY_PRINT_WIN32 "</id>\n"
                        "<param name=\"textToPath\" type=\"boolean\">TRUE</param>\n"
                        "<print/>\n"