Clone in a terminal:
Commit c00f4f8
Johan Mattsson - 2016-10-22T11:08:38+00:00
c00f4f840746e9290c616567f33232ccabb153bbjohan.mattsson.m@gmail.com

Merge ../birdfont-2.x

Changed files (4)

Diff

diff --git a/libbirdfont/BirdFont.vala b/libbirdfont/BirdFont.valaindex fc121f3..97d4c91 100644--- a/libbirdfont/BirdFont.vala+++ b/libbirdfont/BirdFont.vala@@ -498,7 +498,13 @@ public string t_ (string t) { #if ANDROID 	return t; #else-	return _(t);+	string translate = Preferences.get ("translate");+	+	if (translate == "" || translate == "true") {+		return _(t);+	} else {+		return t;+	} #endif } diff --git a/libbirdfont/SettingsTab.vala b/libbirdfont/SettingsTab.valaindex 3a866da..87a91fa 100644--- a/libbirdfont/SettingsTab.vala+++ b/libbirdfont/SettingsTab.vala@@ -18,6 +18,8 @@ using Math; namespace BirdFont {  public class SettingsTab : SettingsDisplay {++	string restart_message = "You need to restart the program in order to apply this setting.";	 	 	public SettingsTab () { 		base ();@@ -141,6 +143,25 @@ public class SettingsTab : SettingsDisplay { 			DrawingTools.pen_tool.set_simplification_threshold (simplification_threshold.get_value ()); 		}); +		Tool translate_ui = new Tool ("translate");+		translate_ui.select_action.connect((self) => {+			Preferences.set ("translate", @"true");	+			ThemeTab.redraw_ui ();+			translate_ui.selected = true;+			MainWindow.show_dialog (new MessageDialog (restart_message));+		});+		+		translate_ui.deselect_action.connect((self) => {+			Preferences.set ("translate", @"false");+			translate_ui.selected = false;+			MainWindow.show_dialog (new MessageDialog (restart_message));+			ThemeTab.redraw_ui ();+		});++		string translate_setting = Preferences.get ("translate");+		translate_ui.selected = translate_setting == "" || translate_setting == "true";		+		tools.add (new SettingsItem (translate_ui, t_("Translate")));+		 		Tool themes = new Tool ("open_theme_tab"); 		themes.set_icon ("theme"); 		themes.select_action.connect((self) => {diff --git a/libbirdfont/ThemeTab.vala b/libbirdfont/ThemeTab.valaindex ac280a6..47fab16 100644--- a/libbirdfont/ThemeTab.vala+++ b/libbirdfont/ThemeTab.vala@@ -53,7 +53,6 @@ public class ThemeTab : SettingsDisplay { 			 			select_theme.select_action.connect((self) => { 				string theme_file = self.get_name ();-				TabBar tb; 				Toolbox toolbox; 				 				Preferences.set ("theme", theme_file);@@ -76,17 +75,7 @@ public class ThemeTab : SettingsDisplay { 					e.redraw (); 				} 				-				Toolbox.redraw_tool_box ();-				-				GlyphCanvas.redraw ();-				-				tb = MainWindow.get_tab_bar ();-				tb.redraw (0, 0, tb.width, tb.height);-				-				OverViewItem.label_background = null;-				OverViewItem.selected_label_background = null;-				OverViewItem.label_background_no_menu = null;-				OverViewItem.selected_label_background_no_menu = null;+				redraw_ui (); 			}); 		 			select_theme.set_icon ("theme");@@ -140,6 +129,22 @@ public class ThemeTab : SettingsDisplay { 		} 	} +	public static void redraw_ui (){+		TabBar tb;+		+		Toolbox.redraw_tool_box ();		+				+		GlyphCanvas.redraw ();+				+		tb = MainWindow.get_tab_bar ();+		tb.redraw (0, 0, tb.width, tb.height);+			+		OverViewItem.label_background = null;+		OverViewItem.selected_label_background = null;+		OverViewItem.label_background_no_menu = null;+		OverViewItem.selected_label_background_no_menu = null;		+	}+	 	public static string get_label_from_file_name (string theme) { 		string label; 		diff --git a/scripts/version.py b/scripts/version.pyindex 431d805..cc91925 100644--- a/scripts/version.py+++ b/scripts/version.py@@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. """ -VERSION = '2.16.12'+VERSION = '2.17.0' SO_VERSION_MAJOR = '36' 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