Code

Add a zoom correction option to preferences (used when zooming to 1:1 etc. to display...
[inkscape.git] / src / ui / dialog / inkscape-preferences.cpp
index 455908a063396f554afcc149d4e7a11fe02a19ff..dcfc4e575bfd006ccf9bfbe49878104f44ed973e 100644 (file)
@@ -306,11 +306,12 @@ void StyleFromSelectionToTool(gchar const *prefs_path, StyleSwatch *swatch)
     }
 }
 
-void InkscapePreferences::AddNewObjectsStyle(DialogPage& p, const std::string& prefs_path)
+void InkscapePreferences::AddNewObjectsStyle(DialogPage& p, const std::string& prefs_path, const gchar* banner)
 {
-
-
-    p.add_group_header( _("Create new objects with:"));
+    if (banner)
+        p.add_group_header(banner);
+    else
+        p.add_group_header( _("Create new objects with:"));
     PrefRadioButton* current = Gtk::manage( new PrefRadioButton);
     current->init ( _("Last used style"), prefs_path, "usecurrent", 1, true, 0);
     p.add_line( true, "", *current, "",
@@ -403,7 +404,8 @@ void InkscapePreferences::initPageTools()
     _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
-    this->AddPage(_page_tweak, _("Tweak"), iter_tools, PREFS_PAGE_TOOLS_NODE);
+    this->AddPage(_page_tweak, _("Tweak"), iter_tools, PREFS_PAGE_TOOLS_TWEAK);
+    this->AddNewObjectsStyle(_page_tweak, "tools.tweak", _("Paint objects with:"));
     AddSelcueCheckbox(_page_tweak, "tools.tweak", true);
     AddGradientCheckbox(_page_tweak, "tools.tweak", false);
 
@@ -469,6 +471,10 @@ void InkscapePreferences::initPageTools()
     this->AddPage(_page_eraser, _("Eraser"), iter_tools, PREFS_PAGE_TOOLS_ERASER);
     this->AddNewObjectsStyle(_page_eraser, "tools.eraser");
 
+    //LPETool
+    this->AddPage(_page_lpetool, _("LPE Tool"), iter_tools, PREFS_PAGE_TOOLS_LPETOOL);
+    this->AddNewObjectsStyle(_page_lpetool, "tools.lpetool");
+
     //Text
     this->AddPage(_page_text, _("Text"), iter_tools, PREFS_PAGE_TOOLS_TEXT);
     this->AddSelcueCheckbox(_page_text, "tools.text", true);
@@ -569,6 +575,12 @@ void InkscapePreferences::initPageClones()
     _page_clones.add_line( true, "", _clone_option_delete, "",
                            _("Orphaned clones are deleted along with their original."));
 
+    _page_clones.add_group_header( _("When duplicating original+clones:"));
+
+    _clone_relink_on_duplicate.init ( _("Relink duplicated clones"), "options.relinkclonesonduplicate", "value", false);
+    _page_clones.add_line(true, "", _clone_relink_on_duplicate, "",
+                        _("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
     this->AddPage(_page_clones, _("Clones"), PREFS_PAGE_CLONES);
 }
@@ -867,44 +879,44 @@ void InkscapePreferences::initPageGrids()
     _grids_notebook.append_page(_grids_xy,     CanvasGrid::getName( GRID_RECTANGULAR ));
     _grids_notebook.append_page(_grids_axonom, CanvasGrid::getName( GRID_AXONOMETRIC ));
         _grids_xy_units.init("options.grids.xy", "units");
-        _grids_xy.add_line( false, _("Grid units"), _grids_xy_units, "", "", false);
+        _grids_xy.add_line( false, _("Grid units:"), _grids_xy_units, "", "", 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.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, _("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_color.init(_("Grid line color"), "options.grids.xy", "color", 0x0000ff20);
-        _grids_xy.add_line( false, _("Grid line color"), _grids_xy_color, "", _("Color used for normal grid lines"), false);
-        _grids_xy_empcolor.init(_("Major grid line color"), "options.grids.xy", "empcolor", 0x0000ff40);
-        _grids_xy.add_line( false, _("Major grid line color"), _grids_xy_empcolor, "", _("Color used for major (highlighted) grid lines"), false);
+        _grids_xy_color.init(_("Grid line color:"), "options.grids.xy", "color", 0x0000ff20);
+        _grids_xy.add_line( false, _("Grid line color:"), _grids_xy_color, "", _("Color used for normal grid lines"), false);
+        _grids_xy_empcolor.init(_("Major grid line color:"), "options.grids.xy", "empcolor", 0x0000ff40);
+        _grids_xy.add_line( false, _("Major grid line color:"), _grids_xy_empcolor, "", _("Color used for major (highlighted) grid lines"), false);
         _grids_xy_empspacing.init("options.grids.xy", "empspacing", 1.0, 1000.0, 1.0, 5.0, 5.0, true, false);
-        _grids_xy.add_line( false, _("Major grid line every"), _grids_xy_empspacing, "", "", false);
+        _grids_xy.add_line( false, _("Major grid line every:"), _grids_xy_empspacing, "", "", false);
         _grids_xy_dotted.init( _("Show dots instead of lines"), "options.grids.xy", "dotted", false);
         _grids_xy.add_line( false, "", _grids_xy_dotted, "", _("If set, display dots at gridpoints instead of gridlines"), false);
 
     // CanvasAxonomGrid properties:
         _grids_axonom_units.init("options.grids.axonom", "units");
-        _grids_axonom.add_line( false, _("Grid units"), _grids_axonom_units, "", "", false);
+        _grids_axonom.add_line( false, _("Grid units:"), _grids_axonom_units, "", "", false);
         _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.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.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_color.init(_("Grid line color"), "options.grids.axonom", "color", 0x0000ff20);
-        _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.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_color.init(_("Grid line color:"), "options.grids.axonom", "color", 0x0000ff20);
+        _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);
+        _grids_axonom.add_line( false, _("Major grid line every:"), _grids_axonom_empspacing, "", "", false);
 
     this->AddPage(_page_grids, _("Grids"), PREFS_PAGE_GRIDS);
 }
@@ -920,7 +932,7 @@ void InkscapePreferences::initPageSVGOutput()
     _page_svgoutput.add_line( false, "", _svgoutput_inlineattrs, "", _("Put attributes on the same line as the element tag"), false);
 
     _svgoutput_indent.init("options.svgoutput", "indent", 0.0, 1000.0, 1.0, 2.0, 2.0, true, 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);
+    _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);
 
     _page_svgoutput.add_group_header( _("Path data"));
 
@@ -932,11 +944,11 @@ void InkscapePreferences::initPageSVGOutput()
 
     _page_svgoutput.add_group_header( _("Numbers"));
 
-    _svgoutput_numericprecision.init("options.svgoutput", "numericprecision", 0.0, 1000.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_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", -100.0, 100.0, 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);
+    _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);
 
     this->AddPage(_page_svgoutput, _("SVG output"), PREFS_PAGE_SVGOUTPUT);
 }
@@ -948,19 +960,23 @@ void InkscapePreferences::initPageUI()
 
     _misc_small_toolbar.init( "toolbox", "small", sizeLabels, sizeValues, G_N_ELEMENTS(sizeLabels), 0 );
     _page_ui.add_line( false, _("Commands bar icon size"), _misc_small_toolbar, "",
-                           _("Set the size for the commands toolbar to use (requires restart)"), 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 );
     _page_ui.add_line( false, _("Tool controls bar icon size"), _misc_small_secondary, "",
-                           _("Set the size for the secondary toolbar to use (requires restart)"), false);
+                              _("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 );
     _page_ui.add_line( false, _("Main toolbar icon size"), _misc_small_tools, "",
-                           _("Set the size for the main tools to use (requires restart)"), false);
+                              _("Set the size for the main tools to use (requires restart)"), false);
 
     _misc_recent.init("options.maxrecentdocuments", "value", 0.0, 1000.0, 1.0, 1.0, 1.0, true, false);
     _page_ui.add_line( false, _("Maximum documents in Open Recent:"), _misc_recent, "",
-                           _("The maximum length of the Open Recent list in the File menu"), false);
+                              _("The maximum length of the Open Recent list in the File menu"), false);
+
+    _ui_zoom_correction.init(300, 30, 1.00, 200.0, 1.0, 10.0, 1.0);
+    _page_ui.add_line( false, _("Zoom correction factor (in %):"), _ui_zoom_correction, "",
+                              _("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);
 
     this->AddPage(_page_ui, _("Interface"), PREFS_PAGE_UI);
 }
@@ -972,11 +988,11 @@ void InkscapePreferences::initPageAutosave()
     _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, _("Interval (in minutes):"), _autosave_autosave_interval, "", _("Interval (in minutes) at which document will be autosaved"), false);
     _autosave_autosave_path.init("options.autosave", "path", true);
-    _page_autosave.add_line(true, _("Path"), _autosave_autosave_path, "", _("The directory where autosaves will be written"), false);
+    _page_autosave.add_line(true, _("Path:"), _autosave_autosave_path, "", _("The directory where autosaves will be written"), false);
     _autosave_autosave_max.init("options.autosave", "max", 1.0, 100.0, 1.0, 10.0, 10.0, true, 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);
+    _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);
 
     /* When changing the interval or enabling/disabling the autosave function,
      * update our running configuration
@@ -1049,6 +1065,14 @@ void InkscapePreferences::initPageMisc()
     _page_misc.add_line( false, _("Simplification threshold:"), _misc_simpl, "",
                            _("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);
 
+    _misc_latency_skew.init("debug.latency", "skew", 0.5, 2.0, 0.01, 0.10, 1.0, false, false);
+    _page_misc.add_line( false, _("Latency skew:"), _misc_latency_skew, _("(requires restart)"),
+                           _("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);
+    _page_misc.add_line( false, "", _misc_namedicon_delay, "",
+                           _("When on, named icons will be rendered before displaying the ui. This is for working around bugs in GTK+ named icon notification"), true);
+
     this->AddPage(_page_misc, _("Misc"), PREFS_PAGE_MISC);
 }