The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Import color SVG files by default

These changes was commited to the Birdfont repository Fri, 24 Jun 2016 19:04:19 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 24 Jun 2016 19:04:19 +0000 (21:04 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Fri, 24 Jun 2016 19:06:05 +0000 (21:06 +0200)
commit 411918b8949d023307f677708a16a01eb7c3a0df
tree af0a5024b29c83a1843b40808f21ef8e77b32fed
parent 9f10873c4b777ef22c9bd2192f6f54cb0b866c6f
Import color SVG files by default

libbirdfont/Menu.vala
resources/key_bindings.xml
--- a/libbirdfont/Menu.vala +++ b/libbirdfont/Menu.vala @@ -285,39 +285,23 @@ }); export_menu.items.add (export_glyph); - MenuItem import_svg = add_menu_item (t_("Import SVG file"), "import svg file", "Glyph"); - import_svg.action.connect (() => { - SvgParser.import (SvgType.REGULAR); + MenuItem import_color_svg; + import_color_svg = add_menu_item (t_("Import SVG file"), + "import svg file color", "Glyph"); + import_color_svg.action.connect (() => { + SvgParser.import (SvgType.COLOR); show_menu = false; }); - export_menu.items.add (import_svg); - - MenuItem import_svg_folder = add_menu_item (t_("Import SVG folder"), "import svg folder", ""); - import_svg_folder.action.connect (() => { - SvgParser.import_folder (SvgType.REGULAR); + export_menu.items.add (import_color_svg); + + MenuItem import_svg_color_folder; + import_svg_color_folder = add_menu_item (t_("Import SVG folder"), + "import svg folder color", ""); + import_svg_color_folder.action.connect (() => { + SvgParser.import_folder (SvgType.COLOR); show_menu = false; }); - export_menu.items.add (import_svg_folder); - - if (BirdFont.has_argument ("--test")) { - MenuItem import_color_svg; - import_color_svg = add_menu_item (t_("Import SVG file") + ", " + t_("color"), - "import svg file color", "Glyph"); - import_color_svg.action.connect (() => { - SvgParser.import (SvgType.COLOR); - show_menu = false; - }); - export_menu.items.add (import_color_svg); - - MenuItem import_svg_color_folder; - import_svg_color_folder = add_menu_item (t_("Import SVG folder") + ", " + t_("color"), - "import svg folder color", ""); - import_svg_color_folder.action.connect (() => { - SvgParser.import_folder (SvgType.COLOR); - show_menu = false; - }); - export_menu.items.add (import_svg_color_folder); - } + export_menu.items.add (import_svg_color_folder); MenuItem import_background_image = add_menu_item (t_("Import Background Image"), "import background image"); import_background_image.action.connect (() => {
--- a/resources/key_bindings.xml +++ b/resources/key_bindings.xml @@ -32,8 +32,8 @@ <action key="" ctrl="false" alt="false" command="false" shift="false" action="move layer down" /> <action key="e" ctrl="true" alt="false" command="false" shift="false" action="export" /> <action key="E" ctrl="true" alt="false" command="false" shift="true" action="export glyph as svg" /> - <action key="i" ctrl="true" alt="false" command="false" shift="false" action="import svg file" /> - <action key="" ctrl="false" alt="false" command="false" shift="false" action="import svg folder" /> + <action key="i" ctrl="true" alt="false" command="false" shift="false" action="import svg file color" /> + <action key="" ctrl="false" alt="false" command="false" shift="false" action="import svg folder color" /> <action key="b" ctrl="true" alt="false" command="false" shift="false" action="import background image" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="export settings" /> <action key="p" ctrl="true" alt="false" command="false" shift="false" action="preview" /> @@ -55,6 +55,7 @@ <action key="" ctrl="false" alt="false" command="false" shift="false" action="settings" /> <action key="d" ctrl="true" alt="false" command="false" shift="false" action="name and description" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="birdfont version" /> + <action key="" ctrl="false" alt="false" command="false" shift="false" action="help" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="new_font" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="open_font" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="save_font" /> @@ -79,13 +80,13 @@ <action key="" ctrl="false" alt="false" command="false" shift="false" action="x_coordinate" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="y_coordinate" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="rotation" /> - <action key="" ctrl="false" alt="false" command="false" shift="false" action="skew" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="width" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="height" /> <action key="w" ctrl="false" alt="false" command="false" shift="false" action="tie_point" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="symmetric" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="create_line" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="reverse_path" /> + <action key="" ctrl="false" alt="false" command="false" shift="false" action="svg_to_birdfont" /> <action key="c" ctrl="false" alt="false" command="false" shift="false" action="close_path" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="move_layer" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="flip_vertical" /> @@ -133,10 +134,14 @@ <action key="" ctrl="false" alt="false" command="false" shift="false" action="export_fonts" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="generate_html_document" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="skew_overview" /> + <action key="" ctrl="false" alt="false" command="false" shift="false" action="transform_slant" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="resize_overview" /> - <action key="" ctrl="false" alt="false" command="false" shift="false" action="transform" /> + <action key="" ctrl="false" alt="false" command="false" shift="false" action="transform_size" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="alternate" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="curve_orientation" /> + <action key="" ctrl="false" alt="false" command="false" shift="false" action="master_size" /> + <action key="" ctrl="false" alt="false" command="false" shift="false" action="new_master" /> + <action key="" ctrl="false" alt="false" command="false" shift="false" action="insert_glyph_from_overview_in_spacing_class" /> <action key="" ctrl="false" alt="false" command="false" shift="false" action="select_background" /> </bindings>