Commit 5015063
Lock small segment in logging lock
Changed files (5)
modifiedlibbirdfont/BirdFont.valamodifiedlibbirdfont/ExportUtils.valamodifiedlibbirdfont/ImportUtils.valamodifiedlibbirdfont/OverviewTools.valamodifiedscripts/version.py
Diff
@@ -260,6 +260,16 @@ public class BirdFont { } } + public static bool has_logging () {+ bool log;+ + lock (BirdFont.logging) {+ log = BirdFont.logging;+ }+ + return log;+ }+ public static Argument get_arguments () { return args; }@@ -406,19 +416,17 @@ public class BirdFont { } public static void debug_message (string s) {- lock (BirdFont.logging) {- if (unlikely (BirdFont.logging)) {- try {- if (BirdFont.logstream != null) {- ((!)BirdFont.logstream).put_string (s);- } else {- warning ("No logstream.");- }- - stderr.printf (s);- } catch (GLib.Error e) {- warning (e.message);+ if (unlikely (has_logging ())) {+ try {+ if (BirdFont.logstream != null) {+ ((!)BirdFont.logstream).put_string (s);+ } else {+ warning ("No logstream."); }+ + stderr.printf (s);+ } catch (GLib.Error e) {+ warning (e.message); } } }@@ -11,8 +11,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. */-using BirdFont;- namespace BirdFont { static void print_export_help (string[] arg) {@@ -51,7 +49,7 @@ public static int run_export (string[] arg) { // FIXME: create a option for this and add structure the log messages - if (BirdFont.logging) {+ if (BirdFont.has_logging ()) { init_logfile (); } @@ -11,8 +11,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. */-using BirdFont;- namespace BirdFont { static void print_import_help (string[] arg) {@@ -128,11 +128,9 @@ public class OverviewTools : ToolCollection { transform.set_persistent (false); transform_expander.add_tool (transform); - if (BirdFont.has_argument ("--test")) {- Tool alternate = new Tool ("alternate", t_("Create alternate"));- alternate.select_action.connect (add_new_alternate);- glyph_expander.add_tool (alternate);- }+ Tool alternate = new Tool ("alternate", t_("Create alternate"));+ alternate.select_action.connect (add_new_alternate);+ glyph_expander.add_tool (alternate); expanders.add (font_name); expanders.add (zoom_expander);@@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. """ -VERSION = '2.12.0'+VERSION = '2.13.0-beta3' SO_VERSION_MAJOR = '36' SO_VERSION_MINOR = '0' SO_VERSION = SO_VERSION_MAJOR + '.' + SO_VERSION_MINOR