From 1dd082e25599433b757e357cbf503bc461497d78 Mon Sep 17 00:00:00 2001 From: tavmjong Date: Fri, 7 Aug 2009 12:53:15 +0000 Subject: [PATCH] Change "canvas" to "page" to be consistent with use in all other dialogs and menus. '-C' is kept, as '-P' is used for PostScript export. --- src/extension/internal/cairo-ps-out.cpp | 16 ++++---- .../internal/cairo-renderer-pdf-out.cpp | 4 +- src/main.cpp | 38 +++++++++---------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/extension/internal/cairo-ps-out.cpp b/src/extension/internal/cairo-ps-out.cpp index 209d1e9b9..9ac19326f 100644 --- a/src/extension/internal/cairo-ps-out.cpp +++ b/src/extension/internal/cairo-ps-out.cpp @@ -156,9 +156,9 @@ CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar con new_bitmapResolution = mod->get_param_int("resolution"); } catch(...) {} - bool new_areaCanvas = true; + bool new_areaPage = true; try { - new_areaCanvas = mod->get_param_bool("areaCanvas"); + new_areaPage = mod->get_param_bool("areaPage"); } catch(...) {} bool new_areaDrawing = true; @@ -173,7 +173,7 @@ CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar con gchar * final_name; final_name = g_strdup_printf("> %s", filename); - ret = ps_print_document_to_file(doc, final_name, level, new_textToPath, new_blurToBitmap, new_bitmapResolution, new_exportId, new_areaDrawing, new_areaCanvas); + ret = ps_print_document_to_file(doc, final_name, level, new_textToPath, new_blurToBitmap, new_bitmapResolution, new_exportId, new_areaDrawing, new_areaPage); g_free(final_name); if (!ret) @@ -220,9 +220,9 @@ CairoEpsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar co new_bitmapResolution = mod->get_param_int("resolution"); } catch(...) {} - bool new_areaCanvas = true; + bool new_areaPage = true; try { - new_areaCanvas = mod->get_param_bool("areaCanvas"); + new_areaPage = mod->get_param_bool("areaPage"); } catch(...) {} bool new_areaDrawing = true; @@ -237,7 +237,7 @@ CairoEpsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar co gchar * final_name; final_name = g_strdup_printf("> %s", filename); - ret = ps_print_document_to_file(doc, final_name, level, new_textToPath, new_blurToBitmap, new_bitmapResolution, new_exportId, new_areaDrawing, new_areaCanvas, true); + ret = ps_print_document_to_file(doc, final_name, level, new_textToPath, new_blurToBitmap, new_bitmapResolution, new_exportId, new_areaDrawing, new_areaPage, true); g_free(final_name); if (!ret) @@ -283,7 +283,7 @@ CairoPsOutput::init (void) "true\n" "90\n" "true\n" - "true\n" + "true\n" "\n" "\n" ".ps\n" @@ -320,7 +320,7 @@ CairoEpsOutput::init (void) "true\n" "90\n" "true\n" - "true\n" + "true\n" "\n" "\n" ".eps\n" diff --git a/src/extension/internal/cairo-renderer-pdf-out.cpp b/src/extension/internal/cairo-renderer-pdf-out.cpp index b8af3b177..0598c388a 100644 --- a/src/extension/internal/cairo-renderer-pdf-out.cpp +++ b/src/extension/internal/cairo-renderer-pdf-out.cpp @@ -180,7 +180,7 @@ CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, bool new_exportCanvas = FALSE; try { - new_exportCanvas = mod->get_param_bool("areaCanvas"); + new_exportCanvas = mod->get_param_bool("areaPage"); } catch(...) { g_warning("Parameter might not exist"); @@ -220,7 +220,7 @@ CairoRendererPdfOutput::init (void) "true\n" "90\n" "false\n" - "false\n" + "false\n" "\n" "\n" ".pdf\n" diff --git a/src/main.cpp b/src/main.cpp index 9c33688ed..12732ef2c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -129,7 +129,7 @@ enum { SP_ARG_EXPORT_DPI, SP_ARG_EXPORT_AREA, SP_ARG_EXPORT_AREA_DRAWING, - SP_ARG_EXPORT_AREA_CANVAS, + SP_ARG_EXPORT_AREA_PAGE, SP_ARG_EXPORT_AREA_SNAP, SP_ARG_EXPORT_WIDTH, SP_ARG_EXPORT_HEIGHT, @@ -179,7 +179,7 @@ static gchar *sp_export_png = NULL; static gchar *sp_export_dpi = NULL; static gchar *sp_export_area = NULL; static gboolean sp_export_area_drawing = FALSE; -static gboolean sp_export_area_canvas = FALSE; +static gboolean sp_export_area_page = FALSE; static gchar *sp_export_width = NULL; static gchar *sp_export_height = NULL; static gchar *sp_export_id = NULL; @@ -222,7 +222,7 @@ static void resetCommandlineGlobals() { sp_export_dpi = NULL; sp_export_area = NULL; sp_export_area_drawing = FALSE; - sp_export_area_canvas = FALSE; + sp_export_area_page = FALSE; sp_export_width = NULL; sp_export_height = NULL; sp_export_id = NULL; @@ -296,17 +296,17 @@ struct poptOption options[] = { {"export-area", 'a', POPT_ARG_STRING, &sp_export_area, SP_ARG_EXPORT_AREA, - N_("Exported area in SVG user units (default is the canvas; 0,0 is lower-left corner)"), + N_("Exported area in SVG user units (default is the page; 0,0 is lower-left corner)"), N_("x0:y0:x1:y1")}, {"export-area-drawing", 'D', POPT_ARG_NONE, &sp_export_area_drawing, SP_ARG_EXPORT_AREA_DRAWING, - N_("Exported area is the entire drawing (not canvas)"), + N_("Exported area is the entire drawing (not page)"), NULL}, - {"export-area-canvas", 'C', - POPT_ARG_NONE, &sp_export_area_canvas, SP_ARG_EXPORT_AREA_CANVAS, - N_("Exported area is the entire canvas"), + {"export-area-page", 'C', + POPT_ARG_NONE, &sp_export_area_page, SP_ARG_EXPORT_AREA_PAGE, + N_("Exported area is the entire page"), NULL}, {"export-area-snap", 0, @@ -632,7 +632,7 @@ main(int argc, char **argv) || !strcmp(argv[i], "-i") || !strncmp(argv[i], "--export-area-drawing", 21) || !strcmp(argv[i], "-D") - || !strncmp(argv[i], "--export-area-canvas", 20) + || !strncmp(argv[i], "--export-area-page", 20) || !strcmp(argv[i], "-C") || !strncmp(argv[i], "--export-id", 12) || !strcmp(argv[i], "-P") @@ -1298,8 +1298,8 @@ sp_do_export_png(SPDocument *doc) return; } area = Geom::Rect(Geom::Interval(x0,x1), Geom::Interval(y0,y1)); - } else if (sp_export_area_canvas || !(sp_export_id || sp_export_area_drawing)) { - /* Export the whole canvas */ + } else if (sp_export_area_page || !(sp_export_id || sp_export_area_drawing)) { + /* Export the whole page: note: Inkscape uses 'page' in all menus and dialogs, not 'canvas' */ sp_document_ensure_up_to_date (doc); Geom::Point origin (SP_ROOT(doc->root)->x.computed, SP_ROOT(doc->root)->y.computed); area = Geom::Rect(origin, origin + sp_document_dimensions(doc)); @@ -1443,8 +1443,8 @@ static void do_export_ps_pdf(SPDocument* doc, gchar const* uri, char const* mime (*i)->set_param_string ("exportId", ""); } - if (sp_export_area_canvas && sp_export_area_drawing) { - g_warning ("You cannot use --export-area-canvas and --export-area-drawing at the same time; only the former will take effect."); + if (sp_export_area_page && sp_export_area_drawing) { + g_warning ("You cannot use --export-area-page and --export-area-drawing at the same time; only the former will take effect."); sp_export_area_drawing = false; } @@ -1454,17 +1454,17 @@ static void do_export_ps_pdf(SPDocument* doc, gchar const* uri, char const* mime (*i)->set_param_bool ("areaDrawing", FALSE); } - if (sp_export_area_canvas) { + if (sp_export_area_page) { if (sp_export_eps) { - g_warning ("EPS cannot have its bounding box extend beyond its content, so if your drawing is smaller than the canvas, --export-area-canvas will clip it to drawing."); + g_warning ("EPS cannot have its bounding box extend beyond its content, so if your drawing is smaller than the page, --export-area-page will clip it to drawing."); } - (*i)->set_param_bool ("areaCanvas", TRUE); + (*i)->set_param_bool ("areaPage", TRUE); } else { - (*i)->set_param_bool ("areaCanvas", FALSE); + (*i)->set_param_bool ("areaPage", FALSE); } - if (!sp_export_area_drawing && !sp_export_area_canvas && !sp_export_id) { - // neither is set, set canvas as default for ps/pdf and drawing for eps + if (!sp_export_area_drawing && !sp_export_area_page && !sp_export_id) { + // neither is set, set page as default for ps/pdf and drawing for eps if (sp_export_eps) { try { (*i)->set_param_bool("areaDrawing", TRUE); -- 2.30.2