Package: espeakedit / 1.48.03-6

wx3.0-2.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From fcaf5d9012d8109f8ee13e79b71d876de4b3aa1b Mon Sep 17 00:00:00 2001
From: "Reece H. Dunn" <msclrhd@gmail.com>
Date: Sat, 16 Nov 2013 00:53:33 +0000
Subject: [PATCH 2/2] wxwidgets 3.0: move FONT_* construction to SpectFrame

When using wxWidgets 3.0, creating a wxFont requires the gtk+
library to be initialized. This is causing espeakedit to segfault.

SpectFrame::Draw is the only place where the FONT_* variables are
used, so move them into the SpectFrame class and create them in
the constructor.

Also, FONT_NORMAL is not used so it has been removed.
---
 src/espeakedit.cpp | 4 ----
 src/main.h         | 4 ----
 src/spect.cpp      | 3 +++
 src/spect.h        | 3 +++
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/spect.cpp b/src/spect.cpp
index 76afd29..60e2709 100644
--- a/src/spect.cpp
+++ b/src/spect.cpp
@@ -1,6 +1,7 @@
 /***************************************************************************
  *   Copyright (C) 2005 to 2007 by Jonathan Duddington                     *
  *   email: jonsd@users.sourceforge.net                                    *
+ *   Copyright (C) 2013 by Reece H. Dunn                                   *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -92,6 +93,8 @@ float SpectTilt(int value, int freq)
 
 
 SpectFrame::SpectFrame(SpectFrame *copy)
+	: FONT_SMALL(8,wxSWISS,wxNORMAL,wxNORMAL)
+	, FONT_MEDIUM(9,wxSWISS,wxNORMAL,wxNORMAL)
 {//=====================================
 
 	int  ix;