Commit 54c7876
windows url
Changed files (3)
modifiedlibbirdfont/LanguageSelectionTab.valamodifiedlibbirdfont/OverView.valamodifiedlibbirdfont/Preview.vala
Diff
@@ -21,13 +21,13 @@ public class LanguageSelectionTab : FontDisplay { TabBar tb = MainWindow.get_tab_bar (); set_prefered_character_set (val); tb.close_display (this);+ Toolbox.select_tool_by_name ("custom_character_set"); }); } /** @param iso_code language iso code. */ public static void set_prefered_character_set (string iso_code) {- Preferences.set ("language", iso_code);- Toolbox.select_tool_by_name ("custom_character_set"); + Preferences.set ("language", iso_code); } public override string get_name () {@@ -221,8 +221,8 @@ public class OverView : FontDisplay { unichar character; Glyph glyph; - items_per_row = (int) Math.floor (allocation.width / OverViewItem.full_width ());- rows = (int) Math.floor (allocation.height / OverViewItem.full_height ());+ items_per_row = (int) Math.ceil (allocation.width / OverViewItem.full_width ());+ rows = (int) Math.ceil (allocation.height / OverViewItem.full_height ()); while (visible_items.length () > 0) { visible_items.remove_link (visible_items.first ());@@ -279,6 +279,7 @@ public class OverView : FontDisplay { cr.save (); cr.set_source_rgba (1, 1, 1, 1); cr.rectangle (0, 0, allocation.width, allocation.height);+ cr.fill (); cr.restore (); // FIXME: cr.translate (view_offset_x, view_offset_y);@@ -46,5 +46,13 @@ public class Preview : FontDisplay { public override string get_uri () { return path_to_uri ((!) get_html_file ().get_path ()); }+ + public static string get_windows_uri () {+ Font font = BirdFont.get_current_font ();+ string html = @"$(font.get_name ()).html";+ File dir = font.get_folder ();+ File file = dir.get_child (html);+ return "file:///" + (!) file.get_path ();+ } } }