Clone in a terminal:
Commit 443b4c0
Johan Mattsson - 2014-09-21T14:39:00+00:00
443b4c0d538d661614c55b5ff943ef3f800bace5johan.mattsson.m@gmail.com

Merge branch 'master' of gitorious.org:birdfont/birdfont

Changed files (10)

Diff

diff --git a/NEWS b/NEWSindex 008c1d2..3c02da2 100644--- a/NEWS+++ b/NEWS@@ -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 fixdiff --git a/birdfont/GtkWindow.vala b/birdfont/GtkWindow.valaindex a47cd7e..ec2d02d 100644--- a/birdfont/GtkWindow.vala+++ b/birdfont/GtkWindow.vala@@ -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;;diff --git a/libbirdfont/BirdFont.vala b/libbirdfont/BirdFont.valaindex 5e5fe7f..823d47d 100644--- a/libbirdfont/BirdFont.vala+++ b/libbirdfont/BirdFont.vala@@ -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")) {diff --git a/libbirdfont/MainWindow.vala b/libbirdfont/MainWindow.valaindex c923716..fe7939d 100644--- a/libbirdfont/MainWindow.vala+++ b/libbirdfont/MainWindow.vala@@ -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);+	} }
 
 }
diff --git a/libbirdfont/OpenFontFormat/HheaTable.vala b/libbirdfont/OpenFontFormat/HheaTable.valaindex 27522df..20c4ca3 100644--- a/libbirdfont/OpenFontFormat/HheaTable.vala+++ b/libbirdfont/OpenFontFormat/HheaTable.vala@@ -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); // Descenderdiff --git a/libbirdfont/PenTool.vala b/libbirdfont/PenTool.valaindex be711fb..3abbbf7 100644--- a/libbirdfont/PenTool.vala+++ b/libbirdfont/PenTool.vala@@ -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; 		}diff --git a/libbirdfont/SearchPaths.vala b/libbirdfont/SearchPaths.valaindex 9ad34a4..3595a69 100644--- a/libbirdfont/SearchPaths.vala+++ b/libbirdfont/SearchPaths.vala@@ -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"; 	}diff --git a/po/cs.po b/po/cs.poindex f4fd6a0..732a7a2 100644--- a/po/cs.po+++ b/po/cs.po@@ -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"diff --git a/scripts/mac_build.py b/scripts/mac_build.pyindex 81e00e1..f1db873 100644--- a/scripts/mac_build.py+++ b/scripts/mac_build.py@@ -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) diff --git a/scripts/version.py b/scripts/version.pyindex 7448c2c..6ce3233 100644--- a/scripts/version.py+++ b/scripts/version.py@@ -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

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112