Commit 936fe19
GTK+ menu and key bindings
Changed files (19)
modifiedNEWSmodifiedbirdfont.potaddedlayout/birdfont_logo.pngmodifiedsrc/ClipTool.valamodifiedsrc/Context.valamodifiedsrc/Font.valamodifiedsrc/GtkWindow.valamodifiedsrc/KeyBindings.valamodifiedsrc/Main.valamodifiedsrc/MainWindow.valamodifiedsrc/MenuTab.valamodifiedsrc/Preferences.valamodifiedsrc/Supplement.valamodifiedsrc/Toolbox.valamodifiedsrc/ZoomTool.valamodifiedsrc/wscriptmodifiedtranslations/birdfont-sv.pomodifiedwin32/wscriptmodifiedwscript
Diff
@@ -2,6 +2,7 @@ birdfont (0.7) stable; * New icons * Bugfixes+ * Menu -- Johan Mattsson <johan.mattsson.m@gmail.com> Sat Dec 8 14:40:08 CET 2012 @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n"-"POT-Creation-Date: 2012-12-05 18:37+0100\n"+"POT-Creation-Date: 2012-12-09 00:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n"@@ -17,274 +17,382 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/Argument.vala:225+#: src/Argument.c:1067 msgid "Usage" msgstr "" -#: src/Argument.vala:229+#: src/Argument.c:1079 msgid "show coordinate in glyph view" msgstr "" -#: src/Argument.vala:230+#: src/Argument.c:1081 msgid "exit if a testcase failes" msgstr "" -#: src/Argument.vala:231+#: src/Argument.c:1083 msgid "treat warnings as fatal" msgstr "" -#: src/Argument.vala:232+#: src/Argument.c:1085 msgid "show this message" msgstr "" -#: src/Argument.vala:233+#: src/Argument.c:1087 msgid "sleep between each command in test suite" msgstr "" -#: src/Argument.vala:234+#: src/Argument.c:1089 msgid "run test case" msgstr "" -#: src/BackgroundTool.vala:40+#: src/BackgroundTool.c:587 msgid "Move, resize and rotate background image" msgstr "" -#: src/Birdfont.vala:22+#: src/Birdfont.c:169 msgid "Usage:" msgstr "" -#: src/Birdfont.vala:25+#: src/Birdfont.c:179 msgid "print this message\n" msgstr "" -#: src/Birdfont.vala:26+#: src/Birdfont.c:185 msgid "write files to this directory\n" msgstr "" -#: src/Birdfont.vala:27+#: src/Birdfont.c:191 msgid "write svg file\n" msgstr "" -#: src/Birdfont.vala:28+#: src/Birdfont.c:197 msgid "write ttf and eot files\n" msgstr "" -#: src/Birdfont.vala:118+#: src/Birdfont.c:633 msgid "Can't find output directory" msgstr "" -#: src/Birdfont.vala:123 src/Birdfont.vala:128+#: src/Birdfont.c:679 src/Birdfont.c:726 msgid "Writing" msgstr "" -#: src/ExportTool.vala:29+#: src/ExportTool.c:462 msgid "Export glyph to svg file" msgstr "" -#: src/GlyphRange.vala:36-msgid "a b c d e f g h i j k l m n o p q r s t u v w x y z"+#: src/ExportTool.c:865+msgid "Can't export" msgstr "" -#: src/GlyphRange.vala:37-msgid "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"+#: src/ExportTool.c:891+msgid "Wrote" msgstr "" -#: src/MenuTab.vala:113-msgid "Create a new font"+#: src/ExportTool.c:1267+msgid "Alphabet" msgstr "" -#: src/MenuTab.vala:114-msgid "Open an existing ffi file"+#: src/ExportTool.c:1298 src/GlyphRange.c:208+msgid "a b c d e f g h i j k l m n o p q r s t u v w x y z" msgstr "" -#: src/MenuTab.vala:115-msgid "Save font"+#: src/ExportTool.c:1303 src/GlyphRange.c:211+msgid "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" msgstr "" -#: src/MenuTab.vala:116-msgid "Save font with a different name"+#: src/ExportTool.c:1913+msgid "Wrote font files" msgstr "" -#: src/MenuTab.vala:117-msgid "Show kerning context"+#: src/MenuTab.c:814+msgid "Preferences" msgstr "" -#: src/MenuTab.vala:118-msgid "Add a new size for grid"+#: src/MenuTab.c:835+msgid "Glyph sequence" msgstr "" -#: src/MenuTab.vala:119-msgid "Remove current grid size"+#: src/MenuTab.c:852+msgid "Name" msgstr "" -#: src/MenuTab.vala:136+#: src/MenuTab.c:873 msgid "Export" msgstr "" -#: src/MenuTab.vala:137+#: src/MenuTab.c:881+msgid "Export SVG, TTF & EOF fonts"+msgstr ""++#: src/MenuTab.c:888 msgid "Preview" msgstr "" -#: src/MenuTab.vala:153+#: src/MenuTab.c:896+msgid "Export SVG font and view the result"+msgstr ""++#: src/MenuTab.c:953 msgid "Recent files" msgstr "" -#: src/MenuTab.vala:266 src/SaveDialog.vala:82+#: src/MenuTab.c:1397 src/SaveDialog.c:334 msgid "Save" msgstr "" -#: src/MergeTool.vala:23+#: src/MergeTool.c:224 msgid "Merge paths" msgstr "" -#: src/MoveTool.vala:36+#: src/MoveTool.c:823 msgid "Move paths" msgstr "" -#: src/PenTool.vala:48-msgid ""-"Right click to add new point, left click to move points and double click to "-"add new point on path"+#: src/PenTool.c:883 src/Toolbox.c:2378+msgid "Right click to add new point, left click to move points and double cli" msgstr "" -#: src/SaveDialog.vala:83+#: src/SaveDialog.c:310+msgid "Save?"+msgstr ""++#: src/SaveDialog.c:344 msgid "Save as" msgstr "" -#: src/SaveDialog.vala:84+#: src/SaveDialog.c:354 msgid "Discard" msgstr "" -#: src/SaveDialog.vala:85+#: src/SaveDialog.c:364 msgid "Cancel" msgstr "" -#: src/Toolbox.vala:94-msgid ""-"Right click to add new point, left click to move points and double click to "-"ad new point on path"+#: src/Toolbox.c:1884+msgid "Creating thumbnails" msgstr "" -#: src/Toolbox.vala:101+#: src/Toolbox.c:2384 msgid "Add new point on path" msgstr "" -#: src/Toolbox.vala:109+#: src/Toolbox.c:2397 msgid "Begin new path from point on path" msgstr "" -#: src/Toolbox.vala:117+#: src/Toolbox.c:2407 msgid "Tie curve handles for selected edit point" msgstr "" -#: src/Toolbox.vala:137+#: src/Toolbox.c:2415 msgid "Tie coordinates to previous edit point" msgstr "" -#: src/Toolbox.vala:144+#: src/Toolbox.c:2420 msgid "Delete edit points" msgstr "" -#: src/Toolbox.vala:153+#: src/Toolbox.c:2427 msgid "Set precision" msgstr "" -#: src/Toolbox.vala:181+#: src/Toolbox.c:2459 msgid "Create counter from outline" msgstr "" -#: src/Toolbox.vala:193+#: src/Toolbox.c:2467 msgid "Move to path to bottom layer" msgstr "" -#: src/Toolbox.vala:205+#: src/Toolbox.c:2475 msgid "Show full unicode characters set" msgstr "" -#: src/Toolbox.vala:216+#: src/Toolbox.c:2483 msgid "Show default characters set" msgstr "" -#: src/Toolbox.vala:227+#: src/Toolbox.c:2491 GtkWindow.c:2074 msgid "Show characters in font" msgstr "" -#: src/Toolbox.vala:236+#: src/Toolbox.c:2499 msgid "Delete selected glyph" msgstr "" -#: src/Toolbox.vala:302+#: src/Toolbox.c:2584 msgid "Show help lines for x-height and baseline" msgstr "" -#: src/Toolbox.vala:317+#: src/Toolbox.c:2590 msgid "Show help lines at top and bottom margin" msgstr "" -#: src/Toolbox.vala:335+#: src/Toolbox.c:2600 GtkWindow.c:2093 msgid "Zoom in" msgstr "" -#: src/Toolbox.vala:342+#: src/Toolbox.c:2606 GtkWindow.c:2100 msgid "Zoom out" msgstr "" -#: src/Toolbox.vala:349+#: src/Toolbox.c:2612 GtkWindow.c:2107 msgid "Zoom to scale 1:1" msgstr "" -#: src/Toolbox.vala:357+#: src/Toolbox.c:2618 msgid "Show full glyph" msgstr "" -#: src/Toolbox.vala:364+#: src/Toolbox.c:2624 msgid "Zoom in at region boundries" msgstr "" -#: src/Toolbox.vala:371+#: src/Toolbox.c:2630 msgid "Zoom in background image" msgstr "" -#: src/Toolbox.vala:384+#: src/Toolbox.c:2636 msgid "Previous view" msgstr "" -#: src/Toolbox.vala:390+#: src/Toolbox.c:2642 msgid "Next view" msgstr "" -#: src/Toolbox.vala:397+#: src/Toolbox.c:2648 msgid "Set size for background image" msgstr "" -#: src/Toolbox.vala:427+#: src/Toolbox.c:2675 msgid "Show/hide background image" msgstr "" -#: src/Toolbox.vala:435+#: src/Toolbox.c:2681 msgid "Insert new background image" msgstr "" -#: src/Toolbox.vala:440-msgid "Creating thumbnails"-msgstr ""--#: src/Toolbox.vala:459+#: src/Toolbox.c:2688 msgid "Set background contrast" msgstr "" -#: src/Toolbox.vala:479+#: src/Toolbox.c:2694 msgid "Set threshold" msgstr "" -#: src/Toolbox.vala:670+#: src/Toolbox.c:3393 msgid "Set size for grid" msgstr "" -#: src/VersionList.vala:32+#: src/VersionList.c:385 msgid "New version" msgstr "" -#: src/VersionList.vala:86+#: src/VersionList.c:606 msgid "Version" msgstr ""++#: GtkWindow.c:1939+msgid "_New"+msgstr ""++#: GtkWindow.c:1946+msgid "_Open"+msgstr ""++#: GtkWindow.c:1953+msgid "_Save"+msgstr ""++#: GtkWindow.c:1960+msgid "Save _as"+msgstr ""++#: GtkWindow.c:1966+msgid "_Export"+msgstr ""++#: GtkWindow.c:1973+msgid "_Preview"+msgstr ""++#: GtkWindow.c:1980+msgid "_Kerning"+msgstr ""++#: GtkWindow.c:1987+msgid "_Quit"+msgstr ""++#: GtkWindow.c:1993+msgid "_Undo"+msgstr ""++#: GtkWindow.c:2000+msgid "_Copy"+msgstr ""++#: GtkWindow.c:2007+msgid "_Paste"+msgstr ""++#: GtkWindow.c:2014+msgid "_Next tab"+msgstr ""++#: GtkWindow.c:2020+msgid "_Previous tab"+msgstr ""++#: GtkWindow.c:2026+msgid "_Close tab"+msgstr ""++#: GtkWindow.c:2033+msgid "_Create path"+msgstr ""++#: GtkWindow.c:2040+msgid "_Zoom"+msgstr ""++#: GtkWindow.c:2046+msgid "_Create counter path"+msgstr ""++#: GtkWindow.c:2053+msgid "_Move"+msgstr ""++#: GtkWindow.c:2060+msgid "Show _full unicode characters set"+msgstr ""++#: GtkWindow.c:2067+msgid "Show de_fault characters set"+msgstr ""++#: GtkWindow.c:2081+msgid "Add new _grid item"+msgstr ""++#: GtkWindow.c:2087+msgid "Remove gr_id item"+msgstr ""++#: GtkWindow.c:2114+msgid "_File"+msgstr ""++#: GtkWindow.c:2119+msgid "_Edit"+msgstr ""++#: GtkWindow.c:2124+msgid "_Tab"+msgstr ""++#: GtkWindow.c:2129+msgid "T_ool"+msgstr ""new file mode 100644Binary files /dev/null and b/layout/birdfont_logo.png differ@@ -17,7 +17,7 @@ namespace Supplement { -class ClipTool : Tool {+public class ClipTool : Tool { static Glyph? glyph = null; static List<Path> path = new List<Path> ();@@ -20,7 +20,7 @@ using Cairo; namespace Supplement { /** Kerning context. */-class ContextDisplay : FontDisplay {+public class ContextDisplay : FontDisplay { List <Word> row; int active_handle = -1;@@ -1071,7 +1071,7 @@ public class Font : GLib.Object { for (Xml.Node* iter = node->children; iter != null; iter = iter->next) { if (iter->name == "top_limit") top_limit = parse_double_from_node (iter); if (iter->name == "top_position") top_position = parse_double_from_node (iter);- if (iter->name == "x-heigh") xheight_position = parse_double_from_node (iter);+ if (iter->name == "x-height") xheight_position = parse_double_from_node (iter); if (iter->name == "base_line") base_line = parse_double_from_node (iter); if (iter->name == "bottom_position") bottom_position = parse_double_from_node (iter); if (iter->name == "bottom_limit") bottom_limit = parse_double_from_node (iter);@@ -161,7 +161,6 @@ public class GtkWindow : Gtk.Window, NativeWindow { html_box.set_visible (false); glyph_canvas_area.set_visible (true); }- }); // Hide this canvas when window is realized and flip canvas @@ -194,47 +193,253 @@ public class GtkWindow : Gtk.Window, NativeWindow { list_box.pack_start (new ToolboxCanvas (MainWindow.tools), false, false, 0); list_box.pack_start (margin_right, false, false, 0); - add (list_box);- - key_snooper_install (GtkWindow.global_key_bindings, null);+ VBox vbox = new VBox (false, 0); - // FIXME: This value should obviously be obtained in a gtk signal - TimeoutSource window_is_active = new TimeoutSource(1000);- window_is_active.set_callback(() => {- if (!has_toplevel_focus) {- MainWindow.key_bindings.reset ();- }- return true;- });- window_is_active.attach(null);+ vbox.pack_start(create_menu (), false, false, 0);+ vbox.pack_start(list_box, true, true, 0);++ add (vbox); try { set_icon_from_file ((!) Icons.find_icon ("window_icon.png").get_path ()); } catch (GLib.Error e) { warning (e.message); }- - show_all (); - - } - public static int global_key_bindings (Widget grab_widget, EventKey event, void* data) { - MainWindow window = MainWindow.get_singleton ();+ key_press_event.connect ((t, event) => {+ MainWindow window = MainWindow.get_singleton ();+ FontDisplay fd = window.glyph_canvas.current_display;+ + if (fd is Glyph) {+ window.glyph_canvas.key_press (event.keyval);+ window.tools.key_press (event.keyval);+ }+ + if (fd is ContextDisplay) {+ window.glyph_canvas.key_press (event.keyval);+ }++ return false;+ }); - foreach (uint k in key_pressed) {- if (k == event.keyval) {- key_pressed.remove_all (k);+ key_release_event.connect ((t, event) => {+ MainWindow window = MainWindow.get_singleton ();+ if (window.glyph_canvas is Glyph) { window.glyph_canvas.key_release (event.keyval);- window.key_bindings.key_release (event.keyval);- return 0; }- }+ return false;+ }); - key_pressed.append (event.keyval);- window.glyph_canvas.key_press (event.keyval);- window.key_bindings.key_press (event.keyval);+ show_all ();+ }++ MenuBar create_menu () {+ MenuBar menubar = new MenuBar ();+ Gtk.Menu file_menu = new Gtk.Menu ();+ Gtk.Menu edit_menu = new Gtk.Menu ();+ Gtk.Menu tab_menu = new Gtk.Menu ();+ Gtk.Menu tool_menu = new Gtk.Menu ();++ AccelGroup accel_group = new Gtk.AccelGroup();+ add_accel_group (accel_group);+ + // File+ Gtk.MenuItem new_item = new Gtk.MenuItem.with_mnemonic (_("_New"));+ file_menu.append (new_item);+ new_item.activate.connect (() => { MenuTab.new_file (); });+ new_item.add_accelerator ("activate", accel_group, 'N', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem load_item = new Gtk.MenuItem.with_mnemonic (_("_Open"));+ file_menu.append (load_item);+ load_item.activate.connect (() => { MenuTab.load (); });+ load_item.add_accelerator ("activate", accel_group, 'O', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem save_item = new Gtk.MenuItem.with_mnemonic (_("_Save"));+ file_menu.append (save_item);+ save_item.activate.connect (() => { MenuTab.save (); });+ save_item.add_accelerator ("activate", accel_group, 'S', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem save_as_item = new Gtk.MenuItem.with_mnemonic (_("Save _as"));+ file_menu.append (save_as_item);+ save_as_item.activate.connect (() => { MenuTab.save_as (); });+ + Gtk.MenuItem export_item = new Gtk.MenuItem.with_mnemonic (_("_Export"));+ file_menu.append (export_item);+ export_item.activate.connect (() => { ExportTool.export_all (); });+ export_item.add_accelerator ("activate", accel_group, 'E', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem preview_item = new Gtk.MenuItem.with_mnemonic(_("_Preview"));+ file_menu.append (preview_item);+ preview_item.activate.connect (() => { MenuTab.preview (); });+ preview_item.add_accelerator ("activate", accel_group, 'P', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem kerning_item = new Gtk.MenuItem.with_mnemonic (_("_Kerning"));+ file_menu.append (kerning_item);+ kerning_item.activate.connect (() => { MenuTab.show_kerning_context (); });+ kerning_item.add_accelerator ("activate", accel_group, 'K', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem quit_item = new Gtk.MenuItem.with_mnemonic (_("_Quit"));+ file_menu.append (quit_item);+ quit_item.activate.connect (() => { quit(); });++ // Edit+ Gtk.MenuItem undo_item = new Gtk.MenuItem.with_mnemonic (_("_Undo"));+ edit_menu.append (undo_item);+ undo_item.activate.connect (() => { MainWindow.get_current_display ().undo (); }); + undo_item.add_accelerator ("activate", accel_group, 'Z', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);+ + Gtk.MenuItem copy_item = new Gtk.MenuItem.with_mnemonic (_("_Copy"));+ edit_menu.append (copy_item);+ copy_item.activate.connect (() => { ClipTool.copy (); }); + copy_item.add_accelerator ("activate", accel_group, 'C', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem paste_item = new Gtk.MenuItem.with_mnemonic (_("_Paste"));+ edit_menu.append (paste_item);+ paste_item.activate.connect (() => { ClipTool.paste (); }); + paste_item.add_accelerator ("activate", accel_group, 'V', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);+ + // Tab+ Gtk.MenuItem next_tab_item = new Gtk.MenuItem.with_mnemonic (_("_Next tab"));+ tab_menu.append (next_tab_item);+ next_tab_item.activate.connect (() => { + TabBar tb = MainWindow.get_tab_bar ();+ int n = tb.get_selected () + 1;+ + if (!(0 <= n < tb.get_length ())) {+ return;+ }+ + tb.select_tab (n);+ }); ++ Gtk.MenuItem prevoius_tab_item = new Gtk.MenuItem.with_mnemonic (_("_Previous tab"));+ tab_menu.append (prevoius_tab_item);+ prevoius_tab_item.activate.connect (() => { + TabBar tb = MainWindow.get_tab_bar ();+ int n = tb.get_selected () - 1;++ if (!(0 <= n < tb.get_length ())) {+ return;+ }+ + tb.select_tab (n);+ }); ++ Gtk.MenuItem close_tab_item = new Gtk.MenuItem.with_mnemonic (_("_Close tab"));+ tab_menu.append (close_tab_item);+ close_tab_item.activate.connect (() => { + TabBar tb = MainWindow.get_tab_bar ();+ int n = tb.get_selected ();++ if (!(0 <= n < tb.get_length ())) {+ return;+ }+ + tb.close_tab (n);+ }); + close_tab_item.add_accelerator ("activate", accel_group, 'W', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ // Tool+ Gtk.MenuItem pen_item = new Gtk.MenuItem.with_mnemonic (_("_Create path"));+ tool_menu.append (pen_item);+ pen_item.activate.connect (() => { + Toolbox.select_tool_by_name ("pen_tool");+ });+ pen_item.add_accelerator ("activate", accel_group, ',', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem zoom_item = new Gtk.MenuItem.with_mnemonic (_("_Zoom"));+ tool_menu.append (zoom_item);+ zoom_item.activate.connect (() => { + Toolbox.select_tool_by_name ("zoom_tool");+ });++ Gtk.MenuItem counter_item = new Gtk.MenuItem.with_mnemonic (_("_Create counter path"));+ tool_menu.append (counter_item);+ counter_item.activate.connect (() => { + Toolbox.select_tool_by_name ("cut");+ });+ counter_item.add_accelerator ("activate", accel_group, 'U', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem move_item = new Gtk.MenuItem.with_mnemonic (_("_Move"));+ tool_menu.append (move_item);+ move_item.activate.connect (() => { + Toolbox.select_tool_by_name ("move");+ });+ move_item.add_accelerator ("activate", accel_group, 'M', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem full_unicode_item = new Gtk.MenuItem.with_mnemonic (_("Show _full unicode characters set"));+ tool_menu.append (full_unicode_item);+ full_unicode_item.activate.connect (() => { + Toolbox.select_tool_by_name ("utf_8");+ });+ full_unicode_item.add_accelerator ("activate", accel_group, 'F', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem default_charset_item = new Gtk.MenuItem.with_mnemonic (_("Show de_fault characters set"));+ tool_menu.append (default_charset_item);+ default_charset_item.activate.connect (() => { + Toolbox.select_tool_by_name ("custom_character_set");+ });+ default_charset_item.add_accelerator ("activate", accel_group, 'R', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem avalilable_characters_item = new Gtk.MenuItem.with_mnemonic (_("Show characters in font"));+ tool_menu.append (avalilable_characters_item);+ avalilable_characters_item.activate.connect (() => { + Toolbox.select_tool_by_name ("available_characters");+ });+ avalilable_characters_item.add_accelerator ("activate", accel_group, 'D', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem add_grid_item = new Gtk.MenuItem.with_mnemonic (_("Add new _grid item"));+ tool_menu.append (add_grid_item);+ add_grid_item.activate.connect (() => { + MainWindow.get_toolbox ().add_new_grid ();+ });++ Gtk.MenuItem remove_grid_item = new Gtk.MenuItem.with_mnemonic (_("Remove gr_id item"));+ tool_menu.append (remove_grid_item);+ remove_grid_item.activate.connect (() => { + MainWindow.get_toolbox ().remove_current_grid ();+ }); - return 0;+ Gtk.MenuItem zoom_in_item = new Gtk.MenuItem.with_mnemonic (_("Zoom in"));+ tool_menu.append (zoom_in_item);+ zoom_in_item.activate.connect (() => { + Toolbox.select_tool_by_name ("zoom_in");+ });+ zoom_in_item.add_accelerator ("activate", accel_group, '+', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem zoom_out_item = new Gtk.MenuItem.with_mnemonic (_("Zoom out"));+ tool_menu.append (zoom_out_item);+ zoom_out_item.activate.connect (() => { + Toolbox.select_tool_by_name ("zoom_out");+ });+ zoom_out_item.add_accelerator ("activate", accel_group, '-', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ Gtk.MenuItem zoom_1_1_item = new Gtk.MenuItem.with_mnemonic (_("Zoom to scale 1:1"));+ tool_menu.append (zoom_1_1_item);+ zoom_1_1_item.activate.connect (() => { + Toolbox.select_tool_by_name ("zoom_1_1");+ });+ zoom_1_1_item.add_accelerator ("activate", accel_group, '0', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);++ // Add menus+ Gtk.MenuItem file_launcher = new Gtk.MenuItem.with_mnemonic (_("_File"));+ file_launcher.set_submenu (file_menu);++ Gtk.MenuItem edit_launcher = new Gtk.MenuItem.with_mnemonic (_("_Edit"));+ edit_launcher.set_submenu (edit_menu);++ Gtk.MenuItem tab_launcher = new Gtk.MenuItem.with_mnemonic (_("_Tab"));+ tab_launcher.set_submenu (tab_menu);++ Gtk.MenuItem tool_launcher = new Gtk.MenuItem.with_mnemonic (_("T_ool"));+ tool_launcher.set_submenu (tool_menu);+ + menubar.append (file_launcher);+ menubar.append (edit_launcher);+ menubar.append (tab_launcher);+ menubar.append (tool_launcher);+ + return menubar; } internal void toggle_expanded_margin_bottom () {@@ -428,11 +633,29 @@ class ToolboxCanvas : DrawingArea { public class GlyphCanvasArea : DrawingArea { GlyphCanvas glyph_canvas; Gtk.Allocation alloc;- ++ /* State on linux */+ public static const int L_SHIFT = 17;+ public static const int L_CTRL = 20;+ public static const int L_SHIFT_CTRL = 21;++ /* State on windows */+ public static const int W_SHIFT = 1;+ public static const int W_CTRL = 4;+ public static const int W_SHIFT_CTRL = 5;+ public GlyphCanvasArea (GlyphCanvas gc) {+ int event_flags;+ glyph_canvas = gc;-- add_events (EventMask.BUTTON_PRESS_MASK | EventMask.BUTTON_RELEASE_MASK | EventMask.POINTER_MOTION_MASK | EventMask.LEAVE_NOTIFY_MASK | EventMask.SCROLL_MASK);+ + event_flags = EventMask.BUTTON_PRESS_MASK;+ event_flags |= EventMask.BUTTON_RELEASE_MASK;+ event_flags |= EventMask.POINTER_MOTION_MASK;+ event_flags |= EventMask.LEAVE_NOTIFY_MASK;+ event_flags |= EventMask.SCROLL_MASK;+ + add_events (event_flags); glyph_canvas.signal_redraw_area.connect ((x, y, w, h) => { queue_draw_area ((int)x, (int)y, (int)w, (int)h);@@ -489,6 +712,8 @@ public class GlyphCanvasArea : DrawingArea { }); button_press_event.connect ((t, e)=> {+ set_modifier ((int) e.state);+ if (e.type == EventType.BUTTON_PRESS) { glyph_canvas.current_display.button_press (e.button, e.x, e.y); } else if (e.type == EventType.2BUTTON_PRESS) {@@ -499,6 +724,7 @@ public class GlyphCanvasArea : DrawingArea { }); button_release_event.connect ((t, e)=> {+ set_modifier ((int) e.state); glyph_canvas.current_display.button_release ((int) e.button, e.x, e.y); return true; });@@ -509,6 +735,8 @@ public class GlyphCanvasArea : DrawingArea { }); scroll_event.connect ((t, e)=> {+ set_modifier ((int) e.state);+ if (e.direction == Gdk.ScrollDirection.UP) { glyph_canvas.current_display.scroll_wheel_up (e.x, e.y); } else if (e.direction == Gdk.ScrollDirection.DOWN) {@@ -516,7 +744,34 @@ public class GlyphCanvasArea : DrawingArea { } return true;- }); + }); + }++ static void set_modifier (int k) {+ switch (k) {+ case L_SHIFT:+ KeyBindings.set_modifier (SHIFT);+ break;+ case L_CTRL:+ KeyBindings.set_modifier (CTRL);+ break;+ case L_SHIFT_CTRL:+ KeyBindings.set_modifier (SHIFT | CTRL);+ break;+ case W_SHIFT:+ KeyBindings.set_modifier (SHIFT);+ break;+ case W_CTRL:+ KeyBindings.set_modifier (CTRL);+ break;+ case W_SHIFT_CTRL:+ KeyBindings.set_modifier (SHIFT | CTRL);+ break;++ default:+ KeyBindings.set_modifier (NONE);+ break;+ } } } @@ -551,8 +806,6 @@ public class TooltipCanvas : DrawingArea { set_size_request (10, 20); }-- } }@@ -19,6 +19,8 @@ using Gdk; namespace Supplement { +// FIXA a lot of these things have been replaced and can safely be removed+ public enum Key { NONE = 0, UP = 65362,@@ -82,192 +84,15 @@ public class BindingList { if (nc == null) { // add all bindings to this list- ShortCut[] default_bindings = { - new ShowMenu (),- new NextTab (),- new PreviousTab (),- new CloseTab (),- new UndoAction (),- new Copy (),- new Paste (),- new Save (),- new NewFile (),- new Load (),- new ShowKerningContext (),- new ShowPreview (),- new ExportFonts ()- };+ ShortCut[] default_bindings = { }; nc = default_bindings; }- return nc;- }-}--class ExportFonts : ShortCut {- - public override void run () {- ExportTool.export_all ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'e'; } - public override unowned string get_description () { return "Export"; }-}--class ShowPreview : ShortCut {- - public override void run () {- MenuTab.preview ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'p'; } - public override unowned string get_description () { return "Preview"; }-}---class ShowKerningContext : ShortCut {- - public override void run () {- MenuTab.show_kerning_context ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'k'; } - public override unowned string get_description () { return "Kerning context"; }-}--class Load : ShortCut {- - public override void run () {- MenuTab.load ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'o'; } - public override unowned string get_description () { return "Open file"; }-}--class NewFile : ShortCut {- - public override void run () {- MenuTab.new_file ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'n'; } - public override unowned string get_description () { return "New file"; }-}--class Save : ShortCut {- - public override void run () {- MenuTab.save ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 's'; } - public override unowned string get_description () { return "Save"; }-}--class Paste : ShortCut {- - public override void run () {- ClipTool.paste ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'v'; } - public override unowned string get_description () { return "Paste"; }-}--class Copy : ShortCut {- - public override void run () {- ClipTool.copy ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'c'; } - public override unowned string get_description () { return "Copy"; }-}--class UndoAction : ShortCut {- - public override void run () {- MainWindow.get_current_display ().undo ();- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'z'; } - public override unowned string get_description () { return "Undo"; }-}--class ShowMenu : ShortCut {- - public override void run () {- MainWindow.get_tab_bar ().select_tab_name ("Content");- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return 'f'; } - public override unowned string get_description () { return "Show menu"; }-}--class NextTab : ShortCut {- - public override void run () {- TabBar tb = MainWindow.get_tab_bar ();- int n = tb.get_selected () + 1;- - if (!(0 <= n < tb.get_length ())) {- return;- }- - tb.select_tab (n);- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return Key.RIGHT; } - public override unowned string get_description () { return "Next tab"; }-}--class PreviousTab : ShortCut {- - public override void run () {- TabBar tb = MainWindow.get_tab_bar ();- int n = tb.get_selected () - 1;-- if (!(0 <= n < tb.get_length ())) {- return;- } - tb.select_tab (n);+ return nc; }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return Key.LEFT; } - public override unowned string get_description () { return "Previous tab"; } } -class CloseTab : ShortCut {- - public override void run () {- TabBar tb = MainWindow.get_tab_bar ();- int n = tb.get_selected ();-- if (!(0 <= n < tb.get_length ())) {- return;- }- - tb.close_tab (n);- }- - public override uint get_default_modifier () { return CTRL; }- public override uint get_default_key () { return (uint) 'w'; } - public override unowned string get_description () { return "Close tab"; }-} /** Function to be executed for each global key binding. */ public abstract class ShortCut : GLib.Object {@@ -510,34 +335,13 @@ public class KeyBindings { return false; }- - void set_modifier (uint k, bool v) {- switch (k) {- case Key.CTRL_LEFT:- modifier_ctrl = v;- break;- case Key.CTRL_RIGHT:- modifier_ctrl = v;- break;- case Key.ALT_LEFT:- modifier_alt = v;- break;- case Key.ALT_GR:- modifier_alt = v;- break;- case Key.SHIFT_LEFT:- modifier_shift = v;- break;- case Key.SHIFT_RIGHT:- modifier_shift = v;- break;- }- - modifier = 0; - if (modifier_ctrl) modifier |= CTRL;- if (modifier_alt) modifier |= ALT; - if (modifier_shift) modifier |= SHIFT;+ public static void set_modifier (uint mod) {+ modifier = mod;++ singleton.modifier_ctrl = ((modifier & CTRL) > 0);+ singleton.modifier_alt = ((modifier & ALT) > 0);+ singleton.modifier_shift = ((modifier & SHIFT) > 0); } public static bool has_alt () {@@ -553,31 +357,9 @@ public class KeyBindings { } public void key_release (uint keyval) {- set_modifier (keyval, false); } public void key_press (uint keyval) {- uint key = keyval;- ShortCut? short_cut;- - set_modifier (keyval, true);- - if (get_short_cut (modifier, key, out short_cut)) {- if (short_cut != null)- ((!)short_cut).run ();- }- - foreach (var exp in MainWindow.get_toolbox ().expanders) {- foreach (Tool t in exp.tool) {- t.set_active (false);- - if (t.key == keyval && t.modifier_flag == modifier) {- if (!(require_modifier && (modifier == NONE || modifier == SHIFT))) {- MainWindow.get_toolbox ().select_tool (t);- }- }- }- } } } @@ -18,6 +18,8 @@ using Birdfont; using Supplement; +const string GETTEXT_PACKAGE = "birdfont"; + public static int main (string[] arg) { GtkWindow native_window; MainWindow window;@@ -53,7 +53,7 @@ public class MainWindow { return singleton; } - internal static FontDisplay get_current_display () { + public static FontDisplay get_current_display () { return get_glyph_canvas ().get_current_display (); } @@ -70,7 +70,7 @@ public class MainWindow { return Supplement.current_glyph; } - internal static Toolbox get_toolbox () { + public static Toolbox get_toolbox () { return get_singleton ().tools; } @@ -43,40 +43,10 @@ public class MenuTab : FontDisplay { load_font (val); }); - add_html_callback ("grid", (val) => {- if (val == "add") {- MainWindow.get_toolbox ().add_new_grid ();- }-- if (val == "remove") {- MainWindow.get_toolbox ().remove_current_grid ();- }- });- add_html_callback ("glyph_sequence", (val) => { Preferences.set ("glyph_sequence", val); }); - add_html_callback ("newfile", (val) => {- new_file ();- });- - add_html_callback ("open", (val) => {- load ();- }); -- add_html_callback ("save", (val) => {- save ();- });- - add_html_callback ("save_as", (val) => {- save_as ();- });-- add_html_callback ("kerning_context", (val) => {- show_kerning_context ();- }); - add_html_callback ("help", (val) => { MainWindow.get_tool_tip ().show_text (val); });@@ -109,20 +79,8 @@ public class MenuTab : FontDisplay { </head> <body> <div class="inner_format_box">- <div class="heading"><h2>Menu</h2></div>- <div class="menu_item" onclick="call ('newfile:');" onmouseover="call ('help:(Ctrl+n) """ + _("Create a new font") + """');">""" + _("New") + """</div>- <div class="menu_item" onclick="call ('open:');" onmouseover="call ('help:(Ctrl+o) """ + _("Open an existing ffi file") + """');">""" + _("Open") + """</div>- <div class="menu_item" onclick="call ('save:');" onmouseover="call ('help:(Ctrl+s) """ + _("Save font") + """');">""" + _("Save") + """</div>- <div class="menu_item" onclick="call ('save_as:');" onmouseover="call ('help:""" + _("Save font with a different name") + """');">""" + _("Save as") + """</div>- <div class="menu_item" onclick="call ('kerning_context:');" onmouseover="call ('help:(Ctrl+k) """ + _("Show kerning context") + """');">""" + _("Kerning context") + """</div>- <div class="menu_item" onclick="call ('grid:add');" onmouseover="call ('help:""" + _("Add a new size for grid") + """');">""" + _("Add grid") + """</div>- <div class="menu_item" onclick="call ('grid:remove');" onmouseover="call ('help:""" + _("Remove current grid size") + """');">""" + _("Remove grid") + """</div>- </div>- - <div class="inner_format_box">- <div class="heading"><h2>""" + _("Edit") + """</h2></div>- <div class="content">+ <div class="heading"><h2>""" + _("Preferences") + """</h2></div> <form> """); @@ -144,6 +102,8 @@ c.append (""" </div> </div> + <img src="birdfont_logo.png" alt="" style="float:right;margin: 50px 0 0 0;">+ <br class="clearBoth" /> <div class="recent_list">@@ -75,7 +75,7 @@ public class Preferences { public static int get_window_width() { string wp = get ("window_width"); int w = int.parse (wp);- return (w == 0) ? 360 : w;+ return (w == 0) ? 860 : w; } public static int get_window_height() {@@ -107,13 +107,19 @@ public class Supplement { Intl.setlocale (LocaleCategory.MESSAGES, ""); Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "utf-8"); - f = File.new_for_path ("./locale"); + f = File.new_for_path ("./build/locale/sv/LC_MESSAGES/birdfont.mo"); + if (f.query_exists ()) { + Intl.bindtextdomain (GETTEXT_PACKAGE, "./build/locale"); + return; + } + + f = File.new_for_path ("./locale/sv/LC_MESSAGES/birdfont.mo"); if (f.query_exists ()) { Intl.bindtextdomain (GETTEXT_PACKAGE, "./locale"); return; } - f = File.new_for_path ("../locale"); + f = File.new_for_path ("../locale/sv/LC_MESSAGES/birdfont.mo"); if (f.query_exists ()) { Intl.bindtextdomain (GETTEXT_PACKAGE, "../locale"); return; @@ -202,7 +202,7 @@ public class Toolbox : GLib.Object { path_tool_modifiers.add_tool (move_layer); // Character set tools- Tool full_unicode = new Tool ("utf_8", _("Show full unicode characters set"));+ Tool full_unicode = new Tool ("utf_8", _("Show full unicode characters set"), 'f', CTRL); full_unicode.select_action.connect ((self) => { MainWindow.get_tab_bar ().add_unique_tab (new OverView (), 100, false); OverView o = MainWindow.get_overview ();@@ -354,7 +354,7 @@ public class Toolbox : GLib.Object { }); view_tools.add_tool (reset_zoom); - Tool full_glyph = new Tool ("full_glyph", _("Show full glyph"), 'f');+ Tool full_glyph = new Tool ("full_glyph", _("Show full glyph")); full_glyph.select_action.connect((self) => { zoom_tool.store_current_view (); zoom_tool.zoom_full_glyph ();@@ -574,6 +574,19 @@ public class Toolbox : GLib.Object { idle.attach (null); } + public void key_press (uint keyval) {+ print ("key_press\n");+ foreach (var exp in MainWindow.get_toolbox ().expanders) {+ foreach (Tool t in exp.tool) {+ t.set_active (false);+ + if (t.key == keyval && t.modifier_flag == NONE) {+ MainWindow.get_toolbox ().select_tool (t);+ }+ }+ }+ }+ public void press (uint button, double x, double y) { foreach (var exp in expanders) { foreach (Tool t in exp.tool) {@@ -784,8 +797,9 @@ public class Toolbox : GLib.Object { return new Tool ("no_icon"); } - public void select_tool_by_name (string name) {- select_tool (get_tool (name));+ public static void select_tool_by_name (string name) {+ Toolbox b = MainWindow.get_toolbox ();+ b.select_tool (b.get_tool (name)); } private void update_expanders () {@@ -28,7 +28,7 @@ class ZoomTool : Tool { List<Tab> views = new List<Tab> (); public ZoomTool (string n) {- base (n, "Zoom", 'z');+ base (n, "Zoom"); select_action.connect((self) => { });@@ -107,13 +107,16 @@ def build (bld): ) bld (- rule = 'gcc ../build/Main.c ../build/GtkWindow.c -I ../build/ -I ../build/src -L ../build/src -l birdfont -o ${TGT} \+ rule = """gcc ../build/Main.c ../build/GtkWindow.c \+ -D 'GETTEXT_PACKAGE="birdfont"' \+ -I ../build/ -I ../build/src -L ../build/src -l birdfont \+ -o ${TGT} \ $(pkg-config --cflags --libs glib-2.0) \ $(pkg-config --cflags --libs libxml-2.0) \ $(pkg-config --cflags --libs gio-2.0) \ $(pkg-config --cflags --libs libsoup-2.4) \ $(pkg-config --cflags --libs gtk+-2.0) \- $(pkg-config --cflags --libs webkit-1.0)',+ $(pkg-config --cflags --libs webkit-1.0)""", source = ['../Main.c'], target = 'birdfont', depends = 'main_c'@@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n"-"POT-Creation-Date: 2012-12-05 18:37+0100\n"+"POT-Creation-Date: 2012-12-09 00:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n"@@ -17,278 +17,385 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/Argument.vala:225+#: src/Argument.c:1067 msgid "Usage" msgstr "" -#: src/Argument.vala:229+#: src/Argument.c:1079 msgid "show coordinate in glyph view" msgstr "" -#: src/Argument.vala:230+#: src/Argument.c:1081 msgid "exit if a testcase failes" msgstr "" -#: src/Argument.vala:231+#: src/Argument.c:1083 msgid "treat warnings as fatal" msgstr "" -#: src/Argument.vala:232+#: src/Argument.c:1085 msgid "show this message" msgstr "" -#: src/Argument.vala:233+#: src/Argument.c:1087 msgid "sleep between each command in test suite" msgstr "" -#: src/Argument.vala:234+#: src/Argument.c:1089 msgid "run test case" msgstr "" -#: src/BackgroundTool.vala:40+#: src/BackgroundTool.c:587 msgid "Move, resize and rotate background image" msgstr "" -#: src/Birdfont.vala:22+#: src/Birdfont.c:169 msgid "Usage:" msgstr "" -#: src/Birdfont.vala:25+#: src/Birdfont.c:179 msgid "print this message\n" msgstr "" -#: src/Birdfont.vala:26+#: src/Birdfont.c:185 msgid "write files to this directory\n" msgstr "" -#: src/Birdfont.vala:27+#: src/Birdfont.c:191 msgid "write svg file\n" msgstr "" -#: src/Birdfont.vala:28+#: src/Birdfont.c:197 msgid "write ttf and eot files\n" msgstr "" -#: src/Birdfont.vala:118+#: src/Birdfont.c:633 msgid "Can't find output directory" msgstr "" -#: src/Birdfont.vala:123 src/Birdfont.vala:128+#: src/Birdfont.c:679 src/Birdfont.c:726 msgid "Writing" msgstr "" -#: src/ExportTool.vala:29+#: src/ExportTool.c:462 msgid "Export glyph to svg file" msgstr "" -#: src/GlyphRange.vala:36-msgid "a b c d e f g h i j k l m n o p q r s t u v w x y z"+#: src/ExportTool.c:865+msgid "Can't export" msgstr "" -#: src/GlyphRange.vala:37-msgid "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"+#: src/ExportTool.c:891+msgid "Wrote" msgstr "" -#: src/MenuTab.vala:113-msgid "Create a new font"+#: src/ExportTool.c:1267+msgid "Alphabet" msgstr "" -#: src/MenuTab.vala:114-msgid "Open an existing ffi file"+#: src/ExportTool.c:1298 src/GlyphRange.c:208+msgid "a b c d e f g h i j k l m n o p q r s t u v w x y z" msgstr "" -#: src/MenuTab.vala:115-msgid "Save font"+#: src/ExportTool.c:1303 src/GlyphRange.c:211+msgid "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z" msgstr "" -#: src/MenuTab.vala:116-msgid "Save font with a different name"+#: src/ExportTool.c:1913+msgid "Wrote font files" msgstr "" -#: src/MenuTab.vala:117-msgid "Show kerning context"+#: src/MenuTab.c:814+msgid "Preferences" msgstr "" -#: src/MenuTab.vala:118-msgid "Add a new size for grid"-msgstr ""+#: src/MenuTab.c:835+msgid "Glyph sequence"+msgstr "Tecken sekvens" -#: src/MenuTab.vala:119-msgid "Remove current grid size"+#: src/MenuTab.c:852+msgid "Name" msgstr "" -#: src/MenuTab.vala:136+#: src/MenuTab.c:873 msgid "Export" msgstr "" -#: src/MenuTab.vala:137+#: src/MenuTab.c:881+msgid "Export SVG, TTF & EOF fonts"+msgstr ""++#: src/MenuTab.c:888 msgid "Preview" msgstr "" -#: src/MenuTab.vala:153+#: src/MenuTab.c:896+msgid "Export SVG font and view the result"+msgstr ""++#: src/MenuTab.c:953 msgid "Recent files" msgstr "" -#: src/MenuTab.vala:266 src/SaveDialog.vala:82+#: src/MenuTab.c:1397 src/SaveDialog.c:334 msgid "Save" msgstr "Spara" -#: src/MergeTool.vala:23+#: src/MergeTool.c:224 msgid "Merge paths" msgstr "" -#: src/MoveTool.vala:36+#: src/MoveTool.c:823 msgid "Move paths" msgstr "" -#: src/PenTool.vala:48-msgid ""-"Right click to add new point, left click to move points and double click to "-"add new point on path"+#: src/PenTool.c:883 src/Toolbox.c:2378+msgid "Right click to add new point, left click to move points and double cli" msgstr "" -#: src/SaveDialog.vala:83+#: src/SaveDialog.c:310+#, fuzzy+msgid "Save?"+msgstr "Spara"++#: src/SaveDialog.c:344 msgid "Save as" msgstr "Spara som" -#: src/SaveDialog.vala:84+#: src/SaveDialog.c:354 msgid "Discard" msgstr "" -#: src/SaveDialog.vala:85+#: src/SaveDialog.c:364 msgid "Cancel" msgstr "" -#: src/Toolbox.vala:94-msgid ""-"Right click to add new point, left click to move points and double click to "-"ad new point on path"+#: src/Toolbox.c:1884+msgid "Creating thumbnails" msgstr "" -#: src/Toolbox.vala:101+#: src/Toolbox.c:2384 msgid "Add new point on path" msgstr "" -#: src/Toolbox.vala:109+#: src/Toolbox.c:2397 msgid "Begin new path from point on path" msgstr "" -#: src/Toolbox.vala:117+#: src/Toolbox.c:2407 msgid "Tie curve handles for selected edit point" msgstr "" -#: src/Toolbox.vala:137+#: src/Toolbox.c:2415 msgid "Tie coordinates to previous edit point" msgstr "" -#: src/Toolbox.vala:144+#: src/Toolbox.c:2420 msgid "Delete edit points" msgstr "" -#: src/Toolbox.vala:153+#: src/Toolbox.c:2427 msgid "Set precision" msgstr "" -#: src/Toolbox.vala:181+#: src/Toolbox.c:2459 msgid "Create counter from outline" msgstr "" -#: src/Toolbox.vala:193+#: src/Toolbox.c:2467 msgid "Move to path to bottom layer" msgstr "" -#: src/Toolbox.vala:205+#: src/Toolbox.c:2475 msgid "Show full unicode characters set" msgstr "" -#: src/Toolbox.vala:216+#: src/Toolbox.c:2483 msgid "Show default characters set" msgstr "" -#: src/Toolbox.vala:227+#: src/Toolbox.c:2491 GtkWindow.c:2074 msgid "Show characters in font" msgstr "" -#: src/Toolbox.vala:236+#: src/Toolbox.c:2499 msgid "Delete selected glyph" msgstr "" -#: src/Toolbox.vala:302+#: src/Toolbox.c:2584 msgid "Show help lines for x-height and baseline" msgstr "" -#: src/Toolbox.vala:317+#: src/Toolbox.c:2590 msgid "Show help lines at top and bottom margin" msgstr "" -#: src/Toolbox.vala:335+#: src/Toolbox.c:2600 GtkWindow.c:2093 msgid "Zoom in" msgstr "" -#: src/Toolbox.vala:342+#: src/Toolbox.c:2606 GtkWindow.c:2100 msgid "Zoom out" msgstr "" -#: src/Toolbox.vala:349+#: src/Toolbox.c:2612 GtkWindow.c:2107 msgid "Zoom to scale 1:1" msgstr "" -#: src/Toolbox.vala:357+#: src/Toolbox.c:2618 msgid "Show full glyph" msgstr "" -#: src/Toolbox.vala:364+#: src/Toolbox.c:2624 msgid "Zoom in at region boundries" msgstr "" -#: src/Toolbox.vala:371+#: src/Toolbox.c:2630 msgid "Zoom in background image" msgstr "" -#: src/Toolbox.vala:384+#: src/Toolbox.c:2636 msgid "Previous view" msgstr "" -#: src/Toolbox.vala:390+#: src/Toolbox.c:2642 msgid "Next view" msgstr "" -#: src/Toolbox.vala:397+#: src/Toolbox.c:2648 msgid "Set size for background image" msgstr "" -#: src/Toolbox.vala:427+#: src/Toolbox.c:2675 msgid "Show/hide background image" msgstr "" -#: src/Toolbox.vala:435+#: src/Toolbox.c:2681 msgid "Insert new background image" msgstr "" -#: src/Toolbox.vala:440-msgid "Creating thumbnails"-msgstr ""--#: src/Toolbox.vala:459+#: src/Toolbox.c:2688 msgid "Set background contrast" msgstr "" -#: src/Toolbox.vala:479+#: src/Toolbox.c:2694 msgid "Set threshold" msgstr "" -#: src/Toolbox.vala:670+#: src/Toolbox.c:3393 msgid "Set size for grid" msgstr "" -#: src/VersionList.vala:32+#: src/VersionList.c:385 msgid "New version" msgstr "" -#: src/VersionList.vala:86+#: src/VersionList.c:606 msgid "Version" msgstr "" +#: GtkWindow.c:1939+msgid "_New"+msgstr ""++#: GtkWindow.c:1946+msgid "_Open"+msgstr ""++#: GtkWindow.c:1953 #, fuzzy-#~ msgid "Save?"-#~ msgstr "Spara"+msgid "_Save"+msgstr "Spara"++#: GtkWindow.c:1960+#, fuzzy+msgid "Save _as"+msgstr "Spara som"++#: GtkWindow.c:1966+msgid "_Export"+msgstr ""++#: GtkWindow.c:1973+msgid "_Preview"+msgstr ""++#: GtkWindow.c:1980+msgid "_Kerning"+msgstr ""++#: GtkWindow.c:1987+msgid "_Quit"+msgstr ""++#: GtkWindow.c:1993+msgid "_Undo"+msgstr ""++#: GtkWindow.c:2000+msgid "_Copy"+msgstr ""++#: GtkWindow.c:2007+msgid "_Paste"+msgstr ""++#: GtkWindow.c:2014+msgid "_Next tab"+msgstr ""++#: GtkWindow.c:2020+msgid "_Previous tab"+msgstr ""++#: GtkWindow.c:2026+msgid "_Close tab"+msgstr ""++#: GtkWindow.c:2033+msgid "_Create path"+msgstr ""++#: GtkWindow.c:2040+msgid "_Zoom"+msgstr ""++#: GtkWindow.c:2046+msgid "_Create counter path"+msgstr ""++#: GtkWindow.c:2053+msgid "_Move"+msgstr ""++#: GtkWindow.c:2060+msgid "Show _full unicode characters set"+msgstr ""++#: GtkWindow.c:2067+msgid "Show de_fault characters set"+msgstr ""++#: GtkWindow.c:2081+msgid "Add new _grid item"+msgstr ""++#: GtkWindow.c:2087+msgid "Remove gr_id item"+msgstr ""++#: GtkWindow.c:2114+msgid "_File"+msgstr "Arkiv"++#: GtkWindow.c:2119+msgid "_Edit"+msgstr "Redigera"++#: GtkWindow.c:2124+msgid "_Tab"+msgstr ""++#: GtkWindow.c:2129+msgid "T_ool"+msgstr "Verktyg"@@ -90,8 +90,8 @@ def build(bld): bld( rule="""i686-w64-mingw32-gcc \- -D 'GETTEXT_PACKAGE="birdfont"' \ -c ./Main.c ./GtkWindow.c ./BirdfontExport.c ./src/*.c ./ \+ -D 'GETTEXT_PACKAGE="birdfont"' \ -I ./ \ -mthreads \ $(i686-w64-mingw32-pkg-config --cflags --libs glib-2.0) \@@ -73,7 +73,7 @@ def build(bld): def update_translations (bld): bld ( - rule = "xgettext --language=C# --keyword=_ --from-code=utf-8 --output=../birdfont.pot src/* 2&> xgettext.errors", + rule = "xgettext --language=C# --keyword=_ --from-code=utf-8 --output=../birdfont.pot src/* ./*.c", name = "update pot", always = True )