Commit 443b4c0
Merge branch 'master' of gitorious.org:birdfont/birdfont
Changed files (10)
modifiedNEWSmodifiedbirdfont/GtkWindow.valamodifiedlibbirdfont/BirdFont.valamodifiedlibbirdfont/MainWindow.valamodifiedlibbirdfont/OpenFontFormat/HheaTable.valamodifiedlibbirdfont/PenTool.valamodifiedlibbirdfont/SearchPaths.valamodifiedpo/cs.pomodifiedscripts/mac_build.pymodifiedscripts/version.py
Diff
@@ -1,3 +1,10 @@+birdfont (1.4) stable;++ * Bug fixes+ * A complete Czech translation++ -- Johan Mattsson <johan.mattsson.m@gmail.com> Sun Sep 21 13:19:55 CEST 2014+ birdfont (1.3) stable; * A bug fix@@ -582,48 +582,26 @@ public class GtkWindow : Gtk.Window, NativeWindow { Gtk.MenuItem next_tab_item = new Gtk.MenuItem.with_mnemonic (t_("_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);+ MainWindow.next_tab (); }); Gtk.MenuItem prevoius_tab_item = new Gtk.MenuItem.with_mnemonic (t_("_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);+ prevoius_tab_item.activate.connect (() => {+ MainWindow.previous_tab (); }); - Gtk.MenuItem close_tab_item = new Gtk.MenuItem.with_mnemonic (t_("_Close tab"));+ Gtk.MenuItem close_tab_item = new Gtk.MenuItem.with_mnemonic (t_("_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);+ MainWindow.close_tab (); }); close_tab_item.add_accelerator ("activate", accel_group, 'W', Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE); Gtk.MenuItem close_all_tabs_item = new Gtk.MenuItem.with_mnemonic (t_("Close _All Tabs")); tab_menu.append (close_all_tabs_item); close_all_tabs_item.activate.connect (() => { - TabBar tb = MainWindow.get_tab_bar ();- tb.close_all_tabs (); + MainWindow.close_all_tabs (); }); // Tool@@ -654,7 +632,7 @@ public class GtkWindow : Gtk.Window, NativeWindow { }); 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 (t_("Show _full unicode characters set"));+ Gtk.MenuItem full_unicode_item = new Gtk.MenuItem.with_mnemonic (t_("Show _Full Unicode Characters Set")); tool_menu.append (full_unicode_item); full_unicode_item.activate.connect (() => { Toolbox.select_tool_by_name ("utf_8");@@ -1373,7 +1351,7 @@ public class DescriptionForm : GLib.Object { }); box.pack_start (bold, false, false, 0); - italic = new CheckButton.with_label (_("Italic"));+ italic = new CheckButton.with_label (t_("Italic")); italic.toggled.connect (() => { Font f = BirdFont.get_current_font (); f.italic = italic.active;;@@ -671,6 +671,12 @@ public string t_ (string t) { return _(t); } +/** Translate mac menu items */+public static string translate_mac (string t) {+ string s = t_(t);+ return s.replace ("_", "");+}+ /** Print a warning if Birdfont was started with the --test argument. */ public static void warn_if_test (string message) { if (BirdFont.has_argument ("--test")) {@@ -211,6 +211,39 @@ public class MainWindow : GLib.Object { public static LigatureList get_ligature_display () { return ligature_display; } ++ public static void next_tab () {+ TabBar tb = MainWindow.get_tab_bar ();+ int n = tb.get_selected () + 1;+ + if (!(0 <= n < tb.get_length ())) {+ return;+ }+ + tb.select_tab (n);+ }++ public static void previous_tab () {+ TabBar tb = MainWindow.get_tab_bar ();+ int n = tb.get_selected () - 1;++ if (!(0 <= n < tb.get_length ())) {+ return;+ }+ + tb.select_tab (n);+ }++ public static void close_tab () {+ TabBar tb = MainWindow.get_tab_bar ();+ int n = tb.get_selected ();++ if (!(0 <= n < tb.get_length ())) {+ return;+ }+ + tb.close_tab (n);+ } } } @@ -12,6 +12,8 @@ Lesser General Public License for more details. */ +using Math;+ namespace BirdFont { public class HheaTable : Table {@@ -84,11 +86,12 @@ public class HheaTable : Table { int16 ascender, descender; FontData fd = new FontData (); Fixed version = 1 << 16;+ Font font = BirdFont.get_current_font (); fd.add_fixed (version); // table version - ascender = glyf_table.ymax;- descender = glyf_table.ymin; // FIXME: look up, should it be -descender or descender?+ ascender = (int16) rint (font.top_limit * HeadTable.UNITS);+ descender = (int16) rint (font.bottom_limit * HeadTable.UNITS); fd.add_16 (ascender); // Ascender fd.add_16 (descender); // Descender@@ -269,6 +269,8 @@ public class PenTool : Tool { public static void delete_selected_points () { Glyph g = MainWindow.get_current_glyph (); + print ("Break path.");+ foreach (PointSelection p in selected_points) { p.point.deleted = true; }@@ -115,7 +115,7 @@ public class SearchPaths { f = PREFIX + "/share/locale/sv/LC_MESSAGES/birdfont.mo"; if (exists (f)) {- return f;+ return PREFIX + "/share/locale/"; } f = "/usr/share/locale/sv/LC_MESSAGES/birdfont.mo";@@ -127,7 +127,12 @@ public class SearchPaths { if (exists (f)) { return BirdFont.exec_path + "/Contents/Resources/locale"; }- ++ f = BirdFont.bundle_path + "/Contents/Resources/locale";+ if (exists (f)) {+ return BirdFont.bundle_path + "/Contents/Resources/locale";+ }+ warning ("translations not found"); return "/usr/share/locale"; }@@ -965,7 +965,7 @@ msgstr "Podrobnosti, od 0.001 do 9.999, výchozí hodnota je 1" #: birdfont-autotrace/AutoTrace.vala:71 msgid "print this message"-msgstr "Vytisknout tuto zprávu\n"+msgstr "Vytisknout tuto zprávu" #: birdfont-autotrace/AutoTrace.vala:72 msgid "use quadratic control points"@@ -56,6 +56,7 @@ library_cflags = "-fno-common -fPIC " + cflags configfile.write_config (prefix) compile_translations() build.libbirdfont(prefix, cc, library_cflags, library_ldflags, valac, valaflags, library, False)+build.birdfont_autotrace(prefix, cc, cflags, ldflags, valac, valaflags, library, False) build.birdfont_export(prefix, cc, cflags, ldflags, valac, valaflags, library, False) build.birdfont_import(prefix, cc, cflags, ldflags, valac, valaflags, library, False) @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ -VERSION = '1.3'-SO_VERSION_MAJOR = '25'+VERSION = '1.4'+SO_VERSION_MAJOR = '26' SO_VERSION_MINOR = '0' SO_VERSION = SO_VERSION_MAJOR + '.' + SO_VERSION_MINOR