inkscape-preferences.cpp revision 68a92b8c1ba374f668d2373aa818ad319be11730
/** @file
* @brief Inkscape Preferences dialog - implementation
*/
/* Authors:
* Carl Hetherington
* Marco Scholten
* Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
* Bruno Dilly <bruno.dilly@gmail.com>
*
* Copyright (C) 2004-2007 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/alignment.h>
#include "preferences.h"
#include "inkscape-preferences.h"
#include "verbs.h"
#include "selcue.h"
#include "unit-constants.h"
#include <iostream>
#include "enums.h"
// #include "inkscape.h"
#include "desktop-handles.h"
#include "message-stack.h"
#include "style.h"
#include "selection.h"
#include "selection-chemistry.h"
#include "ui/widget/style-swatch.h"
#include "display/nr-filter-gaussian.h"
#include "display/nr-filter-types.h"
#include "color-profile-fns.h"
#include "color-profile.h"
#include "display/canvas-grid.h"
namespace Inkscape {
namespace UI {
namespace Dialog {
{
//get the width of a spinbutton
delete sb;
//Main HBox
//Pagelist
_page_list.set_headers_visible(false);
page_list_selection->signal_changed().connect(sigc::mem_fun(*this, &InkscapePreferences::on_pagelist_selection_changed));
//Pages
initPageCMS();
initPageUI();
initPageMisc();
//calculate the size request for this dialog
this->show_all_children();
}
{
}
{
}
Gtk::TreeModel::iterator InkscapePreferences::AddPage(DialogPage& p, Glib::ustring title, Gtk::TreeModel::iterator parent, int id)
{
if (parent)
else
return iter;
}
void InkscapePreferences::initPageMouse()
{
_("How close on the screen you need to be to an object to be able to grab it with mouse (in screen pixels)"), false);
_("Maximum mouse drag (in screen pixels) which is considered a click, not a drag"), false);
_mouse_use_ext_input.init( _("Use pressure-sensitive tablet (requires restart)"), "/options/useextinput/value", true);
_("Use the capabilities of a tablet or other pressure-sensitive device. Disable this only if you have problems with the tablet (you can still use it as a mouse)"));
_mouse_switch_on_ext_input.init( _("Switch tool based on tablet device (requires restart)"), "/options/switchonextinput/value", false);
_("Change tool as different devices are used on the tablet (pen, eraser, mouse)"));
}
void InkscapePreferences::initPageScrolling()
{
_("One mouse wheel notch scrolls by this distance in screen pixels (horizontally with Shift)"), false);
_("Pressing Ctrl+arrow key scrolls by this distance (in screen pixels)"), false);
_scroll_arrow_acc.init ( "/options/scrollingacceleration/value", 0.0, 5.0, 0.01, 1.0, 0.35, false, false);
_("Pressing and holding Ctrl+arrow will gradually speed up scrolling (0 for no acceleration)"), false);
_scroll_auto_speed.init ( "/options/autoscrollspeed/value", 0.0, 5.0, 0.01, 1.0, 0.7, false, false);
_("How fast the canvas autoscrolls when you drag beyond canvas edge (0 to turn autoscroll off)"), false);
_scroll_auto_thres.init ( "/options/autoscrolldistance/value", -600.0, 600.0, 1.0, 1.0, -10.0, true, false);
_("How far (in screen pixels) you need to be from the canvas edge to trigger autoscroll; positive is outside the canvas, negative is within the canvas"), false);
_scroll_space.init ( _("Left mouse button pans when Space is pressed"), "/options/spacepans/value", false);
_("When on, pressing and holding Space and dragging with left mouse button pans canvas (as in Adobe Illustrator). When off, Space temporarily switches to Selector tool (default)."));
_("When on, mouse wheel zooms without Ctrl and scrolls canvas with Ctrl; when off, it zooms with Ctrl and scrolls without Ctrl."));
}
void InkscapePreferences::initPageSnapping()
{
_("After snapping, a symbol is drawn at the point that has snapped"));
_("Postpone snapping as long as the mouse is moving, and then wait an additional fraction of a second. This additional delay is specified here. When set to zero or to a very small number, snapping will be immediate"), true);
_snap_closest_only.init( _("Only snap the node closest to the pointer"), "/options/snapclosestonly/value", false);
_("Only try to snap the node that is initialy closest to the mouse pointer"));
_("When multiple snap solutions are found, then Inkscape can either prefer the closest transformation (when set to 0), or prefer the node that was initially the closest to the pointer (when set to 1)"), true);
}
void InkscapePreferences::initPageSteps()
{
//nudgedistance is limited to 1000 in select-context.cpp: use the same limit here
_("Pressing an arrow key moves selected object(s) or node(s) by this distance (in px units)"), false);
//defaultscale is limited to 1000 in select-context.cpp: use the same limit here
_("Pressing > or < scales selection up or down by this increment (in px units)"), false);
_steps_inset.init ( "/options/defaultoffsetwidth/value", 0.0, 3000.0, 0.01, 1.0, 2.0, false, false);
_("Inset and Outset commands displace the path by this distance (in px units)"), false);
_steps_compass.init ( _("Compass-like display of angles"), "/options/compassangledisplay/value", true);
_("When on, angles are displayed with 0 at north, 0 to 360 range, positive clockwise; otherwise with 0 at east, -180 to 180 range, positive counterclockwise"));
int const num_items = 17;
Glib::ustring labels[num_items] = {"90", "60", "45", "36", "30", "22.5", "18", "15", "12", "10", "7.5", "6", "3", "2", "1", "0.5", _("None")};
_("Rotating with Ctrl pressed snaps every that much degrees; also, pressing [ or ] rotates by this amount"), false);
_steps_zoom.init ( "/options/zoomincrement/value", 101.0, 500.0, 1.0, 1.0, 1.414213562, true, true);
_("Zoom tool click, +/- keys, and middle click zoom in and out by this multiplier"), false);
}
void InkscapePreferences::AddSelcueCheckbox(DialogPage &p, Glib::ustring const &prefs_path, bool def_value)
{
p.add_line( false, "", *cb, "", _("Whether selected objects display a selection cue (the same as in selector)"));
}
void InkscapePreferences::AddGradientCheckbox(DialogPage &p, Glib::ustring const &prefs_path, bool def_value)
{
}
void InkscapePreferences::AddConvertGuidesCheckbox(DialogPage &p, Glib::ustring const &prefs_path, bool def_value) {
cb->init ( _("Conversion to guides uses edges instead of bounding box"), prefs_path + "/convertguides", def_value);
p.add_line( false, "", *cb, "", _("Converting an object to guides places these along the object's true edges (imitating the object's shape), not along the bounding box."));
}
void InkscapePreferences::AddDotSizeSpinbutton(DialogPage &p, Glib::ustring const &prefs_path, double def_value)
{
_("Size of dots created with Ctrl+click (relative to current stroke width)"),
false );
}
{
return;
_("<b>No objects selected</b> to take the style from."));
return;
}
if (!item) {
/* TODO: If each item in the selection has the same style then don't consider it an error.
* Maybe we should try to handle multiple selections anyway, e.g. the intersection of the
* style attributes for the selected items. */
_("<b>More than one object selected.</b> Cannot take style from multiple objects."));
return;
}
if (!css) return;
// only store text style for the text tool
if (prefs_path == "/tools/text") {
}
// we cannot store properties with uris - they will be invalid in other documents
// update the swatch
if (swatch) {
}
}
void InkscapePreferences::AddNewObjectsStyle(DialogPage &p, Glib::ustring const &prefs_path, const gchar *banner)
{
if (banner)
else
p.add_group_header( _("Create new objects with:"));
_("Apply the style you last set on an object"));
p.set_tip( *own, _("Each tool may store its own style to apply to the newly created objects. Use the button below to set it."));
// style swatch
StyleSwatch *swatch = 0;
button->signal_clicked().connect( sigc::bind( sigc::ptr_fun(StyleFromSelectionToTool), prefs_path, swatch) );
_("Remember the style of the (first) selected object as this tool's style"));
}
void InkscapePreferences::initPageTools()
{
_t_bbox_visual.init ( _("Visual bounding box"), "/tools/bounding_box", 0, false, 0); // 0 means visual
_("This bounding box includes stroke width, markers, filter margins, etc."));
_t_bbox_geometric.init ( _("Geometric bounding box"), "/tools/bounding_box", 1, true, &_t_bbox_visual); // 1 means geometric
_("This bounding box includes only the bare path"));
_t_cvg_keep_objects.init ( _("Keep objects after conversion to guides"), "/tools/cvg_keep_objects", false);
_("When converting an object to guides, don't delete the object after the conversion."));
_t_cvg_convert_whole_groups.init ( _("Treat groups as a single object"), "/tools/cvg_convert_whole_groups", false);
_("Treat groups as a single object during conversion to guides rather than converting each child separately."));
_pencil_average_all_sketches.init ( _("Average all sketches"), "/tools/freehand/pencil/average_all_sketches", false);
_calligrapy_use_abs_size.init ( _("Width is in absolute units"), "/tools/calligraphic/abs_width", false);
_connector_ignore_text.init( _("Don't attach connectors to text objects"), "/tools/connector/ignoretext", true);
//Selector
_("Show the actual objects when moving or transforming"));
_t_sel_trans_outl.init ( _("Box outline"), "/tools/select/show", "outline", false, &_t_sel_trans_obj);
_("Show only a box outline of the objects when moving or transforming"));
_("No per-object selection indication"));
_t_sel_cue_mark.init ( _("Mark"), "/options/selcue/value", Inkscape::SelCue::MARK, true, &_t_sel_cue_none);
_("Each selected object has a diamond mark in the top left corner"));
_t_sel_cue_box.init ( _("Box"), "/options/selcue/value", Inkscape::SelCue::BBOX, false, &_t_sel_cue_none);
_("Each selected object displays its bounding box"));
//Node
_t_node_pathoutline_color.init(_("Path outline color"), "/tools/nodes/highlight_color", 0xff0000ff);
_page_node.add_line( false, _("Path outline color"), _t_node_pathoutline_color, "", _("Selects the color used for showing the path outline."), false);
_t_node_pathflash_enabled.init ( _("Path outline flash on mouse-over"), "/tools/nodes/pathflash_enabled", false);
_page_node.add_line( true, "", _t_node_pathflash_enabled, "", _("When hovering over a path, briefly flash its outline."));
_t_node_pathflash_timeout.init("/tools/nodes/pathflash_timeout", 0, 10000.0, 100.0, 100.0, 1000.0, true, false);
_page_node.add_line( false, _("Flash time"), _t_node_pathflash_timeout, "ms", _("Specifies how long the path outline will be visible after a mouse-over (in milliseconds). Specify 0 to have the outline shown until mouse leaves the path."), false);
//Tweak
//Zoom
//Shapes
Gtk::TreeModel::iterator iter_shapes = this->AddPage(_page_shapes, _("Shapes"), iter_tools, PREFS_PAGE_TOOLS_SHAPES);
//Rectangle
//3D box
//ellipse
//star
//spiral
//Pencil
_("If on, the sketch result will be the normal average of all sketches made, instead of averaging the old result with the new sketch."));
//Pen
//Calligraphy
_("If on, pen width is in absolute units (px) independent of zoom; otherwise pen width depends on zoom so that it looks the same at any zoom"));
_("If on, each newly created object will be selected (deselecting previous selection)"));
//Paint Bucket
//Eraser
//LPETool
//Text
//Gradient
//Connector
_("If on, connector attachment points will not be shown for text objects"));
//Dropper
}
void InkscapePreferences::initPageWindows()
{
_win_save_geom.init ( _("Save and restore window geometry for each document"), "/options/savewindowgeometry/value", 1, true, 0);
_win_save_geom_prefs.init ( _("Remember and use last window's geometry"), "/options/savewindowgeometry/value", 2, false, &_win_save_geom);
_win_save_geom_off.init ( _("Don't save window geometry"), "/options/savewindowgeometry/value", 0, false, &_win_save_geom);
_win_hide_task.init ( _("Dialogs are hidden in taskbar"), "/options/dialogsskiptaskbar/value", true);
_win_ontop_agressive.init ( _("Aggressive"), "/options/transientpolicy/value", 2, false, &_win_ontop_none);
_("Let the window manager determine placement of all windows"));
_("Remember and use the last window's geometry (saves geometry to user preferences)"));
_("Save and restore window geometry for each document (saves geometry in the document)"));
_("Dockable"));
_("Floating"));
#ifndef WIN32 // non-Win32 special code to enable transient dialogs
_("Dialogs are treated as regular windows"));
_("Dialogs stay on top of document windows"));
_("Same as Normal but may work better with some window managers"));
#endif
#endif
#ifndef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
_("Whether dialog windows are to be hidden in the window manager taskbar"));
#endif
_("Zoom drawing when document window is resized, to keep the same area visible (this is the default which can be changed in any window using the button above the right scrollbar)"));
_("Whether dialog windows have a close button (requires restart)"));
}
void InkscapePreferences::initPageClones()
{
SP_CLONE_COMPENSATION_PARALLEL, true, 0);
_clone_option_transform.init ( _("Move according to transform"), "/options/clonecompensation/value",
SP_CLONE_COMPENSATION_NONE, false, &_clone_option_parallel);
SP_CLONE_ORPHANS_UNLINK, true, 0);
SP_CLONE_ORPHANS_DELETE, false, &_clone_option_unlink);
_("Clones are translated by the same vector as their original."));
_("Clones preserve their positions when their original is moved."));
_("Each clone moves according to the value of its transform= attribute. For example, a rotated clone will move in a different direction than its original."));
_("Orphaned clones are converted to regular objects."));
_("Orphaned clones are deleted along with their original."));
_clone_relink_on_duplicate.init ( _("Relink duplicated clones"), "/options/relinkclonesonduplicate/value", false);
_("When duplicating a selection containing both a clone and its original (possibly in groups), relink the duplicated clone to the duplicated original instead of the old original"));
//TRANSLATORS: Heading for the Inkscape Preferences "Clones" Page
}
void InkscapePreferences::initPageMasks()
{
_mask_mask_on_top.init ( _("When applying, use the topmost selected object as clippath/mask"), "/options/maskobject/topmost", true);
_("Uncheck this to use the bottom selected object as the clipping path or mask"));
_mask_mask_remove.init ( _("Remove clippath/mask object after applying"), "/options/maskobject/remove", true);
_("After applying, remove the object used as the clipping path or mask from the drawing"));
}
{
_trans_scale_corner.init ( _("Scale rounded corners in rectangles"), "/options/transform/rectcorners", false);
_trans_preserved.init ( _("Preserved"), "/options/preservetransform/value", 1, false, &_trans_optimized);
_("When scaling objects, scale the stroke width by the same proportion"));
_("When scaling rectangles, scale the radii of rounded corners"));
_("Move gradients (in fill or stroke) along with the objects"));
_("Move patterns (in fill or stroke) along with the objects"));
_("If possible, apply transformation to objects without adding a transform= attribute"));
_("Always store transformation as a transform= attribute on objects"));
}
void InkscapePreferences::initPageFilters()
{
/* blur quality */
BLUR_QUALITY_BEST, false, 0);
BLUR_QUALITY_BETTER, false, &_blur_quality_best);
BLUR_QUALITY_NORMAL, true, &_blur_quality_best);
BLUR_QUALITY_WORSE, false, &_blur_quality_best);
BLUR_QUALITY_WORST, false, &_blur_quality_best);
_("Best quality, but display may be very slow at high zooms (bitmap export always uses best quality)"));
_("Better quality, but slower display"));
_("Average quality, acceptable display speed"));
_("Lower quality (some artifacts), but display is faster"));
_("Lowest quality (considerable artifacts), but display is fastest"));
/* filter quality */
_("Best quality, but display may be very slow at high zooms (bitmap export always uses best quality)"));
_("Better quality, but slower display"));
_("Average quality, acceptable display speed"));
_("Lower quality (some artifacts), but display is faster"));
_("Lowest quality (considerable artifacts), but display is fastest"));
/* show infobox */
_show_filters_info_box.init( _("Show filter primitives infobox"), "/options/showfiltersinfobox/value", true);
_("Show icons and descriptions for the filter primitives available at the filter effects dialog."));
}
void InkscapePreferences::initPageSelecting()
{
_sel_all.init ( _("Select in all layers"), "/options/kbselection/inlayer", PREFS_SELECTION_ALL, false, 0);
_sel_current.init ( _("Select only within current layer"), "/options/kbselection/inlayer", PREFS_SELECTION_LAYER, true, &_sel_all);
_sel_recursive.init ( _("Select in current layer and sublayers"), "/options/kbselection/inlayer", PREFS_SELECTION_LAYER_RECURSIVE, false, &_sel_all);
_sel_hidden.init ( _("Ignore hidden objects and layers"), "/options/kbselection/onlyvisible", true);
_sel_locked.init ( _("Ignore locked objects and layers"), "/options/kbselection/onlysensitive", true);
_sel_layer_deselects.init ( _("Deselect upon layer change"), "/options/selection/layerdeselect", true);
_("Make keyboard selection commands work on objects in all layers"));
_("Make keyboard selection commands work on objects in current layer only"));
_("Make keyboard selection commands work on objects in current layer and all its sublayers"));
_("Uncheck this to be able to select objects that are hidden (either by themselves or by being in a hidden layer)"));
_("Uncheck this to be able to select objects that are locked (either by themselves or by being in a locked layer)"));
_("Uncheck this to be able to keep the current objects selected when the current layer changes"));
}
{
_importexport_export.init("/dialogs/export/defaultxdpi/value", 0.0, 6000.0, 1.0, 1.0, PX_PER_IN, true, false);
_page_importexport.add_line( false, _("Default export resolution:"), _importexport_export, _("dpi"),
_("Default bitmap resolution (in dots per inch) in the Export dialog"), false);
_page_importexport.add_line( false, _("Open Clip Art Library Server Name:"), _importexport_ocal_url, "",
_("The server name of the Open Clip Art Library webdav server. It's used by the Import and Export to OCAL function."), true);
_page_importexport.add_line( false, _("Open Clip Art Library Username:"), _importexport_ocal_username, "",
_("The username used to log into Open Clip Art Library."), true);
_page_importexport.add_line( false, _("Open Clip Art Library Password:"), _importexport_ocal_password, "",
_("The password used to log into Open Clip Art Library."), true);
}
#if ENABLE_LCMS
{
if ( rowNum < 1 ) {
} else {
}
}
}
{
}
}
}
#endif // ENABLE_LCMS
void InkscapePreferences::initPageCMS()
{
int const numIntents = 4;
/* TRANSLATORS: see http://www.newsandtech.com/issues/2004/03-04/pt/03-04_rendering.htm */
Glib::ustring intentLabels[numIntents] = {_("Perceptual"), _("Relative Colorimetric"), _("Saturation"), _("Absolute Colorimetric")};
#if !ENABLE_LCMS
#endif // !ENABLE_LCMS
}
gchar* profileTip = g_strdup_printf(_("The ICC profile to use to calibrate display output.\nSearched directories:%s"), tmpStr.c_str());
profileTip, false);
profileTip = 0;
_cms_from_display.init( _("Retrieve profile from display"), "/options/displayprofile/from_display", false);
#ifdef GDK_WINDOWING_X11
_("Retrieve profiles from those attached to displays via XICC."), false);
#else
_("Retrieve profiles from those attached to displays."), false);
#endif // GDK_WINDOWING_X11
_("The rendering intent to use to calibrate display output."), false);
_("Simulates output of target device."), false);
_("Highlights colors that are out of gamut for the target device."), false);
_("Selects the color used for out of gamut warning."), false);
_("The ICC profile to use to simulate device output."), false);
_("The rendering intent to use to calibrate display output."), false);
_("Enables black point compensation."), false);
#if defined(cmsFLAGS_PRESERVEBLACK)
"",
#else
_("(LittleCMS 1.15 or later required)"),
#endif // defined(cmsFLAGS_PRESERVEBLACK)
_("Preserve K channel in CMYK -> CMYK transforms"), false);
#if !defined(cmsFLAGS_PRESERVEBLACK)
_cms_proof_preserveblack.set_sensitive( false );
#endif // !defined(cmsFLAGS_PRESERVEBLACK)
#if ENABLE_LCMS
{
index++;
}
index++;
}
}
index = 0;
}
index++;
}
}
_cms_gamutcolor.signal_color_set().connect( sigc::bind( sigc::ptr_fun(gamutColorChanged), &_cms_gamutcolor) );
_cms_display_profile.signal_changed().connect( sigc::bind( sigc::ptr_fun(profileComboChanged), &_cms_display_profile) );
_cms_proof_profile.signal_changed().connect( sigc::bind( sigc::ptr_fun(proofComboChanged), &_cms_proof_profile) );
#else
// disable it, but leave it visible
_cms_intent.set_sensitive( false );
_cms_display_profile.set_sensitive( false );
_cms_from_display.set_sensitive( false );
_cms_softproof.set_sensitive( false );
_cms_gamutwarn.set_sensitive( false );
_cms_gamutcolor.set_sensitive( false );
_cms_proof_intent.set_sensitive( false );
_cms_proof_profile.set_sensitive( false );
_cms_proof_blackpoint.set_sensitive( false );
_cms_proof_preserveblack.set_sensitive( false );
#endif // ENABLE_LCMS
}
void InkscapePreferences::initPageGrids()
{
_grids_no_emphasize_on_zoom.init( _("Don't emphasize gridlines when zoomed out"), "/options/grids/no_emphasize_when_zoomedout", false);
_page_grids.add_line( false, "", _grids_no_emphasize_on_zoom, "", _("If set and zoomed out, the gridlines will be shown in normal color instead of major grid line color."), false);
_grids_xy_origin_x.init("/options/grids/xy/origin_x", -10000.0, 10000.0, 0.1, 1.0, 0.0, false, false);
_grids_xy_origin_y.init("/options/grids/xy/origin_y", -10000.0, 10000.0, 0.1, 1.0, 0.0, false, false);
_grids_xy.add_line( false, _("Origin X:"), _grids_xy_origin_x, "", _("X coordinate of grid origin"), false);
_grids_xy.add_line( false, _("Origin Y:"), _grids_xy_origin_y, "", _("Y coordinate of grid origin"), false);
_grids_xy_spacing_x.init("/options/grids/xy/spacing_x", -10000.0, 10000.0, 0.1, 1.0, 1.0, false, false);
_grids_xy_spacing_y.init("/options/grids/xy/spacing_y", -10000.0, 10000.0, 0.1, 1.0, 1.0, false, false);
_grids_xy.add_line( false, _("Spacing X:"), _grids_xy_spacing_x, "", _("Distance between vertical grid lines"), false);
_grids_xy.add_line( false, _("Spacing Y:"), _grids_xy_spacing_y, "", _("Distance between horizontal grid lines"), false);
_grids_xy.add_line( false, _("Grid line color:"), _grids_xy_color, "", _("Color used for normal grid lines"), false);
_grids_xy.add_line( false, _("Major grid line color:"), _grids_xy_empcolor, "", _("Color used for major (highlighted) grid lines"), false);
_grids_xy.add_line( false, "", _grids_xy_dotted, "", _("If set, display dots at gridpoints instead of gridlines"), false);
// CanvasAxonomGrid properties:
_grids_axonom_origin_x.init("/options/grids/axonom/origin_x", -10000.0, 10000.0, 0.1, 1.0, 0.0, false, false);
_grids_axonom_origin_y.init("/options/grids/axonom/origin_y", -10000.0, 10000.0, 0.1, 1.0, 0.0, false, false);
_grids_axonom.add_line( false, _("Origin X:"), _grids_axonom_origin_x, "", _("X coordinate of grid origin"), false);
_grids_axonom.add_line( false, _("Origin Y:"), _grids_axonom_origin_y, "", _("Y coordinate of grid origin"), false);
_grids_axonom_spacing_y.init("/options/grids/axonom/spacing_y", -10000.0, 10000.0, 0.1, 1.0, 1.0, false, false);
_grids_axonom.add_line( false, _("Spacing Y:"), _grids_axonom_spacing_y, "", _("Base length of z-axis"), false);
_grids_axonom_angle_x.init("/options/grids/axonom/angle_x", -360.0, 360.0, 1.0, 10.0, 30.0, false, false);
_grids_axonom_angle_z.init("/options/grids/axonom/angle_z", -360.0, 360.0, 1.0, 10.0, 30.0, false, false);
_grids_axonom.add_line( false, _("Angle X:"), _grids_axonom_angle_x, "", _("Angle of x-axis"), false);
_grids_axonom.add_line( false, _("Angle Z:"), _grids_axonom_angle_z, "", _("Angle of z-axis"), false);
_grids_axonom.add_line( false, _("Grid line color:"), _grids_axonom_color, "", _("Color used for normal grid lines"), false);
_grids_axonom_empcolor.init(_("Major grid line color:"), "/options/grids/axonom/empcolor", 0x0000ff40);
_grids_axonom.add_line( false, _("Major grid line color:"), _grids_axonom_empcolor, "", _("Color used for major (highlighted) grid lines"), false);
_grids_axonom_empspacing.init("/options/grids/axonom/empspacing", 1.0, 1000.0, 1.0, 5.0, 5.0, true, false);
_grids_axonom.add_line( false, _("Major grid line every:"), _grids_axonom_empspacing, "", "", false);
}
void InkscapePreferences::initPageSVGOutput()
{
_page_svgoutput.add_line( false, "", _svgoutput_usenamedcolors, "", _("If set, write the CSS name of the color when available (e.g. 'red' or 'magenta') instead of the numeric value"), false);
_page_svgoutput.add_line( false, "", _svgoutput_inlineattrs, "", _("Put attributes on the same line as the element tag"), false);
_page_svgoutput.add_line( false, _("Indent, spaces:"), _svgoutput_indent, "", _("The number of spaces to use for indenting nested elements; set to 0 for no indentation"), false);
_svgoutput_allowrelativecoordinates.init( _("Allow relative coordinates"), "/options/svgoutput/allowrelativecoordinates", true);
_page_svgoutput.add_line( false, "", _svgoutput_allowrelativecoordinates, "", _("If set, relative coordinates may be used in path data"), false);
_svgoutput_forcerepeatcommands.init( _("Force repeat commands"), "/options/svgoutput/forcerepeatcommands", false);
_page_svgoutput.add_line( false, "", _svgoutput_forcerepeatcommands, "", _("Force repeating of the same path command (for example, 'L 1,2 L 3,4' instead of 'L 1,2 3,4')"), false);
_svgoutput_numericprecision.init("/options/svgoutput/numericprecision", 1.0, 16.0, 1.0, 2.0, 8.0, true, false);
_page_svgoutput.add_line( false, _("Numeric precision:"), _svgoutput_numericprecision, "", _("How many digits to write after the decimal dot"), false);
_svgoutput_minimumexponent.init("/options/svgoutput/minimumexponent", -32.0, -1, 1.0, 2.0, -8.0, true, false);
_page_svgoutput.add_line( false, _("Minimum exponent:"), _svgoutput_minimumexponent, "", _("The smallest number written to SVG is 10 to the power of this exponent; anything smaller is written as zero."), false);
}
void InkscapePreferences::initPageUI()
{
Glib::ustring languages[] = {_("System default"), _("am Amharic"), _("ar Arabic"), _("az Azerbaijani"), _("be Belarusian"),
_("bg Bulgarian"), _("bn Bengali"), _("br Breton"), _("ca Catalan"), _("ca@valencia Valencian Catalan"), _("cs Czech"),
_("da Danish"), _("de German"), _("dz Dzongkha"), _("el Greek"), _("en English"), _("en_AU English, as spoken in Australia"),
_("en_CA English, as spoken in Canada"), _("en_GB English, as spoken in Great Britain"), _("en_US@piglatin Pig Latin"),
_("eo Esperanto"), _("es Spanish"), _("es_MX Spanish, as spoken in Mexico"),_("et Estonian"), _("eu Basque"), _("fi Finnish"),
_("fr French"), _("ga Irish"), _("gl Galician"), _("he Hebrew"), _("hr Croatian"), _("hu Hungarian"), _("hy Armenian"),
_("id Indonesian"), _("it Italian"), _("ja Japanese"), _("km Khmer"), _("ko Korean"), _("lt Lithuanian"), _("mk Macedonian"),
_("mn Mongolian"), _("nb Norwegian Bokmål"), _("ne Nepali"), _("nl Dutch"), _("nn Norwegian Nynorsk"), _("pa Panjabi"),
_("pl Polish"), _("pt Portuguese"), _("pt_BR Portuguese, as spoken in Brazil"), _("ro Romanian"), _("ru Russian"),
_("rw Kinyarwanda"), _("sk Slovak"), _("sl Slovenian"), _("sq Albanian"), _("sr Serbian"), _("sr@latin Serbian in Latin script"),
_("sv Swedish"), _("th Thai"), _("tr Turkish"), _("uk Ukrainian"), _("vi Vietnamese"), _("zh_CN Chinese, as spoken in China"),
_("zh_TW Chinese, as spoken in Taiwan")};
Glib::ustring langValues[] = {"", "am", "ar", "az", "be", "bg", "bn", "br", "ca", "ca@valencia", "cs", "da", "de",
"dz", "el", "en", "en_AU", "en_CA", "en_GB", "en_US@piglatin", "eo", "es", "es_MX", "et", "eu", "fi", "fr", "ga",
"gl", "he", "hr", "hu", "hy", "id", "it", "ja", "km", "ko", "lt", "mk", "mn", "nb", "ne", "nl", "nn", "pa",
"pl", "pt", "pt_BR", "ro", "ru", "rw", "sk", "sl", "sq", "sr", "sr@latin", "sv", "th", "tr", "uk", "vi",
"zh_CN", "zh_TW"};
_("Set the language for menus and number-formats"), false);
_("Set the size for the commands toolbar to use (requires restart)"), false);
_misc_small_secondary.init( "/toolbox/secondary", sizeLabels, sizeValues, G_N_ELEMENTS(sizeLabels), 1 );
_("Set the size for the secondary toolbar to use (requires restart)"), false);
_misc_small_tools.init( "/toolbox/tools/small", sizeLabels, sizeValues, G_N_ELEMENTS(sizeLabels), 0 );
_("Set the size for the main tools to use (requires restart)"), false);
reset_recent->signal_clicked().connect(sigc::mem_fun(*this, &InkscapePreferences::on_reset_open_recent_clicked));
_("Set the maximum length of the Open Recent list in the File menu, or clear the list"), false);
_("Adjust the slider until the length of the ruler on your screen matches its real length. This information is used when zooming to 1:1, 1:2, etc., to display objects in their true sizes"), true);
}
void InkscapePreferences::initPageAutosave()
{
// Autosave options
_autosave_autosave_enable.init( _("Enable autosave (requires restart)"), "/options/autosave/enable", false);
_page_autosave.add_line(false, "", _autosave_autosave_enable, "", _("Automatically save the current document(s) at a given interval, thus minimizing loss in case of a crash"), false);
_autosave_autosave_interval.init("/options/autosave/interval", 1.0, 10800.0, 1.0, 10.0, 10.0, true, false);
_page_autosave.add_line(true, _("Interval (in minutes):"), _autosave_autosave_interval, "", _("Interval (in minutes) at which document will be autosaved"), false);
_page_autosave.add_line(true, _("Path:"), _autosave_autosave_path, "", _("The directory where autosaves will be written"), false);
_page_autosave.add_line(true, _("Maximum number of autosaves:"), _autosave_autosave_max, "", _("Maximum number of autosaved files; use this to limit the storage space used"), false);
* update our running configuration
*
* FIXME!
* the inkscape_autosave_init should be called AFTER the values have been changed
* (which cannot be guaranteed from here) - use a PrefObserver somewhere
*/
/*
_autosave_autosave_enable.signal_toggled().connect( sigc::ptr_fun(inkscape_autosave_init), TRUE );
_autosave_autosave_interval.signal_changed().connect( sigc::ptr_fun(inkscape_autosave_init), TRUE );
*/
// -----------
}
void InkscapePreferences::initPageBitmaps()
{
{
_misc_overs_bitmap.init("/options/bitmapoversample/value", labels, values, G_N_ELEMENTS(values), 1);
}
_misc_bitmap_autoreload.init(_("Automatically reload bitmaps"), "/options/bitmapautoreload/value", true);
_("Automatically reload linked images when file is changed on disk"));
values[i] = i;
}
}
_bitmap_copy_res.init("/options/createbitmap/resolution", 1.0, 6000.0, 1.0, 1.0, PX_PER_IN, true, false);
_("Resolution used by the Create Bitmap Copy command"), false);
}
void InkscapePreferences::initPageMisc()
{
_misc_comment.init( _("Add label comments to printing output"), "/printing/debug/show-label-comments", false);
_("When on, a comment will be added to the raw print output, marking the rendered output for an object with its label"), true);
_misc_forkvectors.init( _("Prevent sharing of gradient definitions"), "/options/forkgradientvectors/value", true);
_("When on, shared gradient definitions are automatically forked on change; uncheck to allow sharing of gradient definitions so that editing one object may affect other objects using the same gradient"), true);
_misc_simpl.init("/options/simplifythreshold/value", 0.0001, 1.0, 0.0001, 0.0010, 0.0010, false, false);
_("How strong is the Simplify command by default. If you invoke this command several times in quick succession, it will act more and more aggressively; invoking it again after a pause restores the default threshold."), false);
_("Factor by which the event clock is skewed from the actual time (0.9766 on some systems)."), false);
_misc_namedicon_delay.init( _("Pre-render named icons"), "/options/iconrender/named_nodelay", false);
_("When on, named icons will be rendered before displaying the ui. This is for working around bugs in GTK+ named icon notification"), true);
}
{
this->show_all_children();
this->size_request(sreq);
return false;
}
{
{
return true;
}
return false;
}
{
//Remove only elements that were added by Inkscape
}
}
}
{
// show new selection
if(iter)
{
if (_current_page)
_page_title.set_markup("<span size='large'><b>" + row[_page_list_columns._col_name] + "</b></span>");
_current_page->show();
{
}
this->show_all_children();
}
}
void InkscapePreferences::_presentPages()
{
}
} // namespace Dialog
} // namespace UI
} // namespace Inkscape
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :